baseplane, root-object offset, saveKF & resetKF buttons...

This commit is contained in:
STEINNI
2025-10-21 15:55:22 +00:00
parent 36776162ec
commit aa76bfe9c0
6 changed files with 67 additions and 14 deletions
+12
View File
@@ -173,6 +173,18 @@ export class Threetobus{
this.axes.layers.set(2)
this.scene.add(this.axes)
}
// Base plane
const planeGeo = new THREE.PlaneGeometry(100, 100)
const planeMat = new THREE.MeshBasicMaterial({
color: 0xaaaacc,
opacity: 0.3,
transparent: true, // needed for opacity < 1 to take effect
side: THREE.DoubleSide
})
this.basePlane = new THREE.Mesh(planeGeo, planeMat)
this.basePlane.rotation.x = -Math.PI / 2 // lay it flat (like the grid)
this.basePlane.position.y=-0.01 // to avoid artefacts on objets bases
this.scene.add(this.basePlane)
// Cameras
this.cameras.camPerspective = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)