@pascal-app/core 0.8.0 → 0.9.2
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/dist/events/bus.d.ts +67 -13
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/hooks/scene-registry/item-clip-registry.d.ts +18 -0
- package/dist/hooks/scene-registry/item-clip-registry.d.ts.map +1 -0
- package/dist/hooks/scene-registry/item-clip-registry.js +10 -0
- package/dist/hooks/scene-registry/scene-registry.d.ts +14 -23
- package/dist/hooks/scene-registry/scene-registry.d.ts.map +1 -1
- package/dist/hooks/scene-registry/scene-registry.js +59 -26
- package/dist/hooks/scene-registry/scene-registry.test.d.ts +2 -0
- package/dist/hooks/scene-registry/scene-registry.test.d.ts.map +1 -0
- package/dist/hooks/scene-registry/scene-registry.test.js +26 -0
- package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts +14 -0
- package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts.map +1 -0
- package/dist/hooks/spatial-grid/floor-placed-elevation.js +51 -0
- package/dist/hooks/spatial-grid/floor-placed-elevation.test.d.ts +2 -0
- package/dist/hooks/spatial-grid/floor-placed-elevation.test.d.ts.map +1 -0
- package/dist/hooks/spatial-grid/floor-placed-elevation.test.js +366 -0
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts +79 -11
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-manager.js +508 -141
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +28 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.js +109 -18
- package/dist/hooks/spatial-grid/wall-slab-overlap.test.d.ts +2 -0
- package/dist/hooks/spatial-grid/wall-slab-overlap.test.d.ts.map +1 -0
- package/dist/hooks/spatial-grid/wall-slab-overlap.test.js +363 -0
- package/dist/index.d.ts +36 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -6
- package/dist/lib/level-name.d.ts +4 -0
- package/dist/lib/level-name.d.ts.map +1 -0
- package/dist/lib/level-name.js +10 -0
- package/dist/lib/measurement-geometry.d.ts +19 -0
- package/dist/lib/measurement-geometry.d.ts.map +1 -0
- package/dist/lib/measurement-geometry.js +232 -0
- package/dist/lib/measurement-geometry.test.d.ts +2 -0
- package/dist/lib/measurement-geometry.test.d.ts.map +1 -0
- package/dist/lib/measurement-geometry.test.js +102 -0
- package/dist/lib/polygon-geometry.d.ts +0 -1
- package/dist/lib/polygon-geometry.d.ts.map +1 -1
- package/dist/lib/polygon-geometry.js +0 -18
- package/dist/lib/polygon-relations.d.ts +10 -0
- package/dist/lib/polygon-relations.d.ts.map +1 -0
- package/dist/lib/polygon-relations.js +73 -0
- package/dist/lib/selection-proxy.d.ts +4 -0
- package/dist/lib/selection-proxy.d.ts.map +1 -0
- package/dist/lib/selection-proxy.js +12 -0
- package/dist/lib/slab-polygon.d.ts +31 -2
- package/dist/lib/slab-polygon.d.ts.map +1 -1
- package/dist/lib/slab-polygon.js +525 -31
- package/dist/lib/slab-polygon.test.d.ts +2 -0
- package/dist/lib/slab-polygon.test.d.ts.map +1 -0
- package/dist/lib/slab-polygon.test.js +635 -0
- package/dist/lib/slots.d.ts +14 -0
- package/dist/lib/slots.d.ts.map +1 -0
- package/dist/lib/slots.js +26 -0
- package/dist/lib/space-detection-pause.test.d.ts +2 -0
- package/dist/lib/space-detection-pause.test.d.ts.map +1 -0
- package/dist/lib/space-detection-pause.test.js +42 -0
- package/dist/lib/space-detection.d.ts +54 -2
- package/dist/lib/space-detection.d.ts.map +1 -1
- package/dist/lib/space-detection.js +599 -124
- package/dist/lib/space-detection.test.d.ts +2 -0
- package/dist/lib/space-detection.test.d.ts.map +1 -0
- package/dist/lib/space-detection.test.js +376 -0
- package/dist/lib/wall-distance.d.ts +60 -0
- package/dist/lib/wall-distance.d.ts.map +1 -0
- package/dist/lib/wall-distance.js +85 -0
- package/dist/lib/zone-quantities.d.ts +21 -0
- package/dist/lib/zone-quantities.d.ts.map +1 -0
- package/dist/lib/zone-quantities.js +183 -0
- package/dist/lib/zone-quantities.test.d.ts +2 -0
- package/dist/lib/zone-quantities.test.d.ts.map +1 -0
- package/dist/lib/zone-quantities.test.js +82 -0
- package/dist/material-library.d.ts +20 -1
- package/dist/material-library.d.ts.map +1 -1
- package/dist/material-library.js +3737 -200
- package/dist/registry/__bench__/relations-resolver.bench.d.ts +15 -0
- package/dist/registry/__bench__/relations-resolver.bench.d.ts.map +1 -0
- package/dist/registry/__bench__/relations-resolver.bench.js +170 -0
- package/dist/registry/handles.d.ts +394 -0
- package/dist/registry/handles.d.ts.map +1 -0
- package/dist/registry/handles.js +24 -0
- package/dist/registry/index.d.ts +7 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +4 -0
- package/dist/registry/registry.d.ts +136 -0
- package/dist/registry/registry.d.ts.map +1 -0
- package/dist/registry/registry.js +282 -0
- package/dist/registry/registry.test.d.ts +2 -0
- package/dist/registry/registry.test.d.ts.map +1 -0
- package/dist/registry/registry.test.js +196 -0
- package/dist/registry/relations-resolver.d.ts +42 -0
- package/dist/registry/relations-resolver.d.ts.map +1 -0
- package/dist/registry/relations-resolver.js +77 -0
- package/dist/registry/relations-resolver.test.d.ts +2 -0
- package/dist/registry/relations-resolver.test.d.ts.map +1 -0
- package/dist/registry/relations-resolver.test.js +183 -0
- package/dist/registry/scene-api.d.ts +44 -0
- package/dist/registry/scene-api.d.ts.map +1 -0
- package/dist/registry/scene-api.js +111 -0
- package/dist/registry/scene-api.test.d.ts +2 -0
- package/dist/registry/scene-api.test.d.ts.map +1 -0
- package/dist/registry/scene-api.test.js +183 -0
- package/dist/registry/subtree.d.ts +67 -0
- package/dist/registry/subtree.d.ts.map +1 -0
- package/dist/registry/subtree.js +123 -0
- package/dist/registry/subtree.test.d.ts +2 -0
- package/dist/registry/subtree.test.d.ts.map +1 -0
- package/dist/registry/subtree.test.js +163 -0
- package/dist/registry/types.d.ts +2099 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +1 -0
- package/dist/schema/index.d.ts +35 -4
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +32 -4
- package/dist/schema/material.d.ts +13 -2
- package/dist/schema/material.d.ts.map +1 -1
- package/dist/schema/material.js +17 -5
- package/dist/schema/material.test.d.ts +2 -0
- package/dist/schema/material.test.d.ts.map +1 -0
- package/dist/schema/material.test.js +43 -0
- package/dist/schema/nodes/box-vent.d.ts +74 -0
- package/dist/schema/nodes/box-vent.d.ts.map +1 -0
- package/dist/schema/nodes/box-vent.js +63 -0
- package/dist/schema/nodes/building.d.ts +1 -1
- package/dist/schema/nodes/building.d.ts.map +1 -1
- package/dist/schema/nodes/building.js +3 -2
- package/dist/schema/nodes/cabinet.d.ts +534 -0
- package/dist/schema/nodes/cabinet.d.ts.map +1 -0
- package/dist/schema/nodes/cabinet.js +137 -0
- package/dist/schema/nodes/ceiling.d.ts +5 -2
- package/dist/schema/nodes/ceiling.d.ts.map +1 -1
- package/dist/schema/nodes/ceiling.js +5 -1
- package/dist/schema/nodes/chimney.d.ts +158 -0
- package/dist/schema/nodes/chimney.d.ts.map +1 -0
- package/dist/schema/nodes/chimney.js +67 -0
- package/dist/schema/nodes/column.d.ts +600 -7
- package/dist/schema/nodes/column.d.ts.map +1 -1
- package/dist/schema/nodes/column.js +589 -6
- package/dist/schema/nodes/cupola.d.ts +66 -0
- package/dist/schema/nodes/cupola.d.ts.map +1 -0
- package/dist/schema/nodes/cupola.js +28 -0
- package/dist/schema/nodes/door.d.ts +13 -5
- package/dist/schema/nodes/door.d.ts.map +1 -1
- package/dist/schema/nodes/door.js +12 -0
- package/dist/schema/nodes/dormer.d.ts +228 -0
- package/dist/schema/nodes/dormer.d.ts.map +1 -0
- package/dist/schema/nodes/dormer.js +119 -0
- package/dist/schema/nodes/downspout.d.ts +75 -0
- package/dist/schema/nodes/downspout.d.ts.map +1 -0
- package/dist/schema/nodes/downspout.js +63 -0
- package/dist/schema/nodes/duct-fitting.d.ts +91 -0
- package/dist/schema/nodes/duct-fitting.d.ts.map +1 -0
- package/dist/schema/nodes/duct-fitting.js +92 -0
- package/dist/schema/nodes/duct-segment.d.ts +61 -0
- package/dist/schema/nodes/duct-segment.d.ts.map +1 -0
- package/dist/schema/nodes/duct-segment.js +73 -0
- package/dist/schema/nodes/duct-terminal.d.ts +57 -0
- package/dist/schema/nodes/duct-terminal.d.ts.map +1 -0
- package/dist/schema/nodes/duct-terminal.js +51 -0
- package/dist/schema/nodes/elevator.d.ts +106 -0
- package/dist/schema/nodes/elevator.d.ts.map +1 -0
- package/dist/schema/nodes/elevator.js +57 -0
- package/dist/schema/nodes/eyebrow-vent.d.ts +68 -0
- package/dist/schema/nodes/eyebrow-vent.d.ts.map +1 -0
- package/dist/schema/nodes/eyebrow-vent.js +40 -0
- package/dist/schema/nodes/fence.d.ts +19 -2
- package/dist/schema/nodes/fence.d.ts.map +1 -1
- package/dist/schema/nodes/fence.js +27 -2
- package/dist/schema/nodes/gutter.d.ts +84 -0
- package/dist/schema/nodes/gutter.d.ts.map +1 -0
- package/dist/schema/nodes/gutter.js +76 -0
- package/dist/schema/nodes/hvac-equipment.d.ts +63 -0
- package/dist/schema/nodes/hvac-equipment.d.ts.map +1 -0
- package/dist/schema/nodes/hvac-equipment.js +55 -0
- package/dist/schema/nodes/item.d.ts +12 -0
- package/dist/schema/nodes/item.d.ts.map +1 -1
- package/dist/schema/nodes/item.js +20 -0
- package/dist/schema/nodes/level.d.ts +1 -1
- package/dist/schema/nodes/level.d.ts.map +1 -1
- package/dist/schema/nodes/level.js +4 -0
- package/dist/schema/nodes/lineset.d.ts +42 -0
- package/dist/schema/nodes/lineset.d.ts.map +1 -0
- package/dist/schema/nodes/lineset.js +38 -0
- package/dist/schema/nodes/liquid-line.d.ts +34 -0
- package/dist/schema/nodes/liquid-line.d.ts.map +1 -0
- package/dist/schema/nodes/liquid-line.js +24 -0
- package/dist/schema/nodes/measurement.d.ts +306 -0
- package/dist/schema/nodes/measurement.d.ts.map +1 -0
- package/dist/schema/nodes/measurement.js +87 -0
- package/dist/schema/nodes/measurement.test.d.ts +2 -0
- package/dist/schema/nodes/measurement.test.d.ts.map +1 -0
- package/dist/schema/nodes/measurement.test.js +139 -0
- package/dist/schema/nodes/pipe-fitting.d.ts +56 -0
- package/dist/schema/nodes/pipe-fitting.d.ts.map +1 -0
- package/dist/schema/nodes/pipe-fitting.js +45 -0
- package/dist/schema/nodes/pipe-segment.d.ts +48 -0
- package/dist/schema/nodes/pipe-segment.d.ts.map +1 -0
- package/dist/schema/nodes/pipe-segment.js +36 -0
- package/dist/schema/nodes/pipe-trap.d.ts +43 -0
- package/dist/schema/nodes/pipe-trap.d.ts.map +1 -0
- package/dist/schema/nodes/pipe-trap.js +36 -0
- package/dist/schema/nodes/ridge-vent-defaults.test.d.ts +2 -0
- package/dist/schema/nodes/ridge-vent-defaults.test.d.ts.map +1 -0
- package/dist/schema/nodes/ridge-vent-defaults.test.js +205 -0
- package/dist/schema/nodes/ridge-vent.d.ts +82 -0
- package/dist/schema/nodes/ridge-vent.d.ts.map +1 -0
- package/dist/schema/nodes/ridge-vent.js +248 -0
- package/dist/schema/nodes/roof-segment-shape.d.ts +90 -0
- package/dist/schema/nodes/roof-segment-shape.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-shape.js +318 -0
- package/dist/schema/nodes/roof-segment-shape.test.d.ts +2 -0
- package/dist/schema/nodes/roof-segment-shape.test.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-shape.test.js +175 -0
- package/dist/schema/nodes/roof-segment-surface.test.d.ts +2 -0
- package/dist/schema/nodes/roof-segment-surface.test.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-surface.test.js +48 -0
- package/dist/schema/nodes/roof-segment-trim.test.d.ts +2 -0
- package/dist/schema/nodes/roof-segment-trim.test.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-trim.test.js +107 -0
- package/dist/schema/nodes/roof-segment-walls.d.ts +101 -0
- package/dist/schema/nodes/roof-segment-walls.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-walls.js +330 -0
- package/dist/schema/nodes/roof-segment-walls.test.d.ts +2 -0
- package/dist/schema/nodes/roof-segment-walls.test.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-walls.test.js +92 -0
- package/dist/schema/nodes/roof-segment.d.ts +273 -3
- package/dist/schema/nodes/roof-segment.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment.js +539 -3
- package/dist/schema/nodes/roof.d.ts +8 -8
- package/dist/schema/nodes/roof.d.ts.map +1 -1
- package/dist/schema/nodes/roof.js +4 -16
- package/dist/schema/nodes/shelf.d.ts +106 -0
- package/dist/schema/nodes/shelf.d.ts.map +1 -0
- package/dist/schema/nodes/shelf.js +90 -0
- package/dist/schema/nodes/site.d.ts +1 -122
- package/dist/schema/nodes/site.d.ts.map +1 -1
- package/dist/schema/nodes/site.js +2 -6
- package/dist/schema/nodes/skylight.d.ts +279 -0
- package/dist/schema/nodes/skylight.d.ts.map +1 -0
- package/dist/schema/nodes/skylight.js +152 -0
- package/dist/schema/nodes/slab.d.ts +5 -2
- package/dist/schema/nodes/slab.d.ts.map +1 -1
- package/dist/schema/nodes/slab.js +5 -1
- package/dist/schema/nodes/solar-panel.d.ts +117 -0
- package/dist/schema/nodes/solar-panel.d.ts.map +1 -0
- package/dist/schema/nodes/solar-panel.js +47 -0
- package/dist/schema/nodes/stair-segment.d.ts +4 -4
- package/dist/schema/nodes/stair.d.ts +13 -12
- package/dist/schema/nodes/stair.d.ts.map +1 -1
- package/dist/schema/nodes/stair.js +3 -0
- package/dist/schema/nodes/surface-hole-metadata.d.ts +2 -0
- package/dist/schema/nodes/surface-hole-metadata.d.ts.map +1 -1
- package/dist/schema/nodes/surface-hole-metadata.js +3 -1
- package/dist/schema/nodes/turbine-vent.d.ts +68 -0
- package/dist/schema/nodes/turbine-vent.d.ts.map +1 -0
- package/dist/schema/nodes/turbine-vent.js +41 -0
- package/dist/schema/nodes/wall.d.ts +245 -6
- package/dist/schema/nodes/wall.d.ts.map +1 -1
- package/dist/schema/nodes/wall.js +257 -0
- package/dist/schema/nodes/wall.test.d.ts +2 -0
- package/dist/schema/nodes/wall.test.d.ts.map +1 -0
- package/dist/schema/nodes/wall.test.js +208 -0
- package/dist/schema/nodes/window.d.ts +11 -3
- package/dist/schema/nodes/window.d.ts.map +1 -1
- package/dist/schema/nodes/window.js +12 -0
- package/dist/schema/nodes/zone.d.ts +2 -0
- package/dist/schema/nodes/zone.d.ts.map +1 -1
- package/dist/schema/nodes/zone.js +6 -0
- package/dist/schema/scene-material.d.ts +41 -0
- package/dist/schema/scene-material.d.ts.map +1 -0
- package/dist/schema/scene-material.js +9 -0
- package/dist/schema/types.d.ts +2850 -655
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +49 -0
- package/dist/services/alignment-anchors.d.ts +100 -0
- package/dist/services/alignment-anchors.d.ts.map +1 -0
- package/dist/services/alignment-anchors.js +312 -0
- package/dist/services/alignment-anchors.test.d.ts +2 -0
- package/dist/services/alignment-anchors.test.d.ts.map +1 -0
- package/dist/services/alignment-anchors.test.js +383 -0
- package/dist/services/alignment.d.ts +131 -0
- package/dist/services/alignment.d.ts.map +1 -0
- package/dist/services/alignment.js +171 -0
- package/dist/services/alignment.test.d.ts +2 -0
- package/dist/services/alignment.test.d.ts.map +1 -0
- package/dist/services/alignment.test.js +92 -0
- package/dist/services/drag-session.d.ts +47 -0
- package/dist/services/drag-session.d.ts.map +1 -0
- package/dist/services/drag-session.js +100 -0
- package/dist/services/drag-session.test.d.ts +2 -0
- package/dist/services/drag-session.test.d.ts.map +1 -0
- package/dist/services/drag-session.test.js +219 -0
- package/dist/services/hosting.d.ts +88 -0
- package/dist/services/hosting.d.ts.map +1 -0
- package/dist/services/hosting.js +131 -0
- package/dist/services/hosting.test.d.ts +2 -0
- package/dist/services/hosting.test.d.ts.map +1 -0
- package/dist/services/hosting.test.js +230 -0
- package/dist/services/index.d.ts +13 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +12 -0
- package/dist/services/level-height.d.ts +28 -0
- package/dist/services/level-height.d.ts.map +1 -0
- package/dist/services/level-height.js +62 -0
- package/dist/services/movement.d.ts +48 -0
- package/dist/services/movement.d.ts.map +1 -0
- package/dist/services/movement.js +65 -0
- package/dist/services/movement.test.d.ts +2 -0
- package/dist/services/movement.test.d.ts.map +1 -0
- package/dist/services/movement.test.js +133 -0
- package/dist/services/opening-guides.d.ts +141 -0
- package/dist/services/opening-guides.d.ts.map +1 -0
- package/dist/services/opening-guides.js +267 -0
- package/dist/services/opening-guides.test.d.ts +2 -0
- package/dist/services/opening-guides.test.d.ts.map +1 -0
- package/dist/services/opening-guides.test.js +208 -0
- package/dist/services/port-connectivity.d.ts +115 -0
- package/dist/services/port-connectivity.d.ts.map +1 -0
- package/dist/services/port-connectivity.js +300 -0
- package/dist/services/port-connectivity.test.d.ts +2 -0
- package/dist/services/port-connectivity.test.d.ts.map +1 -0
- package/dist/services/port-connectivity.test.js +297 -0
- package/dist/services/riser-diagram.d.ts +40 -0
- package/dist/services/riser-diagram.d.ts.map +1 -0
- package/dist/services/riser-diagram.js +110 -0
- package/dist/services/riser-diagram.test.d.ts +2 -0
- package/dist/services/riser-diagram.test.d.ts.map +1 -0
- package/dist/services/riser-diagram.test.js +66 -0
- package/dist/services/single-undo-dance.test.d.ts +2 -0
- package/dist/services/single-undo-dance.test.d.ts.map +1 -0
- package/dist/services/single-undo-dance.test.js +210 -0
- package/dist/services/snap.d.ts +80 -0
- package/dist/services/snap.d.ts.map +1 -0
- package/dist/services/snap.js +140 -0
- package/dist/services/snap.test.d.ts +2 -0
- package/dist/services/snap.test.d.ts.map +1 -0
- package/dist/services/snap.test.js +137 -0
- package/dist/services/system-graph.d.ts +30 -0
- package/dist/services/system-graph.d.ts.map +1 -0
- package/dist/services/system-graph.js +164 -0
- package/dist/services/system-graph.test.d.ts +2 -0
- package/dist/services/system-graph.test.d.ts.map +1 -0
- package/dist/services/system-graph.test.js +138 -0
- package/dist/services/validate-dwv.d.ts +32 -0
- package/dist/services/validate-dwv.d.ts.map +1 -0
- package/dist/services/validate-dwv.js +118 -0
- package/dist/services/validate-dwv.test.d.ts +2 -0
- package/dist/services/validate-dwv.test.d.ts.map +1 -0
- package/dist/services/validate-dwv.test.js +109 -0
- package/dist/solar-panel-presets.d.ts +17 -0
- package/dist/solar-panel-presets.d.ts.map +1 -0
- package/dist/solar-panel-presets.js +43 -0
- package/dist/store/actions/node-actions.d.ts +14 -2
- package/dist/store/actions/node-actions.d.ts.map +1 -1
- package/dist/store/actions/node-actions.js +585 -15
- package/dist/store/actions/node-mutation-sanitize.test.d.ts +2 -0
- package/dist/store/actions/node-mutation-sanitize.test.d.ts.map +1 -0
- package/dist/store/actions/node-mutation-sanitize.test.js +147 -0
- package/dist/store/actions/reparent.test.d.ts +2 -0
- package/dist/store/actions/reparent.test.d.ts.map +1 -0
- package/dist/store/actions/reparent.test.js +212 -0
- package/dist/store/actions/ridge-vent-update.test.d.ts +2 -0
- package/dist/store/actions/ridge-vent-update.test.d.ts.map +1 -0
- package/dist/store/actions/ridge-vent-update.test.js +264 -0
- package/dist/store/history-control.d.ts +11 -0
- package/dist/store/history-control.d.ts.map +1 -1
- package/dist/store/history-control.js +33 -0
- package/dist/store/use-interactive.d.ts +39 -0
- package/dist/store/use-interactive.d.ts.map +1 -1
- package/dist/store/use-interactive.js +75 -0
- package/dist/store/use-live-node-overrides.d.ts +22 -0
- package/dist/store/use-live-node-overrides.d.ts.map +1 -0
- package/dist/store/use-live-node-overrides.js +59 -0
- package/dist/store/use-scene-dirty-tracking.test.d.ts +2 -0
- package/dist/store/use-scene-dirty-tracking.test.d.ts.map +1 -0
- package/dist/store/use-scene-dirty-tracking.test.js +68 -0
- package/dist/store/use-scene-elevator-migration.test.d.ts +2 -0
- package/dist/store/use-scene-elevator-migration.test.d.ts.map +1 -0
- package/dist/store/use-scene-elevator-migration.test.js +109 -0
- package/dist/store/use-scene-measurement-roundtrip.test.d.ts +2 -0
- package/dist/store/use-scene-measurement-roundtrip.test.d.ts.map +1 -0
- package/dist/store/use-scene-measurement-roundtrip.test.js +97 -0
- package/dist/store/use-scene-plugins.test.d.ts +2 -0
- package/dist/store/use-scene-plugins.test.d.ts.map +1 -0
- package/dist/store/use-scene-plugins.test.js +51 -0
- package/dist/store/use-scene-wall-slot-migration.test.d.ts +2 -0
- package/dist/store/use-scene-wall-slot-migration.test.d.ts.map +1 -0
- package/dist/store/use-scene-wall-slot-migration.test.js +210 -0
- package/dist/store/use-scene-window-migration.test.d.ts +2 -0
- package/dist/store/use-scene-window-migration.test.d.ts.map +1 -0
- package/dist/store/use-scene-window-migration.test.js +85 -0
- package/dist/store/use-scene.d.ts +28 -2
- package/dist/store/use-scene.d.ts.map +1 -1
- package/dist/store/use-scene.js +546 -49
- package/dist/systems/elevator/elevator-dispatch.d.ts +12 -0
- package/dist/systems/elevator/elevator-dispatch.d.ts.map +1 -0
- package/dist/systems/elevator/elevator-dispatch.js +57 -0
- package/dist/systems/elevator/elevator-geometry.d.ts +15 -0
- package/dist/systems/elevator/elevator-geometry.d.ts.map +1 -0
- package/dist/systems/elevator/elevator-geometry.js +50 -0
- package/dist/systems/elevator/elevator-opening-sync.d.ts +6 -0
- package/dist/systems/elevator/elevator-opening-sync.d.ts.map +1 -0
- package/dist/systems/elevator/elevator-opening-sync.js +218 -0
- package/dist/systems/elevator/elevator-opening-sync.test.d.ts +2 -0
- package/dist/systems/elevator/elevator-opening-sync.test.d.ts.map +1 -0
- package/dist/systems/elevator/elevator-opening-sync.test.js +146 -0
- package/dist/systems/elevator/elevator-opening-system.d.ts +2 -0
- package/dist/systems/elevator/elevator-opening-system.d.ts.map +1 -0
- package/dist/systems/elevator/elevator-opening-system.js +48 -0
- package/dist/systems/elevator/elevator-runtime-system.d.ts +2 -0
- package/dist/systems/elevator/elevator-runtime-system.d.ts.map +1 -0
- package/dist/systems/elevator/elevator-runtime-system.js +8 -0
- package/dist/systems/elevator/elevator-runtime.d.ts +18 -0
- package/dist/systems/elevator/elevator-runtime.d.ts.map +1 -0
- package/dist/systems/elevator/elevator-runtime.js +225 -0
- package/dist/systems/elevator/elevator-runtime.test.d.ts +2 -0
- package/dist/systems/elevator/elevator-runtime.test.d.ts.map +1 -0
- package/dist/systems/elevator/elevator-runtime.test.js +64 -0
- package/dist/systems/elevator/elevator-service.d.ts +19 -0
- package/dist/systems/elevator/elevator-service.d.ts.map +1 -0
- package/dist/systems/elevator/elevator-service.js +111 -0
- package/dist/systems/fence/fence-centerline.d.ts +12 -0
- package/dist/systems/fence/fence-centerline.d.ts.map +1 -0
- package/dist/systems/fence/fence-centerline.js +37 -0
- package/dist/systems/fence/fence-spline.d.ts +39 -0
- package/dist/systems/fence/fence-spline.d.ts.map +1 -0
- package/dist/systems/fence/fence-spline.js +196 -0
- package/dist/systems/fence/fence-spline.test.d.ts +2 -0
- package/dist/systems/fence/fence-spline.test.d.ts.map +1 -0
- package/dist/systems/fence/fence-spline.test.js +136 -0
- package/dist/systems/stair/stair-footprint.d.ts +44 -0
- package/dist/systems/stair/stair-footprint.d.ts.map +1 -0
- package/dist/systems/stair/stair-footprint.js +178 -0
- package/dist/systems/stair/stair-opening-preview.d.ts +2447 -0
- package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -0
- package/dist/systems/stair/stair-opening-preview.js +93 -0
- package/dist/systems/stair/stair-opening-preview.test.d.ts +2 -0
- package/dist/systems/stair/stair-opening-preview.test.d.ts.map +1 -0
- package/dist/systems/stair/stair-opening-preview.test.js +80 -0
- package/dist/systems/stair/stair-opening-sync.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-sync.js +155 -147
- package/dist/systems/stair/stair-opening-sync.test.js +424 -2
- package/dist/systems/stair/stair-opening-system.d.ts +2 -0
- package/dist/systems/stair/stair-opening-system.d.ts.map +1 -0
- package/dist/systems/stair/stair-opening-system.js +104 -0
- package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
- package/dist/systems/wall/wall-mitering.js +38 -2
- package/dist/systems/wall/wall-mitering.test.d.ts +2 -0
- package/dist/systems/wall/wall-mitering.test.d.ts.map +1 -0
- package/dist/systems/wall/wall-mitering.test.js +63 -0
- package/dist/systems/wall/wall-move.d.ts +48 -0
- package/dist/systems/wall/wall-move.d.ts.map +1 -0
- package/dist/systems/wall/wall-move.js +193 -0
- package/dist/utils/clone-scene-graph.d.ts +7 -4
- package/dist/utils/clone-scene-graph.d.ts.map +1 -1
- package/dist/utils/clone-scene-graph.js +29 -7
- package/dist/utils/clone-scene-graph.test.d.ts +2 -0
- package/dist/utils/clone-scene-graph.test.d.ts.map +1 -0
- package/dist/utils/clone-scene-graph.test.js +62 -0
- package/dist/utils/heal-scene-graph.d.ts +18 -0
- package/dist/utils/heal-scene-graph.d.ts.map +1 -0
- package/dist/utils/heal-scene-graph.js +90 -0
- package/dist/utils/heal-scene-graph.test.d.ts +2 -0
- package/dist/utils/heal-scene-graph.test.d.ts.map +1 -0
- package/dist/utils/heal-scene-graph.test.js +88 -0
- package/dist/validation/validate-build-json.d.ts +44 -0
- package/dist/validation/validate-build-json.d.ts.map +1 -0
- package/dist/validation/validate-build-json.js +256 -0
- package/package.json +11 -4
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import dedent from 'dedent';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
+
import { MaterialSchema } from '../material';
|
|
5
|
+
export const TurbineVentNode = BaseNode.extend({
|
|
6
|
+
id: objectId('tvent'),
|
|
7
|
+
type: nodeType('turbine-vent'),
|
|
8
|
+
material: MaterialSchema.optional(),
|
|
9
|
+
// Default to the white preset so a freshly-placed turbine reads as
|
|
10
|
+
// clean painted/galvanised metal and the paint inspector shows "White"
|
|
11
|
+
// as the current selection (matches box-vent's reasoning).
|
|
12
|
+
materialPreset: z.string().default('preset-white'),
|
|
13
|
+
roofSegmentId: z.string().optional(),
|
|
14
|
+
position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
|
|
15
|
+
rotation: z.number().default(0),
|
|
16
|
+
// Overall diameter of the spinning head at its widest point.
|
|
17
|
+
diameter: z.number().default(0.32),
|
|
18
|
+
// Total height from the flange base to the top knob.
|
|
19
|
+
height: z.number().default(0.42),
|
|
20
|
+
// Height of the throat cylinder between the flange and the head. The
|
|
21
|
+
// head occupies the remaining `height - neckHeight`.
|
|
22
|
+
neckHeight: z.number().default(0.09),
|
|
23
|
+
// How far the flange flashing flares past the throat on every side.
|
|
24
|
+
baseOverhang: z.number().default(0.05),
|
|
25
|
+
// Number of curved vanes around the head. More vanes read denser /
|
|
26
|
+
// finer; fewer read as a chunkier industrial turbine.
|
|
27
|
+
vaneCount: z.number().int().default(20),
|
|
28
|
+
// Idle spin speed in radians/second. 0 = static (the head holds still),
|
|
29
|
+
// which is the default — a newly-placed turbine starts paused and is set
|
|
30
|
+
// spinning via the panel's Play toggle or the Spin Speed slider. Driven by
|
|
31
|
+
// the renderer's `useFrame`, not stored per-frame.
|
|
32
|
+
spinSpeed: z.number().default(0),
|
|
33
|
+
// `globe` → classic spherical whirlybird (bulged barrel + domed top)
|
|
34
|
+
// `cylinder`→ straight-barrel turbine with a flat disc top
|
|
35
|
+
style: z.enum(['globe', 'cylinder']).default('globe'),
|
|
36
|
+
}).describe(dedent `
|
|
37
|
+
Turbine vent (whirlybird) — a wind-driven spinning exhaust vent that
|
|
38
|
+
sits on a roof slope. A finned head spins on a throat above a flange.
|
|
39
|
+
Parented to a roof-segment; position is segment-local. Rotation is
|
|
40
|
+
around the segment's vertical axis (post-slope tilt).
|
|
41
|
+
`);
|
|
@@ -1,5 +1,128 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MaterialSchema } from '../material';
|
|
3
|
+
export declare const WallTreatmentSide: z.ZodEnum<{
|
|
4
|
+
interior: "interior";
|
|
5
|
+
exterior: "exterior";
|
|
6
|
+
both: "both";
|
|
7
|
+
}>;
|
|
8
|
+
export type WallTreatmentSide = z.infer<typeof WallTreatmentSide>;
|
|
9
|
+
export declare const WallTrimProfile: z.ZodEnum<{
|
|
10
|
+
flat: "flat";
|
|
11
|
+
bevel: "bevel";
|
|
12
|
+
triangle: "triangle";
|
|
13
|
+
cove: "cove";
|
|
14
|
+
bullnose: "bullnose";
|
|
15
|
+
"base-modern": "base-modern";
|
|
16
|
+
"base-colonial": "base-colonial";
|
|
17
|
+
"base-shoe": "base-shoe";
|
|
18
|
+
"base-ogee": "base-ogee";
|
|
19
|
+
"crown-cove": "crown-cove";
|
|
20
|
+
"crown-ogee": "crown-ogee";
|
|
21
|
+
"crown-craftsman": "crown-craftsman";
|
|
22
|
+
"crown-layered": "crown-layered";
|
|
23
|
+
"rail-rounded": "rail-rounded";
|
|
24
|
+
"rail-ogee": "rail-ogee";
|
|
25
|
+
"rail-picture": "rail-picture";
|
|
26
|
+
"rail-stepped": "rail-stepped";
|
|
27
|
+
}>;
|
|
28
|
+
export type WallTrimProfile = z.infer<typeof WallTrimProfile>;
|
|
29
|
+
export declare const WallTrimConfig: z.ZodObject<{
|
|
30
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
31
|
+
sides: z.ZodDefault<z.ZodEnum<{
|
|
32
|
+
interior: "interior";
|
|
33
|
+
exterior: "exterior";
|
|
34
|
+
both: "both";
|
|
35
|
+
}>>;
|
|
36
|
+
height: z.ZodDefault<z.ZodNumber>;
|
|
37
|
+
proud: z.ZodDefault<z.ZodNumber>;
|
|
38
|
+
profile: z.ZodDefault<z.ZodEnum<{
|
|
39
|
+
flat: "flat";
|
|
40
|
+
bevel: "bevel";
|
|
41
|
+
triangle: "triangle";
|
|
42
|
+
cove: "cove";
|
|
43
|
+
bullnose: "bullnose";
|
|
44
|
+
"base-modern": "base-modern";
|
|
45
|
+
"base-colonial": "base-colonial";
|
|
46
|
+
"base-shoe": "base-shoe";
|
|
47
|
+
"base-ogee": "base-ogee";
|
|
48
|
+
"crown-cove": "crown-cove";
|
|
49
|
+
"crown-ogee": "crown-ogee";
|
|
50
|
+
"crown-craftsman": "crown-craftsman";
|
|
51
|
+
"crown-layered": "crown-layered";
|
|
52
|
+
"rail-rounded": "rail-rounded";
|
|
53
|
+
"rail-ogee": "rail-ogee";
|
|
54
|
+
"rail-picture": "rail-picture";
|
|
55
|
+
"rail-stepped": "rail-stepped";
|
|
56
|
+
}>>;
|
|
57
|
+
offsetY: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export type WallTrimConfig = z.infer<typeof WallTrimConfig>;
|
|
60
|
+
export declare const WALL_SKIRTING_DEFAULT: WallTrimConfig;
|
|
61
|
+
export declare const WALL_CROWN_DEFAULT: WallTrimConfig;
|
|
62
|
+
export declare const WALL_CHAIR_RAIL_DEFAULT: WallTrimConfig;
|
|
63
|
+
export declare const WALL_TRIM_DEFAULTS: {
|
|
64
|
+
readonly skirting: {
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
sides: "interior" | "exterior" | "both";
|
|
67
|
+
height: number;
|
|
68
|
+
proud: number;
|
|
69
|
+
profile: "flat" | "bevel" | "triangle" | "cove" | "bullnose" | "base-modern" | "base-colonial" | "base-shoe" | "base-ogee" | "crown-cove" | "crown-ogee" | "crown-craftsman" | "crown-layered" | "rail-rounded" | "rail-ogee" | "rail-picture" | "rail-stepped";
|
|
70
|
+
offsetY?: number | undefined;
|
|
71
|
+
};
|
|
72
|
+
readonly crown: {
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
sides: "interior" | "exterior" | "both";
|
|
75
|
+
height: number;
|
|
76
|
+
proud: number;
|
|
77
|
+
profile: "flat" | "bevel" | "triangle" | "cove" | "bullnose" | "base-modern" | "base-colonial" | "base-shoe" | "base-ogee" | "crown-cove" | "crown-ogee" | "crown-craftsman" | "crown-layered" | "rail-rounded" | "rail-ogee" | "rail-picture" | "rail-stepped";
|
|
78
|
+
offsetY?: number | undefined;
|
|
79
|
+
};
|
|
80
|
+
readonly chairRail: {
|
|
81
|
+
enabled: boolean;
|
|
82
|
+
sides: "interior" | "exterior" | "both";
|
|
83
|
+
height: number;
|
|
84
|
+
proud: number;
|
|
85
|
+
profile: "flat" | "bevel" | "triangle" | "cove" | "bullnose" | "base-modern" | "base-colonial" | "base-shoe" | "base-ogee" | "crown-cove" | "crown-ogee" | "crown-craftsman" | "crown-layered" | "rail-rounded" | "rail-ogee" | "rail-picture" | "rail-stepped";
|
|
86
|
+
offsetY?: number | undefined;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export declare const WallFaceBandConfig: z.ZodPreprocess<z.ZodObject<{
|
|
90
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
91
|
+
count: z.ZodDefault<z.ZodNumber>;
|
|
92
|
+
lowerHeight: z.ZodDefault<z.ZodNumber>;
|
|
93
|
+
middleHeight: z.ZodDefault<z.ZodNumber>;
|
|
94
|
+
upperHeight: z.ZodDefault<z.ZodNumber>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
export type WallFaceBandConfig = z.infer<typeof WallFaceBandConfig>;
|
|
97
|
+
export declare const WALL_FACE_BAND_DEFAULT: WallFaceBandConfig;
|
|
98
|
+
export declare const WALL_SKIRTING_SLOT_DEFAULT = "library:preset-softwhite";
|
|
99
|
+
export declare const WALL_CROWN_SLOT_DEFAULT = "library:preset-white";
|
|
100
|
+
export declare const WALL_CHAIR_RAIL_SLOT_DEFAULT = "library:preset-cream";
|
|
101
|
+
export declare const WALL_FACE_BAND_SOLID_SLOT_DEFAULTS: {
|
|
102
|
+
readonly lower: "library:preset-white";
|
|
103
|
+
readonly middle: "library:preset-lightgrey";
|
|
104
|
+
readonly upper: "library:preset-greige";
|
|
105
|
+
readonly top: "library:preset-softwhite";
|
|
106
|
+
};
|
|
107
|
+
export declare const WALL_SURFACE_SLOT_DEFAULTS: {
|
|
108
|
+
readonly interior: "library:concrete-drywall";
|
|
109
|
+
readonly exterior: "library:concrete-drywall";
|
|
110
|
+
readonly lowerInterior: "library:concrete-drywall";
|
|
111
|
+
readonly middleInterior: "library:concrete-drywall";
|
|
112
|
+
readonly upperInterior: "library:concrete-drywall";
|
|
113
|
+
readonly topInterior: "library:concrete-drywall";
|
|
114
|
+
readonly lowerExterior: "library:concrete-drywall";
|
|
115
|
+
readonly middleExterior: "library:concrete-drywall";
|
|
116
|
+
readonly upperExterior: "library:concrete-drywall";
|
|
117
|
+
readonly topExterior: "library:concrete-drywall";
|
|
118
|
+
readonly skirtingInterior: "library:preset-softwhite";
|
|
119
|
+
readonly skirtingExterior: "library:preset-softwhite";
|
|
120
|
+
readonly crownInterior: "library:preset-white";
|
|
121
|
+
readonly crownExterior: "library:preset-white";
|
|
122
|
+
readonly chairRailInterior: "library:preset-cream";
|
|
123
|
+
readonly chairRailExterior: "library:preset-cream";
|
|
124
|
+
};
|
|
125
|
+
export type WallSurfaceSlotId = keyof typeof WALL_SURFACE_SLOT_DEFAULTS;
|
|
3
126
|
export declare const WallNode: z.ZodObject<{
|
|
4
127
|
object: z.ZodDefault<z.ZodLiteral<"node">>;
|
|
5
128
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -21,7 +144,7 @@ export declare const WallNode: z.ZodObject<{
|
|
|
21
144
|
children: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodDefault<z.ZodTemplateLiteral<`item_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`door_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`window_${string}`>>]>>>;
|
|
22
145
|
material: z.ZodOptional<z.ZodObject<{
|
|
23
146
|
id: z.ZodOptional<z.ZodString>;
|
|
24
|
-
preset: z.ZodOptional<z.ZodEnum<{
|
|
147
|
+
preset: z.ZodOptional<z.ZodCatch<z.ZodEnum<{
|
|
25
148
|
custom: "custom";
|
|
26
149
|
white: "white";
|
|
27
150
|
brick: "brick";
|
|
@@ -32,7 +155,7 @@ export declare const WallNode: z.ZodObject<{
|
|
|
32
155
|
plaster: "plaster";
|
|
33
156
|
tile: "tile";
|
|
34
157
|
marble: "marble";
|
|
35
|
-
}
|
|
158
|
+
}>>>;
|
|
36
159
|
properties: z.ZodOptional<z.ZodObject<{
|
|
37
160
|
color: z.ZodDefault<z.ZodString>;
|
|
38
161
|
roughness: z.ZodDefault<z.ZodNumber>;
|
|
@@ -54,7 +177,7 @@ export declare const WallNode: z.ZodObject<{
|
|
|
54
177
|
materialPreset: z.ZodOptional<z.ZodString>;
|
|
55
178
|
interiorMaterial: z.ZodOptional<z.ZodObject<{
|
|
56
179
|
id: z.ZodOptional<z.ZodString>;
|
|
57
|
-
preset: z.ZodOptional<z.ZodEnum<{
|
|
180
|
+
preset: z.ZodOptional<z.ZodCatch<z.ZodEnum<{
|
|
58
181
|
custom: "custom";
|
|
59
182
|
white: "white";
|
|
60
183
|
brick: "brick";
|
|
@@ -65,7 +188,7 @@ export declare const WallNode: z.ZodObject<{
|
|
|
65
188
|
plaster: "plaster";
|
|
66
189
|
tile: "tile";
|
|
67
190
|
marble: "marble";
|
|
68
|
-
}
|
|
191
|
+
}>>>;
|
|
69
192
|
properties: z.ZodOptional<z.ZodObject<{
|
|
70
193
|
color: z.ZodDefault<z.ZodString>;
|
|
71
194
|
roughness: z.ZodDefault<z.ZodNumber>;
|
|
@@ -87,7 +210,7 @@ export declare const WallNode: z.ZodObject<{
|
|
|
87
210
|
interiorMaterialPreset: z.ZodOptional<z.ZodString>;
|
|
88
211
|
exteriorMaterial: z.ZodOptional<z.ZodObject<{
|
|
89
212
|
id: z.ZodOptional<z.ZodString>;
|
|
90
|
-
preset: z.ZodOptional<z.ZodEnum<{
|
|
213
|
+
preset: z.ZodOptional<z.ZodCatch<z.ZodEnum<{
|
|
91
214
|
custom: "custom";
|
|
92
215
|
white: "white";
|
|
93
216
|
brick: "brick";
|
|
@@ -98,7 +221,7 @@ export declare const WallNode: z.ZodObject<{
|
|
|
98
221
|
plaster: "plaster";
|
|
99
222
|
tile: "tile";
|
|
100
223
|
marble: "marble";
|
|
101
|
-
}
|
|
224
|
+
}>>>;
|
|
102
225
|
properties: z.ZodOptional<z.ZodObject<{
|
|
103
226
|
color: z.ZodDefault<z.ZodString>;
|
|
104
227
|
roughness: z.ZodDefault<z.ZodNumber>;
|
|
@@ -118,9 +241,107 @@ export declare const WallNode: z.ZodObject<{
|
|
|
118
241
|
}, z.core.$strip>>;
|
|
119
242
|
}, z.core.$strip>>;
|
|
120
243
|
exteriorMaterialPreset: z.ZodOptional<z.ZodString>;
|
|
244
|
+
slots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
121
245
|
thickness: z.ZodOptional<z.ZodNumber>;
|
|
122
246
|
height: z.ZodOptional<z.ZodNumber>;
|
|
123
247
|
curveOffset: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
faceBands: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
249
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
250
|
+
count: z.ZodDefault<z.ZodNumber>;
|
|
251
|
+
lowerHeight: z.ZodDefault<z.ZodNumber>;
|
|
252
|
+
middleHeight: z.ZodDefault<z.ZodNumber>;
|
|
253
|
+
upperHeight: z.ZodDefault<z.ZodNumber>;
|
|
254
|
+
}, z.core.$strip>>>;
|
|
255
|
+
skirting: z.ZodOptional<z.ZodObject<{
|
|
256
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
257
|
+
sides: z.ZodDefault<z.ZodEnum<{
|
|
258
|
+
interior: "interior";
|
|
259
|
+
exterior: "exterior";
|
|
260
|
+
both: "both";
|
|
261
|
+
}>>;
|
|
262
|
+
height: z.ZodDefault<z.ZodNumber>;
|
|
263
|
+
proud: z.ZodDefault<z.ZodNumber>;
|
|
264
|
+
profile: z.ZodDefault<z.ZodEnum<{
|
|
265
|
+
flat: "flat";
|
|
266
|
+
bevel: "bevel";
|
|
267
|
+
triangle: "triangle";
|
|
268
|
+
cove: "cove";
|
|
269
|
+
bullnose: "bullnose";
|
|
270
|
+
"base-modern": "base-modern";
|
|
271
|
+
"base-colonial": "base-colonial";
|
|
272
|
+
"base-shoe": "base-shoe";
|
|
273
|
+
"base-ogee": "base-ogee";
|
|
274
|
+
"crown-cove": "crown-cove";
|
|
275
|
+
"crown-ogee": "crown-ogee";
|
|
276
|
+
"crown-craftsman": "crown-craftsman";
|
|
277
|
+
"crown-layered": "crown-layered";
|
|
278
|
+
"rail-rounded": "rail-rounded";
|
|
279
|
+
"rail-ogee": "rail-ogee";
|
|
280
|
+
"rail-picture": "rail-picture";
|
|
281
|
+
"rail-stepped": "rail-stepped";
|
|
282
|
+
}>>;
|
|
283
|
+
offsetY: z.ZodOptional<z.ZodNumber>;
|
|
284
|
+
}, z.core.$strip>>;
|
|
285
|
+
crown: z.ZodOptional<z.ZodObject<{
|
|
286
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
287
|
+
sides: z.ZodDefault<z.ZodEnum<{
|
|
288
|
+
interior: "interior";
|
|
289
|
+
exterior: "exterior";
|
|
290
|
+
both: "both";
|
|
291
|
+
}>>;
|
|
292
|
+
height: z.ZodDefault<z.ZodNumber>;
|
|
293
|
+
proud: z.ZodDefault<z.ZodNumber>;
|
|
294
|
+
profile: z.ZodDefault<z.ZodEnum<{
|
|
295
|
+
flat: "flat";
|
|
296
|
+
bevel: "bevel";
|
|
297
|
+
triangle: "triangle";
|
|
298
|
+
cove: "cove";
|
|
299
|
+
bullnose: "bullnose";
|
|
300
|
+
"base-modern": "base-modern";
|
|
301
|
+
"base-colonial": "base-colonial";
|
|
302
|
+
"base-shoe": "base-shoe";
|
|
303
|
+
"base-ogee": "base-ogee";
|
|
304
|
+
"crown-cove": "crown-cove";
|
|
305
|
+
"crown-ogee": "crown-ogee";
|
|
306
|
+
"crown-craftsman": "crown-craftsman";
|
|
307
|
+
"crown-layered": "crown-layered";
|
|
308
|
+
"rail-rounded": "rail-rounded";
|
|
309
|
+
"rail-ogee": "rail-ogee";
|
|
310
|
+
"rail-picture": "rail-picture";
|
|
311
|
+
"rail-stepped": "rail-stepped";
|
|
312
|
+
}>>;
|
|
313
|
+
offsetY: z.ZodOptional<z.ZodNumber>;
|
|
314
|
+
}, z.core.$strip>>;
|
|
315
|
+
chairRail: z.ZodOptional<z.ZodObject<{
|
|
316
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
317
|
+
sides: z.ZodDefault<z.ZodEnum<{
|
|
318
|
+
interior: "interior";
|
|
319
|
+
exterior: "exterior";
|
|
320
|
+
both: "both";
|
|
321
|
+
}>>;
|
|
322
|
+
height: z.ZodDefault<z.ZodNumber>;
|
|
323
|
+
proud: z.ZodDefault<z.ZodNumber>;
|
|
324
|
+
profile: z.ZodDefault<z.ZodEnum<{
|
|
325
|
+
flat: "flat";
|
|
326
|
+
bevel: "bevel";
|
|
327
|
+
triangle: "triangle";
|
|
328
|
+
cove: "cove";
|
|
329
|
+
bullnose: "bullnose";
|
|
330
|
+
"base-modern": "base-modern";
|
|
331
|
+
"base-colonial": "base-colonial";
|
|
332
|
+
"base-shoe": "base-shoe";
|
|
333
|
+
"base-ogee": "base-ogee";
|
|
334
|
+
"crown-cove": "crown-cove";
|
|
335
|
+
"crown-ogee": "crown-ogee";
|
|
336
|
+
"crown-craftsman": "crown-craftsman";
|
|
337
|
+
"crown-layered": "crown-layered";
|
|
338
|
+
"rail-rounded": "rail-rounded";
|
|
339
|
+
"rail-ogee": "rail-ogee";
|
|
340
|
+
"rail-picture": "rail-picture";
|
|
341
|
+
"rail-stepped": "rail-stepped";
|
|
342
|
+
}>>;
|
|
343
|
+
offsetY: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
}, z.core.$strip>>;
|
|
124
345
|
start: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
125
346
|
end: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
126
347
|
frontSide: z.ZodDefault<z.ZodEnum<{
|
|
@@ -136,6 +357,24 @@ export declare const WallNode: z.ZodObject<{
|
|
|
136
357
|
}, z.core.$strip>;
|
|
137
358
|
export type WallNode = z.infer<typeof WallNode>;
|
|
138
359
|
export type WallSurfaceSide = 'interior' | 'exterior';
|
|
360
|
+
export type WallFaceBand = 'lower' | 'middle' | 'upper' | 'top';
|
|
361
|
+
export type WallBandSurfaceSlotId = 'lowerInterior' | 'middleInterior' | 'upperInterior' | 'topInterior' | 'lowerExterior' | 'middleExterior' | 'upperExterior' | 'topExterior';
|
|
362
|
+
export declare const WALL_SLOT_DEFAULT: Record<WallSurfaceSide, string>;
|
|
363
|
+
export declare function getWallFaceBandConfig(wall: Pick<WallNode, 'height' | 'faceBands'>): {
|
|
364
|
+
enabled: boolean;
|
|
365
|
+
count: number;
|
|
366
|
+
lowerHeight: number;
|
|
367
|
+
middleHeight: number;
|
|
368
|
+
upperHeight: number;
|
|
369
|
+
lowerTop: number;
|
|
370
|
+
middleTop: number;
|
|
371
|
+
upperTop: number;
|
|
372
|
+
};
|
|
373
|
+
export declare function getWallFaceBandForHeight(wall: Pick<WallNode, 'height' | 'faceBands'>, y: number): WallFaceBand;
|
|
374
|
+
export declare function getWallBandSlotId(side: WallSurfaceSide, band: WallFaceBand): WallBandSurfaceSlotId;
|
|
375
|
+
export declare function buildWallFaceBandCountPatch(wall: Pick<WallNode, 'faceBands' | 'slots'>, count: number): Pick<WallNode, 'faceBands' | 'slots'>;
|
|
376
|
+
export declare function buildEnabledWallFaceBandPatch(wall: Pick<WallNode, 'faceBands' | 'slots'>): Pick<WallNode, 'faceBands' | 'slots'>;
|
|
377
|
+
export declare function getWallSurfaceSideFromBandSlot(slotId: string): WallSurfaceSide | null;
|
|
139
378
|
export type WallSurfaceMaterialSpec = {
|
|
140
379
|
material?: z.infer<typeof MaterialSchema>;
|
|
141
380
|
materialPreset?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wall.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/wall.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAK5C,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"wall.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/wall.ts"],"names":[],"mappings":"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"}
|
|
@@ -5,6 +5,109 @@ import { MaterialSchema } from '../material';
|
|
|
5
5
|
import { DoorNode } from './door';
|
|
6
6
|
import { ItemNode } from './item';
|
|
7
7
|
import { WindowNode } from './window';
|
|
8
|
+
export const WallTreatmentSide = z.enum(['interior', 'exterior', 'both']);
|
|
9
|
+
export const WallTrimProfile = z.enum([
|
|
10
|
+
'flat',
|
|
11
|
+
'bevel',
|
|
12
|
+
'triangle',
|
|
13
|
+
'cove',
|
|
14
|
+
'bullnose',
|
|
15
|
+
'base-modern',
|
|
16
|
+
'base-colonial',
|
|
17
|
+
'base-shoe',
|
|
18
|
+
'base-ogee',
|
|
19
|
+
'crown-cove',
|
|
20
|
+
'crown-ogee',
|
|
21
|
+
'crown-craftsman',
|
|
22
|
+
'crown-layered',
|
|
23
|
+
'rail-rounded',
|
|
24
|
+
'rail-ogee',
|
|
25
|
+
'rail-picture',
|
|
26
|
+
'rail-stepped',
|
|
27
|
+
]);
|
|
28
|
+
export const WallTrimConfig = z.object({
|
|
29
|
+
enabled: z.boolean().default(false),
|
|
30
|
+
sides: WallTreatmentSide.default('both'),
|
|
31
|
+
height: z.number().default(0.1),
|
|
32
|
+
proud: z.number().default(0.015),
|
|
33
|
+
profile: WallTrimProfile.default('flat'),
|
|
34
|
+
offsetY: z.number().optional(),
|
|
35
|
+
});
|
|
36
|
+
export const WALL_SKIRTING_DEFAULT = {
|
|
37
|
+
enabled: false,
|
|
38
|
+
sides: 'both',
|
|
39
|
+
height: 0.12,
|
|
40
|
+
proud: 0.02,
|
|
41
|
+
profile: 'flat',
|
|
42
|
+
};
|
|
43
|
+
export const WALL_CROWN_DEFAULT = {
|
|
44
|
+
enabled: false,
|
|
45
|
+
sides: 'both',
|
|
46
|
+
height: 0.12,
|
|
47
|
+
proud: 0.055,
|
|
48
|
+
profile: 'flat',
|
|
49
|
+
};
|
|
50
|
+
export const WALL_CHAIR_RAIL_DEFAULT = {
|
|
51
|
+
enabled: false,
|
|
52
|
+
sides: 'both',
|
|
53
|
+
height: 0.055,
|
|
54
|
+
proud: 0.026,
|
|
55
|
+
profile: 'flat',
|
|
56
|
+
offsetY: 0.9,
|
|
57
|
+
};
|
|
58
|
+
export const WALL_TRIM_DEFAULTS = {
|
|
59
|
+
skirting: WALL_SKIRTING_DEFAULT,
|
|
60
|
+
crown: WALL_CROWN_DEFAULT,
|
|
61
|
+
chairRail: WALL_CHAIR_RAIL_DEFAULT,
|
|
62
|
+
};
|
|
63
|
+
const WallFaceBandConfigShape = z.object({
|
|
64
|
+
enabled: z.boolean().default(false),
|
|
65
|
+
count: z.number().int().min(1).max(4).default(1),
|
|
66
|
+
lowerHeight: z.number().default(0.84),
|
|
67
|
+
middleHeight: z.number().default(0.61),
|
|
68
|
+
upperHeight: z.number().default(0.61),
|
|
69
|
+
});
|
|
70
|
+
export const WallFaceBandConfig = z.preprocess((value) => {
|
|
71
|
+
if (value && typeof value === 'object' && !Array.isArray(value) && !('count' in value)) {
|
|
72
|
+
const enabled = value.enabled === true;
|
|
73
|
+
return { ...value, count: enabled ? 3 : 1 };
|
|
74
|
+
}
|
|
75
|
+
return value;
|
|
76
|
+
}, WallFaceBandConfigShape);
|
|
77
|
+
export const WALL_FACE_BAND_DEFAULT = {
|
|
78
|
+
enabled: false,
|
|
79
|
+
count: 1,
|
|
80
|
+
lowerHeight: 0.84,
|
|
81
|
+
middleHeight: 0.61,
|
|
82
|
+
upperHeight: 0.61,
|
|
83
|
+
};
|
|
84
|
+
export const WALL_SKIRTING_SLOT_DEFAULT = 'library:preset-softwhite';
|
|
85
|
+
export const WALL_CROWN_SLOT_DEFAULT = 'library:preset-white';
|
|
86
|
+
export const WALL_CHAIR_RAIL_SLOT_DEFAULT = 'library:preset-cream';
|
|
87
|
+
export const WALL_FACE_BAND_SOLID_SLOT_DEFAULTS = {
|
|
88
|
+
lower: 'library:preset-white',
|
|
89
|
+
middle: 'library:preset-lightgrey',
|
|
90
|
+
upper: 'library:preset-greige',
|
|
91
|
+
top: 'library:preset-softwhite',
|
|
92
|
+
};
|
|
93
|
+
export const WALL_SURFACE_SLOT_DEFAULTS = {
|
|
94
|
+
interior: 'library:concrete-drywall',
|
|
95
|
+
exterior: 'library:concrete-drywall',
|
|
96
|
+
lowerInterior: 'library:concrete-drywall',
|
|
97
|
+
middleInterior: 'library:concrete-drywall',
|
|
98
|
+
upperInterior: 'library:concrete-drywall',
|
|
99
|
+
topInterior: 'library:concrete-drywall',
|
|
100
|
+
lowerExterior: 'library:concrete-drywall',
|
|
101
|
+
middleExterior: 'library:concrete-drywall',
|
|
102
|
+
upperExterior: 'library:concrete-drywall',
|
|
103
|
+
topExterior: 'library:concrete-drywall',
|
|
104
|
+
skirtingInterior: WALL_SKIRTING_SLOT_DEFAULT,
|
|
105
|
+
skirtingExterior: WALL_SKIRTING_SLOT_DEFAULT,
|
|
106
|
+
crownInterior: WALL_CROWN_SLOT_DEFAULT,
|
|
107
|
+
crownExterior: WALL_CROWN_SLOT_DEFAULT,
|
|
108
|
+
chairRailInterior: WALL_CHAIR_RAIL_SLOT_DEFAULT,
|
|
109
|
+
chairRailExterior: WALL_CHAIR_RAIL_SLOT_DEFAULT,
|
|
110
|
+
};
|
|
8
111
|
export const WallNode = BaseNode.extend({
|
|
9
112
|
id: objectId('wall'),
|
|
10
113
|
type: nodeType('wall'),
|
|
@@ -19,9 +122,20 @@ export const WallNode = BaseNode.extend({
|
|
|
19
122
|
interiorMaterialPreset: z.string().optional(),
|
|
20
123
|
exteriorMaterial: MaterialSchema.optional(),
|
|
21
124
|
exteriorMaterialPreset: z.string().optional(),
|
|
125
|
+
// Per-slot material overrides on the unified slot model, mirroring
|
|
126
|
+
// `SlabNode.slots`. Key = slot id (`interior` / `exterior`), value = a
|
|
127
|
+
// `MaterialRef` (`library:<id>` / `scene:<id>`). Absent = the declared slot
|
|
128
|
+
// default (`WALL_SLOT_DEFAULT`). The legacy `*Material*` fields above are
|
|
129
|
+
// read only by the load migration that moves them into `slots`; delete them
|
|
130
|
+
// in a follow-up once migrated scenes are the norm.
|
|
131
|
+
slots: z.record(z.string(), z.string()).optional(),
|
|
22
132
|
thickness: z.number().optional(),
|
|
23
133
|
height: z.number().optional(),
|
|
24
134
|
curveOffset: z.number().optional(),
|
|
135
|
+
faceBands: WallFaceBandConfig.optional(),
|
|
136
|
+
skirting: WallTrimConfig.optional(),
|
|
137
|
+
crown: WallTrimConfig.optional(),
|
|
138
|
+
chairRail: WallTrimConfig.optional(),
|
|
25
139
|
// e.g., start/end points for path
|
|
26
140
|
start: z.tuple([z.number(), z.number()]),
|
|
27
141
|
end: z.tuple([z.number(), z.number()]),
|
|
@@ -39,6 +153,149 @@ export const WallNode = BaseNode.extend({
|
|
|
39
153
|
- frontSide: whether the front side faces interior, exterior, or unknown
|
|
40
154
|
- backSide: whether the back side faces interior, exterior, or unknown
|
|
41
155
|
`);
|
|
156
|
+
// Declared default appearance for an unpainted wall face in colored mode —
|
|
157
|
+
// visual parity with the retired DEFAULT_WALL_MATERIAL. Lives in core so the
|
|
158
|
+
// slot declaration (nodes) and the material resolver (viewer) share one value.
|
|
159
|
+
// May be a `#rrggbb` colour or a `library:<id>` ref. Textures-off still
|
|
160
|
+
// collapses to the themed wall role (the escape hatch).
|
|
161
|
+
export const WALL_SLOT_DEFAULT = {
|
|
162
|
+
interior: WALL_SURFACE_SLOT_DEFAULTS.interior,
|
|
163
|
+
exterior: WALL_SURFACE_SLOT_DEFAULTS.exterior,
|
|
164
|
+
};
|
|
165
|
+
export function getWallFaceBandConfig(wall) {
|
|
166
|
+
const wallHeight = wall.height ?? 2.5;
|
|
167
|
+
const raw = { ...WALL_FACE_BAND_DEFAULT, ...(wall.faceBands ?? {}) };
|
|
168
|
+
const count = raw.enabled ? Math.max(1, Math.min(4, Math.round(raw.count ?? 3))) : 1;
|
|
169
|
+
const lowerHeight = count >= 2 ? Math.max(0, Math.min(wallHeight, raw.lowerHeight)) : 0;
|
|
170
|
+
const middleHeight = count >= 3 ? Math.max(0, Math.min(wallHeight - lowerHeight, raw.middleHeight)) : 0;
|
|
171
|
+
const upperHeight = count >= 4 ? Math.max(0, Math.min(wallHeight - lowerHeight - middleHeight, raw.upperHeight)) : 0;
|
|
172
|
+
return {
|
|
173
|
+
enabled: raw.enabled && count > 1,
|
|
174
|
+
count,
|
|
175
|
+
lowerHeight,
|
|
176
|
+
middleHeight,
|
|
177
|
+
upperHeight,
|
|
178
|
+
lowerTop: lowerHeight,
|
|
179
|
+
middleTop: lowerHeight + middleHeight,
|
|
180
|
+
upperTop: lowerHeight + middleHeight + upperHeight,
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
export function getWallFaceBandForHeight(wall, y) {
|
|
184
|
+
const bands = getWallFaceBandConfig(wall);
|
|
185
|
+
if (!bands.enabled)
|
|
186
|
+
return 'upper';
|
|
187
|
+
if (y < bands.lowerTop)
|
|
188
|
+
return 'lower';
|
|
189
|
+
if (y < bands.middleTop)
|
|
190
|
+
return 'middle';
|
|
191
|
+
if (bands.count >= 4 && y < bands.upperTop)
|
|
192
|
+
return 'upper';
|
|
193
|
+
if (bands.count >= 4)
|
|
194
|
+
return 'top';
|
|
195
|
+
return 'upper';
|
|
196
|
+
}
|
|
197
|
+
export function getWallBandSlotId(side, band) {
|
|
198
|
+
const suffix = side === 'interior' ? 'Interior' : 'Exterior';
|
|
199
|
+
return `${band}${suffix}`;
|
|
200
|
+
}
|
|
201
|
+
const WALL_FACE_BAND_SLOTS_BY_SIDE = {
|
|
202
|
+
interior: ['lowerInterior', 'middleInterior', 'upperInterior', 'topInterior'],
|
|
203
|
+
exterior: ['lowerExterior', 'middleExterior', 'upperExterior', 'topExterior'],
|
|
204
|
+
};
|
|
205
|
+
function getWallFaceBandSlotsForCount(side, count) {
|
|
206
|
+
if (count <= 1)
|
|
207
|
+
return [];
|
|
208
|
+
if (side === 'interior') {
|
|
209
|
+
if (count === 2)
|
|
210
|
+
return ['lowerInterior', 'upperInterior'];
|
|
211
|
+
if (count === 3)
|
|
212
|
+
return ['lowerInterior', 'middleInterior', 'upperInterior'];
|
|
213
|
+
return ['lowerInterior', 'middleInterior', 'upperInterior', 'topInterior'];
|
|
214
|
+
}
|
|
215
|
+
if (count === 2)
|
|
216
|
+
return ['lowerExterior', 'upperExterior'];
|
|
217
|
+
if (count === 3)
|
|
218
|
+
return ['lowerExterior', 'middleExterior', 'upperExterior'];
|
|
219
|
+
return ['lowerExterior', 'middleExterior', 'upperExterior', 'topExterior'];
|
|
220
|
+
}
|
|
221
|
+
function getWallFaceBandDefaultSlot(slotId) {
|
|
222
|
+
if (slotId.startsWith('lower'))
|
|
223
|
+
return WALL_FACE_BAND_SOLID_SLOT_DEFAULTS.lower;
|
|
224
|
+
if (slotId.startsWith('middle'))
|
|
225
|
+
return WALL_FACE_BAND_SOLID_SLOT_DEFAULTS.middle;
|
|
226
|
+
if (slotId.startsWith('top'))
|
|
227
|
+
return WALL_FACE_BAND_SOLID_SLOT_DEFAULTS.top;
|
|
228
|
+
return WALL_FACE_BAND_SOLID_SLOT_DEFAULTS.upper;
|
|
229
|
+
}
|
|
230
|
+
function getWallFaceTopBandSlot(side, count) {
|
|
231
|
+
const slots = getWallFaceBandSlotsForCount(side, count);
|
|
232
|
+
return slots[slots.length - 1] ?? null;
|
|
233
|
+
}
|
|
234
|
+
export function buildWallFaceBandCountPatch(wall, count) {
|
|
235
|
+
const slots = { ...(wall.slots ?? {}) };
|
|
236
|
+
const nextCount = Math.max(1, Math.min(4, Math.round(count)));
|
|
237
|
+
const previousCount = wall.faceBands?.enabled
|
|
238
|
+
? Math.max(1, Math.min(4, Math.round(wall.faceBands.count ?? 3)))
|
|
239
|
+
: 1;
|
|
240
|
+
for (const side of ['interior', 'exterior']) {
|
|
241
|
+
const nextSlots = getWallFaceBandSlotsForCount(side, nextCount);
|
|
242
|
+
const activeSlots = new Set(nextSlots);
|
|
243
|
+
const previouslyActiveSlots = new Set(getWallFaceBandSlotsForCount(side, previousCount));
|
|
244
|
+
const previousTopSlot = getWallFaceTopBandSlot(side, previousCount);
|
|
245
|
+
const nextTopSlot = getWallFaceTopBandSlot(side, nextCount);
|
|
246
|
+
const topMaterial = (previousTopSlot ? slots[previousTopSlot] : undefined) ??
|
|
247
|
+
slots[side] ??
|
|
248
|
+
WALL_SURFACE_SLOT_DEFAULTS[side];
|
|
249
|
+
for (const slotId of WALL_FACE_BAND_SLOTS_BY_SIDE[side]) {
|
|
250
|
+
if (activeSlots.has(slotId)) {
|
|
251
|
+
if (slotId === nextTopSlot) {
|
|
252
|
+
slots[slotId] = topMaterial;
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
const wasActive = previouslyActiveSlots.has(slotId);
|
|
256
|
+
const wasPreviousTop = slotId === previousTopSlot;
|
|
257
|
+
if (!wasActive || wasPreviousTop || !slots[slotId]) {
|
|
258
|
+
slots[slotId] = getWallFaceBandDefaultSlot(slotId);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
delete slots[slotId];
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return {
|
|
267
|
+
faceBands: {
|
|
268
|
+
...WALL_FACE_BAND_DEFAULT,
|
|
269
|
+
...(wall.faceBands ?? {}),
|
|
270
|
+
enabled: nextCount > 1,
|
|
271
|
+
count: nextCount,
|
|
272
|
+
lowerHeight: wall.faceBands?.lowerHeight ?? WALL_FACE_BAND_DEFAULT.lowerHeight,
|
|
273
|
+
middleHeight: wall.faceBands?.middleHeight ?? WALL_FACE_BAND_DEFAULT.middleHeight,
|
|
274
|
+
upperHeight: wall.faceBands?.upperHeight ?? WALL_FACE_BAND_DEFAULT.upperHeight,
|
|
275
|
+
},
|
|
276
|
+
slots,
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
export function buildEnabledWallFaceBandPatch(wall) {
|
|
280
|
+
return buildWallFaceBandCountPatch(wall, 2);
|
|
281
|
+
}
|
|
282
|
+
export function getWallSurfaceSideFromBandSlot(slotId) {
|
|
283
|
+
if (slotId === 'interior' || slotId === 'exterior')
|
|
284
|
+
return slotId;
|
|
285
|
+
if (slotId === 'lowerInterior' ||
|
|
286
|
+
slotId === 'middleInterior' ||
|
|
287
|
+
slotId === 'upperInterior' ||
|
|
288
|
+
slotId === 'topInterior') {
|
|
289
|
+
return 'interior';
|
|
290
|
+
}
|
|
291
|
+
if (slotId === 'lowerExterior' ||
|
|
292
|
+
slotId === 'middleExterior' ||
|
|
293
|
+
slotId === 'upperExterior' ||
|
|
294
|
+
slotId === 'topExterior') {
|
|
295
|
+
return 'exterior';
|
|
296
|
+
}
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
42
299
|
function getConfiguredWallSurfaceMaterial(wall, side) {
|
|
43
300
|
if (side === 'interior') {
|
|
44
301
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wall.test.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/wall.test.ts"],"names":[],"mappings":""}
|