Skip to content

Commit

Permalink
Fix camera toggle: #1642
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed May 2, 2023
1 parent f7ec1c3 commit 48d7607
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/static/app/js/ModelView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,10 @@ class ModelView extends React.Component {
}

const isVisible = this.cameraMeshes[0].visible;
this.cameraMeshes.forEach(cam => cam.visible = !isVisible);
this.cameraMeshes[0].traverseAncestors(a => a.visible = !isVisible);
this.cameraMeshes.forEach(cam => {
cam.visible = !isVisible;
cam.parent.visible = cam.visible;
});
}

loadGltf = (url, cb) => {
Expand Down

0 comments on commit 48d7607

Please sign in to comment.