Add "Show Dimensions" overlay for selected splat bound#907
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new viewport overlay that displays the world-space X/Y/Z extents of the currently selected splat’s bounding box, controlled by a new “Show Dimensions” toggle in the View panel and persisted via document serialization.
Changes:
- Added
BoundDimensionsOverlay(SVG-based) that projects bound edges to screen eachprerenderand labels the outer-silhouette edges per axis. - Added a new View panel toggle wired through new
camera.boundDimensionsevents and persisted viadocSerialize.view/docDeserialize.view. - Added styling for the overlay labels and localized the new toggle string across all supported locales.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| static/locales/de.json | Adds localized string for the new “Show Dimensions” toggle. |
| static/locales/en.json | Adds localized string for the new “Show Dimensions” toggle. |
| static/locales/es.json | Adds localized string for the new “Show Dimensions” toggle. |
| static/locales/fr.json | Adds localized string for the new “Show Dimensions” toggle. |
| static/locales/ja.json | Adds localized string for the new “Show Dimensions” toggle. |
| static/locales/ko.json | Adds localized string for the new “Show Dimensions” toggle. |
| static/locales/pt-BR.json | Adds localized string for the new “Show Dimensions” toggle. |
| static/locales/ru.json | Adds localized string for the new “Show Dimensions” toggle. |
| static/locales/zh-CN.json | Adds localized string for the new “Show Dimensions” toggle. |
| src/ui/view-panel.ts | Adds the UI toggle and wires it to camera.boundDimensions events. |
| src/ui/scss/tool.scss | Styles the overlay SVG text (halo stroke, font sizing). |
| src/ui/bound-dimensions-overlay.ts | Implements the per-frame bound projection and label placement logic. |
| src/scene-config.ts | Adds default config flag show.boundDimensions: false. |
| src/main.ts | Instantiates the overlay during app startup. |
| src/editor.ts | Adds boundDimensions event plumbing + view serialization/deserialization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Re-qi
pushed a commit
to Re-qi/ReSplat
that referenced
this pull request
Jun 21, 2026
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.
Summary
Adds a new "Show Dimensions" toggle to the View panel that overlays the world-space length of each axis of the selected splat's bounding box directly on the 3D viewport. Each axis label is rendered as SVG text aligned with — and offset to the outside of — the corresponding outer-silhouette edge of the box, so users can read the X/Y/Z extents at a glance while orbiting.
Implementation
canvasContainer.domwith three<text>children (one per axis). Each frame onprerenderit projects the 8 world-space corners of the splat's local bound, picks the outermost parallel edge per axis (farthest screen-space midpoint from the projected box centroid), and positions each label at that edge's midpoint, rotated to match its on-screen direction with a perpendicular offset that always points away from the box centre. Labels auto-flip 180° to stay upright.camera.boundDimensions/camera.setBoundDimensions/camera.toggleBoundDimensionsevents in [src/editor.ts](src/editor.ts), defaults tofalsein [src/scene-config.ts](src/scene-config.ts), and round-trips viadocSerialize.view/docDeserialize.view.paint-order: stroke) so they remain legible against any background.panel.view-options.show-bound-dimensions).Test plan