Packageaway3d.animators
Classpublic class AnimatorBase
InheritanceAnimatorBase Inheritance flash.events.EventDispatcher
Subclasses ParticleAnimator, SkeletonAnimator, UVAnimator, VertexAnimator

Provides an abstract base class for animator classes that control animation output from a data set subtype of AnimationSetBase.

See also

away3d.animators.AnimationSetBase


Public Properties
 PropertyDefined By
  absoluteTime : Number
[read-only] Returns the internal absolute time of the animator, calculated by the current time and the playback speed.
AnimatorBase
  activeAnimation : AnimationNodeBase
[read-only] Returns the current active animation node.
AnimatorBase
  activeAnimationName : String
[read-only] Returns the current active animation node.
AnimatorBase
  activeState : IAnimationState
[read-only] Returns the current active animation state.
AnimatorBase
  animationSet : IAnimationSet
[read-only] Returns the animation data set in use by the animator.
AnimatorBase
  autoUpdate : Boolean
Determines whether the animators internal update mechanisms are active.
AnimatorBase
  playbackSpeed : Number
The amount by which passed time should be scaled.
AnimatorBase
  time : int
Gets and sets the internal time clock of the animator.
AnimatorBase
  updatePosition : Boolean = true
Enables translation of the animated mesh from data returned per frame via the positionDelta property of the active animation node.
AnimatorBase
Protected Properties
 PropertyDefined By
  _absoluteTime : Number = 0
AnimatorBase
  _activeNode : AnimationNodeBase
AnimatorBase
  _activeState : IAnimationState
AnimatorBase
  _animationSet : IAnimationSet
AnimatorBase
  _name : String
AnimatorBase
  _owners : Vector.<Mesh>
AnimatorBase
Public Methods
 MethodDefined By
  
Creates a new AnimatorBase object.
AnimatorBase
  
AnimatorBase
  
AnimatorBase
  
phase(value:Number):void
Sets the animation phase of the current active state's animation clip(s).
AnimatorBase
  
reset(name:String, offset:Number = 0):void
AnimatorBase
  
start():void
Resumes the automatic playback clock controling the active state of the animator.
AnimatorBase
  
stop():void
Pauses the automatic playback clock of the animator, in case manual updates are required via the time property or update() method.
AnimatorBase
  
update(time:int):void
Provides a way to manually update the active state of the animator when automatic updates are disabled.
AnimatorBase
Events
 Event Summary Defined By
  Dispatched when playback of an animation inside the animator object starts.AnimatorBase
  Dispatched when playback of an animation inside the animator object stops.AnimatorBase
Property Detail
_absoluteTimeproperty
protected var _absoluteTime:Number = 0

_activeNodeproperty 
protected var _activeNode:AnimationNodeBase

_activeStateproperty 
protected var _activeState:IAnimationState

_animationSetproperty 
protected var _animationSet:IAnimationSet

_nameproperty 
protected var _name:String

_ownersproperty 
protected var _owners:Vector.<Mesh>

absoluteTimeproperty 
absoluteTime:Number  [read-only]

Returns the internal absolute time of the animator, calculated by the current time and the playback speed.


Implementation
    public function get absoluteTime():Number

See also

activeAnimationproperty 
activeAnimation:AnimationNodeBase  [read-only]

Returns the current active animation node.


Implementation
    public function get activeAnimation():AnimationNodeBase
activeAnimationNameproperty 
activeAnimationName:String  [read-only]

Returns the current active animation node.


Implementation
    public function get activeAnimationName():String
activeStateproperty 
activeState:IAnimationState  [read-only]

Returns the current active animation state.


Implementation
    public function get activeState():IAnimationState
animationSetproperty 
animationSet:IAnimationSet  [read-only]

Returns the animation data set in use by the animator.


Implementation
    public function get animationSet():IAnimationSet
autoUpdateproperty 
autoUpdate:Boolean

Determines whether the animators internal update mechanisms are active. Used in cases where manual updates are required either via the time property or update() method. Defaults to true.


Implementation
    public function get autoUpdate():Boolean
    public function set autoUpdate(value:Boolean):void

See also

playbackSpeedproperty 
playbackSpeed:Number

The amount by which passed time should be scaled. Used to slow down or speed up animations. Defaults to 1.


Implementation
    public function get playbackSpeed():Number
    public function set playbackSpeed(value:Number):void
timeproperty 
time:int

Gets and sets the internal time clock of the animator.


Implementation
    public function get time():int
    public function set time(value:int):void
updatePositionproperty 
public var updatePosition:Boolean = true

Enables translation of the animated mesh from data returned per frame via the positionDelta property of the active animation node. Defaults to true.

See also

Constructor Detail
AnimatorBase()Constructor
public function AnimatorBase(animationSet:IAnimationSet)

Creates a new AnimatorBase object.

Parameters
animationSet:IAnimationSet — The animation data set to be used by the animator object.
Method Detail
getAnimationState()method
public function getAnimationState(node:AnimationNodeBase):AnimationStateBase

Parameters

node:AnimationNodeBase

Returns
AnimationStateBase
getAnimationStateByName()method 
public function getAnimationStateByName(name:String):AnimationStateBase

Parameters

name:String

Returns
AnimationStateBase
phase()method 
public function phase(value:Number):void

Sets the animation phase of the current active state's animation clip(s).

Parameters

value:Number — The phase value to use. 0 represents the beginning of an animation clip, 1 represents the end.

reset()method 
public function reset(name:String, offset:Number = 0):void

Parameters

name:String
 
offset:Number (default = 0)

start()method 
public function start():void

Resumes the automatic playback clock controling the active state of the animator.

stop()method 
public function stop():void

Pauses the automatic playback clock of the animator, in case manual updates are required via the time property or update() method.

See also

update()method 
public function update(time:int):void

Provides a way to manually update the active state of the animator when automatic updates are disabled.

Parameters

time:int

See also

Event Detail
start Event
Event Object Type: away3d.events.AnimatorEvent
AnimatorEvent.type property = away3d.events.AnimatorEvent

Dispatched when playback of an animation inside the animator object starts.

stop Event  
Event Object Type: away3d.events.AnimatorEvent
AnimatorEvent.type property = away3d.events.AnimatorEvent

Dispatched when playback of an animation inside the animator object stops.