Skip to content

[2/3] Add background import and room/hotspot tools - #2

Merged
WilliamRagstad merged 3 commits into
editor/01-project-shellfrom
editor/02-room-hotspot-tools
Oct 25, 2026
Merged

WilliamRagstad merged 3 commits into
editor/01-project-shellfrom
editor/02-room-hotspot-tools

Conversation

@WilliamRagstad

Copy link
Copy Markdown
Member

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.

@WilliamRagstad
WilliamRagstad marked this pull request as ready for review October 25, 2026 17:18
@WilliamRagstad
WilliamRagstad merged commit c042ff7 into editor/01-project-shell Oct 25, 2026
2 checks passed
@WilliamRagstad
WilliamRagstad deleted the editor/02-room-hotspot-tools branch October 25, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant