@cluesmith/codev 1.5.14 → 1.5.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/3d-viewer.html +7 -7
package/package.json
CHANGED
package/templates/3d-viewer.html
CHANGED
|
@@ -322,8 +322,8 @@
|
|
|
322
322
|
scene.add(directionalLight2);
|
|
323
323
|
|
|
324
324
|
// Grid on XY plane (Z=0) for Z-up coordinate system
|
|
325
|
-
//
|
|
326
|
-
gridHelper = new THREE.GridHelper(
|
|
325
|
+
// 260mm with 26 divisions (27 lines) - roughly print bed size, 10mm squares
|
|
326
|
+
gridHelper = new THREE.GridHelper(260, 26, 0x808080, 0x808080);
|
|
327
327
|
gridHelper.rotation.x = Math.PI / 2; // Rotate from XZ to XY plane
|
|
328
328
|
gridHelper.material.transparent = true;
|
|
329
329
|
gridHelper.material.opacity = 0.5;
|
|
@@ -467,9 +467,9 @@
|
|
|
467
467
|
orthoCamera.bottom = -frustumSize / 2;
|
|
468
468
|
orthoCamera.updateProjectionMatrix();
|
|
469
469
|
|
|
470
|
-
//
|
|
471
|
-
const gridSize =
|
|
472
|
-
const divisions =
|
|
470
|
+
// Grid: 260mm with 26 divisions (27 lines) - roughly print bed size, 10mm squares
|
|
471
|
+
const gridSize = 260;
|
|
472
|
+
const divisions = 26; // 27 grid lines, 10mm per square
|
|
473
473
|
scene.remove(gridHelper);
|
|
474
474
|
gridHelper = new THREE.GridHelper(gridSize, divisions, 0x808080, 0x808080);
|
|
475
475
|
gridHelper.rotation.x = Math.PI / 2; // Rotate from XZ to XY plane
|
|
@@ -483,9 +483,9 @@
|
|
|
483
483
|
axesHelper.visible = showAxes;
|
|
484
484
|
scene.add(axesHelper);
|
|
485
485
|
|
|
486
|
-
// Set camera to look at model center, default
|
|
486
|
+
// Set camera to look at model center, default isometric view
|
|
487
487
|
controls.target.copy(modelCenter);
|
|
488
|
-
setView(
|
|
488
|
+
setView(1, -1, 0.8); // Isometric-ish: see X going right, Y going back, Z going up
|
|
489
489
|
|
|
490
490
|
// Hide loading
|
|
491
491
|
loading.classList.add('hidden');
|