How to hide smoothly some meshes in BJS

Check out whether any of the following help

@JohnK before the move works fine, when u added ur line it is so slow

If this is the case remove my lines.

Alternatively see if it is any quicker when after converting the sets to arrays and iterating over arrays not sets

If that does not work then other than checking out the optimizing suggestions above I am out of ideas.

yes it still slow !
here I tried to create directly an array and then push meshes without sources but it still slow :
PS: I can’t remove your lines cuz the invisibilty of meshes inside seems perfect, thank u dud :v:

about the “slow move” I’ll try again maybe it resolves

Smart change to array from set.

Note line 24 where I changed 30, 30 to 5, 5 to see if that speeded things up, you may want to change it back to 30, 30

Line 217 should now be new Array() not new Set()