JSPM

@mann-conomy/tf-particle-effects

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q49357F
  • License MIT

A Node.js wrapper for Team Fortress 2's in-game particle effects.

Package Exports

  • @mann-conomy/tf-particle-effects
  • @mann-conomy/tf-particle-effects/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mann-conomy/tf-particle-effects) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

particle-effects

A Node.js wrapper for Team Fortress 2's in-game particle effects.

npm version npm downloads Node.js version GitHub actions GitHub license

Installation

Using npm:

$ npm install @mann-conomy/tf-particle-effects

Using yarn:

$ yarn add @mann-conomy/tf-particle-effects

Testing

Using npm:

$ npm test

Using yarn:

$ yarn test

Examples

Creating and evaluating Unusual particle effects from the Team Fortress 2 game files.

import { UnusualEffect } from "@mann-conomy/tf-particle-effects";

(async () => {
    try {
        // Create a new Unusual Effect to represent Burning Flames
        const effect = new UnusualEffect({ name: "Burning Flames" });

        // Evaluate the particle effect based on the provided name
        if (effect.eval()) {
            // Retrieve the effect's particle id and name
            const { id, name } = effect.find();

            console.log(id, name); // 13, Burning Flames
        }
    } catch (error) {
        console.error("Error processing effect", error.message);
    }
})();

Some more examples are available in the examples and test directories.

Documentation

See the Wiki pages for further documentation.

License

MIT

Copyright 2024, The Mann-Conomy Project