소스 검색

Fixing Matrix.Lerp (again)

David Catuhe 9 년 전
부모
커밋
572a322e7a

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 2
dist/preview release/babylon.core.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3815 - 3815
dist/preview release/babylon.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3 - 3
dist/preview release/babylon.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3 - 3
dist/preview release/babylon.max.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 2
dist/preview release/babylon.noworker.js


+ 1 - 1
src/Animations/babylon.animation.js

@@ -406,7 +406,7 @@ var BABYLON;
                     }
                 }
                 else if (this._originalBlendValue.m) {
-                    destination[path] = BABYLON.Matrix.Lerp(currentValue, this._originalBlendValue, this._blendingFactor);
+                    destination[path] = BABYLON.Matrix.Lerp(this._originalBlendValue, currentValue, this._blendingFactor);
                 }
                 else {
                     destination[path] = this._originalBlendValue * (1.0 - this._blendingFactor) + this._blendingFactor * currentValue;

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

@@ -472,7 +472,7 @@
                     }
 
                 } else if (this._originalBlendValue.m) { // Matrix
-                    destination[path] = Matrix.Lerp(currentValue, this._originalBlendValue, this._blendingFactor);
+                    destination[path] = Matrix.Lerp(this._originalBlendValue, currentValue, this._blendingFactor);
                 } else { // Direct value
                     destination[path] = this._originalBlendValue * (1.0 - this._blendingFactor) + this._blendingFactor * currentValue;
                 }

+ 1 - 1
src/Math/babylon.math.js

@@ -2046,7 +2046,7 @@ var BABYLON;
         Matrix.Lerp = function (startValue, endValue, gradient) {
             var result = Matrix.Zero();
             for (var index = 0; index < 16; index++) {
-                result.m[index] = startValue.m[index] * gradient + endValue.m[index] * (1.0 - gradient);
+                result.m[index] = startValue.m[index] * (1.0 - gradient) + endValue.m[index] * gradient;
             }
             return result;
         };

+ 1 - 1
src/Math/babylon.math.ts

@@ -2559,7 +2559,7 @@
             var result = Matrix.Zero();
 
             for (var index = 0; index < 16; index++) {
-                result.m[index] = startValue.m[index] * gradient + endValue.m[index] * (1.0 - gradient);
+                result.m[index] = startValue.m[index] * (1.0 - gradient) + endValue.m[index] * gradient;
             }
 
             return result;