Package | away3d.animators |
Class | public class UVAnimator |
Inheritance | UVAnimator AnimatorBase NamedAssetBase 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 | ||
assetFullPath : Array [read-only] | NamedAssetBase | ||
assetNamespace : String [read-only] | NamedAssetBase | ||
assetType : String [read-only]
The type of the asset. | AnimatorBase | ||
autoRotation : Boolean
Defines if a rotation is performed automatically each update. | UVAnimator | ||
autoTranslate : Boolean
Defines if the animation is translated automatically each update. | UVAnimator | ||
autoUpdate : Boolean
Determines whether the animators internal update mechanisms are active. | AnimatorBase | ||
id : String | NamedAssetBase | ||
name : String | NamedAssetBase | ||
originalName : String [read-only]
The original name used for this asset in the resource (e.g. | NamedAssetBase | ||
playbackSpeed : Number
The amount by which passed time should be scaled. | AnimatorBase | ||
rotationIncrease : Number
if autoRotation = true, the rotation is increased by the rotationIncrease value. | UVAnimator | ||
time : int
Gets and sets the internal time clock of the animator. | AnimatorBase | ||
translateIncrease : Vector.<Number> [read-only] | UVAnimator | ||
updatePosition : Boolean = true
Enables translation of the animated mesh from data returned per frame via the positionDelta property of the active animation node. | AnimatorBase |
Method | Defined By | ||
---|---|---|---|
UVAnimator(uvAnimationSet:UVAnimationSet)
Creates a new UVAnimator object. | UVAnimator | ||
assetPathEquals(name:String, ns:String):Boolean | NamedAssetBase | ||
Returns a shallow clone (re-using the same IAnimationSet) of this IAnimator. | UVAnimator | ||
dispose():void
Cleans up resources used by this asset. | AnimatorBase | ||
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 | UVAnimator | ||
reset(name:String, offset:Number = 0):void | AnimatorBase | ||
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void | NamedAssetBase | ||
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. | UVAnimator | ||
setTranslateIncrease(u:Number, v:Number):void
if autoTranslate = true, animation is translated automatically each update with the u and v values. | UVAnimator | ||
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. | UVAnimator | ||
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. | UVAnimator |
autoRotation | property |
autoRotation:Boolean
Defines if a rotation is performed automatically each update. The rotationIncrease value is added each iteration.
public function get autoRotation():Boolean
public function set autoRotation(value:Boolean):void
autoTranslate | property |
autoTranslate:Boolean
Defines if the animation is translated automatically each update. Ideal to scroll maps. Use setTranslateIncrease to define the offsets.
public function get autoTranslate():Boolean
public function set autoTranslate(value:Boolean):void
rotationIncrease | property |
rotationIncrease:Number
if autoRotation = true, the rotation is increased by the rotationIncrease value. Default is 1;
public function get rotationIncrease():Number
public function set rotationIncrease(value:Number):void
translateIncrease | property |
translateIncrease:Vector.<Number>
[read-only] public function get translateIncrease():Vector.<Number>
UVAnimator | () | Constructor |
public function UVAnimator(uvAnimationSet:UVAnimationSet)
Creates a new UVAnimator
object.
uvAnimationSet:UVAnimationSet — The animation data set containing the uv animations used by the animator.
|
clone | () | method |
public function clone():IAnimator
Returns a shallow clone (re-using the same IAnimationSet) of this IAnimator.
ReturnsIAnimator |
play | () | method |
public function play(name:String, transition:IAnimationTransition = null, offset:Number):void
Parameters
name:String | |
transition:IAnimationTransition (default = null )
| |
offset:Number (default = NaN )
|
setRenderState | () | method |
public function 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.
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 |
setTranslateIncrease | () | method |
public function setTranslateIncrease(u:Number, v:Number):void
if autoTranslate = true, animation is translated automatically each update with the u and v values. Note if value are integers, no visible update will be performed. Values are expected to be in 0-1 range.
Parameters
u:Number | |
v:Number |
testGPUCompatibility | () | method |
public function testGPUCompatibility(pass:MaterialPassBase):void
Verifies 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):void
Applies the calculated time delta to the active animation state node.
Parameters
dt:Number |