Explorar el Código

make optional faceUV optional + typed faceUV array

jbousquie hace 10 años
padre
commit
b165fa8de8
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/Mesh/babylon.mesh.vertexData.ts

+ 2 - 2
src/Mesh/babylon.mesh.vertexData.ts

@@ -574,7 +574,7 @@
             return vertexData;
             return vertexData;
         }
         }
 
 
-        public static CreateBox(options: { width?: number, height?: number, depth?: number, faceUV: Vector4[], sideOrientation?: number }): VertexData;
+        public static CreateBox(options: { width?: number, height?: number, depth?: number, faceUV?: Vector4[], sideOrientation?: number }): VertexData;
         public static CreateBox(size: number, sideOrientation?: number): VertexData;
         public static CreateBox(size: number, sideOrientation?: number): VertexData;
         public static CreateBox(options: any, sideOrientation: number = Mesh.DEFAULTSIDE): VertexData {
         public static CreateBox(options: any, sideOrientation: number = Mesh.DEFAULTSIDE): VertexData {
             var normalsSource = [
             var normalsSource = [
@@ -594,7 +594,7 @@
             var width = 1;
             var width = 1;
             var height = 1;
             var height = 1;
             var depth = 1;
             var depth = 1;
-            var faceUV = options.faceUV || new Array(6);
+            var faceUV: Vector4[] = options.faceUV || new Array<Vector4>(6);
 
 
             if (options.width !== undefined) {
             if (options.width !== undefined) {
                 width = options.width || 1;
                 width = options.width || 1;