I have this stl model that has >3 million vertices and have to render it on screen. Right now, loading the model using a Threejs STL loader crashes the browser. Based on some research, I'm considering doing some of the following:
Stream the STL file to the client and have the STL loader load the model in 1mb chunks
Every time a chunk gets loaded, I can create a buffer geometry and construct a mesh from it. I can do this for every chunk and add all the meshes to the scene. Thus the scene will have multiple meshes in it, but look like it's the original model.
I have a pretty good idea of how to do step 2, but is the first part possible? Can a three.js STL loader load an STL in chunks (assuming it's being delivered to the client in chunks) as I've described?
glTF
causes much less parsing overhead. I would start with this option. – Mugen87STLLoader
, or is it a problem with how the file defines the shapes? Without knowing more about your data, I think your option 2 (or what @Hesha suggested) are the correct approaches. – TheJim01