David Catuhe 7 년 전
부모
커밋
fd7c78a304
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      src/Animations/babylon.animatable.ts
  2. 2 2
      src/Animations/babylon.runtimeAnimation.ts

+ 2 - 2
src/Animations/babylon.animatable.ts

@@ -6,12 +6,12 @@
         private _paused = false;
         private _scene: Scene;
         private _speedRatio = 1;
-        private _weight = 0.5;
+        private _weight = -1.0;
 
         public animationStarted = false;
 
         /**
-         * Gets or sets the animatable weight (1.0 by default)
+         * Gets or sets the animatable weight (-1.0 by default meaning not weighted)
          */
         public get weight(): number {
             return this._weight;

+ 2 - 2
src/Animations/babylon.runtimeAnimation.ts

@@ -247,7 +247,7 @@
             let enableBlending = this._target && this._target.animationPropertiesOverride ? this._target.animationPropertiesOverride.enableBlending : this._animation.enableBlending;
             let blendingSpeed = this._target && this._target.animationPropertiesOverride ? this._target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
             
-            if (enableBlending && this._blendingFactor <= 1.0 || weight != 1.0) {
+            if (enableBlending && this._blendingFactor <= 1.0 || weight !== -1.0) {
                 if (!this._originalValue) {
                     if (destination[path].clone) {
                         this._originalValue = destination[path].clone();
@@ -276,7 +276,7 @@
                 destination[path] = this._currentValue;
             } else {
                 this._currentValue = currentValue;
-                if (weight != 1.0) {
+                if (weight !== -1.0) {
                     this._scene._registerTargetForLateAnimationBinding(this);
                 } else {
                     destination[path] = this._currentValue;