ParticleSystem Component Reference
This component is used to read Particle Resources data and perform a series of operations such as play, pause, destroy, etc.
How to create
ParticleSystem component can be created in the following two ways:
1. Create in the editor
Click the Add Component button at the bottom of the Properties panel and select ParticleSystem from Renderer Component to add the ParticleSystem component to the node.
2. Create in code
// Create a node
var node = new cc.Node();
// And add nodes to the scene
// And add particle components to Node
var particleSystem = node.adComponent(cc.ParticleSystem);
// Next you can particleSystem this object for a series of operations
Please refer to the script interface of the Particle System ParticleSystem API.
|Play particle in edit mode.
|Play On Load
|If set to true, the particle system will automatically start playing on onLoad.
|Auto Remove On Finish
|Indicate whether the owner node will be auto-removed when it has no particles left.
|The plist file.
|If set custom to true, then use custom properties instead of read particle file. When this property is turned on, you can customize the following part of the particle properties
|SpriteFrame of Particle System.
|How many seconds the emitter wil run. -1 means
|Emission rate of the particles.
|Life and variation of each particle setter.
|Maximum particles of the system.
|Start color of each particle.
|Start Color Var
|Variation of the start color.
|Ending color of each particle.
|End Color Var
|Variation of the end color.
|Angle and variation of each particle setter.
|Start size and variation in pixels of each particle.
|End size and variation in pixels of each particle.
|Start angle and variation of each particle.
|End angle and variation of each particle.
|Source position of the emitter.
|Variation of source position.
|Particles movement type. Including
GROUPED three types, refer to PositionType API for details.
|Particles emitter modes. Including
RADIUS three types, refer to EmitterMode API for details.
|Gravity of the emitter, which takes effect only when the Emitter Mode is set to
|Speed and variation of the emitter.
|Tangential acceleration and variation of each particle. Only available in
|Acceleration and variation of each particle. Only available in
|Rotation Is Dir
|Indicate whether the rotation of each particle equals to its direction. Only available in
|Starting radius and variation of the particles. Only available in
|Ending radius and variation of the particles. Only available in
|Rotate Per S
|Number of degress to rotate a particle around the source pos per second and variation. Only available in
|Src Blend Factor
|The source image blend mode. Refer to BlendFactor API for details.
|Dst Blend Factor
|The destination image blend mode. Refer to BlendFactor API for details.