ソースを参照

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 {