Search the Community
Showing results for tags 'delete'.
Found 3 results
Hi everyone, A bit of a babylon philosophical question here. I want to deal with a massive amount of spheres, and want to keep it as smooth as possible. I thought I would hide spheres which are no longer in the view frustum. Now that I got that code, I wonder what is the most efficient, either to hide the meshes by selecting and applying .visibility = 0, or if it is better to dispose of the meshes ? If you're curious, in my case I only rotate the camera and don't move it, and I know what I have to show thanks to the angles within a database. Currently, Babylon still feels a bit too slow to my taste with many elements hidden. Should I change my code to dispose of the meshes and recreate them instead of hiding/showing ? Best, Kevin
Hi, to prevent memory leak, I want to delete unused texture. What is the proper way to do it? Let's say I created texture : var button = PIXI.Texture.fromCanvas(canvas); Later in the code i want to do something like this : button.destroy(); // really delete texture from memory button = PIXI.Texture.fromCanvas(canvas); // newly created texture Thanks in advance, -bubamara