Skip to content

wad4444/react-particle-emitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚙ @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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published