Skip to content

An attempt at replicating the ROBLOX ParticleEmitters as closely as possible in 2D UIs

Notifications You must be signed in to change notification settings

nuttolum/UIParticle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

UIParticle

An attempt at replicating the ROBLOX ParticleEmitters as closely as possible in 2D UIs

Installation

Create a new ModuleScript anywhere (preferably ReplicatedStorage) and paste the source code into it.

Usage

--Require the module
local UIParticleEmitter = require("path.to.ModuleScript")

--Create a new particle emitter, passing a hook (the UI equivalent of a ParticleEmitter's parent) and an element (the element that will represent a particle)
local emitter = UIParticleEmitter.new(hook, element)

--Assign some properties
emitter.Rate = 20
emitter.Acceleration = Vector2.new(15,15)
emitter.Color = Color3.new(0.5,0.5,1)

--Emit 50 particles
emitter:Emit(50)

--Enable the emitter
emitter.Enabled = true

About

An attempt at replicating the ROBLOX ParticleEmitters as closely as possible in 2D UIs

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages