Skip to content

Commit 3c019f1

Browse files
committed
fix: use QuaternionKeyframeTrack instead of ColorKeyframeTrack if property ends with .quaternion
1 parent d6adc29 commit 3c019f1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/jsm/loaders/GLTFLoader.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,12 @@ class GLTFAnimationPointerExtension {
12381238
TypedKeyframeTrack = VectorKeyframeTrack;
12391239
break;
12401240
case 4:
1241-
TypedKeyframeTrack = ColorKeyframeTrack;
1241+
1242+
if ( animationPointerPropertyPath.endsWith( '.quaternion' ) )
1243+
TypedKeyframeTrack = QuaternionKeyframeTrack;
1244+
else
1245+
TypedKeyframeTrack = ColorKeyframeTrack;
1246+
12421247
break;
12431248

12441249
}

0 commit comments

Comments
 (0)