Class BaseParticleSystem
Hierarchy
- BaseParticleSystem
Index
Constructors
Properties
- animations
- begin
Animation From - begin
Animation Loop - begin
Animation OnStart - begin
Animation To - billboard
Mode - blend
Mode - color1
- color2
- color
Dead - custom
Shader - dispose
OnStop - emit
Rate - emitter
- end
Sprite CellID - force
Depth Write - gravity
- id
- layer
Mask - limit
Velocity Damping - manual
Emit Count - max
Angular Speed - max
Emit Power - max
Initial Rotation - max
Life Time - max
ScaleX - max
ScaleY - max
Size - min
Angular Speed - min
Emit Power - min
Initial Rotation - min
Life Time - min
ScaleX - min
ScaleY - min
Size - name
- noise
Strength - on
Animation End - particle
Emitter Type - particle
Texture - pre
Warm Cycles - pre
Warm Step Offset - prevent
Auto Start - rendering
Group Id - snippet
Id - sprite
Cell Change Speed - sprite
Cell Height - sprite
Cell Width - sprite
Random Start Cell - start
Delay - start
Sprite CellID - target
Stop Duration - texture
Mask - translation
Pivot - unique
Id - update
Speed - world
Offset - BLENDMODE_
ADD - BLENDMODE_
MULTIPLY - BLENDMODE_
MULTIPLYADD - BLENDMODE_
ONEONE - BLENDMODE_
STANDARD
Accessors
Methods
- create
Box Emitter - create
Cone Emitter - create
Cylinder Emitter - create
Directed Cylinder Emitter - create
Directed Sphere Emitter - create
Hemispheric Emitter - create
Point Emitter - create
Sphere Emitter - get
Alpha Remap Gradients - get
Angular Speed Gradients - get
Color Gradients - get
Color Remap Gradients - get
Drag Gradients - get
Emit Rate Gradients - get
Life Time Gradients - get
Limit Velocity Gradients - get
Scene - get
Size Gradients - get
Start Size Gradients - get
Velocity Gradients
Constructors
constructor
-
Instantiates a particle system. Particles are often small sprites used to simulate hard-to-reproduce phenomena like fire, smoke, water, or abstract visual effects like magic glitter and faery dust.
Parameters
-
name: string
The name of the particle system
Returns BaseParticleSystem
-
Properties
animationsSearch playground for animations
List of animations used by the particle system.
begin Animation FromSearch playground for beginAnimationFrom
Gets or sets the frame to start the animation from when beginAnimationOnStart is true
begin Animation LoopSearch playground for beginAnimationLoop
Gets or sets a boolean indicating if animations must loop when beginAnimationOnStart is true
begin Animation OnStartSearch playground for beginAnimationOnStart
Gets or sets a boolean indicating that hosted animations (in the system.animations array) must be started when system.start() is called
begin Animation ToSearch playground for beginAnimationTo
Gets or sets the frame to end the animation on when beginAnimationOnStart is true
billboard ModeSearch playground for billboardMode
Gets or sets the billboard mode to use when isBillboardBased = true. Value can be: ParticleSystem.BILLBOARDMODE_ALL, ParticleSystem.BILLBOARDMODE_Y, ParticleSystem.BILLBOARDMODE_STRETCHED
blend ModeSearch playground for blendMode
Blend mode use to render the particle, it can be either ParticleSystem.BLENDMODE_ONEONE or ParticleSystem.BLENDMODE_STANDARD.
color1Search playground for color1
Random color of each particle after it has been emitted, between color1 and color2 vectors
color2Search playground for color2
Random color of each particle after it has been emitted, between color1 and color2 vectors
color DeadSearch playground for colorDead
Color the particle will have at the end of its lifetime
custom ShaderSearch playground for customShader
This can help using your own shader to render the particle system. The according effect will be created
dispose OnStopSearch playground for disposeOnStop
Specifies whether the particle system will be disposed once it reaches the end of the animation.
emit RateSearch playground for emitRate
The maximum number of particles to emit per frame
emitterSearch playground for emitter
The emitter represents the Mesh or position we are attaching the particle system to.
end Sprite CellIDSearch playground for endSpriteCellID
If using a spritesheet (isAnimationSheetEnabled) defines the last sprite cell to display
force Depth WriteSearch playground for forceDepthWrite
Forces the particle to write their depth information to the depth buffer. This can help preventing other draw calls to override the particles.
gravitySearch playground for gravity
You can use gravity if you want to give an orientation to your particles.
idSearch playground for id
The id of the Particle system.
layer MaskSearch playground for layerMask
The layer mask we are rendering the particles through.
limit Velocity DampingSearch playground for limitVelocityDamping
Gets or sets a value indicating the damping to apply if the limit velocity factor is reached
manual Emit CountSearch playground for manualEmitCount
If you want to launch only a few particles at once, that can be done, as well.
max Angular SpeedSearch playground for maxAngularSpeed
Maximum angular speed of emitting particles (Z-axis rotation for each particle).
max Emit PowerSearch playground for maxEmitPower
Maximum power of emitting particles.
max Initial RotationSearch playground for maxInitialRotation
Gets or sets the maximal initial rotation in radians.
max Life TimeSearch playground for maxLifeTime
Maximum life time of emitting particles.
max ScaleXSearch playground for maxScaleX
Maximum scale of emitting particles on X axis.
max ScaleYSearch playground for maxScaleY
Maximum scale of emitting particles on Y axis.
max SizeSearch playground for maxSize
Maximum Size of emitting particles.
min Angular SpeedSearch playground for minAngularSpeed
Minimum angular speed of emitting particles (Z-axis rotation for each particle).
min Emit PowerSearch playground for minEmitPower
Minimum power of emitting particles.
min Initial RotationSearch playground for minInitialRotation
Gets or sets the minimal initial rotation in radians.
min Life TimeSearch playground for minLifeTime
Minimum life time of emitting particles.
min ScaleXSearch playground for minScaleX
Minimum scale of emitting particles on X axis.
min ScaleYSearch playground for minScaleY
Minimum scale of emitting particles on Y axis.
min SizeSearch playground for minSize
Minimum Size of emitting particles.
nameSearch playground for name
The friendly name of the Particle system.
noise StrengthSearch playground for noiseStrength
Gets or sets the strength to apply to the noise value (default is (10, 10, 10))
on Animation EndSearch playground for onAnimationEnd
Callback triggered when the particle animation is ending.
particle Emitter TypeSearch playground for particleEmitterType
The particle emitter type defines the emitter used by the particle system. It can be for example box, sphere, or cone...
particle TextureSearch playground for particleTexture
The texture used to render each particle. (this can be a spritesheet)
pre Warm CyclesSearch playground for preWarmCycles
Gets or sets a value indicating how many cycles (or frames) must be executed before first rendering (this value has to be set before starting the system). Default is 0
pre Warm Step OffsetSearch playground for preWarmStepOffset
Gets or sets a value indicating the time step multiplier to use in pre-warm mode (default is 1)
prevent Auto StartSearch playground for preventAutoStart
By default particle system starts as soon as they are created. This prevents the automatic start to happen and let you decide when to start emitting particles.
rendering Group IdSearch playground for renderingGroupId
The rendering group used by the Particle system to chose when to render.
snippet IdSearch playground for snippetId
Snippet ID if the particle system was created from the snippet server
sprite Cell Change SpeedSearch playground for spriteCellChangeSpeed
If using a spritesheet (isAnimationSheetEnabled) defines the speed of the sprite loop (default is 1 meaning the animation will play once during the entire particle lifetime)
sprite Cell HeightSearch playground for spriteCellHeight
If using a spritesheet (isAnimationSheetEnabled), defines the sprite cell height to use
sprite Cell WidthSearch playground for spriteCellWidth
If using a spritesheet (isAnimationSheetEnabled), defines the sprite cell width to use
sprite Random Start CellSearch playground for spriteRandomStartCell
This allows the system to random pick the start cell ID between startSpriteCellID and endSpriteCellID
start DelaySearch playground for startDelay
Defines the delay in milliseconds before starting the system (0 by default)
start Sprite CellIDSearch playground for startSpriteCellID
If using a spritesheet (isAnimationSheetEnabled) defines the first sprite cell to display
target Stop DurationSearch playground for targetStopDuration
The amount of time the particle system is running (depends of the overall update speed).
texture MaskSearch playground for textureMask
An optional mask to filter some colors out of the texture, or filter a part of the alpha channel
translation PivotSearch playground for translationPivot
Gets or sets a Vector2 used to move the pivot (by default (0,0))
unique IdSearch playground for uniqueId
Gets or sets the unique id of the particle system
update SpeedSearch playground for updateSpeed
The overall motion speed (0.01 is default update speed, faster updates = faster animation)
world OffsetSearch playground for worldOffset
Gets or sets a world offset applied to all particles
Static BLENDMODE_ ADDSearch playground for BLENDMODE_ADD
Add current color and particle color multiplied by particle’s alpha
Static BLENDMODE_ MULTIPLYSearch playground for BLENDMODE_MULTIPLY
Multiply current color with particle color
Static BLENDMODE_ MULTIPLYADDSearch playground for BLENDMODE_MULTIPLYADD
Multiply current color with particle color then add current color and particle color multiplied by particle’s alpha
Static BLENDMODE_ ONEONESearch playground for BLENDMODE_ONEONE
Source color is added to the destination color without alpha affecting the result
Static BLENDMODE_ STANDARDSearch playground for BLENDMODE_STANDARD
Blend current color and particle color using particle’s alpha
Accessors
direction1
-
Random direction of each particle after it has been emitted, between direction1 and direction2 vectors. This only works when particleEmitterTyps is a BoxParticleEmitter
Returns Vector3
-
Random direction of each particle after it has been emitted, between direction1 and direction2 vectors. This only works when particleEmitterTyps is a BoxParticleEmitter
Parameters
-
value: Vector3
Returns any
-
direction2
-
Random direction of each particle after it has been emitted, between direction1 and direction2 vectors. This only works when particleEmitterTyps is a BoxParticleEmitter
Returns Vector3
-
Random direction of each particle after it has been emitted, between direction1 and direction2 vectors. This only works when particleEmitterTyps is a BoxParticleEmitter
Parameters
-
value: Vector3
Returns any
-
image Processing Configuration
-
Gets the image processing configuration used either in this material.
If sets to null, the scene one is in use.
Returns Nullable<ImageProcessingConfiguration>
-
Sets the Default image processing configuration used either in the this material.
If sets to null, the scene one is in use.
Parameters
-
value: Nullable<ImageProcessingConfiguration>
Returns any
-
is Animation Sheet Enabled
-
Gets or sets whether an animation sprite sheet is enabled or not on the particle system
Returns boolean
-
Gets or sets whether an animation sprite sheet is enabled or not on the particle system
Parameters
-
value: boolean
Returns any
-
is Billboard Based
-
Gets or sets a boolean indicating if the particles must be rendered as billboard or aligned with the direction
Returns boolean
-
Gets or sets a boolean indicating if the particles must be rendered as billboard or aligned with the direction
Parameters
-
value: boolean
Returns any
-
max Emit Box
-
Maximum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so. This only works when particleEmitterTyps is a BoxParticleEmitter
Returns Vector3
-
Maximum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so. This only works when particleEmitterTyps is a BoxParticleEmitter
Parameters
-
value: Vector3
Returns any
-
min Emit Box
-
Minimum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so. This only works when particleEmitterTyps is a BoxParticleEmitter
Returns Vector3
-
Minimum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so. This only works when particleEmitterTyps is a BoxParticleEmitter
Parameters
-
value: Vector3
Returns any
-
noise Texture
-
Gets or sets a texture used to add random noise to particle positions
Returns Nullable<ProceduralTexture>
-
Gets or sets a texture used to add random noise to particle positions
Parameters
-
value: Nullable<ProceduralTexture>
Returns any
-
Methods
create Box EmitterSearch playground for createBoxEmitter
-
Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)
Parameters
-
direction1: Vector3
Particles are emitted between the direction1 and direction2 from within the box
-
direction2: Vector3
Particles are emitted between the direction1 and direction2 from within the box
-
minEmitBox: Vector3
Particles are emitted from the box between minEmitBox and maxEmitBox
-
maxEmitBox: Vector3
Particles are emitted from the box between minEmitBox and maxEmitBox
Returns BoxParticleEmitter
the emitter
-
create Cone EmitterSearch playground for createConeEmitter
-
Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
Parameters
-
Optional radius: number
The radius of the cone to emit from
-
Optional angle: number
The base angle of the cone
Returns ConeParticleEmitter
the emitter
-
create Cylinder EmitterSearch playground for createCylinderEmitter
-
Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)
Parameters
-
Optional radius: number
The radius of the emission cylinder
-
Optional height: number
The height of the emission cylinder
-
Optional radiusRange: number
The range of emission [0-1] 0 Surface only, 1 Entire Radius
-
Optional directionRandomizer: number
How much to randomize the particle direction [0-1]
Returns CylinderParticleEmitter
the emitter
-
create Directed Cylinder EmitterSearch playground for createDirectedCylinderEmitter
-
Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)
Parameters
-
Optional radius: number
The radius of the cylinder to emit from
-
Optional height: number
The height of the emission cylinder
-
Optional radiusRange: number
the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)
-
Optional direction1: Vector3
Particles are emitted between the direction1 and direction2 from within the cylinder
-
Optional direction2: Vector3
Particles are emitted between the direction1 and direction2 from within the cylinder
Returns CylinderDirectedParticleEmitter
the emitter
-
create Directed Sphere EmitterSearch playground for createDirectedSphereEmitter
-
Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)
Parameters
-
Optional radius: number
The radius of the sphere to emit from
-
Optional direction1: Vector3
Particles are emitted between the direction1 and direction2 from within the sphere
-
Optional direction2: Vector3
Particles are emitted between the direction1 and direction2 from within the sphere
Returns SphereDirectedParticleEmitter
the emitter
-
create Hemispheric EmitterSearch playground for createHemisphericEmitter
-
Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)
Parameters
-
Optional radius: number
The radius of the hemisphere to emit from
-
Optional radiusRange: number
The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
Returns HemisphericParticleEmitter
the emitter
-
create Point EmitterSearch playground for createPointEmitter
-
Creates a Point Emitter for the particle system (emits directly from the emitter position)
Parameters
-
direction1: Vector3
Particles are emitted between the direction1 and direction2 from within the box
-
direction2: Vector3
Particles are emitted between the direction1 and direction2 from within the box
Returns PointParticleEmitter
the emitter
-
create Sphere EmitterSearch playground for createSphereEmitter
-
Creates a Sphere Emitter for the particle system (emits along the sphere radius)
Parameters
-
Optional radius: number
The radius of the sphere to emit from
-
Optional radiusRange: number
The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
Returns SphereParticleEmitter
the emitter
-
get Alpha Remap GradientsSearch playground for getAlphaRemapGradients
-
Gets the current list of alpha remap gradients. You must use addAlphaRemapGradient and removeAlphaRemapGradient to udpate this list
Returns Nullable<Array<FactorGradient>>
the list of alpha remap gradients
get Angular Speed GradientsSearch playground for getAngularSpeedGradients
-
Gets the current list of angular speed gradients. You must use addAngularSpeedGradient and removeAngularSpeedGradient to udpate this list
Returns Nullable<Array<FactorGradient>>
the list of angular speed gradients
get Color GradientsSearch playground for getColorGradients
-
Gets the current list of color gradients. You must use addColorGradient and removeColorGradient to udpate this list
Returns Nullable<Array<ColorGradient>>
the list of color gradients
get Color Remap GradientsSearch playground for getColorRemapGradients
-
Gets the current list of color remap gradients. You must use addColorRemapGradient and removeColorRemapGradient to udpate this list
Returns Nullable<Array<FactorGradient>>
the list of color remap gradients
get Drag GradientsSearch playground for getDragGradients
-
Gets the current list of drag gradients. You must use addDragGradient and removeDragGradient to udpate this list
Returns Nullable<Array<FactorGradient>>
the list of drag gradients
get Emit Rate GradientsSearch playground for getEmitRateGradients
-
Gets the current list of emit rate gradients. You must use addEmitRateGradient and removeEmitRateGradient to udpate this list
Returns Nullable<Array<FactorGradient>>
the list of emit rate gradients
get Life Time GradientsSearch playground for getLifeTimeGradients
-
Gets the current list of life time gradients. You must use addLifeTimeGradient and removeLifeTimeGradient to udpate this list
Returns Nullable<Array<FactorGradient>>
the list of life time gradients
get Limit Velocity GradientsSearch playground for getLimitVelocityGradients
-
Gets the current list of limit velocity gradients. You must use addLimitVelocityGradient and removeLimitVelocityGradient to udpate this list
Returns Nullable<Array<FactorGradient>>
the list of limit velocity gradients
get SceneSearch playground for getScene
get Size GradientsSearch playground for getSizeGradients
-
Gets the current list of size gradients. You must use addSizeGradient and removeSizeGradient to udpate this list
Returns Nullable<Array<FactorGradient>>
the list of size gradients
get Start Size GradientsSearch playground for getStartSizeGradients
-
Gets the current list of start size gradients. You must use addStartSizeGradient and removeStartSizeGradient to udpate this list
Returns Nullable<Array<FactorGradient>>
the list of start size gradients
get Velocity GradientsSearch playground for getVelocityGradients
-
Gets the current list of velocity gradients. You must use addVelocityGradient and removeVelocityGradient to udpate this list
Returns Nullable<Array<FactorGradient>>
the list of velocity gradients
This represents the base class for particle system in Babylon. Particles are often small sprites used to simulate hard-to-reproduce phenomena like fire, smoke, water, or abstract visual effects like magic glitter and faery dust. Particles can take different shapes while emitted like box, sphere, cone or you can write your custom function.
https://doc.babylonjs.com/babylon101/particles