-
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
A Node.js wrapper for Team Fortress 2's Unusual particle effects.
When you require()
the module, the isUnusual
, findEffectByName
, findEffectById
, getEffectImages
and getEffectImages
functions are returned.
This page lists all parameters and types available for each function.
However, you can also require individual functions and types exported by the module using destructuring.
Below is a CommonJS
example:
// Only require the getEffectImages function
const { getEffectImages } = require('unusual-effects');
A list of exported functions and types is available here.
Most of the functions use primitive JavaScript types, however, a few use custom interfaces to represent objects and have been made available through TypeScript imports.
-
effect
- Any Unusual effect name (string) or id (Number).
Returns true
if the effect
matches any known Unusual effect, otherwise false
.
-
effect
- The name of the Unusual effect.
Returns the id
matching the effect
parameter, otherwise null
.
-
id
- Theid
of the Unusual effect.
Returns the name
of the Unusual effect matching the id
parameter, otherwise null
.
-
effect
- Any Unusual effect name (string) or id (Number).
Returns an GetEffectImagesResponse object containing the effect's name
, id
and links to the particle effects
on Backpack.tf, otherwise null
.
-
item
- An EconItem object that represents an item within the Steam economy.
Returns an GetEffectFromObjectResponse object containing the effect's name
, standardized name
, id
and links to the particle effects
on Backpack.tf, otherwise null
.
For now, there are some examples available in the test directory.
Feel free to create an issue if you need to report any bugs or have a suggestion for a new feature.