UVAnimator
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.
Inherited from AnimatorBase -> NamedAssetBase -> EventDispatcher.
Can be created with method new:
Lib.Away3D.Animators.UVAnimator.new(uvAnimationSet) |
Creates a new UVAnimator object. |
uvAnimationSet - The animation data set containing the uv animations used by the animator. (UVAnimationSet) |
Has properties:
autoRotation |
True/False, Defines if a rotation is performed automatically each update. The rotationIncrease value is added each iteration. |
rotationIncrease |
Number, if autoRotation = true, the rotation is increased by the rotationIncrease value. Default is 1 |
autoTranslate |
True/False, Defines if the animation is translated automatically each update. Ideal to scroll maps. Use setTranslateIncrease to define the offsets. |
translateIncrease |
[read-only] table of numbers, returns table of u,v values |
Created UVAnimator object has methods:
setTranslateIncrease(u, v) |
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. |
u - Number v - Number |
clone() |
Returns a shallow clone (re-using the same IAnimationSet) of this IAnimator. UVAnimator |
|
setRenderState(stage3DProxy, renderable, vertexConstantOffset, vertexStreamOffset, camera) |
Sets the GPU render state required by the animation that is dependent of the rendered object. |
stage3DProxy - The Stage3DProxy object which is currently being used for rendering. renderable - The object currently being rendered. SegmentSet, SkyBox, Sprite3D, SubMesh vertexConstantOffset - The first available vertex register to write data to if running on the gpu. Int. vertexStreamOffset - The first available vertex stream to write vertex data to if running on the gpu. Int. camera - Camera3D object |
play(name, transition, offset) |
Plays an animation state registered with the given name in the animation data set. |
name - The data set name of the animation state to be played. transition - Transition object that determines how the animator will transition from the currently active animation state. Default nil. (Has no implementation yet, use nil) offset - 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. |
Created with the Personal Edition of HelpNDoc: Produce electronic books easily