Przeglądaj źródła

use Mesh and not GroundMesh to instantiate TiledGround

Celian 11 lat temu
rodzic
commit
b1d4cd2a8c
2 zmienionych plików z 2 dodań i 10 usunięć
  1. 1 5
      Babylon/Mesh/babylon.mesh.js
  2. 1 5
      Babylon/Mesh/babylon.mesh.ts

+ 1 - 5
Babylon/Mesh/babylon.mesh.js

@@ -813,16 +813,12 @@ var BABYLON;
         };
 
         Mesh.CreateTiledGround = function (name, xmin, zmin, xmax, zmax, subdivisions, precision, scene, updatable) {
-            var tiledGround = new BABYLON.GroundMesh(name, scene);
-            tiledGround._setReady(false);
-            tiledGround._subdivisions = subdivisions;
+            var tiledGround = new BABYLON.Mesh(name, scene);
 
             var vertexData = BABYLON.VertexData.CreateTiledGround(xmin, zmin, xmax, zmax, subdivisions, precision);
 
             vertexData.applyToMesh(tiledGround, updatable);
 
-            tiledGround._setReady(true);
-
             return tiledGround;
         };
 

+ 1 - 5
Babylon/Mesh/babylon.mesh.ts

@@ -822,16 +822,12 @@
         }
 
         public static CreateTiledGround(name: string, xmin: number, zmin: number, xmax: number, zmax: number, subdivisions: {w: number; h: number;}, precision: {w: number; h: number;}, scene: Scene, updatable?: boolean): Mesh {
-            var tiledGround = new BABYLON.GroundMesh(name, scene);
-            tiledGround._setReady(false);
-            tiledGround._subdivisions = subdivisions;
+            var tiledGround = new BABYLON.Mesh(name, scene);
 
             var vertexData = BABYLON.VertexData.CreateTiledGround(xmin, zmin, xmax, zmax, subdivisions, precision);
 
             vertexData.applyToMesh(tiledGround, updatable);
 
-            tiledGround._setReady(true);
-
             return tiledGround;
         }