Browse Source

fixed "name" param not propagated

Vousk-prod 9 năm trước cách đây
mục cha
commit
c3b6ef13fd
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      src/Animations/babylon.animation.ts

+ 3 - 3
src/Animations/babylon.animation.ts

@@ -31,7 +31,7 @@
 
         private _ranges : { [name: string] : AnimationRange; } = {};
 
-        static _PrepareAnimation(targetProperty: string, framePerSecond: number, totalFrame: number,
+        static _PrepareAnimation(name: string, targetProperty: string, framePerSecond: number, totalFrame: number,
             from: any, to: any, loopMode?: number, easingFunction?: EasingFunction): Animation {
             var dataType = undefined;
 
@@ -69,7 +69,7 @@
             framePerSecond: number, totalFrame: number,
             from: any, to: any, loopMode?: number, easingFunction?: EasingFunction, onAnimationEnd?: () => void) {
 
-            var animation = Animation._PrepareAnimation(targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction);
+            var animation = Animation._PrepareAnimation(name, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction);
 
             return node.getScene().beginDirectAnimation(node, [animation], 0, totalFrame, (animation.loopMode === 1), 1.0, onAnimationEnd);
         }
@@ -78,7 +78,7 @@
             framePerSecond: number, totalFrame: number,
             from: any, to: any, loopMode?: number, easingFunction?: EasingFunction, onAnimationEnd?: () => void) {
 
-            var animation = Animation._PrepareAnimation(targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction);
+            var animation = Animation._PrepareAnimation(name, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction);
 
             node.animations.push(animation);