Skip to content

v0.0.73

Choose a tag to compare

@mococa mococa released this 24 May 03:44
· 78 commits to main since this release

0.0.73 (since 0.0.72)

New features

  • Cube prefab added to the WebGPU prefab catalog (87f5519)
  • Prefab groups and composite prefabsaddGroup(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 animationCullDistance option (default 50, set to Infinity to 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 exposes destroy(); 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.limits as requiredLimits when requesting the GPU device, so skinned scenes can use the GPU's actual buffer caps instead of the WebGPU defaults (1c46ec8)
  • Reused DataView for bone-offset writes — a single DataView over 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 spawnaddSkinnedInstance writes only the touched bone-matrix range via writeBuffer(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 dt clamped to 250 ms so resuming a backgrounded tab no longer delivers a multi-second frame that fast-forwards the simulation. visibilitychange handler resets the timestamp on tab return (43704f3)

Renames (breaking)

  • maxModelsmaxInstances on Renderer3DOptions and base renderer (eafffec)
  • skinningCullDistanceanimationCullDistance (41b485f)

Public API additions

  • WebGPU3DRenderer.maxSkinned getter
  • WebGPU3DRenderer.setAnimationCullDistance(distance) and animationCullDistance getter
  • InstanceHandle.destroy()
  • PrefabBucket.addGroup(name, parts) and getGroup(name)

Full Changelog: v0.0.72...v0.0.73