瀏覽代碼

fix static initialization order

Julien Barrois 7 年之前
父節點
當前提交
64f850723f
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      Tools/Gulp/config.json
  2. 3 3
      src/Math/babylon.math.ts

+ 1 - 1
Tools/Gulp/config.json

@@ -155,6 +155,7 @@
                 "../../src/babylon.types.js",
                 "../../src/Events/babylon.keyboardEvents.js",
                 "../../src/Events/babylon.pointerEvents.js",
+                "../../src/Tools/babylon.tools.js",
                 "../../src/Math/babylon.math.js",
                 "../../src/Math/babylon.math.scalar.js",
                 "../../src/babylon.mixins.js",
@@ -163,7 +164,6 @@
                 "../../src/Tools/babylon.deferred.js",
                 "../../src/Tools/babylon.observable.js",
                 "../../src/Tools/babylon.smartArray.js",
-                "../../src/Tools/babylon.tools.js",
                 "../../src/Tools/babylon.promise.js",
                 "../../src/Tools/babylon.workerPool.js",
                 "../../src/States/babylon.alphaCullingState.js",

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

@@ -1251,7 +1251,7 @@ module BABYLON {
             var len = this.length();
 
             if (len === 0) {
-                return this;
+                return this;
             }
 
             var num = 1.0 / len;
@@ -1994,7 +1994,7 @@ module BABYLON {
         public normalize(): Vector3 {
             var len = this.length();
             if (len === 0 || len === 1.0) {
-                return this;
+                return this;
             }
 
             var num = 1.0 / len;
@@ -3108,7 +3108,7 @@ module BABYLON {
             var len = this.length();
 
             if (len === 0) {
-                return this;
+                return this;
             }
 
             var num = 1.0 / len;