| Package | org.flintparticles.threeD.actions |
| Class | public class Explosion |
| Inheritance | Explosion ActionBase Object |
| Implements | Resetable, FrameUpdatable |
| Property | Defined By | ||
|---|---|---|---|
| center : Vector3D
The center of the explosion. | Explosion | ||
| depth : Number
The strength of the explosion - larger numbers produce a stronger force. | Explosion | ||
| epsilon : Number
The minimum distance for which the explosion force is calculated. | Explosion | ||
| expansionRate : Number
The strength of the explosion - larger numbers produce a stronger force. | Explosion | ||
| power : Number
The strength of the explosion - larger numbers produce a stronger force. | Explosion | ||
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
| x : Number
The x coordinate of the center of the explosion. | Explosion | ||
| y : Number
The y coordinate of the center of the explosion. | Explosion | ||
| z : Number
The z coordinate of the center of the explosion. | Explosion | ||
| Method | Defined By | ||
|---|---|---|---|
Explosion(power:Number = 0, center:Vector3D = null, expansionRate:Number = 300, depth:Number = 10, epsilon:Number = 1)
The constructor creates an Explosion action for use by
an emitter. | Explosion | ||
addedToEmitter(emitter:Emitter):void [override]
Adds an UpdateOnFrame activity to the emitter to call this objects
frameUpdate method once per frame. | Explosion | ||
frameUpdate(emitter:Emitter, time:Number):void
Called every frame before the particles are updated. | Explosion | ||
removedFromEmitter(emitter:Emitter):void [override]
Removes the UpdateOnFrame activity that was added to the emitter in the
addedToEmitter method. | Explosion | ||
reset():void
Resets the explosion to its initial state, so it can start again. | Explosion | ||
[override]
Calculates the effect of the blast and shockwave on the particle at this
time. | Explosion | ||
| center | property |
center:Vector3DThe center of the explosion.
public function get center():Vector3D public function set center(value:Vector3D):void| depth | property |
depth:NumberThe strength of the explosion - larger numbers produce a stronger force.
public function get depth():Number public function set depth(value:Number):void| epsilon | property |
epsilon:NumberThe minimum distance for which the explosion force is calculated. Particles closer than this distance experience the explosion as it they were this distance away. This stops the explosion effect blowing up as distances get small.
public function get epsilon():Number public function set epsilon(value:Number):void| expansionRate | property |
expansionRate:NumberThe strength of the explosion - larger numbers produce a stronger force.
public function get expansionRate():Number public function set expansionRate(value:Number):void| power | property |
power:NumberThe strength of the explosion - larger numbers produce a stronger force.
public function get power():Number public function set power(value:Number):void| x | property |
x:NumberThe x coordinate of the center of the explosion.
public function get x():Number public function set x(value:Number):void| y | property |
y:NumberThe y coordinate of the center of the explosion.
public function get y():Number public function set y(value:Number):void| z | property |
z:NumberThe z coordinate of the center of the explosion.
public function get z():Number public function set z(value:Number):void| Explosion | () | Constructor |
public function Explosion(power:Number = 0, center:Vector3D = null, expansionRate:Number = 300, depth:Number = 10, epsilon:Number = 1)The constructor creates an Explosion action for use by an emitter. To add an Explosion to all particles created by an emitter, use the emitter's addAction method.
Parameterspower:Number (default = 0) — The strength of the explosion - larger numbers produce a stronger
force. (The scale of value has been altered from previous versions
so small numbers now produce a visible effect.)
| |
center:Vector3D (default = null) — The center of the explosion.
| |
expansionRate:Number (default = 300) — The rate at which the shockwave moves out from the explosion, in pixels per second.
| |
depth:Number (default = 10) — The depth (front-edge to back-edge) of the shock wave.
| |
epsilon:Number (default = 1) — The minimum distance for which the explosion force is calculated.
Particles closer than this distance experience the explosion as it they were
this distance away. This stops the explosion effect blowing up as distances get
small.
|
See also
| addedToEmitter | () | method |
override public function addedToEmitter(emitter:Emitter):voidAdds an UpdateOnFrame activity to the emitter to call this objects frameUpdate method once per frame.
Parameters
emitter:Emitter — The emitter this action has been added to.
|
See also
| frameUpdate | () | method |
public function frameUpdate(emitter:Emitter, time:Number):voidCalled every frame before the particles are updated. This method is called via the FrameUpdateable interface which is called by the emitter by using an UpdateOnFrame activity.
Parameters
emitter:Emitter | |
time:Number |
| removedFromEmitter | () | method |
override public function removedFromEmitter(emitter:Emitter):voidRemoves the UpdateOnFrame activity that was added to the emitter in the addedToEmitter method.
Parameters
emitter:Emitter — The emitter this action has been added to.
|
See also
| reset | () | method |
public function reset():voidResets the explosion to its initial state, so it can start again.
| update | () | method |
override public function update(emitter:Emitter, particle:Particle, time:Number):voidCalculates the effect of the blast and shockwave on the particle at this time.
This method is called by the emitter and need not be called by the user.
Parameters
emitter:Emitter — The Emitter that created the particle.
| |
particle:Particle — The particle to be updated.
| |
time:Number — The duration of the frame - used for time based updates.
|
See also