AnimationAction constructor
AnimationAction(
- AnimationMixer mixer,
- AnimationClip clip, {
- Object3D? localRoot,
- int? blendMode,
Implementation
AnimationAction(
this.mixer,
this.clip, {
this.localRoot,
int? blendMode,
}) : blendMode = blendMode ?? clip.blendMode {
var tracks = clip.tracks, nTracks = tracks.length;
interpolants = List<Interpolant?>.filled(nTracks, null);
var interpolantSettings = {"endingStart": ZeroCurvatureEnding, "endingEnd": ZeroCurvatureEnding};
for (var i = 0; i != nTracks; ++i) {
var interpolant = tracks[i].createInterpolant!(null);
interpolants[i] = interpolant;
interpolant.settings = interpolantSettings;
}
_interpolantSettings = interpolantSettings;
// inside: PropertyMixer (managed by the mixer)
propertyBindings = List<PropertyMixer?>.filled(nTracks, null);
cacheIndex = null; // for the memory manager
byClipCacheIndex = null; // for the memory manager
_timeScaleInterpolant = null;
_weightInterpolant = null;
loop = LoopRepeat;
_loopCount = -1;
// global mixer time when the action is to be started
// it's set back to 'null' upon start of the action
_startTime = null;
// scaled local time of the action
// gets clamped or wrapped to 0..clip.duration according to loop
time = 0;
timeScale = 1;
_effectiveTimeScale = 1;
weight = 1;
_effectiveWeight = 1;
repetitions = double.infinity; // no. of repetitions when looping
paused = false; // true -> zero effective time scale
enabled = true; // false -> zero effective weight
clampWhenFinished = false; // keep feeding the last frame?
zeroSlopeAtStart = true; // for smooth interpolation w/o separate
zeroSlopeAtEnd = true; // clips for start, loop and end
}