Skip to content

Commit

Permalink
Rename snapchanged to translationsnapchanged and add rotationsnapchan…
Browse files Browse the repository at this point in the history
…ged to be able to configure snapping (#547)
  • Loading branch information
vincentfretin authored May 31, 2024
1 parent d5b6b4e commit b49ad74
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/editor/lib/viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,14 @@ export function Viewport(inspector) {
transformControls.setMode(mode);
});

Events.on('snapchanged', (dist) => {
Events.on('translationsnapchanged', (dist) => {
transformControls.setTranslationSnap(dist);
});

Events.on('rotationsnapchanged', (dist) => {
transformControls.setRotationSnap(dist);
});

Events.on('transformspacechanged', (space) => {
transformControls.setSpace(space);
});
Expand Down

0 comments on commit b49ad74

Please sign in to comment.