Repository navigation
[2/3] Add background import and room/hotspot tools - #2
Merged
WilliamRagstad merged 3 commits intoOct 25, 2026
Merged
Conversation
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.
Authors can create and rename rooms, import embedded PNG/JPEG/WebP backgrounds, draw rectangular hotspots in either direction, move them, adjust exact percentage bounds, and connect rooms through destination selectors. Hotspots have a keyboard-accessible list, default placement and arrow-key nudging. Coordinates remain relative to the original image when the canvas or background changes size.
Room links use stable IDs, so renames preserve them. Deletion retains references for repair: each validation entry identifies the affected object and field and selects its owner when clicked. Undo/redo restores authored data. Image imports cannot write into a different project opened while the file is loading; unsaved edits are guarded on navigation. Image bytes are shared between history snapshots to avoid duplicating large backgrounds for every edit.
Depends on #1 and targets its branch. The core-format/runtime dependency described there remains blocked; this PR works with the explicitly named draft contract.
Validation on this branch independently: eight Rust integration tests, a release WASM build, and the Chromium browser test passed. The browser test imports backgrounds, draws and nudges a hotspot, links rooms, follows a deleted-reference error, undoes deletion, saves/reopens with deep data equality, checks browser recovery, and rejects an unsupported version without replacing the project.