浏览代码

updated VertexData.CreateGround : now supports only options parameter (breaking change)

jbousquie 10 年之前
父节点
当前提交
92a68e9882
共有 1 个文件被更改,包括 4 次插入14 次删除
  1. 4 14
      src/Mesh/babylon.mesh.vertexData.ts

+ 4 - 14
src/Mesh/babylon.mesh.vertexData.ts

@@ -1002,26 +1002,16 @@
             return vertexData;
         }
 
-        public static CreateGround(options: { width?: number, height?: number, subdivisions?: number, sideOrientation?: number }): VertexData;
-        public static CreateGround(width: number, height: number, subdivisions?: number): VertexData;
-        public static CreateGround(options: any, height?: number, subdivisions?: number): VertexData {
+        public static CreateGround(options: { width?: number, height?: number, subdivisions?: number }): VertexData {
             var indices = [];
             var positions = [];
             var normals = [];
             var uvs = [];
             var row: number, col: number;
 
-            var width: number;
-
-            if (options.width) {
-                width = options.width || 1;
-                height = options.height || 1;
-                subdivisions = options.subdivisions || 1;
-            } else {
-                width = options || 1;
-                height = height || 1;
-                subdivisions = subdivisions || 1;
-            }
+            var width: number = options.width || 1;
+            var height: number = options.height || 1;
+            var subdivisions: number = options.subdivisions || 1;
 
             for (row = 0; row <= subdivisions; row++) {
                 for (col = 0; col <= subdivisions; col++) {