https://github.com/mann-conomy/tf-particle-effects
A Node.js wrapper for Team Fortress 2's in-game particle effects.
https://github.com/mann-conomy/tf-particle-effects
json localization mann-conomy nodejs particle-effects tf2 typescript
Last synced: about 1 month ago
JSON representation
A Node.js wrapper for Team Fortress 2's in-game particle effects.
- Host: GitHub
- URL: https://github.com/mann-conomy/tf-particle-effects
- Owner: Mann-Conomy
- License: mit
- Created: 2024-05-04T16:24:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-14T20:31:32.000Z (about 2 months ago)
- Last Synced: 2025-04-14T21:35:08.386Z (about 2 months ago)
- Topics: json, localization, mann-conomy, nodejs, particle-effects, tf2, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@mann-conomy/tf-particle-effects
- Size: 258 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tf-particle-effects
A Node.js wrapper for Team Fortress 2's in-game particle effects.
[](https://npmjs.com/package/@mann-conomy/tf-particle-effects)
[](https://npmjs.com/package/@mann-conomy/tf-particle-effects)
[](https://nodejs.org/en/about/releases/)
[](https://github.com/Mann-Conomy/tf-particle-effects/blob/main/.github/workflows/test.yml)
[](https://github.com/Mann-Conomy/tf-particle-effects/blob/main/LICENSE)## Installation
Using [npm](https://www.npmjs.com/package/@mann-conomy/tf-particle-effects):
```bash
$ npm install @mann-conomy/tf-particle-effects
```Using [yarn](https://yarnpkg.com/package/@mann-conomy/tf-particle-effects):
```bash
$ yarn add @mann-conomy/tf-particle-effects
```## Testing
Using [npm](https://docs.npmjs.com/cli/v8/commands/npm-run-script):
```bash
$ npm test
```Using [yarn](https://classic.yarnpkg.com/lang/en/docs/cli/run/):
```bash
$ yarn test
```## Examples
Creating and evaluating Unusual particle effects from the Team Fortress 2 game files.
```js
import { UnusualEffect } from "@mann-conomy/tf-particle-effects";try {
// Create a new Unusual effect to represent Burning Flames
const effect = new UnusualEffect({ name: "Burning Flames" });// Evaluate the Unusual effect based on the provided name
if (effect.eval()) {
// Retrieve the Unusal effect's particle id and name
const { id, name } = effect.find();console.log(id, name); // 13, Burning Flames
}
} catch (error) {
console.error("Error processing Unusual effect", error.message);
}
```Want to keep things simple without class instantiation? Opt for the static functions instead!
```js
import { KillstreakEffect } from "@mann-conomy/tf-particle-effects";try {
// Create a new Killstreak effect to represent Singularity
const effect = { id: 2006 };// Evaluate the Killstreak effect based on the provided id
if (KillstreakEffect.eval(effect)) {
// Retrieve the Killstreak effect's name
const { name } = KillstreakEffect.find(effect);console.log("Killstreaker:", name); // Killstreaker: Singularity
}
} catch (error) {
console.error("Error processing Killstreak effect", error.message);
}
```Some more examples are available in the [examples](https://github.com/Mann-Conomy/tf-particle-effects/tree/main/examples) and [test](https://github.com/Mann-Conomy/tf-particle-effects/tree/main/test) directories.
## Documentation
See the [Wiki pages](https://github.com/Mann-Conomy/tf-particle-effects/wiki) for further documentation.
## License
[MIT](LICENSE)
Copyright 2025, The Mann-Conomy Project