Jump to content

cancel mesh simplify


Dad72
 Share

Recommended Posts

Hello,

How to cancel object that has been simplified like this:

mesh.simplify([{distance:300, quality:0.8}, {distance:500, quality:0.5}, {distance:700, quality:0.3}], false, BABYLON.SimplificationType.QUADRATIC);

I would like to be able to do the opposite operation for my editor. If a user simplifies an object, I would like it to be able to cancel this simplification. Is this possible, how can one do?

Thank you for your help.

Link to comment
Share on other sites

Yes, it works. Is this the right way to do it ?

sphere2.simplify([{ quality: 0.9, distance: 50 }, { quality: 0.5, distance: 80 }, { quality: 0.3, distance: 100 }, { quality: 0.1, distance: 180 }], true, BABYLON.SimplificationType.QUADRATIC, function() { 
           for(var i = 0; i < sphere2._LODLevels.length; i++) {
                 sphere2._LODLevels[i].mesh.dispose();    
           }
           sphere2._LODLevels = [];  
    });

 

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