Skip to content

feat: viewport gizmo grid snapping (translate, rotate, scale)#818

Merged
julien-moreau merged 8 commits into
BabylonJS:masterfrom
yuripourre:feat/snap
May 6, 2026
Merged

feat: viewport gizmo grid snapping (translate, rotate, scale)#818
julien-moreau merged 8 commits into
BabylonJS:masterfrom
yuripourre:feat/snap

Conversation

@yuripourre
Copy link
Copy Markdown
Contributor

@yuripourre yuripourre commented Mar 30, 2026

Title

UE-style toolbar toggles with inspector-style scrub fields

Summary

  • Add localStorage-backed snap preferences
  • Optional Edit Preferences section
  • Wire Babylon PositionGizmo, RotationGizmo, and ScaleGizmo snapDistance.

Changes Made

  • Add localStorage-backed snap preferences
  • Optional Edit Preferences section
  • Wire Babylon PositionGizmo, RotationGizmo, and ScaleGizmo snapDistance.

Benefits

  • Ability to use snap for translation, rotation and scale.
Screenshot From 2026-04-03 13-07-38

Add localStorage-backed snap preferences, UE-style toolbar toggles with
inspector-style scrub fields, and optional Edit Preferences section.
Wire Babylon PositionGizmo, RotationGizmo, and ScaleGizmo snapDistance.
Copy link
Copy Markdown
Contributor

@julien-moreau julien-moreau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot !! It's a missing feature that I planned to do but you did it thanks a lot !!!
Just some comments, in order to prepare the future :)

Comment thread editor/src/tools/gizmo-snap-preferences.ts Outdated
Comment thread editor/src/editor/layout/preview.tsx
Comment thread editor/src/editor/layout/inspector/fields/number.tsx Outdated
Comment thread editor/src/editor/layout/inspector/fields/number.tsx Outdated
Copy link
Copy Markdown
Contributor

@julien-moreau julien-moreau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some new findings

Comment thread editor/src/project/load/load.tsx Outdated
Comment thread editor/src/editor/main.tsx Outdated
@yuripourre
Copy link
Copy Markdown
Contributor Author

@julien-moreau I've made some changes, please let me know if that's what you had in mind

@julien-moreau
Copy link
Copy Markdown
Contributor

I'm reviewing and merging today !!

@julien-moreau
Copy link
Copy Markdown
Contributor

@yuripourre can you just resolve the conflicts so we can merge ? Thanks a lot

@yuripourre
Copy link
Copy Markdown
Contributor Author

@yuripourre can you just resolve the conflicts so we can merge ? Thanks a lot

Just did, I used my phone so I did it right. Thank you so much for reviewing.

@julien-moreau julien-moreau dismissed their stale review May 6, 2026 10:16

All good

@julien-moreau julien-moreau merged commit 3876929 into BabylonJS:master May 6, 2026
1 check passed
@yuripourre yuripourre deleted the feat/snap branch May 6, 2026 14:54
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.

2 participants