Ver código fonte

Merge pull request #6733 from BabylonJS/csg-declarations

Update csg.ts
David Catuhe 6 anos atrás
pai
commit
03dba36fec
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/Meshes/csg.ts

+ 2 - 2
src/Meshes/csg.ts

@@ -654,7 +654,7 @@ export class CSG {
      * @param keepSubMeshes Specifies if the submeshes should be kept
      * @returns A new Mesh
      */
-    public buildMeshGeometry(name: string, scene: Scene, keepSubMeshes: boolean): Mesh {
+    public buildMeshGeometry(name: string, scene?: Scene, keepSubMeshes?: boolean): Mesh {
         var matrix = this.matrix.clone();
         matrix.invert();
 
@@ -774,7 +774,7 @@ export class CSG {
      * @param keepSubMeshes Specifies if submeshes should be kept
      * @returns The new Mesh
      */
-    public toMesh(name: string, material: Nullable<Material>, scene: Scene, keepSubMeshes: boolean): Mesh {
+    public toMesh(name: string, material: Nullable<Material> = null, scene?: Scene, keepSubMeshes?: boolean): Mesh {
         var mesh = this.buildMeshGeometry(name, scene, keepSubMeshes);
 
         mesh.material = material;