I built Unreal Engine's Nanite System in threejs https://github.com/apekshik/three-nanite
Like Nanite in Unreal, you can drop in a film-quality mesh with millions of triangles as it is. No retopology, no decimating, no hand-made LODs. The engine works out how much of it to draw.
In the example below, there's 184 million triangles but only under 2 million are drawn without any meaningful dip in visual fidelity.
How it works:
Every mesh is cut into small clusters of triangles, and each cluster is stored at many levels of detail. Every frame, each cluster picks the coarsest level that still looks identical at its size on screen. Close to the camera you get full detail; far away, a fraction of it.
Neighbouring clusters always agree on their shared edges, so there are no cracks and no popping.
You can also give the whole scene one triangle budget and it stays inside it. Hidden props are culled, and only the detail in view is streamed in.
What it doesn't have is Nanite's software rasteriser. WebGL2 has no compute shaders, so the win here comes from drawing far fewer triangles, not from making each one cheaper. WebGPU could do that part.
Works with stock three.js materials. It's open source with an MIT License.
I wanted to experiment with it a bit more before posting about it but i thought it would be cool to set it free and see what others build with it and figure out better ways to optimize it in a communal manner!
This is experimental so don't expect it to be as plug and play as it is inside unreal engine but it's still so cool to see how we can try out really interesting ideas in ways that were impossible only a few months ago.