apply method
Resolve and apply the property value to a target node. This operation is additive; a given node property may be amended by many different PropertyResolvers prior to rendering. For example, an AnimationPlayer may blend multiple Animations together by applying several AnimationClips.
Implementation
@override
void apply(AnimationTransforms target, double timeInSeconds, double weight) {
if (_values.isEmpty) {
return;
}
_TimelineKey key = _getTimelineKey(timeInSeconds);
Quaternion value = _values[key.index];
if (key.lerp < 1) {
value = _values[key.index - 1].slerp(value, key.lerp);
}
target.animatedPose.rotation =
target.animatedPose.rotation.slerp(value, weight);
}