Extends
Members
duration :number
- Description:
- Duration of particle emission (in seconds), where -1 represents infinite emission.
- Source:
- Inherited From:
Duration of particle emission (in seconds), where -1 represents infinite emission.
Type:
- number
enabled :boolean
- Description:
- Flag indicating whether the emitter is running or not.
- Source:
- Inherited From:
Flag indicating whether the emitter is running or not.
Type:
- boolean
id :string
- Description:
- Unique identifier. Defaults to a generated UUID.
- Source:
- Inherited From:
Unique identifier. Defaults to a generated UUID.
Type:
- string
looping :boolean
- Description:
- Flag indicating whether a finite-duration emitter restarts when its time is up.
- Source:
- Inherited From:
Flag indicating whether a finite-duration emitter restarts when its time is up.
Type:
- boolean
particlesPerSecond :number
- Description:
- Continuous emission rate of new particles per second.
- Source:
- Inherited From:
Continuous emission rate of new particles per second.
Type:
- number
x :number
- Description:
- Current horizontal coordinate of the emitter origin.
- Source:
- Inherited From:
Current horizontal coordinate of the emitter origin.
Type:
- number
y :number
- Description:
- Current vertical coordinate of the emitter origin.
- Source:
- Inherited From:
Current vertical coordinate of the emitter origin.
Type:
- number
Methods
addModifier(modifier) → {void}
- Description:
- Registers a modifier to be applied to the particles emitted by the emitter.
- Source:
- Inherited From:
Parameters:
| Name | Type | Description |
|---|---|---|
modifier |
Modifier | Modifier instance to register. |
Returns:
- Type
- void
addScopedForce(force) → {void}
- Description:
- Registers a scoped emitter-specific force to be applied to the particles emitted by the emitter.
- Source:
- Inherited From:
Parameters:
| Name | Type | Description |
|---|---|---|
force |
Force | Force instance to register. |
Returns:
- Type
- void
initParticle(particle) → {void}
- Description:
- Extends the base initialization by positioning the particle at the coordinates of the emitter origin.
- Source:
- Overrides:
Parameters:
| Name | Type | Description |
|---|---|---|
particle |
Particle | Particle instance to initialize. |
Returns:
- Type
- void
update(dt) → {Array.<Particle>}
- Description:
- Updates the emitter's internal timer and returns any new particles to be emitted in the current frame.
- Source:
- Inherited From:
Parameters:
| Name | Type | Description |
|---|---|---|
dt |
number | Time elapsed since the last frame (in seconds). |
Returns:
An array of particles emitted this frame.
- Type
- Array.<Particle>