Julien Barrois 7 年之前
父节点
当前提交
6f66fa99f4
共有 3 个文件被更改,包括 11 次插入10 次删除
  1. 2 2
      src/Math/babylon.math.ts
  2. 1 1
      src/Mesh/babylon.geometry.ts
  3. 8 7
      src/Tools/babylon.tools.ts

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

@@ -1629,7 +1629,7 @@ module BABYLON {
         }
 
         /**
-         * Adds the given coordinates to the current Vector3 
+         * Adds the given coordinates to the current Vector3
          * @param x defines the x coordinate of the operand
          * @param y defines the y coordinate of the operand
          * @param z defines the z coordinate of the operand
@@ -7200,7 +7200,7 @@ module BABYLON {
      * Same as Tmp but not exported to keep it only for math functions to avoid conflicts
      */
     class MathTmp {
-        public static Vector3: Vector3[] = Tools.BuildArray(6, Vector3);;
+        public static Vector3: Vector3[] = Tools.BuildArray(6, Vector3);
         public static Matrix: Matrix[] = Tools.BuildArray(2, Matrix);
         public static Quaternion: Quaternion[] = Tools.BuildArray(3, Quaternion);
     }

+ 1 - 1
src/Mesh/babylon.geometry.ts

@@ -398,7 +398,7 @@ module BABYLON {
 
             if (vertexBuffer.type !== VertexBuffer.FLOAT || vertexBuffer.byteStride !== tightlyPackedByteStride) {
                 const copy : number[] = [];
-                vertexBuffer.forEach(count, value => copy.push(value));
+                vertexBuffer.forEach(count, (value) => copy.push(value));
                 return copy;
             }
 

+ 8 - 7
src/Tools/babylon.tools.ts

@@ -518,8 +518,8 @@ module BABYLON {
             }
 
             if (bias) {
-                minimum.scaleInPlace(1-bias.x).addInPlaceFromFloats(-bias.y, -bias.y, -bias.y)
-                maximum.scaleInPlace(1+bias.x).addInPlaceFromFloats(bias.y, bias.y, bias.y)
+                minimum.scaleInPlace(1 - bias.x).addInPlaceFromFloats(-bias.y, -bias.y, -bias.y);
+                maximum.scaleInPlace(1 + bias.x).addInPlaceFromFloats(bias.y, bias.y, bias.y);
             }
 
             return {
@@ -554,8 +554,8 @@ module BABYLON {
             }
 
             if (bias) {
-                minimum.scaleInPlace(1-bias.x).addInPlaceFromFloats(-bias.y, -bias.y, -bias.y)
-                maximum.scaleInPlace(1+bias.x).addInPlaceFromFloats(bias.y, bias.y, bias.y)
+                minimum.scaleInPlace(1 - bias.x).addInPlaceFromFloats(-bias.y, -bias.y, -bias.y);
+                maximum.scaleInPlace(1 + bias.x).addInPlaceFromFloats(bias.y, bias.y, bias.y);
             }
 
             return {
@@ -585,10 +585,11 @@ module BABYLON {
          * @param kparams the arguments to pass to each call to the constructor
          * @returns a new array filled with new objects
          */
-        public static BuildArray = <T, P extends any[]>(size: number, konstructor: new (...p: P)=>T, ...kparams: P): Array<T> => {
+        public static BuildArray = <T, P extends any[]>(size: number, konstructor: new (...p: P) => T, ...kparams: P): Array<T> => {
             const a: T[] = [];
-            for (let i = 0; i < size; ++i)
-                a.push(new konstructor(...kparams));
+            for (let i = 0; i < size; ++i) {
+                a.push(new konstructor(...kparams));
+            }
             return a;
         }