فهرست منبع

Merge pull request #921 from vousk/fix_animation

fixed "name" param not propagated
David Catuhe 9 سال پیش
والد
کامیت
2af05b8f0f
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      src/Animations/babylon.animation.ts

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

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