@pascal-app/nodes 1.0.6 → 1.0.7
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/README.md +1 -0
- package/dist/beam/actions/move-endpoint.d.ts +24 -0
- package/dist/beam/actions/move-endpoint.d.ts.map +1 -0
- package/dist/beam/actions/move-endpoint.js +54 -0
- package/dist/beam/definition.d.ts +14 -0
- package/dist/beam/definition.d.ts.map +1 -0
- package/dist/beam/definition.js +173 -0
- package/dist/beam/draft-settings.d.ts +17 -0
- package/dist/beam/draft-settings.d.ts.map +1 -0
- package/dist/beam/draft-settings.js +81 -0
- package/dist/beam/drafting.d.ts +35 -0
- package/dist/beam/drafting.d.ts.map +1 -0
- package/dist/beam/drafting.js +103 -0
- package/dist/beam/floorplan-affordances.d.ts +8 -0
- package/dist/beam/floorplan-affordances.d.ts.map +1 -0
- package/dist/beam/floorplan-affordances.js +40 -0
- package/dist/beam/floorplan-move.d.ts +11 -0
- package/dist/beam/floorplan-move.d.ts.map +1 -0
- package/dist/beam/floorplan-move.js +54 -0
- package/dist/beam/floorplan.d.ts +11 -0
- package/dist/beam/floorplan.d.ts.map +1 -0
- package/dist/beam/floorplan.js +91 -0
- package/dist/beam/geometry.d.ts +19 -0
- package/dist/beam/geometry.d.ts.map +1 -0
- package/dist/beam/geometry.js +63 -0
- package/dist/beam/index.d.ts +3 -0
- package/dist/beam/index.d.ts.map +1 -0
- package/dist/beam/index.js +2 -0
- package/dist/beam/move-endpoint-tool.d.ts +21 -0
- package/dist/beam/move-endpoint-tool.d.ts.map +1 -0
- package/dist/beam/move-endpoint-tool.js +49 -0
- package/dist/beam/move-tool.d.ts +12 -0
- package/dist/beam/move-tool.d.ts.map +1 -0
- package/dist/beam/move-tool.js +114 -0
- package/dist/beam/panel-model.d.ts +28 -0
- package/dist/beam/panel-model.d.ts.map +1 -0
- package/dist/beam/panel-model.js +123 -0
- package/dist/beam/panel.d.ts +13 -0
- package/dist/beam/panel.d.ts.map +1 -0
- package/dist/beam/panel.js +107 -0
- package/dist/beam/parametrics.d.ts +3 -0
- package/dist/beam/parametrics.d.ts.map +1 -0
- package/dist/beam/parametrics.js +4 -0
- package/dist/beam/renderer.d.ts +13 -0
- package/dist/beam/renderer.d.ts.map +1 -0
- package/dist/beam/renderer.js +36 -0
- package/dist/beam/schema.d.ts +2 -0
- package/dist/beam/schema.d.ts.map +1 -0
- package/dist/beam/schema.js +1 -0
- package/dist/beam/tool.d.ts +13 -0
- package/dist/beam/tool.d.ts.map +1 -0
- package/dist/beam/tool.js +152 -0
- package/dist/box-vent/panel.d.ts.map +1 -1
- package/dist/box-vent/panel.js +8 -7
- package/dist/cabinet/batchable.d.ts +10 -0
- package/dist/cabinet/batchable.d.ts.map +1 -0
- package/dist/cabinet/batchable.js +12 -0
- package/dist/cabinet/compartment-card.d.ts.map +1 -1
- package/dist/cabinet/compartment-card.js +142 -46
- package/dist/cabinet/countertop-layout.d.ts +5 -0
- package/dist/cabinet/countertop-layout.d.ts.map +1 -1
- package/dist/cabinet/definition.d.ts.map +1 -1
- package/dist/cabinet/definition.js +3 -0
- package/dist/cabinet/dimension-input.d.ts +6 -0
- package/dist/cabinet/dimension-input.d.ts.map +1 -0
- package/dist/cabinet/dimension-input.js +8 -0
- package/dist/cabinet/essential-controls.d.ts.map +1 -1
- package/dist/cabinet/essential-controls.js +82 -17
- package/dist/cabinet/index.d.ts +1 -1
- package/dist/cabinet/index.d.ts.map +1 -1
- package/dist/cabinet/index.js +1 -1
- package/dist/cabinet/kitchen-catalog.d.ts +17 -4
- package/dist/cabinet/kitchen-catalog.d.ts.map +1 -1
- package/dist/cabinet/kitchen-catalog.js +45 -7
- package/dist/cabinet/kitchen-collection.d.ts.map +1 -1
- package/dist/cabinet/kitchen-collection.js +21 -5
- package/dist/cabinet/kitchen-module-actions.d.ts.map +1 -1
- package/dist/cabinet/kitchen-module-actions.js +107 -14
- package/dist/cabinet/neighbor-placement.d.ts +10 -0
- package/dist/cabinet/neighbor-placement.d.ts.map +1 -1
- package/dist/cabinet/panel.d.ts.map +1 -1
- package/dist/cabinet/panel.js +127 -50
- package/dist/cabinet/run-finishing.d.ts +5 -0
- package/dist/cabinet/run-finishing.d.ts.map +1 -1
- package/dist/cabinet/run-ops.d.ts +5 -0
- package/dist/cabinet/run-ops.d.ts.map +1 -1
- package/dist/cabinet/run-panel.d.ts.map +1 -1
- package/dist/cabinet/run-panel.js +203 -52
- package/dist/cabinet/tool.d.ts.map +1 -1
- package/dist/cabinet/tool.js +8 -5
- package/dist/ceiling/build-up-section.d.ts +7 -0
- package/dist/ceiling/build-up-section.d.ts.map +1 -0
- package/dist/ceiling/build-up-section.js +57 -0
- package/dist/ceiling/definition.d.ts.map +1 -1
- package/dist/ceiling/definition.js +3 -1
- package/dist/ceiling/floorplan-affordances.d.ts +112 -0
- package/dist/ceiling/floorplan-affordances.d.ts.map +1 -1
- package/dist/ceiling/materials.d.ts +5 -0
- package/dist/ceiling/materials.d.ts.map +1 -1
- package/dist/ceiling/materials.js +17 -0
- package/dist/ceiling/panel-model.d.ts +13 -0
- package/dist/ceiling/panel-model.d.ts.map +1 -0
- package/dist/ceiling/panel-model.js +49 -0
- package/dist/ceiling/panel.d.ts.map +1 -1
- package/dist/ceiling/panel.js +82 -18
- package/dist/ceiling/renderer.d.ts.map +1 -1
- package/dist/ceiling/renderer.js +10 -4
- package/dist/ceiling/tool.d.ts.map +1 -1
- package/dist/ceiling/tool.js +24 -4
- package/dist/chimney/panel.d.ts.map +1 -1
- package/dist/chimney/panel.js +113 -41
- package/dist/column/definition.d.ts.map +1 -1
- package/dist/column/definition.js +3 -0
- package/dist/column/floorplan.d.ts.map +1 -1
- package/dist/column/floorplan.js +17 -0
- package/dist/column/hosted-resize.d.ts +28 -1
- package/dist/column/hosted-resize.d.ts.map +1 -1
- package/dist/column/panel.d.ts.map +1 -1
- package/dist/column/panel.js +125 -37
- package/dist/column/post-options.d.ts +10 -0
- package/dist/column/post-options.d.ts.map +1 -0
- package/dist/column/post-options.js +71 -0
- package/dist/column/post-placement.d.ts +78 -0
- package/dist/column/post-placement.d.ts.map +1 -0
- package/dist/column/post-placement.js +157 -0
- package/dist/column/post-section.d.ts +17 -0
- package/dist/column/post-section.d.ts.map +1 -0
- package/dist/column/post-section.js +95 -0
- package/dist/column/post-tool.d.ts +11 -0
- package/dist/column/post-tool.d.ts.map +1 -0
- package/dist/column/post-tool.js +94 -0
- package/dist/column/tool.d.ts +3 -10
- package/dist/column/tool.d.ts.map +1 -1
- package/dist/column/tool.js +13 -1
- package/dist/cupola/panel.d.ts.map +1 -1
- package/dist/cupola/panel.js +14 -7
- package/dist/door/actions.d.ts +7 -0
- package/dist/door/actions.d.ts.map +1 -0
- package/dist/door/actions.js +32 -0
- package/dist/door/contextual-dimensions.d.ts.map +1 -1
- package/dist/door/contextual-dimensions.js +11 -1
- package/dist/door/definition.d.ts.map +1 -1
- package/dist/door/definition.js +34 -7
- package/dist/door/floorplan-affordances.d.ts.map +1 -1
- package/dist/door/floorplan-affordances.js +5 -2
- package/dist/door/floorplan-move.d.ts.map +1 -1
- package/dist/door/floorplan-move.js +28 -6
- package/dist/door/floorplan.d.ts +2 -0
- package/dist/door/floorplan.d.ts.map +1 -1
- package/dist/door/floorplan.js +89 -16
- package/dist/door/move-tool.d.ts.map +1 -1
- package/dist/door/move-tool.js +60 -16
- package/dist/door/paint.d.ts +2 -7
- package/dist/door/paint.d.ts.map +1 -1
- package/dist/door/paint.js +26 -2
- package/dist/door/panel.d.ts.map +1 -1
- package/dist/door/panel.js +242 -90
- package/dist/door/parametrics.js +1 -1
- package/dist/door/placement.d.ts.map +1 -1
- package/dist/door/placement.js +9 -2
- package/dist/door/swing.d.ts +22 -0
- package/dist/door/swing.d.ts.map +1 -0
- package/dist/door/swing.js +36 -0
- package/dist/door/tool.d.ts.map +1 -1
- package/dist/door/tool.js +76 -29
- package/dist/dormer/panel-actions-section.d.ts.map +1 -1
- package/dist/dormer/panel-actions-section.js +3 -1
- package/dist/dormer/panel-position-section.d.ts.map +1 -1
- package/dist/dormer/panel-position-section.js +4 -3
- package/dist/dormer/panel-windows-section.d.ts.map +1 -1
- package/dist/dormer/panel-windows-section.js +38 -1
- package/dist/dormer/panel.d.ts.map +1 -1
- package/dist/dormer/panel.js +24 -18
- package/dist/downspout/inspector-editors.d.ts.map +1 -1
- package/dist/downspout/inspector-editors.js +3 -2
- package/dist/duct-fitting/inspector-editors.d.ts.map +1 -1
- package/dist/duct-fitting/inspector-editors.js +6 -1
- package/dist/duct-fitting/tool.d.ts.map +1 -1
- package/dist/duct-fitting/tool.js +11 -2
- package/dist/duct-terminal/tool.d.ts.map +1 -1
- package/dist/duct-terminal/tool.js +11 -2
- package/dist/elevator/panel.d.ts.map +1 -1
- package/dist/elevator/panel.js +41 -18
- package/dist/eyebrow-vent/panel.d.ts.map +1 -1
- package/dist/eyebrow-vent/panel.js +16 -6
- package/dist/fence/drafting.d.ts +2 -3
- package/dist/fence/drafting.d.ts.map +1 -1
- package/dist/fence/drafting.js +2 -3
- package/dist/fence/inspector-editors.d.ts.map +1 -1
- package/dist/fence/inspector-editors.js +64 -21
- package/dist/fence/move-endpoint-tool.d.ts.map +1 -1
- package/dist/fence/move-endpoint-tool.js +11 -2
- package/dist/fence/system.d.ts.map +1 -1
- package/dist/fence/system.js +13 -0
- package/dist/fence-feature/actions.d.ts.map +1 -1
- package/dist/fence-feature/actions.js +5 -2
- package/dist/fence-feature/inspector.d.ts.map +1 -1
- package/dist/fence-feature/inspector.js +150 -34
- package/dist/fence-feature/move-session.d.ts +1 -1
- package/dist/floor-opening/floorplan.d.ts +29 -6
- package/dist/floor-opening/floorplan.d.ts.map +1 -1
- package/dist/floor-opening/floorplan.js +172 -14
- package/dist/gutter/downspouts-panel.d.ts.map +1 -1
- package/dist/gutter/downspouts-panel.js +14 -2
- package/dist/hvac-equipment/tool.d.ts.map +1 -1
- package/dist/hvac-equipment/tool.js +3 -2
- package/dist/i18n/definition-messages.d.ts +5 -0
- package/dist/i18n/definition-messages.d.ts.map +1 -0
- package/dist/i18n/definition-messages.js +771 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/item/authored-params.d.ts.map +1 -1
- package/dist/item/authored-params.js +19 -4
- package/dist/item/floorplan.d.ts +1 -1
- package/dist/item/floorplan.d.ts.map +1 -1
- package/dist/item/panel.d.ts.map +1 -1
- package/dist/item/panel.js +9 -7
- package/dist/liquid-line/tool.d.ts.map +1 -1
- package/dist/liquid-line/tool.js +10 -3
- package/dist/measurement/tool.d.ts +1 -1
- package/dist/measurement/tool.d.ts.map +1 -1
- package/dist/measurement/tool.js +8 -8
- package/dist/pipe-fitting/tool.d.ts.map +1 -1
- package/dist/pipe-fitting/tool.js +3 -2
- package/dist/pipe-trap/tool.d.ts.map +1 -1
- package/dist/pipe-trap/tool.js +7 -2
- package/dist/procedural-item/renderer.d.ts.map +1 -1
- package/dist/procedural-item/renderer.js +8 -1
- package/dist/ridge-vent/panel.d.ts.map +1 -1
- package/dist/ridge-vent/panel.js +22 -9
- package/dist/roof/barrel-panel.d.ts.map +1 -1
- package/dist/roof/barrel-panel.js +7 -3
- package/dist/roof/definition.d.ts.map +1 -1
- package/dist/roof/definition.js +33 -3
- package/dist/roof/floorplan-overrides.d.ts +22 -0
- package/dist/roof/floorplan-overrides.d.ts.map +1 -0
- package/dist/roof/floorplan-overrides.js +46 -0
- package/dist/roof/floorplan-tool.d.ts +9 -0
- package/dist/roof/floorplan-tool.d.ts.map +1 -0
- package/dist/roof/floorplan-tool.js +168 -0
- package/dist/roof/floorplan.d.ts.map +1 -1
- package/dist/roof/floorplan.js +131 -41
- package/dist/roof/glazing-controls.d.ts +2 -1
- package/dist/roof/glazing-controls.d.ts.map +1 -1
- package/dist/roof/glazing-controls.js +51 -13
- package/dist/roof/glazing-panel-editor.d.ts.map +1 -1
- package/dist/roof/glazing-panel-editor.js +40 -13
- package/dist/roof/glazing-panel.d.ts.map +1 -1
- package/dist/roof/glazing-panel.js +73 -9
- package/dist/roof/paint.d.ts +19 -0
- package/dist/roof/paint.d.ts.map +1 -0
- package/dist/roof/paint.js +158 -0
- package/dist/roof/panel.d.ts.map +1 -1
- package/dist/roof/panel.js +90 -22
- package/dist/roof/renderer.d.ts.map +1 -1
- package/dist/roof/renderer.js +13 -2
- package/dist/roof/roof-footprint-source.d.ts +17 -0
- package/dist/roof/roof-footprint-source.d.ts.map +1 -1
- package/dist/roof/roof-footprint-source.js +14 -0
- package/dist/roof/roof-footprint.d.ts +36 -2
- package/dist/roof/roof-footprint.d.ts.map +1 -1
- package/dist/roof/roof-footprint.js +124 -2
- package/dist/roof/roof-materials.d.ts.map +1 -1
- package/dist/roof/roof-materials.js +10 -1
- package/dist/roof/roof-placement-mode.d.ts +0 -2
- package/dist/roof/roof-placement-mode.d.ts.map +1 -1
- package/dist/roof/roof-placement-mode.js +8 -6
- package/dist/roof/roof-plan-creases.d.ts +50 -0
- package/dist/roof/roof-plan-creases.d.ts.map +1 -0
- package/dist/roof/roof-plan-creases.js +194 -0
- package/dist/roof/roof-ridge-mode.d.ts +20 -0
- package/dist/roof/roof-ridge-mode.d.ts.map +1 -0
- package/dist/roof/roof-ridge-mode.js +16 -0
- package/dist/roof/tool.d.ts +17 -4
- package/dist/roof/tool.d.ts.map +1 -1
- package/dist/roof/tool.js +211 -113
- package/dist/roof/wall-catch.d.ts +106 -0
- package/dist/roof/wall-catch.d.ts.map +1 -0
- package/dist/roof/wall-catch.js +267 -0
- package/dist/roof-segment/build-up-section.d.ts +9 -0
- package/dist/roof-segment/build-up-section.d.ts.map +1 -0
- package/dist/roof-segment/build-up-section.js +191 -0
- package/dist/roof-segment/definition.d.ts.map +1 -1
- package/dist/roof-segment/definition.js +50 -5
- package/dist/roof-segment/floorplan-affordances.d.ts.map +1 -1
- package/dist/roof-segment/floorplan-affordances.js +68 -19
- package/dist/roof-segment/floorplan.d.ts.map +1 -1
- package/dist/roof-segment/floorplan.js +16 -12
- package/dist/roof-segment/paint.d.ts +3 -1
- package/dist/roof-segment/paint.d.ts.map +1 -1
- package/dist/roof-segment/paint.js +43 -2
- package/dist/roof-segment/panel-model.d.ts +23 -0
- package/dist/roof-segment/panel-model.d.ts.map +1 -0
- package/dist/roof-segment/panel-model.js +64 -0
- package/dist/roof-segment/panel.d.ts.map +1 -1
- package/dist/roof-segment/panel.js +96 -14
- package/dist/roof-segment/parametrics.d.ts.map +1 -1
- package/dist/roof-segment/parametrics.js +4 -0
- package/dist/roof-segment/renderer.d.ts.map +1 -1
- package/dist/roof-segment/renderer.js +26 -5
- package/dist/separator/definition.d.ts.map +1 -1
- package/dist/separator/definition.js +10 -12
- package/dist/separator/floorplan-affordances.d.ts +9 -0
- package/dist/separator/floorplan-affordances.d.ts.map +1 -0
- package/dist/separator/floorplan-affordances.js +23 -0
- package/dist/separator/floorplan.d.ts +9 -0
- package/dist/separator/floorplan.d.ts.map +1 -0
- package/dist/separator/floorplan.js +54 -0
- package/dist/separator/renderer.d.ts +4 -0
- package/dist/separator/renderer.d.ts.map +1 -1
- package/dist/separator/renderer.js +21 -6
- package/dist/separator/selection.d.ts +10 -0
- package/dist/separator/selection.d.ts.map +1 -0
- package/dist/separator/selection.js +35 -0
- package/dist/shared/build-up-controls.d.ts +88 -0
- package/dist/shared/build-up-controls.d.ts.map +1 -0
- package/dist/shared/build-up-controls.js +139 -0
- package/dist/shared/curtain-opening-limits.d.ts.map +1 -1
- package/dist/shared/curtain-opening-limits.js +44 -14
- package/dist/shared/item-interaction-actions.d.ts.map +1 -1
- package/dist/shared/item-interaction-actions.js +11 -2
- package/dist/shared/layer-thickness.d.ts +2 -0
- package/dist/shared/layer-thickness.d.ts.map +1 -0
- package/dist/shared/layer-thickness.js +3 -0
- package/dist/shared/move-roof-tool.d.ts.map +1 -1
- package/dist/shared/move-roof-tool.js +100 -5
- package/dist/shared/node-batch/batchable.d.ts +2 -0
- package/dist/shared/node-batch/batchable.d.ts.map +1 -1
- package/dist/shared/node-batch/batchable.js +4 -0
- package/dist/shared/node-batch/candidates.d.ts +21 -5
- package/dist/shared/node-batch/candidates.d.ts.map +1 -1
- package/dist/shared/node-batch/candidates.js +85 -50
- package/dist/shared/node-batch/system.d.ts.map +1 -1
- package/dist/shared/node-batch/system.js +24 -15
- package/dist/shared/opening-casing-move.d.ts +16 -0
- package/dist/shared/opening-casing-move.d.ts.map +1 -0
- package/dist/shared/opening-casing-move.js +33 -0
- package/dist/shared/opening-casing-section.d.ts +15 -0
- package/dist/shared/opening-casing-section.d.ts.map +1 -0
- package/dist/shared/opening-casing-section.js +38 -0
- package/dist/shared/opening-casing.d.ts +26 -0
- package/dist/shared/opening-casing.d.ts.map +1 -0
- package/dist/shared/opening-casing.js +80 -0
- package/dist/shared/opening-depth-position.d.ts +13 -0
- package/dist/shared/opening-depth-position.d.ts.map +1 -0
- package/dist/shared/opening-depth-position.js +34 -0
- package/dist/shared/opening-documentation.d.ts.map +1 -1
- package/dist/shared/opening-documentation.js +17 -8
- package/dist/shared/opening-guides-runtime.d.ts +2 -1
- package/dist/shared/opening-guides-runtime.d.ts.map +1 -1
- package/dist/shared/opening-guides-runtime.js +11 -7
- package/dist/shared/opening-labels.d.ts +11 -0
- package/dist/shared/opening-labels.d.ts.map +1 -0
- package/dist/shared/opening-labels.js +46 -0
- package/dist/shared/opening-placement-dimensions.d.ts.map +1 -1
- package/dist/shared/opening-placement-dimensions.js +11 -9
- package/dist/shared/opening-plane-offset.d.ts +4 -3
- package/dist/shared/opening-plane-offset.d.ts.map +1 -1
- package/dist/shared/opening-plane-offset.js +7 -4
- package/dist/shared/opening-swap.d.ts +8 -0
- package/dist/shared/opening-swap.d.ts.map +1 -0
- package/dist/shared/opening-swap.js +18 -0
- package/dist/shared/polygon-vertex-affordance.d.ts +19 -0
- package/dist/shared/polygon-vertex-affordance.d.ts.map +1 -1
- package/dist/shared/polygon-vertex-affordance.js +65 -6
- package/dist/shared/roof-opening-host.d.ts +2 -1
- package/dist/shared/roof-opening-host.d.ts.map +1 -1
- package/dist/shared/roof-opening-host.js +14 -5
- package/dist/shared/roof-wall-opening-cut.d.ts.map +1 -1
- package/dist/shared/roof-wall-opening-cut.js +14 -6
- package/dist/shared/roof-wall-opening-placement.d.ts +2 -1
- package/dist/shared/roof-wall-opening-placement.d.ts.map +1 -1
- package/dist/shared/roof-wall-opening-placement.js +6 -4
- package/dist/shared/run-hanger-inspector.d.ts.map +1 -1
- package/dist/shared/run-hanger-inspector.js +39 -5
- package/dist/shared/system-check-panel.d.ts.map +1 -1
- package/dist/shared/system-check-panel.js +94 -15
- package/dist/shared/wall-attach-target.d.ts.map +1 -1
- package/dist/shared/wall-attach-target.js +6 -3
- package/dist/shelf/definition.d.ts.map +1 -1
- package/dist/shelf/definition.js +2 -0
- package/dist/site/ground-hole.d.ts +3 -3
- package/dist/site/ground-hole.js +3 -3
- package/dist/site/ground-veil.d.ts +5 -12
- package/dist/site/ground-veil.d.ts.map +1 -1
- package/dist/site/ground-veil.js +9 -33
- package/dist/site/panel.d.ts.map +1 -1
- package/dist/site/panel.js +52 -12
- package/dist/site/renderer.d.ts.map +1 -1
- package/dist/site/renderer.js +52 -23
- package/dist/skylight/panel.d.ts.map +1 -1
- package/dist/skylight/panel.js +49 -19
- package/dist/slab/deck-geometry.d.ts +28 -0
- package/dist/slab/deck-geometry.d.ts.map +1 -0
- package/dist/slab/deck-geometry.js +320 -0
- package/dist/slab/definition.d.ts +2 -1
- package/dist/slab/definition.d.ts.map +1 -1
- package/dist/slab/definition.js +6 -1
- package/dist/slab/dependency-tracker.d.ts.map +1 -1
- package/dist/slab/dependency-tracker.js +3 -0
- package/dist/slab/floorplan-affordances.d.ts +500 -0
- package/dist/slab/floorplan-affordances.d.ts.map +1 -1
- package/dist/slab/geometry.d.ts.map +1 -1
- package/dist/slab/geometry.js +46 -9
- package/dist/slab/panel.d.ts.map +1 -1
- package/dist/slab/panel.js +97 -21
- package/dist/slab/renderer.d.ts +11 -0
- package/dist/slab/renderer.d.ts.map +1 -0
- package/dist/slab/renderer.js +19 -0
- package/dist/slab/system.d.ts.map +1 -1
- package/dist/slab/system.js +12 -1
- package/dist/solar-panel/panel.d.ts.map +1 -1
- package/dist/solar-panel/panel.js +49 -14
- package/dist/stair/construction-controls.d.ts +3 -1
- package/dist/stair/construction-controls.d.ts.map +1 -1
- package/dist/stair/construction-controls.js +75 -12
- package/dist/stair/paint.d.ts +6 -0
- package/dist/stair/paint.d.ts.map +1 -1
- package/dist/stair/panel.d.ts.map +1 -1
- package/dist/stair/panel.js +243 -51
- package/dist/stair/parametrics.d.ts.map +1 -1
- package/dist/stair/parametrics.js +7 -0
- package/dist/stair/placement-defaults.d.ts +18 -0
- package/dist/stair/placement-defaults.d.ts.map +1 -0
- package/dist/stair/placement-defaults.js +27 -0
- package/dist/stair/railing-controls.d.ts.map +1 -1
- package/dist/stair/railing-controls.js +78 -18
- package/dist/stair/renderer.d.ts.map +1 -1
- package/dist/stair/renderer.js +16 -10
- package/dist/stair/structure-controls.d.ts +18 -0
- package/dist/stair/structure-controls.d.ts.map +1 -0
- package/dist/stair/structure-controls.js +275 -0
- package/dist/stair/tool.d.ts.map +1 -1
- package/dist/stair/tool.js +13 -9
- package/dist/stair/use-stair-render-data.d.ts +41 -0
- package/dist/stair/use-stair-render-data.d.ts.map +1 -1
- package/dist/stair-segment/panel.d.ts.map +1 -1
- package/dist/stair-segment/panel.js +65 -18
- package/dist/turbine-vent/panel.d.ts.map +1 -1
- package/dist/turbine-vent/panel.js +14 -5
- package/dist/unit/unit-panel.d.ts.map +1 -1
- package/dist/unit/unit-panel.js +28 -12
- package/dist/wall/actions.d.ts +1 -1
- package/dist/wall/actions.d.ts.map +1 -1
- package/dist/wall/actions.js +17 -13
- package/dist/wall/construction-dimensions.d.ts +6 -0
- package/dist/wall/construction-dimensions.d.ts.map +1 -1
- package/dist/wall/construction-dimensions.js +8 -0
- package/dist/wall/contextual-dimensions.d.ts +6 -0
- package/dist/wall/contextual-dimensions.d.ts.map +1 -1
- package/dist/wall/contextual-dimensions.js +104 -17
- package/dist/wall/curtain-opening-frame.d.ts.map +1 -1
- package/dist/wall/curtain-opening-frame.js +6 -4
- package/dist/wall/curtain-wall-layout.d.ts +1 -1
- package/dist/wall/curtain-wall-layout.d.ts.map +1 -1
- package/dist/wall/curtain-wall-layout.js +6 -4
- package/dist/wall/curtain-wall-materials.d.ts.map +1 -1
- package/dist/wall/curtain-wall-materials.js +8 -3
- package/dist/wall/curtain-wall-panel.d.ts.map +1 -1
- package/dist/wall/curtain-wall-panel.js +241 -37
- package/dist/wall/curve-tool.d.ts.map +1 -1
- package/dist/wall/curve-tool.js +2 -3
- package/dist/wall/definition.d.ts.map +1 -1
- package/dist/wall/definition.js +20 -5
- package/dist/wall/floorplan-affordances.d.ts.map +1 -1
- package/dist/wall/floorplan-affordances.js +9 -6
- package/dist/wall/floorplan-move.d.ts.map +1 -1
- package/dist/wall/floorplan-move.js +66 -16
- package/dist/wall/floorplan.d.ts +4 -5
- package/dist/wall/floorplan.d.ts.map +1 -1
- package/dist/wall/floorplan.js +62 -46
- package/dist/wall/move-endpoint-tool.d.ts.map +1 -1
- package/dist/wall/move-endpoint-tool.js +1 -0
- package/dist/wall/move-tool.d.ts.map +1 -1
- package/dist/wall/move-tool.js +77 -12
- package/dist/wall/paint.d.ts +2 -2
- package/dist/wall/paint.d.ts.map +1 -1
- package/dist/wall/paint.js +11 -4
- package/dist/wall/panel-model.d.ts +17 -2
- package/dist/wall/panel-model.d.ts.map +1 -1
- package/dist/wall/panel-model.js +158 -18
- package/dist/wall/panel.d.ts +8 -0
- package/dist/wall/panel.d.ts.map +1 -1
- package/dist/wall/panel.js +228 -156
- package/dist/wall/parametrics.d.ts +1 -1
- package/dist/wall/parametrics.d.ts.map +1 -1
- package/dist/wall/parametrics.js +14 -1
- package/dist/wall/railing-wall-adapter.d.ts +7 -0
- package/dist/wall/railing-wall-adapter.d.ts.map +1 -0
- package/dist/wall/railing-wall-adapter.js +38 -0
- package/dist/wall/railing-wall-floorplan.d.ts +8 -0
- package/dist/wall/railing-wall-floorplan.d.ts.map +1 -0
- package/dist/wall/railing-wall-floorplan.js +27 -0
- package/dist/wall/railing-wall-geometry.d.ts +12 -0
- package/dist/wall/railing-wall-geometry.d.ts.map +1 -0
- package/dist/wall/railing-wall-geometry.js +51 -0
- package/dist/wall/railing-wall-guard.d.ts +81 -0
- package/dist/wall/railing-wall-guard.d.ts.map +1 -0
- package/dist/wall/railing-wall-guard.js +435 -0
- package/dist/wall/railing-wall-materials.d.ts +11 -0
- package/dist/wall/railing-wall-materials.d.ts.map +1 -0
- package/dist/wall/railing-wall-materials.js +31 -0
- package/dist/wall/railing-wall-panel-model.d.ts +30 -0
- package/dist/wall/railing-wall-panel-model.d.ts.map +1 -0
- package/dist/wall/railing-wall-panel-model.js +117 -0
- package/dist/wall/railing-wall-panel.d.ts +17 -0
- package/dist/wall/railing-wall-panel.d.ts.map +1 -0
- package/dist/wall/railing-wall-panel.js +42 -0
- package/dist/wall/rectangle-command.d.ts +79 -1
- package/dist/wall/rectangle-command.d.ts.map +1 -1
- package/dist/wall/rectangle-tool.d.ts.map +1 -1
- package/dist/wall/rectangle-tool.js +2 -0
- package/dist/wall/renderer.d.ts.map +1 -1
- package/dist/wall/renderer.js +3 -1
- package/dist/wall/skirting-floor-gaps.d.ts +8 -0
- package/dist/wall/skirting-floor-gaps.d.ts.map +1 -0
- package/dist/wall/skirting-floor-gaps.js +36 -0
- package/dist/wall/system.d.ts +0 -14
- package/dist/wall/system.d.ts.map +1 -1
- package/dist/wall/system.js +6 -1
- package/dist/wall/tool.d.ts +16 -0
- package/dist/wall/tool.d.ts.map +1 -1
- package/dist/wall/tool.js +160 -47
- package/dist/wall/treatments.d.ts +3 -0
- package/dist/wall/treatments.d.ts.map +1 -1
- package/dist/wall/treatments.js +30 -7
- package/dist/window/actions.d.ts +7 -0
- package/dist/window/actions.d.ts.map +1 -0
- package/dist/window/actions.js +29 -0
- package/dist/window/definition.d.ts.map +1 -1
- package/dist/window/definition.js +11 -2
- package/dist/window/floorplan-move.d.ts.map +1 -1
- package/dist/window/floorplan-move.js +5 -0
- package/dist/window/floorplan.d.ts +2 -0
- package/dist/window/floorplan.d.ts.map +1 -1
- package/dist/window/floorplan.js +58 -1
- package/dist/window/mechanism.d.ts.map +1 -1
- package/dist/window/mechanism.js +21 -1
- package/dist/window/move-tool.d.ts.map +1 -1
- package/dist/window/move-tool.js +10 -3
- package/dist/window/paint.d.ts +2 -7
- package/dist/window/paint.d.ts.map +1 -1
- package/dist/window/paint.js +31 -3
- package/dist/window/panel.d.ts.map +1 -1
- package/dist/window/panel.js +311 -69
- package/dist/window/placement.d.ts.map +1 -1
- package/dist/window/placement.js +5 -1
- package/dist/window/swing.d.ts +13 -0
- package/dist/window/swing.d.ts.map +1 -0
- package/dist/window/swing.js +16 -0
- package/dist/window/tool.d.ts.map +1 -1
- package/dist/window/tool.js +19 -14
- package/dist/zone/floorplan-affordances.d.ts +136 -0
- package/dist/zone/floorplan-affordances.d.ts.map +1 -1
- package/dist/zone/quantities-panel.d.ts.map +1 -1
- package/dist/zone/quantities-panel.js +34 -9
- package/dist/zone/renderer.d.ts.map +1 -1
- package/dist/zone/renderer.js +9 -5
- package/package.json +14 -14
- package/dist/site/generic-foundation-geometry.d.ts +0 -16
- package/dist/site/generic-foundation-geometry.d.ts.map +0 -1
- package/dist/site/generic-foundation-geometry.js +0 -75
- package/dist/site/generic-foundation.d.ts +0 -4
- package/dist/site/generic-foundation.d.ts.map +0 -1
- package/dist/site/generic-foundation.js +0 -91
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { usePascalI18n } from '@pascal-app/core';
|
|
3
4
|
import { getLinearUnitLabel, linearControlValueToMeters, metersToLinearUnit, PanelSection, SegmentedControl, SelectControl, SliderControl, } from '@pascal-app/editor';
|
|
4
5
|
import { useViewer } from '@pascal-app/viewer';
|
|
5
6
|
import { useCallback } from 'react';
|
|
@@ -18,6 +19,7 @@ export function GlazingNumber({ field, label, value, preview, fraction = false,
|
|
|
18
19
|
return (_jsx(SliderControl, { label: label, value: fraction ? value * 100 : display(value), mixed: mixed, min: fraction ? (field === 'glassOpacity' ? 5 : 0) : display(0.001), max: fraction ? 100 : undefined, unit: fraction ? '%' : millimeters ? 'mm' : getLinearUnitLabel(unit), precision: fraction ? 0 : millimeters ? 1 : 3, step: fraction || millimeters ? 1 : 0.005, onChange: onChange, onCommit: preview.finish, onCancel: preview.cancel, restoreOnCommit: false, previewWhileTyping: true }));
|
|
19
20
|
}
|
|
20
21
|
export function GlazingGridControls({ axis, title, description, grid, grids, preview, }) {
|
|
22
|
+
const i18n = usePascalI18n();
|
|
21
23
|
const unit = useViewer((state) => state.unit);
|
|
22
24
|
const patch = useCallback((data, commit = false) => {
|
|
23
25
|
preview.previewGlazing((config) => ({ ...config, [axis]: { ...config[axis], ...data } }));
|
|
@@ -25,26 +27,62 @@ export function GlazingGridControls({ axis, title, description, grid, grids, pre
|
|
|
25
27
|
preview.commit();
|
|
26
28
|
}, [axis, preview]);
|
|
27
29
|
const mixedLayout = grids.some((value) => value.layout !== grid.layout);
|
|
28
|
-
return (_jsxs(PanelSection, { title: title, children: [_jsx(SelectControl, { label:
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
return (_jsxs(PanelSection, { title: title, children: [_jsx(SelectControl, { label: i18n._({ id: 'node.roof.glazingControls.layout', message: 'Layout' }), value: grid.layout, mixed: mixedLayout, options: [
|
|
31
|
+
{
|
|
32
|
+
value: 'maximum-spacing',
|
|
33
|
+
label: i18n._({
|
|
34
|
+
id: 'node.roof.glazingControls.maximumSpacing',
|
|
35
|
+
message: 'Maximum spacing',
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: 'count',
|
|
40
|
+
label: i18n._({ id: 'node.roof.glazingControls.panelCount', message: 'Panel count' }),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: 'fixed-spacing',
|
|
44
|
+
label: i18n._({
|
|
45
|
+
id: 'node.roof.glazingControls.fixedSpacing',
|
|
46
|
+
message: 'Fixed spacing',
|
|
47
|
+
}),
|
|
48
|
+
},
|
|
49
|
+
], onChange: (layout) => patch({ layout }, true) }), mixedLayout ? (_jsx("p", { className: "pt-1 text-[11px] text-muted-foreground", children: i18n._({
|
|
50
|
+
id: 'node.roof.glazingControls.chooseALayoutToEditThe',
|
|
51
|
+
message: 'Choose a layout to edit the grid.',
|
|
52
|
+
}) })) : grid.layout === 'count' ? (_jsx(SliderControl, { label: i18n._({ id: 'node.roof.glazingControls.panels', message: 'Panels' }), value: grid.count, mixed: grids.some((value) => value.count !== grid.count), min: 1, max: 32, step: 1, precision: 0, onChange: (count) => patch({ count: Math.round(count) }), onCommit: preview.finish, onCancel: preview.cancel, restoreOnCommit: false, previewWhileTyping: true })) : (_jsx(SliderControl, { label: grid.layout === 'maximum-spacing'
|
|
53
|
+
? i18n._({ id: 'node.roof.glazingControls.maxSpacing', message: 'Max spacing' })
|
|
54
|
+
: i18n._({ id: 'node.roof.glazingControls.spacing', message: 'Spacing' }), value: metersToLinearUnit(grid.spacing, unit), mixed: grids.some((value) => value.spacing !== grid.spacing), min: metersToLinearUnit(0.2, unit), max: metersToLinearUnit(100, unit), unit: getLinearUnitLabel(unit), step: 0.05, precision: 2, onChange: (input) => patch({
|
|
33
55
|
spacing: linearControlValueToMeters(input, unit, { minMeters: 0.2, maxMeters: 100 }),
|
|
34
|
-
}), onCommit: preview.finish, onCancel: preview.cancel, restoreOnCommit: false, previewWhileTyping: true })), !mixedLayout && grid.layout === 'fixed-spacing' && (_jsxs("div", { className: "flex flex-col gap-2 pt-1", role: "group", "aria-label":
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
56
|
+
}), onCommit: preview.finish, onCancel: preview.cancel, restoreOnCommit: false, previewWhileTyping: true })), !mixedLayout && grid.layout === 'fixed-spacing' && (_jsxs("div", { className: "flex flex-col gap-2 pt-1", role: "group", "aria-label": i18n._({
|
|
57
|
+
id: 'node.roof.glazingControls.titleAlignment',
|
|
58
|
+
message: '{title} alignment',
|
|
59
|
+
values: { title },
|
|
60
|
+
}), children: [_jsx("span", { className: "text-xs text-muted-foreground", children: i18n._({ id: 'node.roof.glazingControls.alignment', message: 'Alignment' }) }), _jsx(SegmentedControl, { value: grid.alignment, mixed: grids.some((value) => value.alignment !== grid.alignment), options: [
|
|
61
|
+
{
|
|
62
|
+
value: 'start',
|
|
63
|
+
label: i18n._({ id: 'node.roof.glazingControls.start', message: 'Start' }),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
value: 'center',
|
|
67
|
+
label: i18n._({ id: 'node.roof.glazingControls.center', message: 'Center' }),
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
value: 'end',
|
|
71
|
+
label: i18n._({ id: 'node.roof.glazingControls.end', message: 'End' }),
|
|
72
|
+
},
|
|
38
73
|
], onChange: (alignment) => patch({ alignment }, true) })] })), _jsx("p", { className: "pt-1 text-[11px] leading-relaxed text-muted-foreground", children: description })] }));
|
|
39
74
|
}
|
|
40
75
|
export function GlazingColor({ field, label, value, mixed, preview, }) {
|
|
41
|
-
|
|
76
|
+
const i18n = usePascalI18n();
|
|
77
|
+
return (_jsxs("label", { className: "flex h-10 items-center justify-between gap-2 rounded-lg border border-border/50 bg-[#2C2C2E] px-3 text-xs", children: [_jsx("span", { className: "text-muted-foreground", children: label }), _jsxs("span", { className: "flex items-center gap-2", children: [_jsx("span", { className: "font-mono text-[11px] text-foreground", children: mixed
|
|
78
|
+
? i18n._({ id: 'node.roof.glazingControls.mixed', message: 'Mixed' })
|
|
79
|
+
: value.toUpperCase() }), _jsx("input", { "aria-label": label, type: "color", value: value, className: "size-6 cursor-pointer overflow-hidden rounded border border-border/50 bg-transparent p-0 focus-visible:outline-2 focus-visible:outline-ring", onChange: (event) => preview.previewGlazing((config) => ({ ...config, [field]: event.target.value })), onBlur: preview.finish, onKeyDown: (event) => {
|
|
42
80
|
if (event.key === 'Escape')
|
|
43
81
|
preview.cancel();
|
|
44
82
|
} })] })] }));
|
|
45
83
|
}
|
|
46
84
|
export const GLAZING_INFILL_OPTIONS = [
|
|
47
|
-
{ value: 'glass', label: 'Glass' },
|
|
48
|
-
{ value: 'solid', label: 'Solid' },
|
|
49
|
-
{ value: 'empty', label: 'Empty' },
|
|
85
|
+
{ value: 'glass', label: /* i18n */ { id: 'node.roof.glazingControls.glass', message: 'Glass' } },
|
|
86
|
+
{ value: 'solid', label: /* i18n */ { id: 'node.roof.glazingControls.solid', message: 'Solid' } },
|
|
87
|
+
{ value: 'empty', label: /* i18n */ { id: 'node.roof.glazingControls.empty', message: 'Empty' } },
|
|
50
88
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glazing-panel-editor.d.ts","sourceRoot":"","sources":["../../src/roof/glazing-panel-editor.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"glazing-panel-editor.d.ts","sourceRoot":"","sources":["../../src/roof/glazing-panel-editor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,eAAe,EAErB,MAAM,kBAAkB,CAAA;AA+BzB,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,eAAe,CAAA;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;CAChD,sCAoHA"}
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { getGlazedRoofLayout, getGlazedRoofPanelType, getRoofGlazing, } from '@pascal-app/core';
|
|
3
|
+
import { getGlazedRoofLayout, getGlazedRoofPanelType, getRoofGlazing, usePascalI18n, } from '@pascal-app/core';
|
|
4
4
|
import { ActionButton, PanelSection, SegmentedControl, SelectControl, SliderControl, } from '@pascal-app/editor';
|
|
5
5
|
import { RotateCcw } from 'lucide-react';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import { GLAZING_INFILL_OPTIONS } from './glazing-controls.js';
|
|
8
|
-
|
|
8
|
+
const FACE_LABELS = {
|
|
9
|
+
front: /* i18n */ { id: 'node.roof.glazing.face.front', message: 'Front slope' },
|
|
10
|
+
back: /* i18n */ { id: 'node.roof.glazing.face.back', message: 'Back slope' },
|
|
11
|
+
slope: /* i18n */ { id: 'node.roof.glazing.face.slope', message: 'Shed slope' },
|
|
12
|
+
'end-left': /* i18n */ { id: 'node.roof.glazing.face.endLeft', message: 'Left end' },
|
|
13
|
+
'end-right': /* i18n */ { id: 'node.roof.glazing.face.endRight', message: 'Right end' },
|
|
14
|
+
};
|
|
15
|
+
function faceLabel(id, i18n) {
|
|
9
16
|
if (id.startsWith('barrel-'))
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
return labels[id] ?? id;
|
|
17
|
+
return i18n._({
|
|
18
|
+
id: 'node.roof.glazing.face.archBay',
|
|
19
|
+
message: 'Arch bay {number}',
|
|
20
|
+
values: { number: Number(id.slice(7)) + 1 },
|
|
21
|
+
});
|
|
22
|
+
const label = FACE_LABELS[id];
|
|
23
|
+
return label ? i18n._(label) : id;
|
|
19
24
|
}
|
|
20
25
|
export function GlazingPanelEditor({ node, onUpdate, }) {
|
|
26
|
+
const i18n = usePascalI18n();
|
|
21
27
|
const [faceId, setFaceId] = useState('front');
|
|
22
28
|
const [column, setColumn] = useState(0);
|
|
23
29
|
const [row, setRow] = useState(0);
|
|
@@ -36,9 +42,30 @@ export function GlazingPanelEditor({ node, onUpdate, }) {
|
|
|
36
42
|
...(type ? [{ face: layout.face.id, column: activeColumn, row: activeRow, type }] : []),
|
|
37
43
|
],
|
|
38
44
|
});
|
|
39
|
-
return (_jsxs(PanelSection, { title:
|
|
45
|
+
return (_jsxs(PanelSection, { title: i18n._({
|
|
46
|
+
id: 'node.roof.glazingPanelEditor.individualPanels',
|
|
47
|
+
message: 'Individual panels',
|
|
48
|
+
}), defaultExpanded: false, children: [_jsx("p", { className: "pb-1 text-[11px] leading-relaxed text-muted-foreground", children: i18n._({
|
|
49
|
+
id: 'node.roof.glazingPanelEditor.chooseAPanelToOverrideIts',
|
|
50
|
+
message: 'Choose a panel to override its default infill.',
|
|
51
|
+
}) }), _jsx(SelectControl, { label: i18n._({ id: 'node.roof.glazingPanelEditor.roofFace', message: 'Roof face' }), value: layout.face.id, options: layouts.map(({ face }) => ({ value: face.id, label: faceLabel(face.id, i18n) })), onChange: (value) => {
|
|
40
52
|
setFaceId(value);
|
|
41
53
|
setColumn(0);
|
|
42
54
|
setRow(0);
|
|
43
|
-
} }),
|
|
55
|
+
} }), _jsx("p", { className: "py-1 text-[11px] text-muted-foreground", children: i18n._({
|
|
56
|
+
id: 'node.roof.glazingPanelEditor.grid',
|
|
57
|
+
message: '{columns, plural, one {{columnCount} column} other {{columnCount} columns}} · {rows, plural, one {{rowCount} row} other {{rowCount} rows}}',
|
|
58
|
+
values: { columns, rows, columnCount: String(columns), rowCount: String(rows) },
|
|
59
|
+
}) }), columns > 1 && (_jsx(SliderControl, { label: i18n._({ id: 'node.roof.glazingPanelEditor.column2', message: 'Column' }), value: activeColumn + 1, min: 1, max: columns, step: 1, precision: 0, onChange: (value) => setColumn(Math.round(value) - 1) })), rows > 1 && (_jsx(SliderControl, { label: i18n._({ id: 'node.roof.glazingPanelEditor.row2', message: 'Row' }), value: activeRow + 1, min: 1, max: rows, step: 1, precision: 0, onChange: (value) => setRow(Math.round(value) - 1) })), _jsxs("div", { className: "flex flex-col gap-2 pt-1", role: "group", "aria-label": i18n._({
|
|
60
|
+
id: 'node.roof.glazingPanelEditor.selectedPanelInfill',
|
|
61
|
+
message: 'Selected panel infill',
|
|
62
|
+
}), children: [_jsxs("span", { className: "flex items-center justify-between text-xs text-muted-foreground", children: [i18n._({ id: 'node.roof.glazingPanelEditor.panelInfill', message: 'Panel infill' }), ' ', _jsx("span", { className: "text-[11px]", children: overridden
|
|
63
|
+
? i18n._({ id: 'node.roof.glazingPanelEditor.custom', message: 'Custom' })
|
|
64
|
+
: i18n._({ id: 'node.roof.glazingPanelEditor.default', message: 'Default' }) })] }), _jsx(SegmentedControl, { value: getGlazedRoofPanelType(node, layout.face.id, activeColumn, activeRow), options: GLAZING_INFILL_OPTIONS.map((option) => ({
|
|
65
|
+
...option,
|
|
66
|
+
label: i18n._(option.label),
|
|
67
|
+
})), onChange: (type) => update(type) })] }), _jsx(ActionButton, { label: i18n._({
|
|
68
|
+
id: 'node.roof.glazingPanelEditor.resetToDefault',
|
|
69
|
+
message: 'Reset to default',
|
|
70
|
+
}), icon: _jsx(RotateCcw, { className: "size-3.5" }), disabled: !overridden, className: "mt-1 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-[#2C2C2E]", onClick: () => update() })] }));
|
|
44
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glazing-panel.d.ts","sourceRoot":"","sources":["../../src/roof/glazing-panel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"glazing-panel.d.ts","sourceRoot":"","sources":["../../src/roof/glazing-panel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,eAAe,EAIrB,MAAM,kBAAkB,CAAA;AAazB,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAA;CAAE,sCAmPtF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { getEffectiveNode, getRoofGlazing, isGlazedRoofSegment, supportsRoofGlazing, useLiveNodeOverrides, } from '@pascal-app/core';
|
|
3
|
+
import { getEffectiveNode, getRoofGlazing, isGlazedRoofSegment, supportsRoofGlazing, useLiveNodeOverrides, usePascalI18n, } from '@pascal-app/core';
|
|
4
4
|
import { PanelSection, SegmentedControl, ToggleControl } from '@pascal-app/editor';
|
|
5
5
|
import { useEffect, useMemo } from 'react';
|
|
6
6
|
import { useShallow } from 'zustand/react/shallow';
|
|
@@ -8,6 +8,7 @@ import { GLAZING_INFILL_OPTIONS, GlazingColor, GlazingGridControls, GlazingNumbe
|
|
|
8
8
|
import { GlazingPanelEditor } from './glazing-panel-editor.js';
|
|
9
9
|
import { createRoofGlazingPreview } from './glazing-preview.js';
|
|
10
10
|
export function RoofGlazingPanel({ segments }) {
|
|
11
|
+
const i18n = usePascalI18n();
|
|
11
12
|
useLiveNodeOverrides(useShallow((state) => segments.map((segment) => state.overrides.get(segment.id))));
|
|
12
13
|
const idKey = segments.map((segment) => segment.id).join(',');
|
|
13
14
|
const preview = useMemo(() => createRoofGlazingPreview(idKey ? idKey.split(',') : []), [idKey]);
|
|
@@ -27,15 +28,78 @@ export function RoofGlazingPanel({ segments }) {
|
|
|
27
28
|
preview.previewGlazing((current) => ({ ...current, ...patch }));
|
|
28
29
|
preview.commit();
|
|
29
30
|
};
|
|
30
|
-
return (_jsxs(_Fragment, { children: [_jsxs(PanelSection, { title:
|
|
31
|
-
{
|
|
32
|
-
|
|
31
|
+
return (_jsxs(_Fragment, { children: [_jsxs(PanelSection, { title: i18n._({ id: 'node.roof.glazingPanel.roofSystem', message: 'Roof system' }), children: [_jsx(SegmentedControl, { value: glazed ? 'glazed' : 'standard', mixed: mixed, options: [
|
|
32
|
+
{
|
|
33
|
+
value: 'standard',
|
|
34
|
+
label: i18n._({ id: 'node.roof.glazingPanel.standard', message: 'Standard' }),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: 'glazed',
|
|
38
|
+
label: i18n._({ id: 'node.roof.glazingPanel.glazed', message: 'Glazed' }),
|
|
39
|
+
disabled: !supported,
|
|
40
|
+
},
|
|
33
41
|
], onChange: (roofSystem) => {
|
|
34
42
|
if (roofSystem === 'standard' || supported)
|
|
35
43
|
preview.commit({ roofSystem });
|
|
36
|
-
} }), !supported && (_jsx("p", { className: "pt-1 text-[11px] leading-relaxed text-muted-foreground", children:
|
|
37
|
-
|
|
38
|
-
: '
|
|
39
|
-
|
|
40
|
-
: '
|
|
44
|
+
} }), !supported && (_jsx("p", { className: "pt-1 text-[11px] leading-relaxed text-muted-foreground", children: i18n._({
|
|
45
|
+
id: 'node.roof.glazingPanel.glazingIsAvailableForGableStraight',
|
|
46
|
+
message: 'Glazing is available for gable, straight shed, and barrel roofs.',
|
|
47
|
+
}) })), mixed && (_jsx("p", { className: "pt-1 text-[11px] leading-relaxed text-muted-foreground", children: i18n._({
|
|
48
|
+
id: 'node.roof.glazingPanel.chooseOneRoofSystemToEdit',
|
|
49
|
+
message: 'Choose one roof system to edit settings for all selected segments.',
|
|
50
|
+
}) })), segments.length > 1 && (_jsx("p", { className: "pt-1 text-[11px] text-muted-foreground", children: i18n._({
|
|
51
|
+
id: 'node.roof.glazingPanel.changesApplyToAllLengthRoof',
|
|
52
|
+
message: 'Changes apply to all {length} roof segments.',
|
|
53
|
+
values: { length: segments.length },
|
|
54
|
+
}) }))] }), glazed && !mixed && (_jsxs(_Fragment, { children: [_jsx(GlazingGridControls, { axis: "across", title: allBarrel
|
|
55
|
+
? i18n._({
|
|
56
|
+
id: 'node.roof.glazingPanel.gridAlongTheLength',
|
|
57
|
+
message: 'Grid along the length',
|
|
58
|
+
})
|
|
59
|
+
: i18n._({
|
|
60
|
+
id: 'node.roof.glazingPanel.gridAcrossTheRoof',
|
|
61
|
+
message: 'Grid across the roof',
|
|
62
|
+
}), description: allBarrel
|
|
63
|
+
? i18n._({
|
|
64
|
+
id: 'node.roof.glazingPanel.dividesTheLengthOfEachArch',
|
|
65
|
+
message: 'Divides the length of each arch bay into columns.',
|
|
66
|
+
})
|
|
67
|
+
: i18n._({
|
|
68
|
+
id: 'node.roof.glazingPanel.dividesEachRoofFaceIntoColumns',
|
|
69
|
+
message: 'Divides each roof face into columns.',
|
|
70
|
+
}), grid: config.across, grids: configs.map((value) => value.across), preview: preview }), _jsx(GlazingGridControls, { axis: "along", title: allBarrel
|
|
71
|
+
? i18n._({
|
|
72
|
+
id: 'node.roof.glazingPanel.gridWithinEachArchBay',
|
|
73
|
+
message: 'Grid within each arch bay',
|
|
74
|
+
})
|
|
75
|
+
: i18n._({
|
|
76
|
+
id: 'node.roof.glazingPanel.gridAlongTheSlope',
|
|
77
|
+
message: 'Grid along the slope',
|
|
78
|
+
}), description: allBarrel
|
|
79
|
+
? i18n._({
|
|
80
|
+
id: 'node.roof.glazingPanel.subdividesEachFlatArchBayArch',
|
|
81
|
+
message: 'Subdivides each flat arch bay. Arch bays controls the divisions around the curve.',
|
|
82
|
+
})
|
|
83
|
+
: i18n._({
|
|
84
|
+
id: 'node.roof.glazingPanel.spacingIsMeasuredOnTheSlope',
|
|
85
|
+
message: 'Spacing is measured on the slope, not its horizontal projection.',
|
|
86
|
+
}), grid: config.along, grids: configs.map((value) => value.along), preview: preview }), _jsxs(PanelSection, { title: i18n._({ id: 'node.roof.glazingPanel.framing', message: 'Framing' }), children: [_jsx(GlazingNumber, { field: "frameWidth", label: i18n._({ id: 'node.roof.glazingPanel.frameWidth', message: 'Frame width' }), value: config.frameWidth, mixed: mixedField('frameWidth'), preview: preview }), _jsx(GlazingNumber, { field: "frameDepth", label: i18n._({ id: 'node.roof.glazingPanel.frameDepth', message: 'Frame depth' }), value: config.frameDepth, mixed: mixedField('frameDepth'), preview: preview }), _jsx(GlazingColor, { field: "frameColor", label: i18n._({ id: 'node.roof.glazingPanel.frameColor', message: 'Frame color' }), value: config.frameColor, mixed: mixedField('frameColor'), preview: preview })] }), _jsxs(PanelSection, { title: i18n._({ id: 'node.roof.glazingPanel.glass', message: 'Glass' }), children: [_jsx(GlazingNumber, { field: "glassThickness", label: i18n._({
|
|
87
|
+
id: 'node.roof.glazingPanel.paneThickness',
|
|
88
|
+
message: 'Pane thickness',
|
|
89
|
+
}), value: config.glassThickness, mixed: mixedField('glassThickness'), preview: preview }), _jsx(GlazingColor, { field: "glassColor", label: i18n._({ id: 'node.roof.glazingPanel.glassTint', message: 'Glass tint' }), value: config.glassColor, mixed: mixedField('glassColor'), preview: preview }), _jsx(GlazingNumber, { field: "glassOpacity", label: i18n._({ id: 'node.roof.glazingPanel.opacity', message: 'Opacity' }), value: config.glassOpacity, mixed: mixedField('glassOpacity'), preview: preview, fraction: true }), _jsx(GlazingNumber, { field: "glassRoughness", label: i18n._({ id: 'node.roof.glazingPanel.roughness', message: 'Roughness' }), value: config.glassRoughness, mixed: mixedField('glassRoughness'), preview: preview, fraction: true })] }), _jsxs(PanelSection, { title: i18n._({ id: 'node.roof.glazingPanel.infill', message: 'Infill' }), children: [_jsxs("div", { className: "flex flex-col gap-2 pb-1", role: "group", "aria-label": i18n._({
|
|
90
|
+
id: 'node.roof.glazingPanel.defaultPanelInfill',
|
|
91
|
+
message: 'Default panel infill',
|
|
92
|
+
}), children: [_jsx("span", { className: "text-xs text-muted-foreground", children: i18n._({
|
|
93
|
+
id: 'node.roof.glazingPanel.defaultPanelInfill',
|
|
94
|
+
message: 'Default panel infill',
|
|
95
|
+
}) }), _jsx(SegmentedControl, { value: config.panelType, mixed: mixedField('panelType'), options: GLAZING_INFILL_OPTIONS.map((option) => ({
|
|
96
|
+
...option,
|
|
97
|
+
label: i18n._(option.label),
|
|
98
|
+
})), onChange: (panelType) => update({ panelType }) })] }), _jsx(ToggleControl, { label: i18n._({
|
|
99
|
+
id: 'node.roof.glazingPanel.closeTheRoofEnds',
|
|
100
|
+
message: 'Close the roof ends',
|
|
101
|
+
}), checked: config.glazedEnds, mixed: mixedField('glazedEnds'), onChange: (glazedEnds) => update({ glazedEnds }) }), _jsx("p", { className: "pt-1 text-[11px] leading-relaxed text-muted-foreground", children: i18n._({
|
|
102
|
+
id: 'node.roof.glazingPanel.endInfillFillsTheSpaceAbove',
|
|
103
|
+
message: 'End infill fills the space above the walls. Edit room walls and ceilings separately.',
|
|
104
|
+
}) })] }), segments.length === 1 && (_jsx(GlazingPanelEditor, { node: node, onUpdate: update }, node.id))] }))] }));
|
|
41
105
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type AnyNodeId, type PaintCapability } from '@pascal-app/core';
|
|
2
|
+
type RoofGableBand = 'gable-left' | 'gable-right';
|
|
3
|
+
/** Every gable of the roof: the `matching` scope of a gable hit. */
|
|
4
|
+
export declare const ROOF_ALL_GABLES_ROLE = "gables:all";
|
|
5
|
+
/** One gable of the merged shell: `gable-left:<segmentId>` / `gable-right:<segmentId>`. */
|
|
6
|
+
export declare function roofGableRole(band: RoofGableBand, segmentId: string): string;
|
|
7
|
+
export declare function parseRoofGableRole(role: string): {
|
|
8
|
+
band: RoofGableBand;
|
|
9
|
+
segmentId: AnyNodeId;
|
|
10
|
+
} | null;
|
|
11
|
+
/**
|
|
12
|
+
* The merged roof shell's paint. Its surfaces are the roof's top / edge / wall
|
|
13
|
+
* finishes and the heel band; an edge hit on a segment's ±x end wall is that
|
|
14
|
+
* gable alone (its segment's gable finish), and the `matching` scope widens it
|
|
15
|
+
* to every gable — the roof's edge, with no segment keeping a gable of its own.
|
|
16
|
+
*/
|
|
17
|
+
export declare const roofPaint: PaintCapability;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=paint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../../src/roof/paint.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAId,KAAK,eAAe,EAKrB,MAAM,kBAAkB,CAAA;AAazB,KAAK,aAAa,GAAG,YAAY,GAAG,aAAa,CAAA;AAEjD,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,eAAe,CAAA;AAEhD,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GACX;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,GAAG,IAAI,CAMtD;AAqCD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,eA8GvB,CAAA"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { getEffectiveRoofSurfaceMaterial, getEffectiveSegmentSurfaceMaterial, getRoofWallBandMaterial, useScene, } from '@pascal-app/core';
|
|
2
|
+
import { buildRoofSurfaceMaterialPatch, resolveRoofWallHit } from '@pascal-app/editor';
|
|
3
|
+
import { getRoofMaterialArray, levelWallCladdingRef, levelWallFaceRef, ROOF_HEEL_MATERIAL_INDEX, useViewer, } from '@pascal-app/viewer';
|
|
4
|
+
import { Vector3 } from 'three';
|
|
5
|
+
import { wallBandPatch } from '../roof-segment/paint.js';
|
|
6
|
+
import { swapPreviewMaterial } from '../shared/swap-preview-material.js';
|
|
7
|
+
/** Every gable of the roof: the `matching` scope of a gable hit. */
|
|
8
|
+
export const ROOF_ALL_GABLES_ROLE = 'gables:all';
|
|
9
|
+
/** One gable of the merged shell: `gable-left:<segmentId>` / `gable-right:<segmentId>`. */
|
|
10
|
+
export function roofGableRole(band, segmentId) {
|
|
11
|
+
return `${band}:${segmentId}`;
|
|
12
|
+
}
|
|
13
|
+
export function parseRoofGableRole(role) {
|
|
14
|
+
const split = role.indexOf(':');
|
|
15
|
+
if (split < 0)
|
|
16
|
+
return null;
|
|
17
|
+
const band = role.slice(0, split);
|
|
18
|
+
if (band !== 'gable-left' && band !== 'gable-right')
|
|
19
|
+
return null;
|
|
20
|
+
return { band, segmentId: role.slice(split + 1) };
|
|
21
|
+
}
|
|
22
|
+
const isSurfaceRole = (role) => role === 'top' || role === 'edge' || role === 'wall';
|
|
23
|
+
const hitWorldPoint = new Vector3();
|
|
24
|
+
/** The merged shell's surface under the cursor: its material slot, else the hit normal. */
|
|
25
|
+
function surfaceRole(materialIndex, normal) {
|
|
26
|
+
if (materialIndex === 3)
|
|
27
|
+
return 'top';
|
|
28
|
+
if (materialIndex === ROOF_HEEL_MATERIAL_INDEX)
|
|
29
|
+
return 'heel';
|
|
30
|
+
if (materialIndex === 0)
|
|
31
|
+
return 'edge';
|
|
32
|
+
if (materialIndex === 1 || materialIndex === 2)
|
|
33
|
+
return 'wall';
|
|
34
|
+
const normalY = normal?.[1];
|
|
35
|
+
if (normalY !== undefined && normalY > 0.35)
|
|
36
|
+
return 'top';
|
|
37
|
+
if (normalY !== undefined && Math.abs(normalY) <= 0.35)
|
|
38
|
+
return 'edge';
|
|
39
|
+
if (normalY !== undefined && normalY < -0.35)
|
|
40
|
+
return 'wall';
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
/** The merged roof with `role` repainted, so the preview draws it the way a commit would. */
|
|
44
|
+
function previewRoof(roof, role, material, preset) {
|
|
45
|
+
if (role === 'heel')
|
|
46
|
+
return { ...roof, ...wallBandPatch('heel', material, preset) };
|
|
47
|
+
const surface = role === ROOF_ALL_GABLES_ROLE ? 'edge' : role;
|
|
48
|
+
if (!isSurfaceRole(surface))
|
|
49
|
+
return null;
|
|
50
|
+
return { ...roof, ...buildRoofSurfaceMaterialPatch(roof, surface, material, preset) };
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The merged roof shell's paint. Its surfaces are the roof's top / edge / wall
|
|
54
|
+
* finishes and the heel band; an edge hit on a segment's ±x end wall is that
|
|
55
|
+
* gable alone (its segment's gable finish), and the `matching` scope widens it
|
|
56
|
+
* to every gable — the roof's edge, with no segment keeping a gable of its own.
|
|
57
|
+
*/
|
|
58
|
+
export const roofPaint = {
|
|
59
|
+
materialTarget: 'roof',
|
|
60
|
+
resolveRole(args) {
|
|
61
|
+
const role = surfaceRole(args.materialIndex, args.normal);
|
|
62
|
+
if (role !== 'edge' || !(args.localPosition && args.hitObject))
|
|
63
|
+
return role;
|
|
64
|
+
args.hitObject.updateWorldMatrix(true, false);
|
|
65
|
+
const position = args.hitObject.localToWorld(hitWorldPoint.set(...args.localPosition));
|
|
66
|
+
const hit = resolveRoofWallHit(args.node, [position.x, position.y, position.z], args.normal, args.hitObject);
|
|
67
|
+
if (!hit || (hit.face.id !== 'left' && hit.face.id !== 'right'))
|
|
68
|
+
return role;
|
|
69
|
+
return roofGableRole(hit.face.id === 'left' ? 'gable-left' : 'gable-right', hit.segment.id);
|
|
70
|
+
},
|
|
71
|
+
roleLabel(_node, role) {
|
|
72
|
+
if (role === 'heel')
|
|
73
|
+
return 'Heel band';
|
|
74
|
+
if (role === ROOF_ALL_GABLES_ROLE)
|
|
75
|
+
return 'All gables';
|
|
76
|
+
const gable = parseRoofGableRole(role);
|
|
77
|
+
if (!gable)
|
|
78
|
+
return null;
|
|
79
|
+
return gable.band === 'gable-left' ? 'Left gable' : 'Right gable';
|
|
80
|
+
},
|
|
81
|
+
scopes(_node, role) {
|
|
82
|
+
if (!parseRoofGableRole(role))
|
|
83
|
+
return null;
|
|
84
|
+
return {
|
|
85
|
+
scopes: ['single', 'matching'],
|
|
86
|
+
labels: { matching: 'All gables' },
|
|
87
|
+
roleFor: (scope) => (scope === 'matching' ? ROOF_ALL_GABLES_ROLE : role),
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
buildPatch({ node, role, material, materialPreset }) {
|
|
91
|
+
const roof = node;
|
|
92
|
+
if (role === 'heel')
|
|
93
|
+
return wallBandPatch('heel', material, materialPreset);
|
|
94
|
+
if (role === ROOF_ALL_GABLES_ROLE)
|
|
95
|
+
return buildRoofSurfaceMaterialPatch(roof, 'edge', material, materialPreset);
|
|
96
|
+
if (!isSurfaceRole(role))
|
|
97
|
+
return {};
|
|
98
|
+
return buildRoofSurfaceMaterialPatch(roof, role, material, materialPreset);
|
|
99
|
+
},
|
|
100
|
+
commit(args) {
|
|
101
|
+
const scene = useScene.getState();
|
|
102
|
+
const gable = parseRoofGableRole(args.role);
|
|
103
|
+
if (gable) {
|
|
104
|
+
scene.updateNode(gable.segmentId, wallBandPatch(gable.band, args.material, args.materialPreset));
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (args.role !== ROOF_ALL_GABLES_ROLE) {
|
|
108
|
+
scene.updateNode(args.node.id, roofPaint.buildPatch(args));
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
// Every gable: the roof's edge, and no segment keeping a gable of its own.
|
|
112
|
+
const cleared = {
|
|
113
|
+
...wallBandPatch('gable-left', undefined, undefined),
|
|
114
|
+
...wallBandPatch('gable-right', undefined, undefined),
|
|
115
|
+
};
|
|
116
|
+
scene.updateNodes([
|
|
117
|
+
{ id: args.node.id, data: roofPaint.buildPatch(args) },
|
|
118
|
+
...(args.node.children ?? []).flatMap((childId) => scene.nodes[childId]?.type === 'roof-segment'
|
|
119
|
+
? [{ id: childId, data: cleared }]
|
|
120
|
+
: []),
|
|
121
|
+
]);
|
|
122
|
+
},
|
|
123
|
+
applyPreview(args) {
|
|
124
|
+
// One gable has no surface of its own on the merged shell until it is painted.
|
|
125
|
+
if (parseRoofGableRole(args.role))
|
|
126
|
+
return null;
|
|
127
|
+
const mesh = args.root.getObjectByName('merged-roof');
|
|
128
|
+
if (!mesh)
|
|
129
|
+
return null;
|
|
130
|
+
const roof = args.node;
|
|
131
|
+
const preview = previewRoof(roof, args.role, args.material, args.materialPreset);
|
|
132
|
+
if (!preview)
|
|
133
|
+
return null;
|
|
134
|
+
// The renderer's wall-derived defaults, so the surfaces not being painted hold still.
|
|
135
|
+
const nodes = args.nodes ?? useScene.getState().nodes;
|
|
136
|
+
const viewer = useViewer.getState();
|
|
137
|
+
const material = getRoofMaterialArray(preview, viewer.shading, viewer.textures, viewer.colorPreset, viewer.sceneTheme, levelWallCladdingRef(nodes, roof), args.materials ?? useScene.getState().materials, levelWallFaceRef(nodes, roof));
|
|
138
|
+
return material ? swapPreviewMaterial(mesh, material) : null;
|
|
139
|
+
},
|
|
140
|
+
// The top / edge / wall finishes return null here and resolve through the
|
|
141
|
+
// editor's roof surface fallback (`resolveActivePaintMaterialFromSelection`).
|
|
142
|
+
getEffectiveMaterial({ node, role, nodes }) {
|
|
143
|
+
if (role === 'heel') {
|
|
144
|
+
const own = getRoofWallBandMaterial(node, 'heel');
|
|
145
|
+
return own ? { material: own.material, materialPreset: own.materialPreset } : null;
|
|
146
|
+
}
|
|
147
|
+
const gable = parseRoofGableRole(role);
|
|
148
|
+
const segment = gable ? nodes?.[gable.segmentId] : undefined;
|
|
149
|
+
if (!(gable && segment?.type === 'roof-segment'))
|
|
150
|
+
return null;
|
|
151
|
+
// Unpainted, a gable shows the segment's edge, falling back to the roof's.
|
|
152
|
+
const own = getRoofWallBandMaterial(segment, gable.band);
|
|
153
|
+
if (own)
|
|
154
|
+
return { material: own.material, materialPreset: own.materialPreset };
|
|
155
|
+
const edge = getEffectiveSegmentSurfaceMaterial(segment, 'edge', getEffectiveRoofSurfaceMaterial(node, 'edge'));
|
|
156
|
+
return { material: edge.material, materialPreset: edge.materialPreset };
|
|
157
|
+
},
|
|
158
|
+
};
|
package/dist/roof/panel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/roof/panel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/roof/panel.tsx"],"names":[],"mappings":"AAiDA,MAAM,CAAC,OAAO,UAAU,SAAS,uCAqsBhC"}
|