瀏覽代碼

make clone's name parameter optional

Trevor Baron 7 年之前
父節點
當前提交
90636dcb11
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Mesh/babylon.mesh.ts

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

@@ -1816,7 +1816,7 @@
          * The optional parameter `doNotCloneChildren` (default `false`) allows/denies the recursive cloning of the original mesh children if any.
          * The parameter `clonePhysicsImpostor` (default `true`)  allows/denies the cloning in the same time of the original mesh `body` used by the physics engine, if any. 
          */
-        public clone(name: string, newParent?: Node, doNotCloneChildren?: boolean, clonePhysicsImpostor: boolean = true): Mesh {
+        public clone(name: string = "", newParent?: Node, doNotCloneChildren?: boolean, clonePhysicsImpostor: boolean = true): Mesh {
             return new Mesh(name, this.getScene(), newParent, this, doNotCloneChildren, clonePhysicsImpostor);
         }