KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
It seems like Three.js does not have a good way to dispose a THREE.Scene and all of the objects within that scene. Currently I am doing the following: $.each(scene.__objects, function(idx, obj) { scene.remove(obj); if (obj.geometry) { obj.geometry.dispose(); } if (obj.material) { if (obj.material instanceof THREE.MeshFaceMaterial) { $.each(obj.material.materials, function(idx, obj) { obj.dispose(); }); } else { obj.material.dispose(); } } if (obj.dispose) { obj.dispose(); } }); Looking at the Chrome Heap
Tags (comma-separated)
Save Edits
Cancel