Packageaway3d.core.base
Classpublic class Animation
InheritanceAnimation Inheritance flash.events.EventDispatcher
ImplementsIAnimation

Holds information about the current state of a mesh animation.

Public Properties
 PropertyDefined by
  cycleEvent : Boolean = false
Determines whether the animation will fire cycle events.
Animation
  delay : Number = 0
Determines the delay time between animation cycles if loop is set to true.
Animation
  fps : Number = 24
The frames per second at which the animation will run.
Animation
  frame : Number = 0
The current frame of the animation.
Animation
  geometry : Geometry
The geometry on which the animation is occurring.
Animation
  isRunning : Boolean
[read-only] Indicates whether the animation is currently running.
Animation
  latest : uint
[read-only] Returns the number of the latest frame displayed.
Animation
  loop : Boolean = false
Determines whether the animation will loop.
Animation
  mesh : Mesh
The mesh on which the animation is occurring.
Animation
  sequence : Array
Holds an array of animation frames.
Animation
  sequenceEvent : Boolean = false
Determines whether the animation will fire sequence events.
Animation
  smooth : Boolean = false
Determines whether the animation will smooth motion (interpolate) between frames.
Animation
  transitionValue : Number
Animation
Public Methods
 MethodDefined by
  
Creates a new Animation object.
Animation
  
Creates a new AnimationTransition object.
Animation
  
interpolate():void
Smooth interpolations between new AnimationSequence objects
Animation
  
start():void
Jumps to the beginning of the animation and start playing
Animation
  
stop():void
Stops the animation at it's current position.
Animation
  
update():void
Updates the positions of vertex objects in the geometry to the current frame values
Animation
Events
 EventSummaryDefined by
   Dispatched when all frame sequences are complete Animation
   Dispatched when the current frame sequence is complete Animation
Property detail
cycleEventproperty
public var cycleEvent:Boolean = false

Determines whether the animation will fire cycle events.

See also

delayproperty 
public var delay:Number = 0

Determines the delay time between animation cycles if loop is set to true.

See also

loop
fpsproperty 
public var fps:Number = 24

The frames per second at which the animation will run.

frameproperty 
public var frame:Number = 0

The current frame of the animation.

geometryproperty 
public var geometry:Geometry

The geometry on which the animation is occurring.

isRunningproperty 
isRunning:Boolean  [read-only]

Indicates whether the animation is currently running.

Implementation
    public function get isRunning():Boolean
latestproperty 
latest:uint  [read-only]

Returns the number of the latest frame displayed.

Implementation
    public function get latest():uint
loopproperty 
public var loop:Boolean = false

Determines whether the animation will loop.

meshproperty 
public var mesh:Mesh

The mesh on which the animation is occurring.

sequenceproperty 
public var sequence:Array

Holds an array of animation frames.

See also

away3d.core.base.AnimationFrame
sequenceEventproperty 
public var sequenceEvent:Boolean = false

Determines whether the animation will fire sequence events.

See also

smoothproperty 
public var smooth:Boolean = false

Determines whether the animation will smooth motion (interpolate) between frames.

transitionValueproperty 
transitionValue:Number  [read-write]Implementation
    public function get transitionValue():Number
    public function set transitionValue(value:Number):void
Constructor detail
Animation()constructor
public function Animation(geo:Geometry)Parameters
geo:Geometry — The geometry object that the animation acts on.
Init Parameters
Method detail
createTransition()method
public function createTransition():void

Creates a new AnimationTransition object.

interpolate()method 
public function interpolate():void

Smooth interpolations between new AnimationSequence objects

start()method 
public function start():void

Jumps to the beginning of the animation and start playing

stop()method 
public function stop():void

Stops the animation at it's current position.

update()method 
public function update():void

Updates the positions of vertex objects in the geometry to the current frame values

Event detail
cycleevent 
Event object type: away3d.events.AnimationEvent

Dispatched when all frame sequences are complete

sequenceupdateevent  
Event object type: away3d.events.AnimationEvent

Dispatched when the current frame sequence is complete

Wiki link
Click to go to the wiki page for 'away3d.core.base.Animation'

Code examples

Comments