A WebGPU retro game engine for TypeScript, inspired by RetroBlit. Build pixel-perfect 2D games with a clean, fantasy-console-style API.

fix(input): release pointer captures on detach and record final mouse position on pointerup master

In detach(), iterate pointerIdToSlot and call releasePointerCapture() for each active capture before removing event listeners. Without this, any in-flight touch or pen contacts leave dangling browser-side capture state when the input system is torn down. In handlePointerUp(), call updateSlotPosition() before setMouseButton() for mouse events, matching the existing touch/pen path. The terminal position from the pointerup event was previously discarded, leaving the slot with a stale coordinate on the release frame. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Vaclav Vancura <commit@vancura.dev>


+11
1 changed file