TechniquesStatic merge with moving anchors
Merge rigid parts by material identity, or opt in to vertex-baked standard materials so different colours and PBR finishes share draws.
Moving anchors carry their merged descendants; reflected parts keep their front faces. Originals remain for picking and restoration. The windmill yard compares 147 separate draws with two baked draws while its sails move.
What it costs a frame
- GPU
- 0.41 ms
- CPU, median
- 0.27 ms
- CPU, 95th pct
- 0.39 ms
- Draw calls
- 6
- Weight
- Light
Measured 19 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 0.34–0.44, CPU 0.27–0.32 ms). What ran: A windmill yard made of individually named rigid parts, with one moving sail anchor and a fitted sun shadow. Merging and draw colours are enabled initially. Both representations, normal/draw colours, shadow passes and the selection tint are warmed before interaction. Card counts cover the yard’s main-view draws only, not the surrounding ground, shadow pass or selection overlay; they are not timing measurements. Phones: tiers are being measured next.
How steadily it runs on RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference
- Typical frame ?
- 3.27 ms
- 1% low ?
- 143 fps
- Varies by ?
- ±0.95 ms
All metricsRTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference
Frames run back to back, each starting once the GPU has finished the last, so frame times show the work itself. They have a floor of about 4–5 ms from the browser’s own scheduling: GPU and CPU ms stay the measure of cost.
Frames
- Median (p50) ?
- 3.27 ms
- p95 ?
- 5.69 ms
- p99 ?
- 6.63 ms
- Slowest ?
- 7.30 ms
- Mean ?
- 3.70 ms
- Standard deviation ?
- 0.95 ms
- 1% low ?
- 143 fps
- 0.1% low ?
- 137 fps
- Hitches ?
- 6 of 600
- Over budget ?
- 0 of 600
Main thread
- Long tasks ?
- 0
- Long frames ?
- 0
- Event-loop delay ?
- 0.0 / 0.5 / 0.5 ms
Input
Memory
- JavaScript heap ?
- 41.7 → 46.6 MB
- Growth ?
- +4.83 MB
Browser
- JavaScript a frame ?
- 0.01 ms
- All tasks a frame ?
- 0.47 ms
- Layout / style ?
- 0.00 / 0.00 ms
- Main thread busy ?
- 13%
Garbage collection
- Collections ?
- 2 (2 minor, 0 major)
- Pauses ?
- 1.0 ms in all, longest 0.6
What it needs
- Renders with
- WebGPU or WebGLWebGPU where there is one, WebGL2 where there is not.
- Your browser
- Runs hereNo WebGPU needed
- Depends on
- three.js 0.187.0No other packages
- With an agent
install("static-merge")Your coding agent reads its pitfalls and installs it through the library’s MCP server. Set it up
What it’s for
- Machines and props assembled from many different rigid parts
- Merging static building geometry within a culling cell
- Keeping a moving wheel or hinge attached to a merged assembly
- Reducing draws while retaining original object identities for picking
Pitfalls, in brief
- A bake is a snapshot: move only the root and declared anchors.
- Keep culling local: one merger per compact assembly or world cell.
- Default grouping uses material identity and vertex layout, preserving textures and shader state.
- Material baking is deliberately narrow: textures, physical extensions, node/custom graphs, non-standard lighting models, RGBA vertex colours, alpha, clipping, wireframe or other unsupported settings retain existing identity grouping or existing exclusions.
- The baked option requires three r187 WebGPURenderer, with native WebGPU or its WebGL2 backend; a classic WebGLRenderer cannot draw the generated node material.
5 more in brief
- Object-dependent shading cannot be baked blindly: custom and node materials, custom render callbacks, depth/distance materials, object-space normal maps and active vertex displacement are excluded.
- Originals stay visible in the hierarchy but use layer mask zero while merged.
- Skip means keep drawing separately: transparent or transmissive, not depth-written, skinned, morphed, instanced, batched, partial draw ranges, non-vertex attributes, singular transforms and material arrays are excluded.
- Dispose restores original layers and frees generated geometry plus any generated baked node materials, once each.
- Counts are not a timing result: vertex data is copied while originals remain for picking, so memory rises.
Where it comes from
From HaTac. Adapted from published work, named below.
Hannes Andersson: Static world merging, moving-anchor assembly baking, original-object picking and reflected triangle correction in HaTac and HaTac_FP; vertex material baking in rpg-game.


