createAnimationClip method
Instantiates animation as an AnimationClip bound to bindTarget
and registers it with this player.
The clip starts paused at time 0; call AnimationClip.play to
begin playback. Subsequent calls with the same Animation.name
replace the previously registered clip.
Implementation
AnimationClip createAnimationClip(Animation animation, Node bindTarget) {
final clip = AnimationClip(animation, bindTarget);
// Record all of the unique default transforms that this AnimationClip
// will mutate.
for (final binding in clip._bindings) {
_targetTransforms[binding.node] = AnimationTransforms(
bindPose: DecomposedTransform.fromMatrix(binding.node.localTransform),
);
}
_clips[animation.name] = clip;
return clip;
}