javascript - how to remove all Mesh objects from the scene in three.js? -


i passing name of 3d model add , texture name in function , result 3d model rendered in scene. in stuck ,i want remove 3d objects scene

when use scene.children objects contains light , camera want remove meshes in scene

just removing 3 objects scene not enough delete them memory. have call dispose() methods on objects' geometries, materials , textures.

https://github.com/mrdoob/three.js/issues/5175

after call dispose , remove methods, diagnostic (where this.renderer three.renderer):

if (this.renderer && (this.renderer.info.memory.geometries || this.renderer.info.memory.programs || this.renderer.info.memory.textures)) {     loge("geometries=" + this.renderer.info.memory.geometries + " programs=" + this.renderer.info.memory.programs + " textures=" + this.renderer.info.memory.textures); } 

if number of programs, geometries , textures isn't stable, inviting performance issues , memory leak.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -