@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
<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)
}
/>
Package is licensed under the MIT License.