| Package | alternativa.engine3d.animation |
| Class | public class AnimationClip |
| Inheritance | AnimationClip AnimationNode Object |
AnimationController.
See also
| Property | Defined By | ||
|---|---|---|---|
| animated : Boolean = true
Handles the active animation execution. | AnimationClip | ||
![]() | isActive : Boolean [read-only]
Determines if the animation is active. | AnimationNode | |
| length : Number = 0
Length of animation in seconds. | AnimationClip | ||
| loop : Boolean = true
Defines if animation should be repeated. | AnimationClip | ||
| name : String
Name of the animation clip. | AnimationClip | ||
| normalizedTime : Number
Current normalized time in the interval [0, 1]. | AnimationClip | ||
| notifiers : Vector.<AnimationNotify> [read-only]
The list of notification triggers. | AnimationClip | ||
| numTracks : int [read-only]
Number of tracks in the AnimationClip. | AnimationClip | ||
| objects : Array
The list of animated objects. | AnimationClip | ||
![]() | parent : AnimationNode [read-only]
Parent of this node in animation tree hierarchy. | AnimationNode | |
![]() | speed : Number = 1
Animation speed. | AnimationNode | |
| time : Number
Current time of animation. | AnimationClip | ||
| Method | Defined By | ||
|---|---|---|---|
AnimationClip(name:String = null)
Creates a AnimationClip object. | AnimationClip | ||
addNotify(time:Number, name:String = null):AnimationNotify
Creates an AnimationNotify instance which is capable of firing notification events when playback reaches the specified time on the time line. | AnimationClip | ||
addNotifyAtEnd(offsetFromEnd:Number = 0, name:String = null):AnimationNotify
Creates an AnimationNotify instance which is capable of firing notification events when playback reaches
the specified time on the time line. | AnimationClip | ||
Adds a new track to the animation clip. | AnimationClip | ||
attach(object:Object, includeDescendants:Boolean):void
Binds tracks from the animation clip to given object. | AnimationClip | ||
Clones the clip. | AnimationClip | ||
getTrackAt(index:int):Track
Returns the track object instance that exists at the specified index. | AnimationClip | ||
Removes specified notification trigger. | AnimationClip | ||
Removes the specified track from the clip. | AnimationClip | ||
slice(start:Number, end:Number):AnimationClip
Returns a fragment of the clip between specified bounds. | AnimationClip | ||
updateLength():void
Updates the length of the clip in order to match with length of longest track. | AnimationClip | ||
| animated | property |
public var animated:Boolean = trueHandles the active animation execution. Plays animation if value is true.
See also
| length | property |
public var length:Number = 0Length of animation in seconds. If length of any animation track is changed, updateLength() method should be called to recalculate the length of the clip.
See also
| loop | property |
public var loop:Boolean = trueDefines if animation should be repeated.
| name | property |
public var name:StringName of the animation clip.
| normalizedTime | property |
normalizedTime:NumberCurrent normalized time in the interval [0, 1].
public function get normalizedTime():Number public function set normalizedTime(value:Number):void| notifiers | property |
notifiers:Vector.<AnimationNotify> [read-only] The list of notification triggers.
public function get notifiers():Vector.<AnimationNotify>| numTracks | property |
numTracks:int [read-only] Number of tracks in the AnimationClip.
public function get numTracks():int| objects | property |
objects:ArrayThe list of animated objects. Animation tracks are bound to the objects by object names.
public function get objects():Array public function set objects(value:Array):voidSee also
| time | property |
time:NumberCurrent time of animation.
public function get time():Number public function set time(value:Number):void| AnimationClip | () | Constructor |
public function AnimationClip(name:String = null)Creates a AnimationClip object.
Parametersname:String (default = null) — name of the clip
|
| addNotify | () | method |
public function addNotify(time:Number, name:String = null):AnimationNotifyCreates an AnimationNotify instance which is capable of firing notification events when playback reaches the specified time on the time line.
Parameters
time:Number — The time in seconds to which the notification trigger will be bound.
| |
name:String (default = null) — The name of AnimationNotify instance.
|
AnimationNotify — A new instance of AnimationNotify class bound to specified time counting from start of the time line.
|
See also
| addNotifyAtEnd | () | method |
public function addNotifyAtEnd(offsetFromEnd:Number = 0, name:String = null):AnimationNotifyCreates an AnimationNotify instance which is capable of firing notification events when playback reaches the specified time on the time line. The time is specified as an offset from the end of time line towards its start.
Parameters
offsetFromEnd:Number (default = 0) — The offset in seconds from the end of the time line towards its start, where the event object will be set in.
| |
name:String (default = null) — The name of notification trigger.
|
AnimationNotify — A new instance of AnimationNotify class bound to specified time.
|
See also
| addTrack | () | method |
public function addTrack(track:Track):TrackAdds a new track to the animation clip. The total length of the clip is recalculated automatically.
Parameters
track:Track — track which should be added.
|
Track — added track.
|
See also
| attach | () | method |
public function attach(object:Object, includeDescendants:Boolean):voidBinds tracks from the animation clip to given object. Only those tracks which have object property equal to the object's name are bound.
Parameters
object:Object — The object to which tracks are bound.
| |
includeDescendants:Boolean — If true, the whole tree of the object's children (if any) is processed.
|
See also
| clone | () | method |
public function clone():AnimationClipClones the clip. Both the clone and the original reference the same tracks.
ReturnsAnimationClip |
| getTrackAt | () | method |
public function getTrackAt(index:int):TrackReturns the track object instance that exists at the specified index.
Parameters
index:int — index.
|
Track — the track object instance that exists at the specified index.
|
| removeNotify | () | method |
public function removeNotify(notify:AnimationNotify):AnimationNotifyRemoves specified notification trigger.
Parameters
notify:AnimationNotify — The notification trigger to remove.
|
AnimationNotify — The removed notification trigger.
|
| removeTrack | () | method |
public function removeTrack(track:Track):TrackRemoves the specified track from the clip. The clip length is automatically recalculated.
Parameters
track:Track — track which should be removed.
|
Track — removed track.
|
See also
| slice | () | method |
public function slice(start:Number, end:Number):AnimationClipReturns a fragment of the clip between specified bounds.
Parameters
start:Number — The start time of a fragment in seconds.
| |
end:Number (default = NaN) — The end time of a fragment in seconds.
|
AnimationClip — The clip fragment.
|
| updateLength | () | method |
public function updateLength():voidUpdates the length of the clip in order to match with length of longest track. Should be called after track was changed.