Optimize elevator editing performance with live previews

This commit is contained in:
sudhir
2026-05-09 19:09:48 +05:30
parent 0514363136
commit 2480be91b1
59 changed files with 4299 additions and 176 deletions
@@ -1,6 +1,7 @@
import { useFrame } from '@react-three/fiber'
import { type AnyNodeId, type CeilingNode, sceneRegistry, useScene } from '@pascal-app/core'
import { useFrame } from '@react-three/fiber'
import * as THREE from 'three'
import { mergeSurfaceHolePolygons } from '../surface-hole-geometry'
function ensureUv2Attribute(geometry: THREE.BufferGeometry) {
const uv = geometry.getAttribute('uv')
@@ -82,7 +83,7 @@ export function generateCeilingGeometry(ceilingNode: CeilingNode): THREE.BufferG
shape.closePath()
// Add holes to the shape
const holes = ceilingNode.holes || []
const holes = mergeSurfaceHolePolygons(ceilingNode.holes || [])
for (const holePolygon of holes) {
if (holePolygon.length < 3) continue