THREE.JS / WEBGL / BATCHEDMESH / BVH / LOD
Half a million, one draw.
The pinned example combines BatchedMesh, five geometry LODs, radix sorting, BLAS/TLAS BVHs, accelerated raycasting, and 500,000 instances. This route preserves that full topology and exposes the source toggles as explicit controls.
Initializing—
Generating ten source geometries and their LOD chains.
- instances
- —
- geometries
- —
- LODs
- —
- BVH
- —
- LOD path
- —
- hovered
- —
- sample
- —
- frame
- —
- sort
- —
Selected source contractWebGLRenderer → BatchedMesh(500,000) → 10 geometry IDs × 5 LODs → BLAS/TLAS BVH → accelerated raycast
All 500,000 instances remain in the default path. The source uses external batch-extension, simplify-geometry, BVH, and meshoptimizer packages pinned into this lab; exact random placement, Stats/GUI presentation, and whole-example fidelity remain separate.
Derived from the pinned WebGL Batch LOD BVH example. Move the pointer over the canvas to exercise accelerated instance raycasting.
Study issue