Packageaway3d.animators
Classpublic class UVAnimator
InheritanceUVAnimator Inheritance AnimatorBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher
Implements IAnimator

Provides an interface for assigning uv-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.



Public Properties
 PropertyDefined By
 InheritedabsoluteTime : Number
[read-only] Returns the internal absolute time of the animator, calculated by the current time and the playback speed.
AnimatorBase
 InheritedactiveAnimation : AnimationNodeBase
[read-only] Returns the current active animation node.
AnimatorBase
 InheritedactiveAnimationName : String
[read-only] Returns the current active animation node.
AnimatorBase
 InheritedactiveState : IAnimationState
[read-only] Returns the current active animation state.
AnimatorBase
 InheritedanimationSet : IAnimationSet
[read-only] Returns the animation data set in use by the animator.
AnimatorBase
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : 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
 InheritedautoUpdate : Boolean
Determines whether the animators internal update mechanisms are active.
AnimatorBase
 Inheritedid : String
NamedAssetBase
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
 InheritedplaybackSpeed : 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
 Inheritedtime : int
Gets and sets the internal time clock of the animator.
AnimatorBase
  translateIncrease : Vector.<Number>
[read-only]
UVAnimator
 InheritedupdatePosition : 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
 Inherited_absoluteTime : Number = 0
AnimatorBase
 Inherited_activeAnimationName : String
AnimatorBase
 Inherited_activeNode : AnimationNodeBase
AnimatorBase
 Inherited_activeState : IAnimationState
AnimatorBase
 Inherited_animationSet : IAnimationSet
AnimatorBase
 Inherited_owners : Vector.<Mesh>
AnimatorBase
Public Methods
 MethodDefined By
  
UVAnimator(uvAnimationSet:UVAnimationSet)
Creates a new UVAnimator object.
UVAnimator
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
  
Returns a shallow clone (re-using the same IAnimationSet) of this IAnimator.
UVAnimator
 Inherited
dispose():void
Cleans up resources used by this asset.
AnimatorBase
 Inherited
AnimatorBase
 Inherited
AnimatorBase
 Inherited
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
 Inherited
reset(name:String, offset:Number = 0):void
AnimatorBase
 Inherited
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
 Inherited
start():void
Resumes the automatic playback clock controling the active state of the animator.
AnimatorBase
 Inherited
stop():void
Pauses the automatic playback clock of the animator, in case manual updates are required via the time property or update() method.
AnimatorBase
  
Verifies if the animation will be used on cpu.
UVAnimator
 Inherited
update(time:int):void
Provides a way to manually update the active state of the animator when automatic updates are disabled.
AnimatorBase
Protected Methods
 MethodDefined By
  
updateDeltaTime(dt:Number):void
[override] Applies the calculated time delta to the active animation state node.
UVAnimator
Events
 Event Summary Defined By
 InheritedDispatched when playback of an animation reaches the end of an animation.AnimatorBase
 InheritedDispatched when playback of an animation inside the animator object starts.AnimatorBase
 InheritedDispatched when playback of an animation inside the animator object stops.AnimatorBase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
autoRotationproperty
autoRotation:Boolean

Defines if a rotation is performed automatically each update. The rotationIncrease value is added each iteration.


Implementation
    public function get autoRotation():Boolean
    public function set autoRotation(value:Boolean):void
autoTranslateproperty 
autoTranslate:Boolean

Defines if the animation is translated automatically each update. Ideal to scroll maps. Use setTranslateIncrease to define the offsets.


Implementation
    public function get autoTranslate():Boolean
    public function set autoTranslate(value:Boolean):void
rotationIncreaseproperty 
rotationIncrease:Number

if autoRotation = true, the rotation is increased by the rotationIncrease value. Default is 1;


Implementation
    public function get rotationIncrease():Number
    public function set rotationIncrease(value:Number):void
translateIncreaseproperty 
translateIncrease:Vector.<Number>  [read-only]


Implementation
    public function get translateIncrease():Vector.<Number>
Constructor Detail
UVAnimator()Constructor
public function UVAnimator(uvAnimationSet:UVAnimationSet)

Creates a new UVAnimator object.

Parameters
uvAnimationSet:UVAnimationSet — The animation data set containing the uv animations used by the animator.
Method Detail
clone()method
public function clone():IAnimator

Returns a shallow clone (re-using the same IAnimationSet) of this IAnimator.

Returns
IAnimator
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