@rbxts/react-particle-emitter
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

⚙ @rbxts/react-particle-emitter

📦 Installation

@rbxts/react-particle-emitter is available on NPM and can be installed with the following commands:

npm install @rbxts/react-particle-emitter
yarn add @rbxts/react-particle-emitter
pnpm add @rbxts/react-particle-emitter

⚡ Example

<ParticleEmitter
    position={UDim2.fromScale(0.5, 0.5)}
    images={["rbxassetid://15796004190"]}
    rate={20}
    getDirection={(_, id) => {
        const random = new Random(id);
        const x = random.NextNumber(-1, 1);
        const y = random.NextNumber(-1, 1);
        return new Vector2(x, y).Unit;
    }}
    lifetime={1.25}
    size={new Vector2(px(50), px(50))}
    getAngularVelocity={(time) =>
        clampedMap(time, 0.6, 1, math.random(-180, 180), 0)
    }
    getTransparency={(time) =>
        clampedMap(time, 0.5, 1, math.random(0, 5) * 0.1, 1)
    }
    getVelocity={(time, id) =>
        clampedMap(time, 0.5, 1, math.random(500, 650), 0)
    }
/>

📝 License

Package is licensed under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i @rbxts/react-particle-emitter

Weekly Downloads

7

Version

1.0.2

License

ISC

Unpacked Size

11.4 kB

Total Files

10

Last publish

Collaborators

  • g1mmeth3money