Package | away3d.animators |
Class | public class PathAnimator |
Inheritance | PathAnimator Animator flash.events.EventDispatcher |
Property | Defined by | ||
---|---|---|---|
alignToPath : Boolean
Defines whether the 3d object aligns its rotation to the axis of the path while animating along the path.
| PathAnimator | ||
currentFrame : int
Returns the current keyframe number
| Animator | ||
cycleNumber : int
Returns the number of the current loop cycle
| Animator | ||
delay : Number
Defines the delay to the start of the animation in seconds
| Animator | ||
fps : Number
Defines the keyframes per second of the animation
| Animator | ||
interpolate : Boolean
Defines whether the animation interpolates between channel points.
| Animator | ||
isPlaying : Boolean
Returns true when the animation is playing
| Animator | ||
length : Number
Defines the total length of the animation in seconds
| Animator | ||
loop : Boolean
Defines whether the animation will loop.
| Animator | ||
name : String
The name of the animation used as a unique reference.
| Animator | ||
offset : Number3D
sets an optional offset to the position on the path, ideal for cameras or reusing the same
Path object for parallel animations
| PathAnimator | ||
path : Path
defines the path used by the animation.
| PathAnimator | ||
position : Number3D
[read-only]
returns the current interpolated position on the path with no optional offset applied
| PathAnimator | ||
progress : Number
Represents the progress of the animation playhead from the start (0) to the end (1) of the animation.
| Animator | ||
rotation : Number3D
[read-only]
returns the current interpolated rotation along the path.
| PathAnimator | ||
rotations : Array
Defines an optional array of rotations in order to follow a path that is twisted along its axis.
| PathAnimator | ||
target : Object3D
Defines the 3d object to which the animation is applied.
| Animator | ||
targetObject : Object3D
Defines a target object that the 3d object looks at while animating along the path.
| PathAnimator | ||
totalFrames : Number
Returns the total length of the animation in frames
| Animator |
Method | Defined by | ||
---|---|---|---|
Creates a new
PathAnimator
| PathAnimator | ||
addOnCycle(listener:Function):void
Default method for adding a cycle event listener.
| Animator | ||
addOnEnterKeyFrame(listener:Function):void
Default method for adding an enterKeyFrame event listener
| Animator | ||
Duplicates the animators properties to another
Animator object
| Animator | ||
Returns a position on the path determined by the elapsed time given.
| PathAnimator | ||
Updates a position Number3D on the path at a given time.
| PathAnimator | ||
getTimeSegment(t:Number):Number
returns the segment index that is used at a given time;
| PathAnimator | ||
gotoAndPlay(frame:uint):void
| Animator | ||
gotoAndStop(frame:uint):void
| Animator | ||
play():void
| Animator | ||
removeOnCycle(listener:Function):void
Default method for removing a cycle event listener
| Animator | ||
removeOnEnterKeyFrame(listener:Function):void
Default method for removing a enterKeyFrame event listener
| Animator | ||
stop():void
| Animator | ||
update(time:Number):void
Updates the position of the playhead to the given time in seconds.
| Animator |
Method | Defined by | ||
---|---|---|---|
getDefaultFps():Number
| PathAnimator | ||
updateProgress(val:Number):void
| PathAnimator | ||
updateTarget():void
| PathAnimator |
alignToPath | property |
public var alignToPath:Boolean
Defines whether the 3d object aligns its rotation to the axis of the path while animating along the path. Defaults to false.
offset | property |
public var offset:Number3D
sets an optional offset to the position on the path, ideal for cameras or reusing the same Path
object for parallel animations
path | property |
path:Path
[read-write]defines the path used by the animation.
Implementation public function get path():Path
public function set path(value:Path):void
See also
position | property |
position:Number3D
[read-only]returns the current interpolated position on the path with no optional offset applied
Implementation public function get position():Number3D
rotation | property |
rotation:Number3D
[read-only]returns the current interpolated rotation along the path.
Implementation public function get rotation():Number3D
rotations | property |
public var rotations:Array
Defines an optional array of rotations in order to follow a path that is twisted along its axis.
targetObject | property |
public var targetObject:Object3D
Defines a target object that the 3d object looks at while animating along the path. Defaults to null.
PathAnimator | () | constructor |
public function PathAnimator(path:Path = null, target:Object3D = null, init:Object = null)
Parameters
path:Path (default = null ) — [optional] Defines the Path object used tp define the path of the animation.
|
|
target:Object3D (default = null ) — [optional] Defines the 3d object to which the animation is applied.
|
|
init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
targetObject:Object3D | |
alignToPath",false:Boolean | |
offset:Number3D | |
rotations:Array |
getDefaultFps | () | method |
protected override function getDefaultFps():Number
Returns
Number |
getPathPosition | () | method |
public function getPathPosition(time:Number, position:Number3D = null):Number3D
Returns a position on the path determined by the elapsed time given.
Parameterstime:Number — time A number representing the elapsed time in seconds.
|
|
position:Number3D (default = null ) — position [optional] A 3d number object representing the instance to be returned.
|
Number3D —
A Number3D object representing the position.
|
getPositionOnPath | () | method |
public function getPositionOnPath(p:Number3D, t:Number):void
Updates a position Number3D on the path at a given time. Do not use this handler to animate, it's in there to add dummy's or place camera before or after the animated object. Use the update() method or progress property instead.
Parametersp:Number3D — Number3D. The Number3D to update according to the "t" time parameter.
|
|
t:Number — Number. A Number from 0 to 1
|
See also
getTimeSegment | () | method |
public function getTimeSegment(t:Number):Number
returns the segment index that is used at a given time;
Parameterst:Number — t [Number]. A Number between 0 and 1. If no params, actual pathanimator time segment index is returned.
|
Number |
updateProgress | () | method |
protected override function updateProgress(val:Number):void
Parameters
val:Number |
updateTarget | () | method |
protected override function updateTarget():void