Repository navigation
Catch the sprite in gaps between displays - #51
Merged
Merged
Conversation
omesser
force-pushed
the
feat/4-union-bounds
branch
from
August 29, 2026 19:24
e10b436 to
0a0df06
Compare
Physics clamped to the outermost edges of all displays, which is the rectangle that bounds them rather than the union of their frames. Two displays with a gap between them bound a region no screen covers, and a sprite in it is over nothing: `floor_under` finds no display at that x, `support_below` returns nothing, and it falls, unseen, for as long as the app runs. A test that lets go of one over the gap reaches y=15598 and is still accelerating. Only a drop finds this. A thrown sprite carries enough sideways speed to clear the gap before gravity matters, which is why the defect survived the throw tests that have been there since #3 — and why it became reachable the moment Grab landed and a hand could carry the sprite there deliberately. So being over no display, rather than being past the outermost edge, is what catches an edge now. The two cases were always the same thing; only the second was checked. Every inner edge stays somewhere to cross rather than something to stop at, so displays that touch are still crossed freely. That retires the `ponytail:` comment on `wall_reached`, which named this issue as the hook to clamp at. The L-shaped and diagonal arrangements #4 also asks for turn out not to strand anything: every x in their bounding rectangles is spanned by some display, so there is always a floor somewhere below. They get tests saying so rather than an assumption, since the reasoning is not obvious from the arrangement. The third criterion needs no code. Apparent size is stable across displays of differing resolution because the sprite is sized in points from end to end — the Engine, `place_sprite`, and the webview's CSS pixels are one space, and the backing scale is resolved by the compositor at render time. Crossing between displays is exercised on #6's branch, where the cursor conversion that makes a drag cross at all is being fixed. Closes #4 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
omesser
force-pushed
the
feat/4-union-bounds
branch
from
August 29, 2026 19:24
0a0df06 to
aca21de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Physics clamped to the rectangle that bounds the displays, not the union of their frames. Two displays with a gap between them bound a region no screen covers — and a sprite let go there falls for ever, unseen.
A test drops one into the gap and it reaches
y = 15598, still accelerating.Why it survived this long
The fix
Being over no display is what catches an edge now, rather than being past the outermost edge. Those were always the same thing; only the second was checked.
ponytail:comment onwall_reached, which named this issue as the hook to clamp at.The other two arrangements
#4 also asks for L-shaped and diagonal layouts. Neither strands anything: every x in their bounding rectangles is spanned by some display, so there is always a floor somewhere below. They get tests saying so rather than an assumption, because that is not obvious from the arrangement.
The third criterion needs no code
"Crosses between displays of differing resolution at a stable apparent size." The sprite is sized in points end to end — the Engine,
place_spriteand the webview's CSS pixels are one space, and the backing scale is resolved by the compositor at render time. Crossing itself is exercised on #49, where the cursor conversion that makes a drag cross at all is being fixed.Verify
Removing the clamp fails three tests, including one that predates this change.
Merges cleanly with #49 in either order — checked both ways.
Closes #4
🤖 Generated with Claude Code