Interface IParticleSystem
animations: Animation[];
beginAnimationFrom: number;
beginAnimationLoop: boolean;
beginAnimationOnStart: boolean;
beginAnimationTo: number;
billboardMode: number;
blendMode: number;
color1: Color4;
color2: Color4;
colorDead: Color4;
defaultProjectionMatrix: Matrix;
disposeOnStop: boolean;
doNotSerialize?: boolean;
emitRate: number;
emitter: Nullable<AbstractMesh | Vector3>;
endSpriteCellID: number;
gravity: Vector3;
id: string;
indexBuffer: Nullable<DataBuffer>;
isAnimationSheetEnabled: boolean;
isBillboardBased: boolean;
isLocal: boolean;
isNodeGenerated: boolean;
layerMask: number;
limitVelocityDamping: number;
manualEmitCount: number;
maxAngularSpeed: number;
maxEmitPower: number;
maxInitialRotation: number;
maxLifeTime: number;
maxScaleX: number;
maxScaleY: number;
maxSize: number;
minAngularSpeed: number;
minEmitPower: number;
minInitialRotation: number;
minLifeTime: number;
minScaleX: number;
minScaleY: number;
minSize: number;
name: string;
noiseStrength: Vector3;
noiseTexture: Nullable<BaseTexture>;
onBeforeDrawParticlesObservable: Observable<Nullable<Effect>>;
onDisposeObservable: Observable<IParticleSystem>;
onStartedObservable: Observable<IParticleSystem>;
onStoppedObservable: Observable<IParticleSystem>;
particleEmitterType: Nullable<IParticleEmitterType>;
particleTexture: Nullable<BaseTexture>;
preWarmCycles: number;
preWarmStepOffset: number;
renderingGroupId: number;
snippetId: string;
spriteCellChangeSpeed: number;
spriteCellHeight: number;
spriteCellLoop: boolean;
spriteCellWidth: number;
spriteRandomStartCell: boolean;
startDelay: number;
startSpriteCellID: number;
targetStopDuration: number;
translationPivot: Vector2;
uniqueId: number;
updateInAnimate: boolean;
updateSpeed: number;
useLogarithmicDepth: boolean;
useRampGradients: boolean;
vertexBuffers: Immutable<{ [key: string]: VertexBuffer }>;
vertexShaderName: string;
addAlphaRemapGradient(
gradient: number,
min: number,
max: number,
): IParticleSystem;
addAngularSpeedGradient(
gradient: number,
factor: number,
factor2?: number,
): IParticleSystem;
addColorGradient(
gradient: number,
color1: Color4,
color2?: Color4,
): IParticleSystem;
addColorRemapGradient(
gradient: number,
min: number,
max: number,
): IParticleSystem;
addDragGradient(
gradient: number,
factor: number,
factor2?: number,
): IParticleSystem;
addEmitRateGradient(
gradient: number,
factor: number,
factor2?: number,
): IParticleSystem;
addLifeTimeGradient(
gradient: number,
factor: number,
factor2?: number,
): IParticleSystem;
addLimitVelocityGradient(
gradient: number,
factor: number,
factor2?: number,
): IParticleSystem;
addRampGradient(gradient: number, color: Color3): IParticleSystem;
addSizeGradient(
gradient: number,
factor: number,
factor2?: number,
): IParticleSystem;
addStartSizeGradient(
gradient: number,
factor: number,
factor2?: number,
): IParticleSystem;
addVelocityGradient(
gradient: number,
factor: number,
factor2?: number,
): IParticleSystem;
animate(): void;
clone(name: string, newEmitter: any): Nullable<IParticleSystem>;
createBoxEmitter(
direction1: Vector3,
direction2: Vector3,
minEmitBox: Vector3,
maxEmitBox: Vector3,
): BoxParticleEmitter;
createConeEmitter(radius: number, angle: number): ConeParticleEmitter;
createCylinderEmitter(
radius: number,
height: number,
radiusRange: number,
directionRandomizer: number,
): CylinderParticleEmitter;
createDirectedConeEmitter(
radius: number,
angle: number,
direction1: Vector3,
direction2: Vector3,
): ConeDirectedParticleEmitter;
createDirectedCylinderEmitter(
radius: number,
height: number,
radiusRange: number,
direction1: Vector3,
direction2: Vector3,
): CylinderDirectedParticleEmitter;
createDirectedSphereEmitter(
radius: number,
direction1: Vector3,
direction2: Vector3,
): SphereDirectedParticleEmitter;
createHemisphericEmitter(
radius: number,
radiusRange: number,
): HemisphericParticleEmitter;
createMeshEmitter(mesh: Nullable<AbstractMesh>): MeshParticleEmitter;
createPointEmitter(
direction1: Vector3,
direction2: Vector3,
): PointParticleEmitter;
createSphereEmitter(
radius: number,
radiusRange: number,
): SphereParticleEmitter;
dispose(
disposeTexture?: boolean,
disposeAttachedSubEmitters?: boolean,
disposeEndSubEmitters?: boolean,
): void;
fillDefines(
defines: string[],
blendMode: number,
fillImageProcessing?: boolean,
): void;
fillUniformsAttributesAndSamplerNames(
uniforms: string[],
attributes: string[],
samplers: string[],
): void;
forceRefreshGradients(): void;
getActiveCount(): number;
getAlphaRemapGradients(): Nullable<FactorGradient[]>;
getAngularSpeedGradients(): Nullable<FactorGradient[]>;
getCapacity(): number;
getClassName(): string;
getColorGradients(): Nullable<ColorGradient[]>;
getColorGradients(): Nullable<ColorGradient[]>;
getColorRemapGradients(): Nullable<FactorGradient[]>;
getCustomEffect(blendMode: number): Nullable<Effect>;
getDragGradients(): Nullable<FactorGradient[]>;
getEmitRateGradients(): Nullable<FactorGradient[]>;
getLifeTimeGradients(): Nullable<FactorGradient[]>;
getLimitVelocityGradients(): Nullable<FactorGradient[]>;
getRampGradients(): Nullable<Color3Gradient[]>;
getScene(): Nullable<Scene>;
getSizeGradients(): Nullable<FactorGradient[]>;
getStartSizeGradients(): Nullable<FactorGradient[]>;
getVelocityGradients(): Nullable<FactorGradient[]>;
isReady(): boolean;
isStarted(): boolean;
isStopping(): boolean;
rebuild(): void;
removeAngularSpeedGradient(gradient: number): IParticleSystem;
removeColorGradient(gradient: number): IParticleSystem;
removeDragGradient(gradient: number): IParticleSystem;
removeEmitRateGradient(gradient: number): IParticleSystem;
removeLifeTimeGradient(gradient: number): IParticleSystem;
removeLimitVelocityGradient(gradient: number): IParticleSystem;
removeSizeGradient(gradient: number): IParticleSystem;
removeStartSizeGradient(gradient: number): IParticleSystem;
removeVelocityGradient(gradient: number): IParticleSystem;
render(): number;
reset(): void;
serialize(serializeTexture: boolean): any;
setCustomEffect(effect: Nullable<Effect>, blendMode: number): void;
start(delay?: number): void;
stop(): void;
}
Implemented by
Index
Properties
Methods
Properties
animations
List of animations used by the particle system.
begin Animation From
Gets or sets the frame to start the animation from when beginAnimationOnStart is true
begin Animation Loop
Gets or sets a boolean indicating if animations must loop when beginAnimationOnStart is true
begin Animation On Start
Gets or sets a boolean indicating that hosted animations (in the system.animations array) must be started when system.start() is called
begin Animation To
Gets or sets the frame to end the animation on when beginAnimationOnStart is true
billboard Mode
Gets or sets the billboard mode to use when isBillboardBased = true. Value can be: ParticleSystem.BILLBOARDMODE_ALL, ParticleSystem.BILLBOARDMODE_Y, ParticleSystem.BILLBOARDMODE_STRETCHED
blend Mode
Blend mode use to render the particle. It can be any of the ParticleSystem.BLENDMODE_* constants
color1
Random color of each particle after it has been emitted, between color1 and color2 vectors.
color2
Random color of each particle after it has been emitted, between color1 and color2 vectors.
color Dead
Color the particle will have at the end of its lifetime.
default Projection Matrix
Gets or sets a matrix to use to compute projection
dispose On Stop
Specifies whether the particle system will be disposed once it reaches the end of the animation.
Optionaldo Not Serialize
Specifies if the particle system should be serialized
emit Rate
The maximum number of particles to emit per frame until we reach the activeParticleCount value
emitter
The emitter represents the Mesh or position we are attaching the particle system to.
end Sprite Cell ID
If using a spritesheet (isAnimationSheetEnabled) defines the last sprite cell to display
gravity
You can use gravity if you want to give an orientation to your particles.
id
The id of the Particle system.
index Buffer
Gets the index buffer used by the particle system (or null if no index buffer is used)
is Animation Sheet Enabled
Gets or sets a boolean indicating if a spritesheet is used to animate the particles texture
is Billboard Based
Gets or sets a boolean indicating if the particles must be rendered as billboard or aligned with the direction
is Local
Specifies if the particles are updated in emitter local space or world space
is Node Generated
Returns true if the particle system was generated by a node particle system set
layer Mask
The layer mask we are rendering the particles through.
limit Velocity Damping
Gets or sets a value indicating the damping to apply if the limit velocity factor is reached
manual Emit Count
If you want to launch only a few particles at once, that can be done, as well.
max Angular Speed
Maximum angular speed of emitting particles (Z-axis rotation for each particle).
max Emit Power
Maximum power of emitting particles.
max Initial Rotation
Gets or sets the maximal initial rotation in radians.
max Life Time
Maximum life time of emitting particles.
max Scale X
Maximum scale of emitting particles on X axis.
max Scale Y
Maximum scale of emitting particles on Y axis.
max Size
Maximum Size of emitting particles.
min Angular Speed
Minimum angular speed of emitting particles (Z-axis rotation for each particle).
min Emit Power
Minimum power of emitting particles.
min Initial Rotation
Gets or sets the minimal initial rotation in radians.
min Life Time
Minimum life time of emitting particles.
min Scale X
Minimum scale of emitting particles on X axis.
min Scale Y
Minimum scale of emitting particles on Y axis.
min Size
Minimum Size of emitting particles.
name
The name of the Particle system.
noise Strength
Gets or sets the strength to apply to the noise value (default is (10, 10, 10))
noise Texture
Gets or sets a texture used to add random noise to particle positions
on Before Draw Particles Observable
Observable that will be called just before the particles are drawn
on Dispose Observable
An event triggered when the system is disposed
on Started Observable
An event triggered when the system is started
on Stopped Observable
An event triggered when the system is stopped
particle Emitter Type
The particle emitter type defines the emitter used by the particle system. It can be for example box, sphere, or cone...
particle Texture
The texture used to render each particle. (this can be a spritesheet)
pre Warm Cycles
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 Offset
Gets or sets a value indicating the time step multiplier to use in pre-warm mode (default is 1)
rendering Group Id
The rendering group used by the Particle system to chose when to render.
snippet Id
Snippet ID if the particle system was created from the snippet server
sprite Cell Change Speed
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 Height
If using a spritesheet (isAnimationSheetEnabled), defines the sprite cell height to use
sprite Cell Loop
If using a spritesheet (isAnimationSheetEnabled), defines whether the sprite animation is looping
sprite Cell Width
If using a spritesheet (isAnimationSheetEnabled), defines the sprite cell width to use
sprite Random Start Cell
This allows the system to random pick the start cell ID between startSpriteCellID and endSpriteCellID
start Delay
Defines the delay in milliseconds before starting the system (0 by default)
start Sprite Cell ID
If using a spritesheet (isAnimationSheetEnabled) defines the first sprite cell to display
target Stop Duration
The amount of time the particle system is running (depends of the overall update speed).
translation Pivot
Gets or sets a Vector2 used to move the pivot (by default (0,0))
unique Id
Gets or sets the unique id of the particle system.
update In Animate
Indicates that the update of particles is done in the animate function (and not in render)
update Speed
The overall motion speed (0.01 is default update speed, faster updates = faster animation)
use Logarithmic Depth
Gets or sets a boolean enabling the use of logarithmic depth buffers, which is good for wide depth buffers.
use Ramp Gradients
Gets or sets a boolean indicating that ramp gradients must be used
vertex Buffers
Gets the vertex buffers used by the particle system
vertex Shader Name
Gets the name of the particle vertex shader
Methods
add Alpha Remap Gradient
-
Adds a new alpha remap gradient
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- min: number
defines the alpha remap minimal range
- max: number
defines the alpha remap maximal range
Returns IParticleSystem
the current particle system
- gradient: number
add Angular Speed Gradient
-
Adds a new angular speed gradient
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- factor: number
defines the angular speed to affect to the specified gradient
Optionalfactor2: numberdefines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
Returns IParticleSystem
the current particle system
- gradient: number
add Color Gradient
add Color Remap Gradient
-
Adds a new color remap gradient
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- min: number
defines the color remap minimal range
- max: number
defines the color remap maximal range
Returns IParticleSystem
the current particle system
- gradient: number
add Drag Gradient
-
Adds a new drag gradient
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- factor: number
defines the drag to affect to the specified gradient
Optionalfactor2: numberdefines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
Returns IParticleSystem
the current particle system
- gradient: number
add Emit Rate Gradient
-
Adds a new emit rate gradient (please note that this will only work if you set the targetStopDuration property)
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- factor: number
defines the emit rate to affect to the specified gradient
Optionalfactor2: numberdefines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
Returns IParticleSystem
the current particle system
- gradient: number
add Life Time Gradient
-
Adds a new life time gradient
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- factor: number
defines the life time factor to affect to the specified gradient
Optionalfactor2: numberdefines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
Returns IParticleSystem
the current particle system
- gradient: number
add Limit Velocity Gradient
-
Adds a new limit velocity gradient
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- factor: number
defines the limit velocity to affect to the specified gradient
Optionalfactor2: numberdefines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
Returns IParticleSystem
the current particle system
- gradient: number
add Ramp Gradient
-
Adds a new ramp gradient used to remap particle colors
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- color: Color3
defines the color to affect to the specified gradient
Returns IParticleSystem
the current particle system
- gradient: number
add Size Gradient
-
Adds a new size gradient
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- factor: number
defines the size factor to affect to the specified gradient
Optionalfactor2: numberdefines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
Returns IParticleSystem
the current particle system
- gradient: number
add Start Size Gradient
-
Adds a new start size gradient (please note that this will only work if you set the targetStopDuration property)
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- factor: number
defines the start size to affect to the specified gradient
Optionalfactor2: numberdefines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
Returns IParticleSystem
the current particle system
- gradient: number
add Velocity Gradient
-
Adds a new velocity gradient
Parameters
- gradient: number
defines the gradient to use (between 0 and 1)
- factor: number
defines the velocity to affect to the specified gradient
Optionalfactor2: numberdefines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
Returns IParticleSystem
the current particle system
- gradient: number
animate
-
Animates the particle system for this frame.
Returns void
clone
-
Clones the particle system.
Parameters
- name: string
The name of the cloned object
- newEmitter: any
The new emitter to use
Returns Nullable<IParticleSystem>
the cloned particle system
- name: string
create Box Emitter
-
createBoxEmitter(
direction1: Vector3,
direction2: Vector3,
minEmitBox: Vector3,
maxEmitBox: Vector3,
): BoxParticleEmitterCreates 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
- direction1: Vector3
create Cone Emitter
-
Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
Parameters
- radius: number
The radius of the cone to emit from
- angle: number
The base angle of the cone
Returns ConeParticleEmitter
the emitter
- radius: number
create Cylinder Emitter
-
createCylinderEmitter(
radius: number,
height: number,
radiusRange: number,
directionRandomizer: number,
): CylinderParticleEmitterCreates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)
Parameters
- radius: number
The radius of the emission cylinder
- height: number
The height of the emission cylinder
- radiusRange: number
The range of emission [0-1] 0 Surface only, 1 Entire Radius
- directionRandomizer: number
How much to randomize the particle direction [0-1]
Returns CylinderParticleEmitter
the emitter
- radius: number
create Directed Cone Emitter
-
createDirectedConeEmitter(
radius: number,
angle: number,
direction1: Vector3,
direction2: Vector3,
): ConeDirectedParticleEmitterReturns ConeDirectedParticleEmitter
create Directed Cylinder Emitter
-
createDirectedCylinderEmitter(
radius: number,
height: number,
radiusRange: number,
direction1: Vector3,
direction2: Vector3,
): CylinderDirectedParticleEmitterCreates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)
Parameters
- radius: number
The radius of the cylinder to emit from
- height: number
The height of the emission cylinder
- radiusRange: number
the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)
- direction1: Vector3
Particles are emitted between the direction1 and direction2 from within the cylinder
- direction2: Vector3
Particles are emitted between the direction1 and direction2 from within the cylinder
Returns CylinderDirectedParticleEmitter
the emitter
- radius: number
create Directed Sphere Emitter
-
createDirectedSphereEmitter(
radius: number,
direction1: Vector3,
direction2: Vector3,
): SphereDirectedParticleEmitterCreates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)
Parameters
Returns SphereDirectedParticleEmitter
the emitter
create Hemispheric Emitter
-
Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)
Parameters
- radius: number
The radius of the hemisphere to emit from
- radiusRange: number
The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
Returns HemisphericParticleEmitter
the emitter
- radius: number
create Mesh Emitter
-
Creates a Mesh Emitter for the particle system (emits from the surface of a mesh)
Parameters
- mesh: Nullable<AbstractMesh>
The mesh to use as the emitter source
Returns MeshParticleEmitter
the emitter
- mesh: Nullable<AbstractMesh>
create Point Emitter
-
Creates a Point Emitter for the particle system (emits directly from the emitter position)
Parameters
Returns PointParticleEmitter
the emitter
create Sphere Emitter
-
Creates a Sphere Emitter for the particle system (emits along the sphere radius)
Parameters
- radius: number
The radius of the sphere to emit from
- radiusRange: number
The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
Returns SphereParticleEmitter
the emitter
- radius: number
dispose
-
dispose(
disposeTexture?: boolean,
disposeAttachedSubEmitters?: boolean,
disposeEndSubEmitters?: boolean,
): voidDispose the particle system and frees its associated resources.
Parameters
OptionaldisposeTexture: booleandefines if the particle texture must be disposed as well (true by default)
OptionaldisposeAttachedSubEmitters: booleandefines if the attached sub-emitters must be disposed as well (false by default)
OptionaldisposeEndSubEmitters: booleandefines if the end type sub-emitters must be disposed as well (false by default)
Returns void
fill Defines
-
Fill the defines array according to the current settings of the particle system
Parameters
- defines: string[]
Array to be updated
- blendMode: number
blend mode to take into account when updating the array
OptionalfillImageProcessing: booleanfills the image processing defines
Returns void
- defines: string[]
fill Uniforms Attributes And Sampler Names
-
fillUniformsAttributesAndSamplerNames(
uniforms: string[],
attributes: string[],
samplers: string[],
): voidFill the uniforms, attributes and samplers arrays according to the current settings of the particle system
Parameters
- uniforms: string[]
Uniforms array to fill
- attributes: string[]
Attributes array to fill
- samplers: string[]
Samplers array to fill
Returns void
- uniforms: string[]
force Refresh Gradients
-
Force the system to rebuild all gradients that need to be resync
Returns void
get Active Count
-
Gets the number of particles active at the same time.
Returns number
The number of active particles.
get Alpha Remap Gradients
-
Gets the current list of alpha remap gradients. You must use addAlphaRemapGradient and removeAlphaRemapGradient to update this list
Returns Nullable<FactorGradient[]>
the list of alpha remap gradients
get Angular Speed Gradients
-
Gets the current list of angular speed gradients. You must use addAngularSpeedGradient and removeAngularSpeedGradient to update this list
Returns Nullable<FactorGradient[]>
the list of angular speed gradients
get Capacity
-
Gets the maximum number of particles active at the same time.
Returns number
The max number of active particles.
get Class Name
-
Returns the string "ParticleSystem"
Returns string
a string containing the class name
get Color Gradients
-
Gets the current list of color gradients. You must use addColorGradient and removeColorGradient to update this list
Returns Nullable<ColorGradient[]>
the list of color gradients
-
Gets the current list of color gradients. You must use addColorGradient and removeColorGradient to update this list
Returns Nullable<ColorGradient[]>
the list of color gradients
get Color Remap Gradients
-
Gets the current list of color remap gradients. You must use addColorRemapGradient and removeColorRemapGradient to update this list
Returns Nullable<FactorGradient[]>
the list of color remap gradients
get Custom Effect
get Drag Gradients
-
Gets the current list of drag gradients. You must use addDragGradient and removeDragGradient to update this list
Returns Nullable<FactorGradient[]>
the list of drag gradients
get Emit Rate Gradients
-
Gets the current list of emit rate gradients. You must use addEmitRateGradient and removeEmitRateGradient to update this list
Returns Nullable<FactorGradient[]>
the list of emit rate gradients
get Life Time Gradients
-
Gets the current list of life time gradients. You must use addLifeTimeGradient and removeLifeTimeGradient to update this list
Returns Nullable<FactorGradient[]>
the list of life time gradients
get Limit Velocity Gradients
-
Gets the current list of limit velocity gradients. You must use addLimitVelocityGradient and removeLimitVelocityGradient to update this list
Returns Nullable<FactorGradient[]>
the list of limit velocity gradients
get Ramp Gradients
-
Gets the current list of ramp gradients. You must use addRampGradient and removeRampGradient to update this list
Returns Nullable<Color3Gradient[]>
the list of ramp gradients
get Scene
get Size Gradients
-
Gets the current list of size gradients. You must use addSizeGradient and removeSizeGradient to update this list
Returns Nullable<FactorGradient[]>
the list of size gradients
get Start Size Gradients
-
Gets the current list of start size gradients. You must use addStartSizeGradient and removeStartSizeGradient to update this list
Returns Nullable<FactorGradient[]>
the list of start size gradients
get Velocity Gradients
-
Gets the current list of velocity gradients. You must use addVelocityGradient and removeVelocityGradient to update this list
Returns Nullable<FactorGradient[]>
the list of velocity gradients
is Ready
-
Is this system ready to be used/rendered
Returns boolean
true if the system is ready
is Started
-
Gets if the system has been started. (Note: this will still be true after stop is called)
Returns boolean
True if it has been started, otherwise false.
is Stopping
-
Gets a boolean indicating that the system is stopping
Returns boolean
true if the system is currently stopping
rebuild
-
Rebuild the particle system
Returns void
remove Angular Speed Gradient
-
Remove a specific angular speed gradient
Parameters
- gradient: number
defines the gradient to remove
Returns IParticleSystem
the current particle system
- gradient: number
remove Color Gradient
-
Remove a specific color gradient
Parameters
- gradient: number
defines the gradient to remove
Returns IParticleSystem
the current particle system
- gradient: number
remove Drag Gradient
-
Remove a specific drag gradient
Parameters
- gradient: number
defines the gradient to remove
Returns IParticleSystem
the current particle system
- gradient: number
remove Emit Rate Gradient
-
Remove a specific emit rate gradient
Parameters
- gradient: number
defines the gradient to remove
Returns IParticleSystem
the current particle system
- gradient: number
remove Life Time Gradient
-
Remove a specific life time gradient
Parameters
- gradient: number
defines the gradient to remove
Returns IParticleSystem
the current particle system
- gradient: number
remove Limit Velocity Gradient
-
Remove a specific limit velocity gradient
Parameters
- gradient: number
defines the gradient to remove
Returns IParticleSystem
the current particle system
- gradient: number
remove Size Gradient
-
Remove a specific size gradient
Parameters
- gradient: number
defines the gradient to remove
Returns IParticleSystem
the current particle system
- gradient: number
remove Start Size Gradient
-
Remove a specific start size gradient
Parameters
- gradient: number
defines the gradient to remove
Returns IParticleSystem
the current particle system
- gradient: number
remove Velocity Gradient
-
Remove a specific velocity gradient
Parameters
- gradient: number
defines the gradient to remove
Returns IParticleSystem
the current particle system
- gradient: number
render
-
Renders the particle system in its current state.
Returns number
the current number of particles
reset
-
Remove all active particles
Returns void
serialize
-
Serializes the particle system to a JSON object
Parameters
- serializeTexture: boolean
defines if the texture must be serialized as well
Returns any
the JSON object
- serializeTexture: boolean
set Custom Effect
start
-
Starts the particle system and begins to emit
Parameters
Optionaldelay: numberdefines the delay in milliseconds before starting the system (0 by default)
Returns void
stop
-
Stops the particle system.
Returns void
Interface representing a particle system in Babylon.js. This groups the common functionalities that needs to be implemented in order to create a particle system. A particle system represents a way to manage particles from their emission to their animation and rendering.