Packageorg.papervision3d.core.animation.core
Classpublic class AnimationEngine



Public Properties
 PropertyDefined by
  currentFrame : uint = 0
current frame
AnimationEngine
  maxTime : Number
maximum time in milliseconds (effectively NUM_FRAMES TICK).
AnimationEngine
  NUM_FRAMES : uint = 100
[static] total number of frames
AnimationEngine
  TICK : Number = 50
[static] frame duration in milliseconds
AnimationEngine
  time : Number = 0
current time in milliseconds.
AnimationEngine
Public Methods
 MethodDefined by
  
constructor.
AnimationEngine
  
[static] Adds a controller to the animation engine.
AnimationEngine
  
[static] Gets all controllers for the specified object.
AnimationEngine
  
[static] getInstance.
AnimationEngine
  
millisToFrame(millis:Number):uint
[static] Converts milliseconds to frames.
AnimationEngine
  
secondsToFrame(seconds:Number):uint
[static] Converts seconds to frames.
AnimationEngine
  
setControllers(object:DisplayObject3D, controllers:Array, overwrite:Boolean = false):void
[static] Sets all controllers for the specified object.
AnimationEngine
  
tick():void
tick.
AnimationEngine
Property detail
currentFrameproperty
public var currentFrame:uint = 0

current frame

maxTimeproperty 
public var maxTime:Number

maximum time in milliseconds (effectively NUM_FRAMES TICK).

NUM_FRAMESproperty 
public static var NUM_FRAMES:uint = 100

total number of frames

TICKproperty 
public static var TICK:Number = 50

frame duration in milliseconds

timeproperty 
public var time:Number = 0

current time in milliseconds.

Constructor detail
AnimationEngine()constructor
public function AnimationEngine()

constructor.

Method detail
addController()method
public static function addController(object:DisplayObject3D, controller:AbstractController):AbstractController

Adds a controller to the animation engine.

Parameters
object:DisplayObject3D — the object the controller targets.
 
controller:AbstractController — the controller.

Returns
AbstractController

See also

org.papervision3d.objects.DisplayObject3D
org.papervision3d.animation.core.AbstractController
getControllers()method 
public static function getControllers(object:DisplayObject3D):Array

Gets all controllers for the specified object.

Parameters
object:DisplayObject3D

Returns
Array

See also

org.papervision3d.animation.core.AbstractController
getInstance()method 
public static function getInstance():AnimationEngine

getInstance.

Returns
AnimationEngine
millisToFrame()method 
public static function millisToFrame(millis:Number):uint

Converts milliseconds to frames.

Parameters
millis:Number — milliseconds.

Returns
uint — frame number
secondsToFrame()method 
public static function secondsToFrame(seconds:Number):uint

Converts seconds to frames.

Parameters
seconds:Number — seconds

Returns
uint — frame number
setControllers()method 
public static function setControllers(object:DisplayObject3D, controllers:Array, overwrite:Boolean = false):void

Sets all controllers for the specified object.

Parameters
object:DisplayObject3D — the object the controller targets.
 
controllers:Array — the object the controllers target.
 
overwrite:Boolean (default = false) — a boolean value indicating whether to overwrite all previous controllers.

See also

org.papervision3d.objects.DisplayObject3D
org.papervision3d.animation.core.AbstractController
tick()method 
public function tick():void

tick.