Three js memory management

后端 未结 2 674
渐次进展
渐次进展 2021-02-04 08:56

I have a large scene with a lot of Mesh and MorphAnimMesh. I want to free memory when the meshes are removed. If i know right this is the best way to do:

for ( v         


        
2条回答
  •  礼貌的吻别
    2021-02-04 09:39

    Most likely, you need to add some, or all, of the following:

    geometry.dispose();
    material.dispose();
    texture.dispose();
    

    Check out these examples:

    http://mrdoob.github.com/three.js/examples/webgl_test_memory.html

    http://mrdoob.github.com/three.js/examples/webgl_test_memory2.html

    three.js r.60

提交回复
热议问题