Skip to content

Commit

Permalink
Change the default angle for ortho camera
Browse files Browse the repository at this point in the history
  • Loading branch information
sgenoud committed Apr 11, 2024
1 parent ffdf1c9 commit d7fcd2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/replicad-opencascadejs/src/replicad_single.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/studio/src/Stage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ export default function Stage({ children, center, ...props }) {
camera.lookAt(0, 0, 0);

if (camera.type === "OrthographicCamera") {
camera.position.set(
radius,
-radius,
radius
);

camera.zoom = 5;
camera.near = -Math.max(5000, radius * 4);
camera.updateProjectionMatrix();
Expand Down

0 comments on commit d7fcd2b

Please sign in to comment.