| Package | org.flintparticles.actions |
| Class | public class BoundingBox |
| Inheritance | BoundingBox Action |
| Property | Defined by | ||
|---|---|---|---|
| bottom : Number
The left coordinate of the bounding box.
| BoundingBox | ||
| bounce : Number
The coefficient of restitution when the particles bounce off the
sides of the box.
| BoundingBox | ||
| box : Rectangle
The bounding box.
| BoundingBox | ||
| left : Number
The left coordinate of the bounding box.
| BoundingBox | ||
| right : Number
The left coordinate of the bounding box.
| BoundingBox | ||
| top : Number
The top coordinate of the bounding box.
| BoundingBox | ||
| Method | Defined by | ||
|---|---|---|---|
|
BoundingBox(left:Number, top:Number, right:Number, bottom:Number, bounce:Number = 1)
The constructor creates a BoundingBox action for use by
an emitter.
| BoundingBox | ||
![]() |
addedToEmitter(emitter:Emitter):void
The addedToEmitter method is called by the emitter when the Action is added to it
It is called within the emitter's addAction method and need not
be called by the user.
| Action | |
|
getDefaultPriority():Number
The getDefaultPriority method is used to order the execution of actions.
| BoundingBox | ||
![]() |
removedFromEmitter(emitter:Emitter):void
The removedFromEmitter method is called by the emitter when the Action is removed from it
It is called within the emitter's removeAction method and need not
be called by the user.
| Action | |
|
The update method is used by the emitter to apply the action
to every particle.
| BoundingBox | ||
| bottom | property |
bottom:Number [read-write]The left coordinate of the bounding box.
Implementation public function get bottom():Number
public function set bottom(value:Number):void
| bounce | property |
bounce:Number [read-write]The coefficient of restitution when the particles bounce off the sides of the box. A value of 1 gives a pure pure elastic collision, with no energy loss. A value between 0 and 1 causes the particle to loose enegy in the collision. A value greater than 1 causes the particle to gain energy in the collision.
Implementation public function get bounce():Number
public function set bounce(value:Number):void
| box | property |
box:Rectangle [read-write]The bounding box.
Implementation public function get box():Rectangle
public function set box(value:Rectangle):void
| left | property |
left:Number [read-write]The left coordinate of the bounding box.
Implementation public function get left():Number
public function set left(value:Number):void
| right | property |
right:Number [read-write]The left coordinate of the bounding box.
Implementation public function get right():Number
public function set right(value:Number):void
| top | property |
top:Number [read-write]The top coordinate of the bounding box.
Implementation public function get top():Number
public function set top(value:Number):void
| BoundingBox | () | constructor |
public function BoundingBox(left:Number, top:Number, right:Number, bottom:Number, bounce:Number = 1)The constructor creates a BoundingBox action for use by an emitter. To add a BoundingBox to all particles created by an emitter, use the emitter's addAction method.
Parametersleft:Number — The left coordinate of the box. The coordinates are in the
coordinate space of the object containing the emitter.
|
|
top:Number — The top coordinate of the box. The coordinates are in the
coordinate space of the object containing the emitter.
|
|
right:Number — The right coordinate of the box. The coordinates are in the
coordinate space of the object containing the emitter.
|
|
bottom:Number — The bottom coordinate of the box. The coordinates are in the
coordinate space of the object containing the emitter.
|
|
bounce:Number (default = 1) — The coefficient of restitution when the particles bounce off the
sides of the box. A value of 1 gives a pure elastic collision, with no energy loss.
A value between 0 and 1 causes the particle to loose enegy in the collision. A value
greater than 1 causes the particle to gain energy in the collision.
|
See also
| getDefaultPriority | () | method |
public override function getDefaultPriority():NumberThe getDefaultPriority method is used to order the execution of actions. It is called within the emitter's addAction method when the user doesn't manually set a priority. It need not be called directly by the user.
ReturnsNumber |
| update | () | method |
public override function update(emitter:Emitter, particle:Particle, time:Number):voidThe update method is used by the emitter to apply the action to every particle. It is called within the emitter's update loop and need not be called by the user.
Parametersemitter: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.
|