labris
5
Please don’t use for-each cycle since it will not work here for objective reasons.
To dispose meshes from an array use while
while(scene.meshes.length) {
const mesh = scene.meshes[0]
mesh.dispose();
}
The same relates to mesh.animations
array.
1 Like