| 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 [read-only]
Returns the current keyframe number
| Animator | |
![]() | cycleNumber : int [read-only]
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 [read-only]
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 : Vector3D
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 : Vector3D [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 : Vector3D [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 [read-only]
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 | |
getPathPosition(time:Number, position:Vector3D = null):Vector3D
Returns a position on the path determined by the elapsed time given. | PathAnimator | ||
getPositionOnPath(p:Vector3D, t:Number):void
Updates a position Vector3D 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 [override] | PathAnimator | ||
updateProgress(val:Number):void [override] | PathAnimator | ||
updateTarget():void [override] | PathAnimator | ||
| alignToPath | property |
public var alignToPath:BooleanDefines 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:Vector3D
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:Pathdefines the path used by the animation.
public function get path():Path public function set path(value:Path):voidSee also
| position | property |
position:Vector3D [read-only] returns the current interpolated position on the path with no optional offset applied
public function get position():Vector3D| rotation | property |
rotation:Vector3D [read-only] returns the current interpolated rotation along the path.
public function get rotation():Vector3D| rotations | property |
public var rotations:ArrayDefines an optional array of rotations in order to follow a path that is twisted along its axis.
| targetObject | property |
public var targetObject:Object3DDefines 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)
Creates a new PathAnimator
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.
|
| getDefaultFps | () | method |
override protected function getDefaultFps():NumberReturnsNumber |
| getPathPosition | () | method |
public function getPathPosition(time:Number, position:Vector3D = null):Vector3DReturns a position on the path determined by the elapsed time given.
Parameters
time:Number — A number representing the elapsed time in seconds.
| |
position:Vector3D (default = null) — [optional] A 3d number object representing the instance to be returned.
|
Vector3D — A Vector3D object representing the position.
|
| getPositionOnPath | () | method |
public function getPositionOnPath(p:Vector3D, t:Number):voidUpdates a position Vector3D 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.
Parameters
p:Vector3D — Vector3D. The Vector3D 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):Numberreturns the segment index that is used at a given time;
Parameters
t:Number (default = NaN) — [Number]. A Number between 0 and 1. If no params, actual pathanimator time segment index is returned.
|
Number |
| updateProgress | () | method |
override protected function updateProgress(val:Number):voidParameters
val:Number |
| updateTarget | () | method |
override protected function updateTarget():void