| Package | com.desuade.motion.physics |
| Class | public class PrimitivePhysics |
| Inheritance | PrimitivePhysics BasePrimitive Object |
| Language Version : | ActionScript 3 |
| Since : | 29.07.2009 |
| Runtime Versions : | AIR 1.0, Flash Player 9.0.0 |
| Property | Defined By | ||
|---|---|---|---|
| acceleration : Number
The acceleration of the property. | PrimitivePhysics | ||
| duration : int = 0
How long the physics calculations should be applied for. | PrimitivePhysics | ||
![]() | ended : Boolean = false
Has the Primitive ended or not. | BasePrimitive | |
![]() | endFunc : Function
The function to run on end. | BasePrimitive | |
| flip : Boolean
Setting this to true will 'flip' the way the property is handled. | PrimitivePhysics | ||
| friction : Number
The friction of the property. | PrimitivePhysics | ||
![]() | id : int
This is the unique internal id of the item. | BasePrimitive | |
![]() | isclean : Boolean = true
This is used by the pool to determine if/how the Primitive has been used before in memory. | BasePrimitive | |
![]() | property : String
The property on the target. | BasePrimitive | |
![]() | target : Object
The target object. | BasePrimitive | |
![]() | updateFunc : Function
The function to run on update. | BasePrimitive | |
| velocity : Number
The velocity of the property. | PrimitivePhysics | ||
| Method | Defined By | ||
|---|---|---|---|
The PrimitivePhysics object. | PrimitivePhysics | ||
![]() | end(broadcast:Boolean = true):void
This ends the Primitive immediately. | BasePrimitive | |
init(... args):void [override]
This inits the PrimitivePhysics. | PrimitivePhysics | ||
![]() | render(time:int):void
This renders the primitive. | BasePrimitive | |
| acceleration | property |
public var acceleration:NumberThe acceleration of the property. This is added to the current velocity. A negative acceleration would represent gravity.
| duration | property |
public var duration:int = 0How long the physics calculations should be applied for.
| flip | property |
public var flip:BooleanSetting this to true will 'flip' the way the property is handled. This is for properties such as 'y' that are reversed from the cartesian coordinate system.
| friction | property |
friction:NumberThe friction of the property. This will slow down the velocity to 0 if there is no acceleration. Should be a positive number.
public function get friction():Number public function set friction(value:Number):void| velocity | property |
public var velocity:NumberThe velocity of the property. This is added to the current value every frame - ie: FPS of 50, with a velocity of 2 = 100/second.
| PrimitivePhysics | () | Constructor |
public function PrimitivePhysics()The PrimitivePhysics object.
| init | () | method |
override public function init(... args):voidThis inits the PrimitivePhysics.
Parameters
... args |