Optimal way to render multiple scenes with large numbers of objects in Three.js
问题 Imagine that you want to draw two scenes, each with hundreds of spheres, and provide the ability to switch between these scenes. What is an optimal way to do this? Currently a switch takes about 4 to 5 seconds because I am deleting, creating, and drawing all of the spheres on each switch. Below is an example of the code that runs on a scene switch. clearObjects(); resetCamera(); for(var i = 0; i < 500; i++) { var geometry = new THREE.SphereGeometry(radius, 50, 50); var material = new THREE