Provides an interface for assigning skeleton-based animation data sets to mesh-based entity objects and controlling the various available states of animation through an interative playhead that can be automatically updated or manually triggered.

Constructor

@:value({ forceCPU : false })new(animationSet:SkeletonAnimationSet, skeleton:Skeleton, forceCPU:Bool = false)

Creates a new SkeletonAnimator object.

Parameters:

skeletonAnimationSet

The animation data set containing the skeleton animations used by the animator.

skeleton

The skeleton object used for calculating the resulting global matrices for transforming skinned mesh data.

forceCPU

Optional value that only allows the animator to perform calculation on the CPU. Defaults to false.

Variables

read onlyforceCPU:Bool

read onlyglobalMatrices:Vector<Float>

Methods

clone():IAnimator

@inheritDoc

@:value({ offset : null, transition : null })play(name:String, ?transition:IAnimationTransition, ?offset:Int):Void

Plays an animation state registered with the given name in the animation data set.

Parameters:

name

The data set name of the animation state to be played.

transition

An optional transition object that determines how the animator will transition from the currently active animation state.

offset

An option offset time (in milliseconds) that resets the state's internal clock to the absolute time of the animator plus the offset value. Required for non-looping animation states.

setRenderState(stage3DProxy:Stage3DProxy, renderable:IRenderable, vertexConstantOffset:Int, vertexStreamOffset:Int, camera:Camera3D):Void

@inheritDoc

Inherited Variables

Defined by AnimatorBase

read onlyabsoluteTime:Int

read onlyactiveAnimationName:String

read onlyassetType:String

time:Int

@:value(true)updatePosition:Bool = 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:

  • away3d.animators.states.IAnimationState#positionDelta

Defined by NamedAssetBase

read onlyassetFullPath:Array<Dynamic>

read onlyassetNamespace:String

id:String

name:String

read onlyoriginalName:String

Inherited Methods

Defined by AnimatorBase

dispose():Void

@inheritDoc

phase(value:Float):Void

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

Parameters:

value

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

@:value({ offset : 0 })reset(name:String, offset:Int = 0):Void

start():Void

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

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:

  • time

  • update()

update(time:Int):Void

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

See also:

  • stop()

  • autoUpdate

Defined by NamedAssetBase

assetPathEquals(name:String, ns:String):Bool

@:value({ overrideOriginal : true, ns : null })resetAssetPath(name:String, ?ns:String, overrideOriginal:Bool = true):Void