AnimationAction class
AnimationActions schedule the performance of the animations which are
stored in AnimationClips
.
Note: Most of AnimationAction's methods can be chained.
For an overview of the different elements of the three.js animation system see the "Animation System" article in the "Next Steps" section of the manual.
Constructors
- AnimationAction.new(AnimationMixer mixer, AnimationClip clip, {Object3D? localRoot, int? blendMode})
-
mixer
- theAnimationMixer
that is controlled by this action.
Properties
- blendMode ↔ int
-
getter/setter pair
- byClipCacheIndex ↔ int?
-
getter/setter pair
- cacheIndex ↔ int?
-
getter/setter pair
- clampWhenFinished ↔ bool
-
getter/setter pair
- clip ↔ AnimationClip
-
getter/setter pair
- enabled ↔ bool
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
interpolants
↔ List<
Interpolant?> -
getter/setter pair
- localRoot ↔ Object3D?
-
getter/setter pair
- loop ↔ int
-
getter/setter pair
- mixer ↔ AnimationMixer
-
getter/setter pair
- paused ↔ bool
-
getter/setter pair
-
propertyBindings
↔ List<
PropertyMixer?> -
getter/setter pair
- repetitions ↔ num
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- time ↔ double
-
getter/setter pair
- timeScale ↔ num
-
getter/setter pair
- weight ↔ double
-
getter/setter pair
- zeroSlopeAtEnd ↔ bool
-
getter/setter pair
- zeroSlopeAtStart ↔ bool
-
getter/setter pair
Methods
-
crossFadeFrom(
AnimationAction fadeOutAction, num duration, [bool warp = false]) → AnimationAction - Causes this action to fadeIn, fading out another action simultaneously, within the passed time interval. This method can be chained.
-
crossFadeTo(
AnimationAction fadeInAction, num duration, bool warp) → AnimationAction - Causes this action to fadeOut, fading in another action simultaneously, within the passed time interval. This method can be chained.
-
fadeIn(
num duration) → AnimationAction -
Increases the
page:.weight weight
of this action gradually from0
to1
, within the passed time interval. This method can be chained. -
fadeOut(
num duration) → AnimationAction -
Decreases the weight of this action gradually from
1
to0
, within the passed time interval. This method can be chained. -
getClip(
) → AnimationClip - Returns the clip which holds the animation data for this action.
-
getEffectiveTimeScale(
) → num - Returns the effective time scale (considering the current states of warping and paused).
-
getEffectiveWeight(
) → num -
getMixer(
) → AnimationMixer - Returns the mixer which is responsible for playing this action.
-
getRoot(
) → Object3D - Returns the root object on which this action is performed
-
halt(
num duration) → AnimationAction -
Decelerates this animation's speed to
0
by decreasing timeScale gradually (starting from its current value), within the passed time interval. -
isRunning(
) → bool - Returns true if the action’s time is currently running.
-
isScheduled(
) → bool - Returns true, if this action is activated in the mixer.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
play(
) → AnimationAction - Tells the mixer to activate the action. This method can be chained.
-
reset(
) → AnimationAction - Resets the action. This method can be chained.
-
scheduleFading(
num duration, num weightNow, num weightThen) → AnimationAction -
setDuration(
num duration) → AnimationAction - Sets the duration for a single loop of this action (by adjusting timeScale and stopping any scheduled warping). This method can be chained.
-
setEffectiveTimeScale(
num timeScale) → AnimationAction -
Sets the
timeScale
and stops any scheduled warping. This method can be chained. -
setEffectiveWeight(
double weight) → AnimationAction -
Sets the
weight
and stops any scheduled fading. This method can be chained. -
setLoop(
int mode, num repetitions) → AnimationAction -
Sets the loop
mode
and the number ofrepetitions
. This method can be chained. -
startAt(
dynamic time) → AnimationAction - Defines the time for a delayed start (usually passed as AnimationMixer.time + deltaTimeInSeconds). This method can be chained.
-
stop(
) → AnimationAction - Tells the mixer to deactivate this action. This method can be chained.
-
stopFading(
) → AnimationAction -
Stops any scheduled
page:.fadeIn fading
which is applied to this action. This method can be chained. -
stopWarping(
) → AnimationAction -
Stops any scheduled
page:.warp warping
which is applied to this action. -
syncWith(
AnimationAction action) → AnimationAction - Synchronizes this action with the passed other action. This method can be chained.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
num time, num deltaTime, num timeDirection, int accuIndex) → void -
warp(
num startTimeScale, num endTimeScale, num duration) → AnimationAction -
Changes the playback speed, within the passed time interval, by modifying
timeScale gradually from
startTimeScale
toendTimeScale
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited