Jump to content

what is the difference of clone and BABYLON.InstancedMesh?


Recommended Posts


i am new 

find an article that tell me prefer use the BABYLON.InstancedMesh to make more mesh 


however ,i see other code that use mesh.clone 

what are those two function difference ?

in what situation ,we use it?


Link to comment
Share on other sites

- an instance is like a copy of the base object (which serves as a reference). if you modify the base object (textures for example) all instances are modified, copies can not be modified.

- If you create a clone, it's also a copy, but each copy can be edited and have their own editable textures. You can also create another clone from a clone, which is not possible with instances.

Instance creation is the most efficient if you do not need to modify them, otherwise prefer the cloning that creates new editable mesh. Cloning avoids reloading the same object and is therefore faster.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...