| Package | away3d.animators |
| Class | public class SkeletonAnimator |
| Inheritance | SkeletonAnimator AnimatorBase flash.events.EventDispatcher |
| Implements | IAnimator |
| Property | Defined 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 | |
| forceCPU : Boolean [read-only]
Indicates whether the skeleton animator is disabled by default for GPU rendering, something that allows the animator to perform calculation on the GPU. | SkeletonAnimator | ||
| globalMatrices : Vector.<Number> [read-only]
returns the calculated global matrices of the current skeleton pose. | SkeletonAnimator | ||
| globalPose : SkeletonPose [read-only]
returns the current skeleton pose output from the animator. | SkeletonAnimator | ||
![]() | playbackSpeed : Number
The amount by which passed time should be scaled. | AnimatorBase | |
| skeleton : Skeleton [read-only]
Returns the skeleton object in use by the animator - this defines the number and heirarchy of joints used by the
skinned geoemtry to which skeleon animator is applied. | SkeletonAnimator | ||
![]() | 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 | |
| useCondensedIndices : Boolean
Offers the option of enabling GPU accelerated animation on skeletons larger than 32 joints
by condensing the number of joint index values required per mesh. | SkeletonAnimator | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new SkeletonAnimator object. | SkeletonAnimator | ||
Returns a shallow clone (re-using the same IAnimationSet) of this IAnimator. | SkeletonAnimator | ||
![]() | AnimatorBase | ||
![]() | getAnimationStateByName(name:String):AnimationStateBase | AnimatorBase | |
![]() | phase(value:Number):void
Sets the animation phase of the current active state's animation clip(s). | AnimatorBase | |
play(name:String, transition:IAnimationTransition = null, offset:Number):void
Plays an animation state registered with the given name in the animation data set. | SkeletonAnimator | ||
![]() | reset(name:String, offset:Number = 0):void | AnimatorBase | |
setRenderState(stage3DProxy:Stage3DProxy, renderable:IRenderable, vertexConstantOffset:int, vertexStreamOffset:int, camera:Camera3D):void
Sets the GPU render state required by the animation that is dependent of the rendered object. | SkeletonAnimator | ||
![]() | 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 | |
testGPUCompatibility(pass:MaterialPassBase):void
Verifies if the animation will be used on cpu. | SkeletonAnimator | ||
![]() | update(time:int):void
Provides a way to manually update the active state of the animator when automatic
updates are disabled. | AnimatorBase | |
| Method | Defined By | ||
|---|---|---|---|
updateDeltaTime(dt:Number):void [override]
Applies the calculated time delta to the active animation state node or state transition object. | SkeletonAnimator | ||
| forceCPU | property |
forceCPU:Boolean [read-only] Indicates whether the skeleton animator is disabled by default for GPU rendering, something that allows the animator to perform calculation on the GPU. Defaults to false.
public function get forceCPU():Boolean| globalMatrices | property |
globalMatrices:Vector.<Number> [read-only] returns the calculated global matrices of the current skeleton pose.
public function get globalMatrices():Vector.<Number>See also
| globalPose | property |
globalPose:SkeletonPose [read-only] returns the current skeleton pose output from the animator.
public function get globalPose():SkeletonPoseSee also
| skeleton | property |
skeleton:Skeleton [read-only] Returns the skeleton object in use by the animator - this defines the number and heirarchy of joints used by the skinned geoemtry to which skeleon animator is applied.
public function get skeleton():Skeleton| useCondensedIndices | property |
useCondensedIndices:BooleanOffers the option of enabling GPU accelerated animation on skeletons larger than 32 joints by condensing the number of joint index values required per mesh. Only applicable to skeleton animations that utilise more than one mesh object. Defaults to false.
public function get useCondensedIndices():Boolean public function set useCondensedIndices(value:Boolean):void| SkeletonAnimator | () | Constructor |
public function SkeletonAnimator(animationSet:SkeletonAnimationSet, skeleton:Skeleton, forceCPU:Boolean = false)
Creates a new SkeletonAnimator object.
animationSet:SkeletonAnimationSet — The animation data set containing the skeleton animations used by the animator.
| |
skeleton:Skeleton — The skeleton object used for calculating the resulting global matrices for transforming skinned mesh data.
| |
forceCPU:Boolean (default = false) — Optional value that only allows the animator to perform calculation on the CPU. Defaults to false.
|
| clone | () | method |
public function clone():IAnimatorReturns a shallow clone (re-using the same IAnimationSet) of this IAnimator.
ReturnsIAnimator |
| play | () | method |
public function play(name:String, transition:IAnimationTransition = null, offset:Number):voidPlays an animation state registered with the given name in the animation data set.
Parameters
name:String — The data set name of the animation state to be played.
| |
transition:IAnimationTransition (default = null) — An optional transition object that determines how the animator will transition from the currently active animation state.
| |
offset:Number (default = NaN) |
| setRenderState | () | method |
public function setRenderState(stage3DProxy:Stage3DProxy, renderable:IRenderable, vertexConstantOffset:int, vertexStreamOffset:int, camera:Camera3D):voidSets the GPU render state required by the animation that is dependent of the rendered object.
Parameters
stage3DProxy:Stage3DProxy — The Stage3DProxy object which is currently being used for rendering.
| |
renderable:IRenderable — The object currently being rendered.
| |
vertexConstantOffset:int — The first available vertex register to write data to if running on the gpu.
| |
vertexStreamOffset:int — The first available vertex stream to write vertex data to if running on the gpu.
| |
camera:Camera3D |
| testGPUCompatibility | () | method |
public function testGPUCompatibility(pass:MaterialPassBase):voidVerifies if the animation will be used on cpu. Needs to be true for all passes for a material to be able to use it on gpu. Needs to be called if gpu code is potentially required.
Parameters
pass:MaterialPassBase |
| updateDeltaTime | () | method |
override protected function updateDeltaTime(dt:Number):voidApplies the calculated time delta to the active animation state node or state transition object.
Parameters
dt:Number |