| Package | org.flintparticles.common.counters |
| Class | public class TimePeriod |
| Implements | Counter |
See also
| Property | Defined by | ||
|---|---|---|---|
| complete : Boolean [read-only]
Indicates if the counter has emitted all its particles.
| TimePeriod | ||
| duration : Number
The duration of the time period.
| TimePeriod | ||
| easing : Function
An easing function used to distribute the emission of the
particles over the time period.
| TimePeriod | ||
| numParticles : uint
The number of particles to emit over the full duration
of the time period.
| TimePeriod | ||
| Method | Defined by | ||
|---|---|---|---|
|
TimePeriod(numParticles:uint = 0, duration:Number = 0, easing:Function = null)
The constructor creates a TimePeriod counter for use by an emitter.
| TimePeriod | ||
|
resume():void
Resumes the emitter after a stop
| TimePeriod | ||
|
startEmitter(emitter:Emitter):uint
Initilizes the counter.
| TimePeriod | ||
|
stop():void
Stops the emitter from emitting particles
| TimePeriod | ||
|
updateEmitter(emitter:Emitter, time:Number):uint
Uses the time, timePeriod and easing function to calculate how many
particles the emitter should emit now.
| TimePeriod | ||
| complete | property |
complete:Boolean [read-only]Indicates if the counter has emitted all its particles.
Implementation public function get complete():Boolean
| duration | property |
duration:Number [read-write]The duration of the time period. After this time is up the emitter will not release any more particles.
Implementation public function get duration():Number
public function set duration(value:Number):void
| easing | property |
easing:Function [read-write]An easing function used to distribute the emission of the particles over the time period.
Implementation public function get easing():Function
public function set easing(value:Function):void
| numParticles | property |
numParticles:uint [read-write]The number of particles to emit over the full duration of the time period.
Implementation public function get numParticles():uint
public function set numParticles(value:uint):void
| TimePeriod | () | constructor |
public function TimePeriod(numParticles:uint = 0, duration:Number = 0, easing:Function = null)The constructor creates a TimePeriod counter for use by an emitter. To add a TimePeriod counter to an emitter use the emitter's counter property.
ParametersnumParticles:uint (default = 0) — The number of particles to emit over the full duration
of the time period
|
|
duration:Number (default = 0) — The duration of the time period. After this time is up the
emitter will not release any more particles.
|
|
easing:Function (default = null) — An easing function used to distribute the emission of the
particles over the time period. If no easing function is passed a simple
linear distribution is used in which particles are emitted at a constant
rate over the time period.
|
See also
| resume | () | method |
public function resume():voidResumes the emitter after a stop
| startEmitter | () | method |
public function startEmitter(emitter:Emitter):uintInitilizes the counter. Returns 0 to indicate that the emitter should emit no particles when it starts.
This method is called within the emitter's start method and need not be called by the user.
Parametersemitter:Emitter — The emitter.
|
uint — 0
|
See also
| stop | () | method |
public function stop():voidStops the emitter from emitting particles
| updateEmitter | () | method |
public function updateEmitter(emitter:Emitter, time:Number):uintUses the time, timePeriod and easing function to calculate how many particles the emitter should emit now.
This method is called within the emitter's update loop and need not be called by the user.
Parametersemitter:Emitter — The emitter.
|
|
time:Number — The time, in seconds, since the previous call to this method.
|
uint — the number of particles the emitter should create.
|
See also