v0.0.73
0.0.73 (since 0.0.72)
New features
- Cube prefab added to the WebGPU prefab catalog (
87f5519) - Prefab groups and composite prefabs —
addGroup(name, parts)registers multi-part prefabs under a dotted ID namespace; composite prefabs spawn each part with a baked position/rotation offset (5512dd1) - Distance-based skinning culling — new
animationCullDistanceoption (default 50, set toInfinityto disable) skips compute-shader skinning dispatches for instances outside the cull radius while keeping CPU animation clocks running. Frustum culling also applied at the compute-dispatch level (1c46ec8) - Instance handle
destroy()method — every mesh and aggregate instance now exposesdestroy();removeInstance()delegates to it. Aggregate handles (glTF, composite) destroy all child handles (eafffec) - Bone-block recycling — per-skin freelist of bone-matrix offsets with refcount tracking, so destroying and respawning skinned instances reuses bone buffer slots instead of growing indefinitely. Linked multi-part instances share a single bone block via refcount (
eafffec)
Performance
- Adapter-limits forwarding — renderer forwards
adapter.limitsasrequiredLimitswhen requesting the GPU device, so skinned scenes can use the GPU's actual buffer caps instead of the WebGPU defaults (1c46ec8) - Reused
DataViewfor bone-offset writes — a singleDataViewover the skinned static buffer is stored at init and reused on every spawn instead of allocating a fresh one, cutting per-spawn allocation cost (97b764a) - Ranged rest-pose uploads on spawn —
addSkinnedInstancewrites only the touched bone-matrix range viawriteBuffer(buffer, offset, source, srcOffset, size)instead of uploading the full bone buffer, eliminating ~80-100ms spawn hitches at high instance counts (eafffec)
Bug fixes
- SparseBatcher reactivates emptied buckets — fixed a bug where re-adding to a bucket that had been fully drained would not re-register it in
activeBuckets, leaving the new instance allocated but invisible. Manifested as "bulk-destroy then respawn renders nothing." Regression test added (279ca44) - RafDriver clamps long frame deltas — per-frame
dtclamped to 250 ms so resuming a backgrounded tab no longer delivers a multi-second frame that fast-forwards the simulation.visibilitychangehandler resets the timestamp on tab return (43704f3)
Renames (breaking)
maxModels→maxInstancesonRenderer3DOptionsand base renderer (eafffec)skinningCullDistance→animationCullDistance(41b485f)
Public API additions
WebGPU3DRenderer.maxSkinnedgetterWebGPU3DRenderer.setAnimationCullDistance(distance)andanimationCullDistancegetterInstanceHandle.destroy()PrefabBucket.addGroup(name, parts)andgetGroup(name)
Full Changelog: v0.0.72...v0.0.73