Jump to content

Merge Meshes


Maxence
 Share

Recommended Posts

Hi,

 

Thanks Deltakosh for your wiki page about merging meshes (https://github.com/BabylonJS/Babylon.js/wiki/How-to-merge-meshes).

It helped me to create a function to merge a mesh to another one. I added the function to your Mesh class and I could send you a pull-request if you want.

 

Nevertheless I'm not totaly happy about it since I didn't manage to avoid to create a new mesh to contain the result of the merging. Indeed, I think it could be helpful to directly modify the first mesh to be the merged mesh, thus the process could be simpler to chain meshes merging (and I need this :)) and more efficient.

 

Here are two jsfiddles. The first one gives the good result but a new mesh has to be created, the second one avoids the creation of a new mesh but the result is translated and I don't understand why.

 

http://jsfiddle.net/MaxenceBrasselet/epzrV/

 

http://jsfiddle.net/MaxenceBrasselet/epzrV/1/

 

(only two lines are different: l48 and l65)

 

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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