ParticleEmitter
ParticleEmitter : Instance
Overview
The ParticleEmitter class is used to create and control particle effects, which are essential for adding visual flair and dynamic elements to games.
Description
Particle emitters are a Lua class designed to manage particle emitters and their behavior within a game environment. This class inherits properties from its higher class, instances. The main role of this class is to create and control particle effects, manipulate individual particle characteristics, and interact with other game components to create dynamic visual representations, such as explosions or smoke.
Properties
Acceleration
Vector3
Acceleration is used to control the acceleration of emitted particles.
Code Samples
Brightness
number
Brightness determines how bright the particles look when visualized.
Code Samples
Color
ColorSequence
Color is a property of type ColorSequence in the ParticleEmitter class. ColorSequence defines a sequence of colors that can vary over the lifetime of particles
Code Samples
Drag
number
Drag represents a scalar value that determines how particles lose their speed through exponential decay over time. This property influences the motion and behavior of emitted particles, affecting how quickly they slow down or dissipate.
Code Samples
Enabled
bool
The Enabled property enables or disables the emission of particles depending on its boolean value (true or false).
Code Samples
EmissionDirection
Enum.NormalId
This property can be set to control the distribution of particles emitted from the emitter.
Code Samples
FlipbookFramerate
NumberRange
Flipbook Framerate controls the frame rate range of animated flipbook textures used by particles. This property allows the user to adjust the animation rate of flipbook textures according to the range values defined for each particle effect.
Code Samples
FlipbookLayout
Enum.ParticleFlipbookLayout
Enum.ParticleFlipbookLayout
It's associated with an enum type named Enum.ParticleFlipbookLayout that determines the layout of animation frames within a flipbook texture used during particle emission. This property can be set to various options such as None, Grid2x2, Grid4x4, and Grid8x8. The chosen value will affect the arrangement and display of animation frames as particles are emitted in the system.
Code Samples
FlipbookMode
Enum.ParticleFlipbookMode
FlipbookMode determines how particles transition through their texture frames. This property allows users to select between different modes like Loop, OneShot, PingPong, or Random to control the animation behavior and visual appearance of the particle system
Code Samples
FlipbookStartRandom
bool
It determines whether flipbook animations start randomly or follow a specific pattern when using the FlipbookMode property.
Code Samples
LightEmission
number
LightEmission controls how much particles' colors blend with the colors behind them.
Code Samples
Orientation
Enum.ParticleOrientation
The "Orientation" property determines orientarion of paticles.
Code Samples
Rate
number
Determines the number of particles emitted per second.
Code Samples
RotSpeed
number
Determines the rate at which the emitted particles rotate.
Code Samples
Rotation
NumberRange
Specifies the range of rotation of the emitted particles.
Code Samples
Shape
Enum.ParticleEmitterShape
It represents the desired shape for particle emission, allowing developers to select from various options such as box, sphere, cylinder, or disc.
Code Samples
ShapeInOut
Enum.ParticleEmitterShapeInOut
ShapeInOut determines how particles are emitted from the emitter shape based on three possible settings - outward only, inward only, or both directions simultaneously.
Code Samples
ShapeStyle
Enum.ParticleEmitterShapeStyle
ShapeStyle determines whether particles are emitted volumetrically or only on its surface.
Code Samples
Size
NumberSequence
Determines the size of the emitted particles. It is specified in Number Sequence form and can determine how the size changes over time.
Code Samples
Speed
NumberRange
Specifies the rate at which the particles are emitted. NumberRange type, which allows you to specify the range of the rate at which particles are emitted.
Code Samples
SpreadAngle
number
This property determines a random range of velocities or angles at which new particles are emitted.
Code Samples
Squash
NumberSequence
The Squash property uses NumberSequence data type, which is a sequence of numbers that can be controlled using curve data to allow non-uniform scaling of individual particles over time.
Code Samples
Texture
string
It represents an image or texture used for Particle effects
Code Samples
Transparency
NumberSequence
Transparency property is implemented using NumberSequence, which represents a sequence of numbers that can be used to control the transparency or opacity of particles over their individual lifetimes.
Code Samples
TextureContent
Content
Content serves as an interface for managing content related to textures used for particle effects.
Code Samples
Methods
Clear
The Clear
is used to clear all particles.
Parameters
Return
void
Code Samples
Emit
The Emit
method generates and emits a specified number of particles.
Parameters
number
particleCount
Return
void