Merge remote-tracking branch 'origin/main' into feat/editor-ux-rendering-placement
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pascal-app/viewer",
|
||||
"version": "0.8.0",
|
||||
"version": "0.9.1",
|
||||
"description": "3D viewer component for Pascal building editor",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
@@ -22,7 +22,7 @@
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@pascal-app/core": "^0.8.0",
|
||||
"@pascal-app/core": "^0.9.1",
|
||||
"@react-three/drei": "^10",
|
||||
"@react-three/fiber": "^9",
|
||||
"react": "^18 || ^19",
|
||||
@@ -38,7 +38,7 @@
|
||||
"@types/node": "^22",
|
||||
"@types/react": "^19.2.2",
|
||||
"@types/three": "^0.184.0",
|
||||
"typescript": "6.0.2"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"keywords": [
|
||||
"3d",
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
getEffectiveNode,
|
||||
nodeRegistry,
|
||||
sceneRegistry,
|
||||
useLiveTransforms,
|
||||
useScene,
|
||||
} from '@pascal-app/core'
|
||||
import { useFrame } from '@react-three/fiber'
|
||||
@@ -104,9 +105,10 @@ function updateCeilingGeometry(
|
||||
// canonical position after the rebuild. Matches the pattern used by
|
||||
// FenceSystem.updateFenceGeometry / GeometrySystem (both fully reset
|
||||
// position+rotation after rebuild).
|
||||
mesh.position.x = 0
|
||||
mesh.position.z = 0
|
||||
mesh.position.y = (node.height ?? 2.5) - 0.01 // Slight offset to avoid z-fighting with upper-level slabs
|
||||
const liveTransform = useLiveTransforms.getState().get(node.id)
|
||||
mesh.position.x = liveTransform?.position[0] ?? 0
|
||||
mesh.position.z = liveTransform?.position[2] ?? 0
|
||||
mesh.position.y = (node.height ?? 2.5) - 0.01 + (liveTransform?.position[1] ?? 0) // Slight offset to avoid z-fighting with upper-level slabs
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user