Packageaway3d.animators
Classpublic class PathAnimator
InheritancePathAnimator Inheritance Animator Inheritance flash.events.EventDispatcher



Public Properties
 PropertyDefined By
  alignToPath : Boolean
Defines whether the 3d object aligns its rotation to the axis of the path while animating along the path.
PathAnimator
 InheritedcurrentFrame : int
[read-only] Returns the current keyframe number
Animator
 InheritedcycleNumber : int
[read-only] Returns the number of the current loop cycle
Animator
 Inheriteddelay : Number
Defines the delay to the start of the animation in seconds
Animator
 Inheritedfps : Number
Defines the keyframes per second of the animation
Animator
 Inheritedinterpolate : Boolean
Defines whether the animation interpolates between channel points.
Animator
 InheritedisPlaying : Boolean
[read-only] Returns true when the animation is playing
Animator
 Inheritedlength : Number
Defines the total length of the animation in seconds
Animator
 Inheritedloop : Boolean
Defines whether the animation will loop.
Animator
 Inheritedname : 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
 Inheritedprogress : 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
 Inheritedtarget : 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
 InheritedtotalFrames : Number
[read-only] Returns the total length of the animation in frames
Animator
Protected Properties
 PropertyDefined By
 Inherited_currentFrame : uint
Animator
 Inherited_fraction : Number
Animator
 Inheritedini : Init
Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.
Animator
 Inherited_invFraction : Number
Animator
 Inherited_progress : Number = 0
Animator
 Inherited_target : Object3D
Animator
 Inherited_time : Number
Animator
Public Methods
 MethodDefined By
  
PathAnimator(path:Path = null, target:Object3D = null, init:Object = null)
Creates a new PathAnimator
PathAnimator
 Inherited
addOnCycle(listener:Function):void
Default method for adding a cycle event listener.
Animator
 Inherited
addOnEnterKeyFrame(listener:Function):void
Default method for adding an enterKeyFrame event listener
Animator
 Inherited
clone(animator:Animator = null):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
 Inherited
gotoAndPlay(frame:uint):void
Animator
 Inherited
gotoAndStop(frame:uint):void
Animator
 Inherited
play():void
Animator
 Inherited
removeOnCycle(listener:Function):void
Default method for removing a cycle event listener
Animator
 Inherited
removeOnEnterKeyFrame(listener:Function):void
Default method for removing a enterKeyFrame event listener
Animator
 Inherited
stop():void
Animator
 Inherited
update(time:Number):void
Updates the position of the playhead to the given time in seconds.
Animator
Protected Methods
 MethodDefined By
  
getDefaultFps():Number
[override]
PathAnimator
  
updateProgress(val:Number):void
[override]
PathAnimator
  
[override]
PathAnimator
Events
 Event Summary Defined By
 InheritedDispatched when a looping animation starts a new cycle.Animator
 InheritedDispatched when entering a new keyframe.Animator
 InheritedDispatched when the animation starts.Animator
 InheritedDispatched when the animation stops.Animator
Property Detail
alignToPathproperty
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.

offsetproperty 
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

pathproperty 
path:Path

defines the path used by the animation.


Implementation
    public function get path():Path
    public function set path(value:Path):void

See also

Path
positionproperty 
position:Vector3D  [read-only]

returns the current interpolated position on the path with no optional offset applied


Implementation
    public function get position():Vector3D
rotationproperty 
rotation:Vector3D  [read-only]

returns the current interpolated rotation along the path.


Implementation
    public function get rotation():Vector3D
rotationsproperty 
public var rotations:Array

Defines an optional array of rotations in order to follow a path that is twisted along its axis.

targetObjectproperty 
public var targetObject:Object3D

Defines a target object that the 3d object looks at while animating along the path. Defaults to null.

Constructor Detail
PathAnimator()Constructor
public function PathAnimator(path:Path = null, target:Object3D = null, init:Object = null)

Creates a new PathAnimator

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.
####INIT####
Method Detail
getDefaultFps()method
override protected function getDefaultFps():Number

Returns
Number
getPathPosition()method 
public function getPathPosition(time:Number, position:Vector3D = null):Vector3D

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

Returns
Vector3D — A Vector3D object representing the position.
getPositionOnPath()method 
public function getPositionOnPath(p:Vector3D, t:Number):void

Updates 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

animateOnPath
update
getTimeSegment()method 
public function getTimeSegment(t:Number):Number

returns 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.

Returns
Number
updateProgress()method 
override protected function updateProgress(val:Number):void

Parameters

val:Number

updateTarget()method 
override protected function updateTarget():void