API Docs for: v2.1.0
Show:

CGSGParticleEmitter Class

Extends CGSGNode
Module: ParticleSystem
Parent Module: Animation

A particle emitter for the cgSceneGraph Particle System

Constructor

CGSGParticleEmitter

(
  • nodeConstructor
  • region
  • nbParticlesMax
  • velocity
  • angle
  • speed
  • speedThreshold
  • outflow
)

Parameters:

Methods

_createParticle

(
  • index
)
private

create a new particle, and add it to the emitter

Parameters:

addForce

(
  • vector
  • ttl
)
Object public

Add a force to the emitter

Parameters:

Returns:

initParticle

(
  • particle
  • index
)
public

Parameters:

removeForce

(
  • force
)
public

Remove a previously added force

Parameters:

render

(
  • context
)
public

Parameters:

reset

() public

reset the animation

start

() public

start the animation

stop

() public

stop the animation

updateParticle

(
  • particle
)
Boolean public

Parameters:

Returns:

Properties

angle

Number

angle range of emission. a particle is emitted in the this.direction vector + or - this.angle/2 angle.

gravity

Object

Gravity Force added by default with the addForce method

nbParticlesMax

Number

number max of particles out of the emitter on 1 frame

onInitParticle

Function

Callback when reinit for 1 particle

Default: null

onInitParticlesEnd

Function

Callback when reinit all particles is done

Default: null

onUpdateParticleEnd

Function

Callback on end of update for 1 particle

Default: null

region

CGSGRegion

the region from where the particles are emitted

speed

Number

speed of a particle

speedThreshold

Number

threshold to randomize and add to the speed of a particle