| Package | org.flintparticles.common.counters |
| Class | public class TimePeriod |
| Inheritance | TimePeriod Object |
| 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 | ||
| running : Boolean [read-only]
Indicates if the counter is currently emitting particles
| 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.
public function get complete():Boolean| duration | property |
duration:NumberThe duration of the time period. After this time is up the emitter will not release any more particles.
public function get duration():Number public function set duration(value:Number):void| easing | property |
easing:FunctionAn easing function used to distribute the emission of the particles over the time period.
public function get easing():Function public function set easing(value:Function):void| numParticles | property |
numParticles:uintThe number of particles to emit over the full duration of the time period.
public function get numParticles():uint public function set numParticles(value:uint):void| running | property |
running:Boolean [read-only] Indicates if the counter is currently emitting particles
public function get running():Boolean| 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.
Parameters
emitter: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.
Parameters
emitter: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