浏览代码

Merge pull request #8810 from Popov72/mesh-clone-getter

Add a cloneMeshMap getter to the Mesh class
David Catuhe 5 年之前
父节点
当前提交
6fea19db83
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      src/Meshes/mesh.ts

+ 9 - 0
src/Meshes/mesh.ts

@@ -394,6 +394,15 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
     }
 
     /**
+     * Gets the list of clones of this mesh
+     * The scene must have been constructed with useClonedMeshMap=true for this to work!
+     * Note that useClonedMeshMap=true is the default setting
+     */
+    public get cloneMeshMap(): Nullable<{ [id: string]: Mesh | undefined }> {
+        return this._internalMeshDataInfo.meshMap;
+    }
+
+    /**
      * Gets or sets a boolean indicating that this mesh does not use index buffer
      */
     public get isUnIndexed(): boolean {