How can I efficiently render a large static mesh in three.js, even if it's 2 GB with tens of millions of polygons?
My plan is to stream the mesh geometry buffers into indexedDB and render them progressively to the screen, all while maintaining an interactive frame rate. I will implement a MemoryManager class to prevent crashing the browser by loading data into a fixed-size buffer from indexedDB. In my animation loop, I will render as many geometries as possible within 16ms, continuing to render meshes until the user stops interacting.
While I have a high-level strategy in place, I know there will be numerous optimizations required (such as object pools, octree, occlusion queries, etc).
My main question is: Is there a more efficient way to achieve this, and has it been attempted before? (Considering I am using WebGL1, knowing WebGL2 occlusion queries would simplify this process)
Additionally, what is the optimal method for customizing the Three.js WebGLRenderer class? I know there are private closure variables (like WebGLState) that I may need to access in order to enhance performance for my specific scenario.