diff --git a/web/src/components/IdeViewer/IdeViewer.js b/web/src/components/IdeViewer/IdeViewer.js
index 739eb22..e324c19 100644
--- a/web/src/components/IdeViewer/IdeViewer.js
+++ b/web/src/components/IdeViewer/IdeViewer.js
@@ -10,11 +10,14 @@ function Controls({ onCameraChange }) {
const { scene, camera, gl } = useThree()
useEffect(() => {
// init camera position
- camera.position.x = 12
+ camera.position.x = 16
camera.position.y = 12
- // Euler rotation can be problematic since order matters
- // We want it to rotate around the z or vertical axis first then the x axis
- // in Three Y is the vertical axis (Z for openscad)
+ console.log(camera)
+ camera.fov = 22.5 // matches default openscad fov
+
+ // Order matters with Euler rotations
+ // We want it to rotate around the z or vertical axis first then the x axis to match openscad
+ // in Three.js Y is the vertical axis (Z for openscad)
camera.rotation._order = 'YXZ'
if (controls.current) {
@@ -29,7 +32,7 @@ function Controls({ onCameraChange }) {
}
const getPositions = () => {
const { x: scadX, y: scadZ, z: negScadY } = target.object.position
- const scale = 10 // I'm not sure why this is exactly 10
+ const scale = 10
const scadY = -negScadY
return [scadX * scale, scadY * scale, scadZ * scale]
}
@@ -65,7 +68,7 @@ function Box(props) {
return (