Skip to content

Commit

Permalink
Update transformControls scale on camera change (fix #649) (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin authored Sep 8, 2024
1 parent 6c78f69 commit a3ae96c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export function Viewport(inspector) {
controls.zoomSpeed = 0.05;
controls.setAspectRatio(sceneEl.canvas.width / sceneEl.canvas.height);
controls.addEventListener('change', () => {
transformControls.update(true); // true is updateScale
Events.emit('camerachanged');
});

Expand Down Expand Up @@ -177,7 +178,6 @@ export function Viewport(inspector) {

Events.on('objectfocus', (object) => {
controls.focus(object);
transformControls.update();
});

Events.on('geometrychanged', (object) => {
Expand Down

0 comments on commit a3ae96c

Please sign in to comment.