Repository navigation
Draw the Character whole across a display seam - #88
Merged
Merged
Conversation
One window cannot be on two displays, so a Character on a seam was clipped to half of itself. Every display now gets an overlay covering it, each told where the sprite is in its own coordinates, and the halves meet. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Review fixes: the seam column's click-through went to the wrong overlay, a failed reconcile was latched as done, the emit-target comment named a mechanism that is not the real one, and the verify script's new count check failed on mirrored displays. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes #62. The upgrade #56 deferred.
What changes
One overlay per display instead of one that follows the Character. Each covers its own display; the Character is drawn on both while it straddles a seam, each clipped to its own overlay, so the halves meet. Up to 64 points of a 128 point sprite used to be missing during a crossing.
The Engine is untouched. Physics already ran in one point space across every display and knows nothing about windows.
Everything that has to stay consistent across overlays — click-through, window level, Spaces membership, never being captured — goes through one function called per display, rather than being written twice. That was the issue's own stated risk: a second window is a second place for those to disagree.
Three defects found while building it
outside_bytreated a display rect as closed, so a point at x=1920 was zero away from both displays and the tie went to display 0 — while the window actually under that column belongs to display 1. Containment is now half-open, with nearest-display as the fallback for gaps and throws.CGGetActiveDisplayListentries against overlays; mirrored displays report two entries and want one overlay. It counts distinct rectangles now, checked against five arrangements.Verify
cargo test --workspace— 171 passed, 0 failed, 2 ignored.node --test— 6 passed. clippy-D warningsandcargo fmt --all --checkclean../scripts/verify-overlay.sh— 26/26, including four new checks (one overlay per display, all on screen, all at floating level, every display covered whole and nothing more) and both hit-test checks.Every new test confirmed load-bearing by mutation.
One ceiling, marked
While the sprite is moving, each webview interpolates against its own frame readings and its own animation-frame phase, so the two halves can land a point apart. It is not a rounding bug — local and shared coordinates differ by an exact integer, so rounding either first gives the same answer. Removing it needs a clock shared across webviews.
Marked with a
ponytail:insrc/main.jsnaming the ceiling, the upgrade (carry the Engine's timestamp on the frame plus a per-webview offset) and the condition. README checklist item 13 now says to watch the halves while the hand is still moving, which is the only way to see it.Not verified here
Hot-plugging a display (README item 15) needs hardware and has not been done. The reconcile fix is shell control flow around
run_on_main_thread, so it has no automated test.🤖 Generated with Claude Code