fix build issues

This commit is contained in:
wass08
2026-02-12 10:56:56 +09:00
parent 83cd28b01b
commit 0797a828f8
4 changed files with 30 additions and 38 deletions
+11 -13
View File
@@ -124,22 +124,20 @@ export function generateSlabGeometry(slabNode: SlabNode): THREE.BufferGeometry {
shape.closePath()
// Add holes to the shape
if (slabNode.holes && slabNode.holes.length > 0) {
for (const holePolygon of slabNode.holes) {
if (holePolygon.length < 3) continue
for (const holePolygon of slabNode.holes) {
if (holePolygon.length < 3) continue
const holePath = new THREE.Path()
const holeFirstPt = holePolygon[0]!
holePath.moveTo(holeFirstPt[0], -holeFirstPt[1])
const holePath = new THREE.Path()
const holeFirstPt = holePolygon[0]!
holePath.moveTo(holeFirstPt[0], -holeFirstPt[1])
for (let i = 1; i < holePolygon.length; i++) {
const pt = holePolygon[i]!
holePath.lineTo(pt[0], -pt[1])
}
holePath.closePath()
shape.holes.push(holePath)
for (let i = 1; i < holePolygon.length; i++) {
const pt = holePolygon[i]!
holePath.lineTo(pt[0], -pt[1])
}
holePath.closePath()
shape.holes.push(holePath)
}
// Extrude the shape by elevation