Просмотр исходного кода

AnimationAction: Preserve interpolant settings on action creation. (#33033)

Co-authored-by: javedwilde <javedwilde@gmail.com>
Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
JavedWilde 4 дней назад
Родитель
Сommit
ac88a8c2d8
1 измененных файлов с 10 добавлено и 1 удалено
  1. 10 1
      src/animation/AnimationAction.js

+ 10 - 1
src/animation/AnimationAction.js

@@ -41,6 +41,15 @@ class AnimationAction {
 
 			const interpolant = tracks[ i ].createInterpolant( null );
 			interpolants[ i ] = interpolant;
+
+			// preserve interpolant settings (like tangent data from BezierInterpolant)
+
+			if ( interpolant.settings ) {
+
+				Object.assign( interpolantSettings, interpolant.settings );
+
+			}
+
 			interpolant.settings = interpolantSettings;
 
 		}
@@ -894,7 +903,7 @@ class AnimationAction {
 
 			} else {
 
-				settings.endingEnd 	 = WrapAroundEnding;
+				settings.endingEnd = WrapAroundEnding;
 
 			}
 

粤ICP备19079148号