@pascal-app/nodes 1.0.3 → 1.0.4
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/block/definition.d.ts.map +1 -1
- package/dist/block/definition.js +18 -3
- package/dist/block/floorplan.d.ts +11 -1
- package/dist/block/floorplan.d.ts.map +1 -1
- package/dist/block/floorplan.js +81 -13
- package/dist/block/geometry.d.ts +2 -2
- package/dist/block/geometry.d.ts.map +1 -1
- package/dist/block/geometry.js +39 -24
- package/dist/block/hosted-edit.d.ts.map +1 -1
- package/dist/block/hosted-edit.js +25 -0
- package/dist/block/material-slots.d.ts +1 -3
- package/dist/block/material-slots.d.ts.map +1 -1
- package/dist/block/material-slots.js +1 -11
- package/dist/block/paint.d.ts.map +1 -1
- package/dist/block/paint.js +4 -10
- package/dist/block/panel.d.ts.map +1 -1
- package/dist/block/panel.js +8 -3
- package/dist/block/selection.d.ts.map +1 -1
- package/dist/block/selection.js +2 -2
- package/dist/box-vent/definition.d.ts.map +1 -1
- package/dist/box-vent/definition.js +2 -5
- package/dist/box-vent/panel.d.ts.map +1 -1
- package/dist/box-vent/panel.js +5 -28
- package/dist/cabinet/countertop-layout.d.ts +13 -2
- package/dist/cabinet/countertop-layout.d.ts.map +1 -1
- package/dist/cabinet/definition.d.ts.map +1 -1
- package/dist/cabinet/definition.js +1 -2
- package/dist/cabinet/floorplan.d.ts.map +1 -1
- package/dist/cabinet/floorplan.js +125 -28
- package/dist/cabinet/geometry/shared.d.ts +1 -2
- package/dist/cabinet/geometry/shared.d.ts.map +1 -1
- package/dist/cabinet/geometry/shared.js +1 -2
- package/dist/cabinet/run-layout.d.ts.map +1 -1
- package/dist/cabinet/run-layout.js +8 -5
- package/dist/cabinet/run-ops.d.ts +13 -2
- package/dist/cabinet/run-ops.d.ts.map +1 -1
- package/dist/cabinet/tool.d.ts.map +1 -1
- package/dist/cabinet/tool.js +22 -24
- package/dist/cabinet/wall-snap.d.ts.map +1 -1
- package/dist/cabinet/wall-snap.js +8 -8
- package/dist/ceiling/boundary-editor.d.ts.map +1 -1
- package/dist/ceiling/boundary-editor.js +5 -3
- package/dist/ceiling/definition.d.ts +4 -4
- package/dist/ceiling/definition.d.ts.map +1 -1
- package/dist/ceiling/definition.js +15 -15
- package/dist/ceiling/floorplan-affordances.d.ts +84 -4
- package/dist/ceiling/floorplan-affordances.d.ts.map +1 -1
- package/dist/ceiling/floorplan-affordances.js +0 -1
- package/dist/ceiling/floorplan-move.d.ts.map +1 -1
- package/dist/ceiling/floorplan-move.js +0 -1
- package/dist/ceiling/floorplan.d.ts +1 -1
- package/dist/ceiling/floorplan.d.ts.map +1 -1
- package/dist/ceiling/floorplan.js +2 -1
- package/dist/ceiling/height-bounds.d.ts +19 -0
- package/dist/ceiling/height-bounds.d.ts.map +1 -0
- package/dist/ceiling/height-bounds.js +24 -0
- package/dist/ceiling/hole-editor.d.ts.map +1 -1
- package/dist/ceiling/hole-editor.js +3 -4
- package/dist/ceiling/materials.d.ts +1 -1
- package/dist/ceiling/materials.d.ts.map +1 -1
- package/dist/ceiling/materials.js +10 -3
- package/dist/ceiling/paint.d.ts +2 -8
- package/dist/ceiling/paint.d.ts.map +1 -1
- package/dist/ceiling/paint.js +121 -24
- package/dist/ceiling/panel.d.ts.map +1 -1
- package/dist/ceiling/panel.js +40 -23
- package/dist/ceiling/renderer.d.ts.map +1 -1
- package/dist/ceiling/renderer.js +41 -5
- package/dist/chimney/move-tool.d.ts.map +1 -1
- package/dist/chimney/move-tool.js +8 -2
- package/dist/chimney/paint.d.ts.map +1 -1
- package/dist/chimney/paint.js +3 -10
- package/dist/column/definition.d.ts.map +1 -1
- package/dist/column/definition.js +24 -2
- package/dist/column/floorplan-affordances.d.ts.map +1 -1
- package/dist/column/floorplan-affordances.js +5 -0
- package/dist/column/floorplan.d.ts +1 -1
- package/dist/column/floorplan.d.ts.map +1 -1
- package/dist/column/floorplan.js +47 -2
- package/dist/column/hosted-resize.d.ts +101 -2
- package/dist/column/hosted-resize.d.ts.map +1 -1
- package/dist/column/panel.d.ts.map +1 -1
- package/dist/column/panel.js +147 -146
- package/dist/column/renderer.d.ts.map +1 -1
- package/dist/column/renderer.js +6 -4
- package/dist/column/surface.d.ts.map +1 -1
- package/dist/column/surface.js +7 -0
- package/dist/construction-dimension/floorplan.js +7 -3
- package/dist/cupola/definition.d.ts.map +1 -1
- package/dist/cupola/definition.js +2 -8
- package/dist/cupola/panel.d.ts.map +1 -1
- package/dist/cupola/panel.js +5 -23
- package/dist/door/definition.d.ts.map +1 -1
- package/dist/door/definition.js +12 -3
- package/dist/door/door-math.d.ts +5 -10
- package/dist/door/door-math.d.ts.map +1 -1
- package/dist/door/door-math.js +14 -15
- package/dist/door/floorplan-move.d.ts.map +1 -1
- package/dist/door/floorplan-move.js +3 -1
- package/dist/door/floorplan.d.ts.map +1 -1
- package/dist/door/floorplan.js +55 -21
- package/dist/door/mechanism.d.ts +4 -0
- package/dist/door/mechanism.d.ts.map +1 -0
- package/dist/door/mechanism.js +24 -0
- package/dist/door/move-tool.d.ts.map +1 -1
- package/dist/door/move-tool.js +72 -48
- package/dist/door/paint.d.ts.map +1 -1
- package/dist/door/paint.js +3 -0
- package/dist/door/panel.d.ts.map +1 -1
- package/dist/door/panel.js +34 -259
- package/dist/door/placement.d.ts +45 -0
- package/dist/door/placement.d.ts.map +1 -0
- package/dist/door/placement.js +51 -0
- package/dist/door/preview.d.ts.map +1 -1
- package/dist/door/preview.js +2 -0
- package/dist/door/renderer.d.ts.map +1 -1
- package/dist/door/renderer.js +3 -2
- package/dist/door/tool.d.ts.map +1 -1
- package/dist/door/tool.js +92 -21
- package/dist/dormer/csg-geometry.d.ts.map +1 -1
- package/dist/dormer/csg-geometry.js +2 -0
- package/dist/dormer/paint.d.ts.map +1 -1
- package/dist/dormer/paint.js +2 -5
- package/dist/dormer/panel.d.ts.map +1 -1
- package/dist/dormer/panel.js +4 -14
- package/dist/downspout/definition.d.ts.map +1 -1
- package/dist/downspout/definition.js +2 -2
- package/dist/duct-fitting/definition.d.ts.map +1 -1
- package/dist/duct-fitting/definition.js +2 -1
- package/dist/duct-fitting/geometry.d.ts.map +1 -1
- package/dist/duct-fitting/geometry.js +1 -1
- package/dist/duct-fitting/move-tool.d.ts.map +1 -1
- package/dist/duct-fitting/move-tool.js +8 -2
- package/dist/duct-segment/definition.d.ts.map +1 -1
- package/dist/duct-segment/definition.js +2 -2
- package/dist/duct-segment/geometry.d.ts.map +1 -1
- package/dist/duct-segment/geometry.js +1 -1
- package/dist/duct-segment/move-tool.d.ts.map +1 -1
- package/dist/duct-segment/move-tool.js +8 -2
- package/dist/elevator/definition.d.ts.map +1 -1
- package/dist/elevator/definition.js +1 -2
- package/dist/elevator/panel.d.ts.map +1 -1
- package/dist/elevator/panel.js +5 -27
- package/dist/elevator/parametrics.js +1 -1
- package/dist/elevator/renderer.d.ts.map +1 -1
- package/dist/elevator/renderer.js +3 -4
- package/dist/eyebrow-vent/definition.d.ts.map +1 -1
- package/dist/eyebrow-vent/definition.js +2 -5
- package/dist/eyebrow-vent/paint.d.ts.map +1 -1
- package/dist/eyebrow-vent/paint.js +3 -6
- package/dist/eyebrow-vent/panel.d.ts.map +1 -1
- package/dist/eyebrow-vent/panel.js +5 -23
- package/dist/fence/actions/move-endpoint.d.ts +1 -1
- package/dist/fence/actions/move-endpoint.d.ts.map +1 -1
- package/dist/fence/actions/move-endpoint.js +2 -1
- package/dist/fence/definition.d.ts +2 -1
- package/dist/fence/definition.d.ts.map +1 -1
- package/dist/fence/definition.js +83 -28
- package/dist/fence/drafting.d.ts +36 -0
- package/dist/fence/drafting.d.ts.map +1 -0
- package/dist/fence/drafting.js +210 -0
- package/dist/fence/feature-tool.d.ts +4 -0
- package/dist/fence/feature-tool.d.ts.map +1 -0
- package/dist/fence/feature-tool.js +140 -0
- package/dist/fence/features.d.ts +2 -0
- package/dist/fence/features.d.ts.map +1 -0
- package/dist/fence/features.js +12 -0
- package/dist/fence/floorplan-affordances.d.ts.map +1 -1
- package/dist/fence/floorplan-affordances.js +2 -1
- package/dist/fence/floorplan.d.ts +2 -3
- package/dist/fence/floorplan.d.ts.map +1 -1
- package/dist/fence/floorplan.js +131 -71
- package/dist/fence/geometry-parts.d.ts +50 -0
- package/dist/fence/geometry-parts.d.ts.map +1 -0
- package/dist/fence/geometry-parts.js +1144 -0
- package/dist/fence/geometry.d.ts +2 -3
- package/dist/fence/geometry.d.ts.map +1 -1
- package/dist/fence/geometry.js +84 -7
- package/dist/fence/index.d.ts +1 -0
- package/dist/fence/index.d.ts.map +1 -1
- package/dist/fence/index.js +1 -0
- package/dist/fence/inspector-editors.d.ts +15 -0
- package/dist/fence/inspector-editors.d.ts.map +1 -1
- package/dist/fence/inspector-editors.js +128 -3
- package/dist/fence/lift.d.ts.map +1 -1
- package/dist/fence/lift.js +5 -2
- package/dist/fence/move-tool.js +2 -1
- package/dist/fence/panel-model.d.ts +4 -0
- package/dist/fence/panel-model.d.ts.map +1 -0
- package/dist/fence/panel-model.js +12 -0
- package/dist/fence/parametrics.d.ts +0 -12
- package/dist/fence/parametrics.d.ts.map +1 -1
- package/dist/fence/parametrics.js +185 -18
- package/dist/fence/system.d.ts.map +1 -1
- package/dist/fence/system.js +141 -31
- package/dist/fence/tool.d.ts.map +1 -1
- package/dist/fence/tool.js +256 -47
- package/dist/fence-feature/actions.d.ts +7 -0
- package/dist/fence-feature/actions.d.ts.map +1 -0
- package/dist/fence-feature/actions.js +26 -0
- package/dist/fence-feature/definition.d.ts +4 -0
- package/dist/fence-feature/definition.d.ts.map +1 -0
- package/dist/fence-feature/definition.js +112 -0
- package/dist/fence-feature/floorplan-affordances.d.ts +3 -0
- package/dist/fence-feature/floorplan-affordances.d.ts.map +1 -0
- package/dist/fence-feature/floorplan-affordances.js +37 -0
- package/dist/fence-feature/floorplan.d.ts +4 -0
- package/dist/fence-feature/floorplan.d.ts.map +1 -0
- package/dist/fence-feature/floorplan.js +120 -0
- package/dist/fence-feature/geometry.d.ts +5 -0
- package/dist/fence-feature/geometry.d.ts.map +1 -0
- package/dist/fence-feature/geometry.js +43 -0
- package/dist/fence-feature/handles.d.ts +5 -0
- package/dist/fence-feature/handles.d.ts.map +1 -0
- package/dist/fence-feature/handles.js +84 -0
- package/dist/fence-feature/inspector.d.ts +6 -0
- package/dist/fence-feature/inspector.d.ts.map +1 -0
- package/dist/fence-feature/inspector.js +214 -0
- package/dist/fence-feature/interaction.d.ts +3 -0
- package/dist/fence-feature/interaction.d.ts.map +1 -0
- package/dist/fence-feature/interaction.js +41 -0
- package/dist/fence-feature/move-session.d.ts +9 -0
- package/dist/fence-feature/move-session.d.ts.map +1 -0
- package/dist/fence-feature/move-session.js +48 -0
- package/dist/fence-feature/move-tool.d.ts +5 -0
- package/dist/fence-feature/move-tool.d.ts.map +1 -0
- package/dist/fence-feature/move-tool.js +58 -0
- package/dist/fence-feature/pick-target.d.ts +7 -0
- package/dist/fence-feature/pick-target.d.ts.map +1 -0
- package/dist/fence-feature/pick-target.js +52 -0
- package/dist/floor-opening/definition.d.ts +3 -0
- package/dist/floor-opening/definition.d.ts.map +1 -0
- package/dist/floor-opening/definition.js +41 -0
- package/dist/floor-opening/floorplan.d.ts +156 -0
- package/dist/floor-opening/floorplan.d.ts.map +1 -0
- package/dist/floor-opening/floorplan.js +63 -0
- package/dist/gutter/definition.d.ts.map +1 -1
- package/dist/gutter/definition.js +2 -2
- package/dist/imported-mesh/definition.d.ts.map +1 -1
- package/dist/imported-mesh/definition.js +2 -0
- package/dist/imported-mesh/geometry.d.ts +1 -1
- package/dist/imported-mesh/geometry.d.ts.map +1 -1
- package/dist/imported-mesh/geometry.js +40 -12
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -2
- package/dist/item/authored-face-host.d.ts +10 -0
- package/dist/item/authored-face-host.d.ts.map +1 -0
- package/dist/item/authored-face-host.js +87 -0
- package/dist/item/authored-params.d.ts +15 -0
- package/dist/item/authored-params.d.ts.map +1 -0
- package/dist/item/authored-params.js +72 -0
- package/dist/item/definition.d.ts +2 -2
- package/dist/item/definition.d.ts.map +1 -1
- package/dist/item/definition.js +33 -4
- package/dist/item/floorplan.d.ts +1 -1
- package/dist/item/floorplan.d.ts.map +1 -1
- package/dist/item/floorplan.js +35 -5
- package/dist/item/index.d.ts +1 -0
- package/dist/item/index.d.ts.map +1 -1
- package/dist/item/index.js +1 -0
- package/dist/item/model-loader.d.ts +2 -0
- package/dist/item/model-loader.d.ts.map +1 -1
- package/dist/item/model-loader.js +55 -23
- package/dist/item/move-tool.js +4 -4
- package/dist/item/paint.d.ts.map +1 -1
- package/dist/item/paint.js +5 -24
- package/dist/item/panel.d.ts +1 -3
- package/dist/item/panel.d.ts.map +1 -1
- package/dist/item/panel.js +20 -24
- package/dist/item/placement-notice.d.ts +14 -0
- package/dist/item/placement-notice.d.ts.map +1 -0
- package/dist/item/placement-notice.js +38 -0
- package/dist/item/plan-symbols.d.ts +67 -0
- package/dist/item/plan-symbols.d.ts.map +1 -0
- package/dist/item/plan-symbols.js +407 -0
- package/dist/item/renderer.d.ts +10 -0
- package/dist/item/renderer.d.ts.map +1 -1
- package/dist/item/renderer.js +64 -38
- package/dist/item/script-param-defaults.d.ts +12 -0
- package/dist/item/script-param-defaults.d.ts.map +1 -0
- package/dist/item/script-param-defaults.js +34 -0
- package/dist/lean-to-extension/definition.d.ts.map +1 -1
- package/dist/lean-to-extension/definition.js +1 -2
- package/dist/lean-to-extension/geometry.d.ts.map +1 -1
- package/dist/lean-to-extension/geometry.js +1 -1
- package/dist/lean-to-extension/layout.d.ts.map +1 -1
- package/dist/lean-to-extension/layout.js +2 -3
- package/dist/lean-to-extension/placement-validation.d.ts.map +1 -1
- package/dist/lean-to-extension/placement-validation.js +5 -5
- package/dist/lean-to-extension/tool.d.ts.map +1 -1
- package/dist/lean-to-extension/tool.js +5 -5
- package/dist/lineset/move-tool.d.ts.map +1 -1
- package/dist/lineset/move-tool.js +8 -2
- package/dist/liquid-line/move-tool.d.ts.map +1 -1
- package/dist/liquid-line/move-tool.js +8 -2
- package/dist/measurement/definition.js +1 -1
- package/dist/pipe-fitting/move-tool.d.ts.map +1 -1
- package/dist/pipe-fitting/move-tool.js +8 -2
- package/dist/pipe-segment/move-tool.d.ts.map +1 -1
- package/dist/pipe-segment/move-tool.js +8 -2
- package/dist/procedural-item/animation.d.ts +8 -0
- package/dist/procedural-item/animation.d.ts.map +1 -0
- package/dist/procedural-item/animation.js +116 -0
- package/dist/procedural-item/definition.d.ts.map +1 -1
- package/dist/procedural-item/definition.js +74 -8
- package/dist/procedural-item/geometry.d.ts +5 -1
- package/dist/procedural-item/geometry.d.ts.map +1 -1
- package/dist/procedural-item/geometry.js +239 -15
- package/dist/procedural-item/renderer.d.ts.map +1 -1
- package/dist/procedural-item/renderer.js +272 -23
- package/dist/ridge-vent/panel.d.ts.map +1 -1
- package/dist/ridge-vent/panel.js +5 -23
- package/dist/ridge-vent/renderer.d.ts.map +1 -1
- package/dist/ridge-vent/renderer.js +9 -8
- package/dist/roof/definition.d.ts.map +1 -1
- package/dist/roof/definition.js +4 -1
- package/dist/roof/floorplan.d.ts +8 -0
- package/dist/roof/floorplan.d.ts.map +1 -1
- package/dist/roof/floorplan.js +194 -18
- package/dist/roof/panel-model.d.ts.map +1 -1
- package/dist/roof/panel-model.js +10 -6
- package/dist/roof/panel.d.ts.map +1 -1
- package/dist/roof/panel.js +3 -10
- package/dist/roof/renderer.d.ts.map +1 -1
- package/dist/roof/renderer.js +5 -2
- package/dist/roof-segment/panel.d.ts.map +1 -1
- package/dist/roof-segment/panel.js +5 -24
- package/dist/roof-segment/renderer.d.ts.map +1 -1
- package/dist/roof-segment/renderer.js +17 -8
- package/dist/separator/definition.d.ts +3 -0
- package/dist/separator/definition.d.ts.map +1 -0
- package/dist/separator/definition.js +39 -0
- package/dist/separator/renderer.d.ts +5 -0
- package/dist/separator/renderer.d.ts.map +1 -0
- package/dist/separator/renderer.js +36 -0
- package/dist/shared/duct-body-paint.d.ts +0 -4
- package/dist/shared/duct-body-paint.d.ts.map +1 -1
- package/dist/shared/duct-body-paint.js +1 -5
- package/dist/shared/item-interaction-actions.d.ts +6 -0
- package/dist/shared/item-interaction-actions.d.ts.map +1 -0
- package/dist/shared/item-interaction-actions.js +27 -0
- package/dist/shared/item-interactions.d.ts +9 -0
- package/dist/shared/item-interactions.d.ts.map +1 -0
- package/dist/shared/item-interactions.js +74 -0
- package/dist/shared/item-light-placement.d.ts +2 -0
- package/dist/shared/item-light-placement.d.ts.map +1 -0
- package/dist/shared/item-light-placement.js +3 -0
- package/dist/shared/move-roof-tool.js +2 -1
- package/dist/shared/node-batch/batchable.d.ts +12 -0
- package/dist/shared/node-batch/batchable.d.ts.map +1 -0
- package/dist/shared/node-batch/batchable.js +41 -0
- package/dist/shared/node-batch/candidates.d.ts +7 -5
- package/dist/shared/node-batch/candidates.d.ts.map +1 -1
- package/dist/shared/node-batch/candidates.js +43 -59
- package/dist/shared/node-batch/release.d.ts +8 -0
- package/dist/shared/node-batch/release.d.ts.map +1 -0
- package/dist/shared/node-batch/release.js +16 -0
- package/dist/shared/node-batch/system.d.ts.map +1 -1
- package/dist/shared/node-batch/system.js +17 -12
- package/dist/shared/node-batch/types.d.ts +4 -1
- package/dist/shared/node-batch/types.d.ts.map +1 -1
- package/dist/shared/opening-documentation.d.ts +13 -1
- package/dist/shared/opening-documentation.d.ts.map +1 -1
- package/dist/shared/opening-documentation.js +245 -59
- package/dist/shared/opening-guides-runtime.d.ts.map +1 -1
- package/dist/shared/opening-guides-runtime.js +17 -14
- package/dist/shared/opening-placement-dimensions.d.ts.map +1 -1
- package/dist/shared/opening-placement-dimensions.js +3 -3
- package/dist/shared/opening-plane-offset.d.ts +23 -0
- package/dist/shared/opening-plane-offset.d.ts.map +1 -0
- package/dist/shared/opening-plane-offset.js +24 -0
- package/dist/shared/polygon-centroid-move.d.ts.map +1 -1
- package/dist/shared/polygon-centroid-move.js +4 -1
- package/dist/shared/polygon-vertex-affordance.d.ts.map +1 -1
- package/dist/shared/polygon-vertex-affordance.js +19 -15
- package/dist/shared/run-hangers.d.ts.map +1 -1
- package/dist/shared/run-hangers.js +5 -4
- package/dist/shared/scripted-opening-handles.d.ts +18 -0
- package/dist/shared/scripted-opening-handles.d.ts.map +1 -0
- package/dist/shared/scripted-opening-handles.js +53 -0
- package/dist/shared/scripted-opening.d.ts +25 -0
- package/dist/shared/scripted-opening.d.ts.map +1 -0
- package/dist/shared/scripted-opening.js +72 -0
- package/dist/shared/slot-paint.d.ts +14 -2
- package/dist/shared/slot-paint.d.ts.map +1 -1
- package/dist/shared/slot-paint.js +29 -29
- package/dist/shared/surface-paint.d.ts.map +1 -1
- package/dist/shared/surface-paint.js +2 -5
- package/dist/shared/swap-preview-material.d.ts +11 -0
- package/dist/shared/swap-preview-material.d.ts.map +1 -0
- package/dist/shared/swap-preview-material.js +16 -0
- package/dist/shared/system-checks.d.ts.map +1 -1
- package/dist/shared/system-checks.js +5 -3
- package/dist/shared/wall-attach-target.d.ts +3 -10
- package/dist/shared/wall-attach-target.d.ts.map +1 -1
- package/dist/shared/wall-attach-target.js +3 -63
- package/dist/shared/wall-opening-ceiling.d.ts +5 -15
- package/dist/shared/wall-opening-ceiling.d.ts.map +1 -1
- package/dist/shared/wall-opening-ceiling.js +10 -18
- package/dist/shelf/definition.d.ts.map +1 -1
- package/dist/shelf/definition.js +1 -1
- package/dist/shelf/geometry.d.ts.map +1 -1
- package/dist/shelf/geometry.js +1 -2
- package/dist/shelf/paint.d.ts.map +1 -1
- package/dist/shelf/paint.js +4 -10
- package/dist/site/line-ribbon.d.ts +31 -0
- package/dist/site/line-ribbon.d.ts.map +1 -0
- package/dist/site/line-ribbon.js +117 -0
- package/dist/site/lot-mask.d.ts +18 -0
- package/dist/site/lot-mask.d.ts.map +1 -0
- package/dist/site/lot-mask.js +35 -0
- package/dist/site/panel.d.ts +10 -0
- package/dist/site/panel.d.ts.map +1 -0
- package/dist/site/panel.js +155 -0
- package/dist/site/parametrics.d.ts +7 -0
- package/dist/site/parametrics.d.ts.map +1 -1
- package/dist/site/parametrics.js +8 -0
- package/dist/site/recessed-slab-ground-holes.d.ts.map +1 -1
- package/dist/site/recessed-slab-ground-holes.js +5 -2
- package/dist/site/renderer.d.ts.map +1 -1
- package/dist/site/renderer.js +150 -19
- package/dist/site/setbacks.d.ts +33 -0
- package/dist/site/setbacks.d.ts.map +1 -0
- package/dist/site/setbacks.js +204 -0
- package/dist/site/terrain-geometry.d.ts +28 -1
- package/dist/site/terrain-geometry.d.ts.map +1 -1
- package/dist/site/terrain-geometry.js +78 -4
- package/dist/site/terrain-holes.d.ts +15 -0
- package/dist/site/terrain-holes.d.ts.map +1 -0
- package/dist/site/terrain-holes.js +74 -0
- package/dist/site/terrain-mesh.d.ts +9 -2
- package/dist/site/terrain-mesh.d.ts.map +1 -1
- package/dist/site/terrain-mesh.js +36 -9
- package/dist/site/terrain-renderer.d.ts +9 -2
- package/dist/site/terrain-renderer.d.ts.map +1 -1
- package/dist/site/terrain-renderer.js +14 -4
- package/dist/slab/boundary-editor.d.ts +1 -1
- package/dist/slab/boundary-editor.d.ts.map +1 -1
- package/dist/slab/boundary-editor.js +13 -13
- package/dist/slab/definition.d.ts.map +1 -1
- package/dist/slab/definition.js +19 -3
- package/dist/slab/dependency-tracker.d.ts.map +1 -1
- package/dist/slab/dependency-tracker.js +67 -7
- package/dist/slab/elevation-limit.d.ts.map +1 -1
- package/dist/slab/elevation-limit.js +2 -2
- package/dist/slab/floorplan-affordances.d.ts +176 -4
- package/dist/slab/floorplan-affordances.d.ts.map +1 -1
- package/dist/slab/floorplan-affordances.js +0 -1
- package/dist/slab/floorplan-move.d.ts.map +1 -1
- package/dist/slab/floorplan-move.js +3 -4
- package/dist/slab/floorplan.d.ts +7 -0
- package/dist/slab/floorplan.d.ts.map +1 -1
- package/dist/slab/floorplan.js +22 -5
- package/dist/slab/geometry.d.ts.map +1 -1
- package/dist/slab/geometry.js +186 -76
- package/dist/slab/move-tool.js +7 -6
- package/dist/slab/paint.d.ts +18 -5
- package/dist/slab/paint.d.ts.map +1 -1
- package/dist/slab/paint.js +458 -9
- package/dist/slab/panel.d.ts.map +1 -1
- package/dist/slab/panel.js +28 -9
- package/dist/slab/placement-ownership.d.ts +2 -1
- package/dist/slab/placement-ownership.d.ts.map +1 -1
- package/dist/slab/placement-ownership.js +2 -2
- package/dist/slab/surface-split.d.ts +24 -0
- package/dist/slab/surface-split.d.ts.map +1 -0
- package/dist/slab/surface-split.js +389 -0
- package/dist/slab/tool.d.ts.map +1 -1
- package/dist/slab/tool.js +3 -3
- package/dist/stair/baluster-geometry.d.ts +21 -0
- package/dist/stair/baluster-geometry.d.ts.map +1 -0
- package/dist/stair/baluster-geometry.js +74 -0
- package/dist/stair/baluster-guard.d.ts +50 -0
- package/dist/stair/baluster-guard.d.ts.map +1 -0
- package/dist/stair/baluster-guard.js +71 -0
- package/dist/stair/boards-guard.d.ts +37 -0
- package/dist/stair/boards-guard.d.ts.map +1 -0
- package/dist/stair/boards-guard.js +61 -0
- package/dist/stair/cable-guard.d.ts +39 -0
- package/dist/stair/cable-guard.d.ts.map +1 -0
- package/dist/stair/cable-guard.js +105 -0
- package/dist/stair/construction-controls.d.ts +15 -0
- package/dist/stair/construction-controls.d.ts.map +1 -0
- package/dist/stair/construction-controls.js +29 -0
- package/dist/stair/continuous-railings.d.ts +10 -0
- package/dist/stair/continuous-railings.d.ts.map +1 -0
- package/dist/stair/continuous-railings.js +159 -0
- package/dist/stair/definition.d.ts.map +1 -1
- package/dist/stair/definition.js +16 -37
- package/dist/stair/documentation.d.ts +1 -1
- package/dist/stair/documentation.d.ts.map +1 -1
- package/dist/stair/documentation.js +10 -17
- package/dist/stair/floorplan-affordances.d.ts.map +1 -1
- package/dist/stair/floorplan-affordances.js +9 -25
- package/dist/stair/floorplan.d.ts +1 -23
- package/dist/stair/floorplan.d.ts.map +1 -1
- package/dist/stair/floorplan.js +102 -86
- package/dist/stair/glass-guard.d.ts +72 -0
- package/dist/stair/glass-guard.d.ts.map +1 -0
- package/dist/stair/glass-guard.js +167 -0
- package/dist/stair/guard-path.d.ts +119 -0
- package/dist/stair/guard-path.d.ts.map +1 -0
- package/dist/stair/guard-path.js +208 -0
- package/dist/stair/materials.d.ts +11 -0
- package/dist/stair/materials.d.ts.map +1 -0
- package/dist/stair/materials.js +51 -0
- package/dist/stair/metal-guard.d.ts +38 -0
- package/dist/stair/metal-guard.d.ts.map +1 -0
- package/dist/stair/metal-guard.js +79 -0
- package/dist/stair/paint.d.ts +32 -0
- package/dist/stair/paint.d.ts.map +1 -1
- package/dist/stair/paint.js +75 -36
- package/dist/stair/panel.d.ts.map +1 -1
- package/dist/stair/panel.js +154 -17
- package/dist/stair/parametrics.d.ts +1 -1
- package/dist/stair/parametrics.d.ts.map +1 -1
- package/dist/stair/parametrics.js +32 -15
- package/dist/stair/plan-entry.d.ts +31 -0
- package/dist/stair/plan-entry.d.ts.map +1 -0
- package/dist/stair/plan-entry.js +325 -0
- package/dist/stair/post-and-rail-guard.d.ts +31 -0
- package/dist/stair/post-and-rail-guard.d.ts.map +1 -0
- package/dist/stair/post-and-rail-guard.js +63 -0
- package/dist/stair/railing-controls.d.ts +9 -0
- package/dist/stair/railing-controls.d.ts.map +1 -0
- package/dist/stair/railing-controls.js +49 -0
- package/dist/stair/renderer.d.ts.map +1 -1
- package/dist/stair/renderer.js +259 -259
- package/dist/stair/use-stair-render-data.d.ts +317 -0
- package/dist/stair/use-stair-render-data.d.ts.map +1 -0
- package/dist/stair/use-stair-render-data.js +73 -0
- package/dist/stair-segment/definition.d.ts.map +1 -1
- package/dist/stair-segment/definition.js +51 -10
- package/dist/stair-segment/panel.d.ts.map +1 -1
- package/dist/stair-segment/panel.js +36 -42
- package/dist/stair-segment/parametrics.d.ts +1 -1
- package/dist/stair-segment/parametrics.d.ts.map +1 -1
- package/dist/stair-segment/parametrics.js +21 -8
- package/dist/stair-segment/renderer.d.ts.map +1 -1
- package/dist/stair-segment/renderer.js +16 -28
- package/dist/turbine-vent/definition.d.ts.map +1 -1
- package/dist/turbine-vent/definition.js +2 -5
- package/dist/turbine-vent/paint.d.ts.map +1 -1
- package/dist/turbine-vent/paint.js +2 -5
- package/dist/turbine-vent/panel.d.ts.map +1 -1
- package/dist/turbine-vent/panel.js +5 -23
- package/dist/unit/unit-panel.d.ts.map +1 -1
- package/dist/unit/unit-panel.js +6 -1
- package/dist/wall/actions.d.ts.map +1 -1
- package/dist/wall/actions.js +7 -2
- package/dist/wall/construction-dimensions.js +8 -5
- package/dist/wall/contextual-dimensions.js +4 -4
- package/dist/wall/curtain-wall-materials.d.ts +1 -1
- package/dist/wall/curtain-wall-materials.d.ts.map +1 -1
- package/dist/wall/curtain-wall-materials.js +2 -2
- package/dist/wall/curve-tool.d.ts.map +1 -1
- package/dist/wall/curve-tool.js +4 -0
- package/dist/wall/definition.d.ts.map +1 -1
- package/dist/wall/definition.js +41 -17
- package/dist/wall/floorplan-move.d.ts +1 -1
- package/dist/wall/floorplan-move.d.ts.map +1 -1
- package/dist/wall/floorplan-move.js +20 -83
- package/dist/wall/floorplan-tool.d.ts.map +1 -1
- package/dist/wall/floorplan-tool.js +10 -11
- package/dist/wall/floorplan.d.ts +3 -1
- package/dist/wall/floorplan.d.ts.map +1 -1
- package/dist/wall/floorplan.js +184 -21
- package/dist/wall/measurement.d.ts.map +1 -1
- package/dist/wall/measurement.js +5 -5
- package/dist/wall/move-endpoint-tool.d.ts.map +1 -1
- package/dist/wall/move-endpoint-tool.js +20 -7
- package/dist/wall/move-shared.d.ts.map +1 -1
- package/dist/wall/move-shared.js +11 -7
- package/dist/wall/move-tool.d.ts.map +1 -1
- package/dist/wall/move-tool.js +118 -148
- package/dist/wall/paint.d.ts +26 -15
- package/dist/wall/paint.d.ts.map +1 -1
- package/dist/wall/paint.js +306 -117
- package/dist/wall/panel-model.d.ts +18 -0
- package/dist/wall/panel-model.d.ts.map +1 -1
- package/dist/wall/panel-model.js +77 -19
- package/dist/wall/panel.d.ts.map +1 -1
- package/dist/wall/panel.js +217 -41
- package/dist/wall/parametrics.d.ts.map +1 -1
- package/dist/wall/parametrics.js +3 -0
- package/dist/wall/rectangle-command.d.ts +111 -12
- 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 +26 -8
- package/dist/wall/renderer.d.ts.map +1 -1
- package/dist/wall/renderer.js +4 -2
- package/dist/wall/split-floorplan-layer.d.ts.map +1 -1
- package/dist/wall/split-floorplan-layer.js +7 -7
- package/dist/wall/split-session.d.ts.map +1 -1
- package/dist/wall/split-session.js +7 -1
- package/dist/wall/system.d.ts.map +1 -1
- package/dist/wall/system.js +36 -4
- package/dist/wall/tool.d.ts.map +1 -1
- package/dist/wall/tool.js +105 -49
- package/dist/wall/treatment-level-data.d.ts +3 -2
- package/dist/wall/treatment-level-data.d.ts.map +1 -1
- package/dist/wall/treatment-level-data.js +17 -13
- package/dist/wall/treatments.d.ts +10 -10
- package/dist/wall/treatments.d.ts.map +1 -1
- package/dist/wall/treatments.js +67 -54
- package/dist/wall/wall-batch-system.d.ts +7 -0
- package/dist/wall/wall-batch-system.d.ts.map +1 -1
- package/dist/wall/wall-batch-system.js +35 -3
- package/dist/wall/wall-batch.d.ts +6 -0
- package/dist/wall/wall-batch.d.ts.map +1 -1
- package/dist/wall/wall-batch.js +7 -1
- package/dist/window/definition.d.ts.map +1 -1
- package/dist/window/definition.js +12 -4
- package/dist/window/floorplan-move.d.ts.map +1 -1
- package/dist/window/floorplan-move.js +3 -1
- package/dist/window/floorplan.d.ts.map +1 -1
- package/dist/window/floorplan.js +145 -60
- package/dist/window/mechanism.d.ts +4 -0
- package/dist/window/mechanism.d.ts.map +1 -0
- package/dist/window/mechanism.js +20 -0
- package/dist/window/move-tool.d.ts.map +1 -1
- package/dist/window/move-tool.js +79 -48
- package/dist/window/paint.d.ts.map +1 -1
- package/dist/window/paint.js +3 -0
- package/dist/window/panel.d.ts.map +1 -1
- package/dist/window/panel.js +32 -88
- package/dist/window/placement.d.ts +23 -0
- package/dist/window/placement.d.ts.map +1 -0
- package/dist/window/placement.js +66 -0
- package/dist/window/preview.d.ts.map +1 -1
- package/dist/window/preview.js +2 -0
- package/dist/window/renderer.d.ts.map +1 -1
- package/dist/window/renderer.js +3 -2
- package/dist/window/tool.d.ts.map +1 -1
- package/dist/window/tool.js +96 -24
- package/dist/window/window-math.d.ts +6 -14
- package/dist/window/window-math.d.ts.map +1 -1
- package/dist/window/window-math.js +14 -20
- package/dist/zone/contextual-dimensions.d.ts.map +1 -1
- package/dist/zone/contextual-dimensions.js +6 -28
- package/dist/zone/definition.d.ts.map +1 -1
- package/dist/zone/definition.js +3 -3
- package/dist/zone/floorplan-affordances.d.ts +200 -0
- package/dist/zone/floorplan-affordances.d.ts.map +1 -1
- package/dist/zone/floorplan.d.ts +1 -1
- package/dist/zone/floorplan.d.ts.map +1 -1
- package/dist/zone/floorplan.js +93 -53
- package/dist/zone/quantities-panel.d.ts.map +1 -1
- package/dist/zone/quantities-panel.js +3 -14
- package/dist/zone/quick-measurement.d.ts +2 -2
- package/dist/zone/quick-measurement.d.ts.map +1 -1
- package/dist/zone/quick-measurement.js +6 -5
- package/dist/zone/renderer.d.ts +1 -1
- package/dist/zone/renderer.d.ts.map +1 -1
- package/dist/zone/renderer.js +58 -146
- package/dist/zone/room-clear-dimensions.js +3 -3
- package/dist/zone/room-documentation.d.ts.map +1 -1
- package/dist/zone/room-documentation.js +2 -6
- package/package.json +11 -11
- package/dist/block/slots.d.ts +0 -4
- package/dist/block/slots.d.ts.map +0 -1
- package/dist/block/slots.js +0 -17
- package/dist/cabinet/slots.d.ts +0 -4
- package/dist/cabinet/slots.d.ts.map +0 -1
- package/dist/cabinet/slots.js +0 -24
- package/dist/ceiling/slots.d.ts +0 -6
- package/dist/ceiling/slots.d.ts.map +0 -1
- package/dist/ceiling/slots.js +0 -7
- package/dist/column/slots.d.ts +0 -9
- package/dist/column/slots.d.ts.map +0 -1
- package/dist/column/slots.js +0 -19
- package/dist/door/slots.d.ts +0 -9
- package/dist/door/slots.d.ts.map +0 -1
- package/dist/door/slots.js +0 -20
- package/dist/elevator/slots.d.ts +0 -8
- package/dist/elevator/slots.d.ts.map +0 -1
- package/dist/elevator/slots.js +0 -17
- package/dist/fence/slots.d.ts +0 -10
- package/dist/fence/slots.d.ts.map +0 -1
- package/dist/fence/slots.js +0 -23
- package/dist/item/__fixtures__/main-floorplan.d.ts +0 -26
- package/dist/item/__fixtures__/main-floorplan.d.ts.map +0 -1
- package/dist/item/__fixtures__/main-floorplan.js +0 -297
- package/dist/lean-to-extension/slots.d.ts +0 -5
- package/dist/lean-to-extension/slots.d.ts.map +0 -1
- package/dist/lean-to-extension/slots.js +0 -15
- package/dist/shelf/slots.d.ts +0 -9
- package/dist/shelf/slots.d.ts.map +0 -1
- package/dist/shelf/slots.js +0 -30
- package/dist/slab/slots.d.ts +0 -10
- package/dist/slab/slots.d.ts.map +0 -1
- package/dist/slab/slots.js +0 -20
- package/dist/stair/floor-stack.d.ts +0 -10
- package/dist/stair/floor-stack.d.ts.map +0 -1
- package/dist/stair/floor-stack.js +0 -115
- package/dist/stair/slots.d.ts +0 -7
- package/dist/stair/slots.d.ts.map +0 -1
- package/dist/stair/slots.js +0 -13
- package/dist/wall/drawing-mode.d.ts +0 -12
- package/dist/wall/drawing-mode.d.ts.map +0 -1
- package/dist/wall/drawing-mode.js +0 -38
- package/dist/wall/slots.d.ts +0 -10
- package/dist/wall/slots.d.ts.map +0 -1
- package/dist/wall/slots.js +0 -92
- package/dist/window/slots.d.ts +0 -5
- package/dist/window/slots.d.ts.map +0 -1
- package/dist/window/slots.js +0 -11
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
import { getBlockFaceFrame, getRoofWallFaceFrame, getScaledDimensions, roofFacePointToSegment, useLiveTransforms, } from '@pascal-app/core';
|
|
2
|
-
import { formatLinearMeasurement, readFloorplanMetricNotationOverride } from '@pascal-app/editor';
|
|
3
|
-
import { restingNodePlanFrame } from '../../shared/resting-surface-plan';
|
|
4
|
-
// Plan-space rotation convention used by the legacy `rotatePlanVector`
|
|
5
|
-
// in `editor/src/lib/floorplan/geometry.ts`. This is a CLOCKWISE rotation
|
|
6
|
-
// — the registry-side equivalent of the canonical floor-plan transform
|
|
7
|
-
// math. Don't switch to a standard counter-clockwise rotation; the wall
|
|
8
|
-
// items math (wallRotation = -atan2(dy, dx)) is calibrated against this
|
|
9
|
-
// convention, and the legacy item floor-plan stack reads from these
|
|
10
|
-
// offsets across many sites.
|
|
11
|
-
function rotateVec(x, y, angle) {
|
|
12
|
-
const c = Math.cos(angle);
|
|
13
|
-
const s = Math.sin(angle);
|
|
14
|
-
return [x * c + y * s, -x * s + y * c];
|
|
15
|
-
}
|
|
16
|
-
export function resolveItemTransform(item, ctx, cache = new Map()) {
|
|
17
|
-
const cached = cache.get(item.id);
|
|
18
|
-
if (cached !== undefined)
|
|
19
|
-
return cached;
|
|
20
|
-
const localRotation = item.rotation[1] ?? 0;
|
|
21
|
-
let result = null;
|
|
22
|
-
const parentNode = item.parentId
|
|
23
|
-
? ctx.resolve(item.parentId)
|
|
24
|
-
: undefined;
|
|
25
|
-
if (parentNode?.type === 'wall') {
|
|
26
|
-
// Wall-aligned: rotate item.position by wall's angle, anchor at wall.start.
|
|
27
|
-
const wall = parentNode;
|
|
28
|
-
const wallRotation = -Math.atan2(wall.end[1] - wall.start[1], wall.end[0] - wall.start[0]);
|
|
29
|
-
const wallLocalZ = item.asset.attachTo === 'wall-side'
|
|
30
|
-
? ((wall.thickness ?? 0.1) / 2) * (item.side === 'front' ? 1 : -1)
|
|
31
|
-
: item.position[2];
|
|
32
|
-
const [offsetX, offsetY] = rotateVec(item.position[0], wallLocalZ, wallRotation);
|
|
33
|
-
result = {
|
|
34
|
-
x: wall.start[0] + offsetX,
|
|
35
|
-
y: wall.start[1] + offsetY,
|
|
36
|
-
rotation: wallRotation + localRotation,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
else if (parentNode?.type === 'item') {
|
|
40
|
-
// Nested item: recursively resolve parent's transform.
|
|
41
|
-
const parentT = resolveItemTransform(parentNode, ctx, cache);
|
|
42
|
-
if (parentT) {
|
|
43
|
-
const [offsetX, offsetY] = rotateVec(item.position[0], item.position[2], parentT.rotation);
|
|
44
|
-
result = {
|
|
45
|
-
x: parentT.x + offsetX,
|
|
46
|
-
y: parentT.y + offsetY,
|
|
47
|
-
rotation: parentT.rotation + localRotation,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else if (parentNode?.type === 'cabinet' ||
|
|
52
|
-
parentNode?.type === 'cabinet-module' ||
|
|
53
|
-
parentNode?.type === 'procedural-item') {
|
|
54
|
-
const f = restingNodePlanFrame(item, ctx.resolve);
|
|
55
|
-
result = {
|
|
56
|
-
x: f.position[0],
|
|
57
|
-
y: f.position[2],
|
|
58
|
-
rotation: Math.atan2(f.axes[2][0], f.axes[2][2]),
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
else if (parentNode?.type === 'shelf') {
|
|
62
|
-
// Shelf-hosted item: `item.position` is in shelf-local coords. The
|
|
63
|
-
// shelf has its own `position` + `rotation[1]` in its parent (level)
|
|
64
|
-
// frame, so the item's plan-space position composes the shelf's
|
|
65
|
-
// pose with the item's local offset. Without this branch the
|
|
66
|
-
// `else` below would treat shelf-local coords as level-local and
|
|
67
|
-
// the item would render at the wrong spot whenever the shelf is
|
|
68
|
-
// anywhere other than (0, 0, 0).
|
|
69
|
-
//
|
|
70
|
-
// We also check `useLiveTransforms` for the shelf — if the shelf is
|
|
71
|
-
// mid-move (3D or 2D), its scene-state `position` is still at the
|
|
72
|
-
// pre-move spot but the live transform carries the cursor-tracked
|
|
73
|
-
// position. Reading the live value here keeps the hosted item
|
|
74
|
-
// following the shelf in 2D throughout the drag, mirroring how the
|
|
75
|
-
// shelf's own entry follows via the layer's effectiveNode override.
|
|
76
|
-
const shelf = parentNode;
|
|
77
|
-
const live = useLiveTransforms.getState().get(shelf.id);
|
|
78
|
-
if (shelf.parentId &&
|
|
79
|
-
['item', 'shelf', 'cabinet', 'cabinet-module', 'procedural-item'].includes(ctx.resolve(shelf.parentId)?.type ?? '')) {
|
|
80
|
-
const parentT = resolveItemTransform({
|
|
81
|
-
...shelf,
|
|
82
|
-
position: live?.position ?? shelf.position,
|
|
83
|
-
rotation: [0, live?.rotation ?? shelf.rotation[1], 0],
|
|
84
|
-
}, ctx, cache);
|
|
85
|
-
if (!parentT)
|
|
86
|
-
return null;
|
|
87
|
-
const [x, y] = rotateVec(item.position[0], item.position[2], parentT.rotation);
|
|
88
|
-
return { x: parentT.x + x, y: parentT.y + y, rotation: parentT.rotation + localRotation };
|
|
89
|
-
}
|
|
90
|
-
const shelfX = live?.position[0] ?? shelf.position[0];
|
|
91
|
-
const shelfZ = live?.position[2] ?? shelf.position[2];
|
|
92
|
-
const shelfRotationY = live?.rotation ?? shelf.rotation[1] ?? 0;
|
|
93
|
-
const [offsetX, offsetY] = rotateVec(item.position[0], item.position[2], shelfRotationY);
|
|
94
|
-
result = {
|
|
95
|
-
x: shelfX + offsetX,
|
|
96
|
-
y: shelfZ + offsetY,
|
|
97
|
-
rotation: shelfRotationY + localRotation,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
else if (parentNode?.type === 'roof-segment') {
|
|
101
|
-
// Roof-hosted wall item: FACE-LOCAL position mapped through the face
|
|
102
|
-
// frame, then composed through the segment's and parent roof's poses
|
|
103
|
-
// into level-local plan coords.
|
|
104
|
-
const segment = parentNode;
|
|
105
|
-
const roof = segment.parentId
|
|
106
|
-
? ctx.resolve(segment.parentId)
|
|
107
|
-
: undefined;
|
|
108
|
-
if (roof?.type === 'roof' && item.roofFace) {
|
|
109
|
-
const frame = getRoofWallFaceFrame(segment, item.roofFace);
|
|
110
|
-
const segLocal = roofFacePointToSegment(segment, item.roofFace, item.position);
|
|
111
|
-
const [sx, sz] = rotateVec(segLocal[0], segLocal[2], segment.rotation ?? 0);
|
|
112
|
-
const [rx, rz] = rotateVec(sx + segment.position[0], sz + segment.position[2], roof.rotation ?? 0);
|
|
113
|
-
result = {
|
|
114
|
-
x: rx + roof.position[0],
|
|
115
|
-
y: rz + roof.position[2],
|
|
116
|
-
rotation: (roof.rotation ?? 0) + (segment.rotation ?? 0) + frame.yaw + localRotation,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
else if (parentNode?.type === 'block' && item.blockFaceId) {
|
|
121
|
-
const frame = getBlockFaceFrame(parentNode.topology, item.blockFaceId);
|
|
122
|
-
if (frame) {
|
|
123
|
-
const localX = frame.origin[0] +
|
|
124
|
-
frame.xAxis[0] * item.position[0] +
|
|
125
|
-
frame.yAxis[0] * item.position[1] +
|
|
126
|
-
frame.normal[0] * item.position[2];
|
|
127
|
-
const localZ = frame.origin[2] +
|
|
128
|
-
frame.xAxis[2] * item.position[0] +
|
|
129
|
-
frame.yAxis[2] * item.position[1] +
|
|
130
|
-
frame.normal[2] * item.position[2];
|
|
131
|
-
const hostRotation = parentNode.rotation ?? 0;
|
|
132
|
-
const [offsetX, offsetZ] = rotateVec(localX, localZ, hostRotation);
|
|
133
|
-
const faceRotation = -Math.atan2(frame.xAxis[2], frame.xAxis[0]);
|
|
134
|
-
result = {
|
|
135
|
-
x: parentNode.position[0] + offsetX,
|
|
136
|
-
y: parentNode.position[2] + offsetZ,
|
|
137
|
-
rotation: hostRotation + faceRotation + localRotation,
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
// Level / slab / ceiling parent — item.position is level-local.
|
|
143
|
-
result = {
|
|
144
|
-
x: item.position[0],
|
|
145
|
-
y: item.position[2],
|
|
146
|
-
rotation: localRotation,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
cache.set(item.id, result);
|
|
150
|
-
return result;
|
|
151
|
-
}
|
|
152
|
-
export function buildItemContextualDimensions(node, ctx) {
|
|
153
|
-
const transform = resolveItemTransform(node, ctx);
|
|
154
|
-
if (!transform)
|
|
155
|
-
return null;
|
|
156
|
-
const [width, , depth] = getScaledDimensions(node);
|
|
157
|
-
if (width <= 1e-6 || depth <= 1e-6)
|
|
158
|
-
return null;
|
|
159
|
-
const centerLocalZ = node.asset.attachTo === 'wall-side' ? depth / 2 : 0;
|
|
160
|
-
const [centerOffsetX, centerOffsetY] = rotateVec(0, centerLocalZ, transform.rotation);
|
|
161
|
-
const cx = transform.x + centerOffsetX;
|
|
162
|
-
const cy = transform.y + centerOffsetY;
|
|
163
|
-
const halfWidth = width / 2;
|
|
164
|
-
const halfDepth = depth / 2;
|
|
165
|
-
const point = (x, y) => {
|
|
166
|
-
const [rx, ry] = rotateVec(x, y, transform.rotation);
|
|
167
|
-
return [cx + rx, cy + ry];
|
|
168
|
-
};
|
|
169
|
-
const widthNormal = rotateVec(0, -1, transform.rotation);
|
|
170
|
-
const depthNormal = rotateVec(1, 0, transform.rotation);
|
|
171
|
-
const unit = ctx.viewState?.unit ?? 'metric';
|
|
172
|
-
const metricNotation = readFloorplanMetricNotationOverride(ctx) ?? 'meters';
|
|
173
|
-
const stroke = ctx.viewState?.palette?.selectedStroke ?? '#2563eb';
|
|
174
|
-
return {
|
|
175
|
-
kind: 'group',
|
|
176
|
-
children: [
|
|
177
|
-
{
|
|
178
|
-
kind: 'dimension',
|
|
179
|
-
start: point(-halfWidth, -halfDepth),
|
|
180
|
-
end: point(halfWidth, -halfDepth),
|
|
181
|
-
offsetNormal: widthNormal,
|
|
182
|
-
offsetDistance: 0.28,
|
|
183
|
-
extensionOvershoot: 0.08,
|
|
184
|
-
text: formatLinearMeasurement(width, unit, metricNotation),
|
|
185
|
-
stroke,
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
kind: 'dimension',
|
|
189
|
-
start: point(halfWidth, -halfDepth),
|
|
190
|
-
end: point(halfWidth, halfDepth),
|
|
191
|
-
offsetNormal: depthNormal,
|
|
192
|
-
offsetDistance: 0.28,
|
|
193
|
-
extensionOvershoot: 0.08,
|
|
194
|
-
text: formatLinearMeasurement(depth, unit, metricNotation),
|
|
195
|
-
stroke,
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
export function buildItemFloorplan(node, ctx) {
|
|
201
|
-
const transform = resolveItemTransform(node, ctx);
|
|
202
|
-
if (!transform)
|
|
203
|
-
return null;
|
|
204
|
-
const [width, , depth] = getScaledDimensions(node);
|
|
205
|
-
if (width <= 0 || depth <= 0)
|
|
206
|
-
return null;
|
|
207
|
-
// Wall-side items are anchored at the mounted wall face; their body extends
|
|
208
|
-
// depth-ward AWAY from the wall (into the room), so push the footprint centre
|
|
209
|
-
// a half-depth out along the item's local +Z. After the front/back π flip in
|
|
210
|
-
// `transform.rotation`, +depth/2 always points off the wall for either side;
|
|
211
|
-
// a negative offset would lay the footprint across the wall onto the far side.
|
|
212
|
-
const centerLocalZ = node.asset.attachTo === 'wall-side' ? depth / 2 : 0;
|
|
213
|
-
const [centerOffsetX, centerOffsetY] = rotateVec(0, centerLocalZ, transform.rotation);
|
|
214
|
-
const cx = transform.x + centerOffsetX;
|
|
215
|
-
const cy = transform.y + centerOffsetY;
|
|
216
|
-
// Rectangle corners in local space, rotated and translated.
|
|
217
|
-
const halfW = width / 2;
|
|
218
|
-
const halfD = depth / 2;
|
|
219
|
-
const corners = [
|
|
220
|
-
[-halfW, -halfD],
|
|
221
|
-
[halfW, -halfD],
|
|
222
|
-
[halfW, halfD],
|
|
223
|
-
[-halfW, halfD],
|
|
224
|
-
];
|
|
225
|
-
const points = corners.map(([x, y]) => {
|
|
226
|
-
const [rx, ry] = rotateVec(x, y, transform.rotation);
|
|
227
|
-
return [cx + rx, cy + ry];
|
|
228
|
-
});
|
|
229
|
-
const isSelected = ctx.viewState?.selected ?? false;
|
|
230
|
-
// Marquee preview — the about-to-be-selected tint every other kind shows.
|
|
231
|
-
const isHighlighted = ctx.viewState?.highlighted ?? false;
|
|
232
|
-
const showSelection = isSelected || isHighlighted;
|
|
233
|
-
const isMoving = ctx.viewState?.moving ?? false;
|
|
234
|
-
const selectedStroke = ctx.viewState?.palette?.selectedStroke ?? '#3b82f6';
|
|
235
|
-
const floorPlanUrl = node.asset.floorPlanUrl;
|
|
236
|
-
const children = [
|
|
237
|
-
{
|
|
238
|
-
kind: 'polygon',
|
|
239
|
-
points,
|
|
240
|
-
// When an asset thumbnail is present, the polygon is a transparent
|
|
241
|
-
// hit-target — the image carries the visual weight. Without a
|
|
242
|
-
// thumbnail the polygon needs a light fill to read at all.
|
|
243
|
-
//
|
|
244
|
-
// `transparent` (not `none`) so the interior remains hit-testable —
|
|
245
|
-
// the registry layer's wrapping `<g>` only fires onPointerDown when
|
|
246
|
-
// the child renders a paintable surface. `fill="none"` would make
|
|
247
|
-
// clicks pass through to whatever's beneath, breaking selection.
|
|
248
|
-
fill: floorPlanUrl ? 'transparent' : '#fef3c7',
|
|
249
|
-
// Selected items read as selected: palette stroke + heavier weight
|
|
250
|
-
// (the move dot used to be the only cue, and it hides in
|
|
251
|
-
// multi-selections).
|
|
252
|
-
stroke: showSelection ? selectedStroke : '#92400e',
|
|
253
|
-
strokeWidth: showSelection ? 0.035 : 0.012,
|
|
254
|
-
opacity: 0.85,
|
|
255
|
-
},
|
|
256
|
-
];
|
|
257
|
-
// Asset thumbnail — top-down PNG capture from the asset modal. Drawn
|
|
258
|
-
// inside the footprint with the item's rotation applied. Matches the
|
|
259
|
-
// legacy `FloorplanItemImage` overlay.
|
|
260
|
-
if (floorPlanUrl) {
|
|
261
|
-
children.push({
|
|
262
|
-
kind: 'image',
|
|
263
|
-
url: floorPlanUrl,
|
|
264
|
-
center: [cx, cy],
|
|
265
|
-
width,
|
|
266
|
-
height: depth,
|
|
267
|
-
// `rotateVec` (the footprint polygon) applies R(-angle), but the renderer
|
|
268
|
-
// draws the image with SVG `rotate(+deg)` = R(+angle). Negate so the
|
|
269
|
-
// sprite rotates the same way as its footprint box (and 3D); otherwise the
|
|
270
|
-
// two counter-rotate and diverge by 2x the item's rotation.
|
|
271
|
-
rotation: -transform.rotation,
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
// Selection ring ABOVE the thumbnail — the base polygon's selected stroke
|
|
275
|
-
// sits underneath the image, so re-draw it on top. `fill: none` keeps the
|
|
276
|
-
// ring click-through; the base polygon owns hit-testing.
|
|
277
|
-
if (showSelection && floorPlanUrl) {
|
|
278
|
-
children.push({
|
|
279
|
-
kind: 'polygon',
|
|
280
|
-
points,
|
|
281
|
-
fill: 'none',
|
|
282
|
-
stroke: selectedStroke,
|
|
283
|
-
strokeWidth: 0.035,
|
|
284
|
-
opacity: isSelected ? 0.95 : 0.7,
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
// Move handle — orange dot at the item center. Only when selected and not
|
|
288
|
-
// already moving: during a move the dot sits under the cursor, so a release
|
|
289
|
-
// over it would re-arm the move (and re-enter edit) instead of committing.
|
|
290
|
-
if (isSelected && !isMoving) {
|
|
291
|
-
children.push({
|
|
292
|
-
kind: 'move-handle',
|
|
293
|
-
point: [cx, cy],
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
return { kind: 'group', children };
|
|
297
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { SlotDeclaration } from '@pascal-app/core';
|
|
2
|
-
export type LeanToSlotId = 'flashing' | 'ledger' | 'beam' | 'framing' | 'posts' | 'footings';
|
|
3
|
-
export declare const LEAN_TO_SLOT_DEFAULTS: Partial<Record<LeanToSlotId, string>>;
|
|
4
|
-
export declare function leanToSlots(): SlotDeclaration[];
|
|
5
|
-
//# sourceMappingURL=slots.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/lean-to-extension/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEvD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;AAE5F,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAIvE,CAAA;AAED,wBAAgB,WAAW,IAAI,eAAe,EAAE,CAS/C"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const LEAN_TO_SLOT_DEFAULTS = {
|
|
2
|
-
flashing: 'library:metal-steel',
|
|
3
|
-
posts: 'library:concrete-plaster',
|
|
4
|
-
footings: 'library:concrete-plaster',
|
|
5
|
-
};
|
|
6
|
-
export function leanToSlots() {
|
|
7
|
-
return [
|
|
8
|
-
{ slotId: 'flashing', label: 'Flashing', default: LEAN_TO_SLOT_DEFAULTS.flashing },
|
|
9
|
-
{ slotId: 'ledger', label: 'Ledger / high beam', default: LEAN_TO_SLOT_DEFAULTS.ledger },
|
|
10
|
-
{ slotId: 'beam', label: 'Low beam', default: LEAN_TO_SLOT_DEFAULTS.beam },
|
|
11
|
-
{ slotId: 'framing', label: 'Framing', default: LEAN_TO_SLOT_DEFAULTS.framing },
|
|
12
|
-
{ slotId: 'posts', label: 'Posts', default: LEAN_TO_SLOT_DEFAULTS.posts },
|
|
13
|
-
{ slotId: 'footings', label: 'Footings', default: LEAN_TO_SLOT_DEFAULTS.footings },
|
|
14
|
-
];
|
|
15
|
-
}
|
package/dist/shelf/slots.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { SlotDeclaration } from '@pascal-app/core';
|
|
2
|
-
import type { ShelfNode } from './schema';
|
|
3
|
-
export type ShelfSlotId = 'shelves' | 'frame' | 'back';
|
|
4
|
-
export declare const SHELF_SLOT_DEFAULT_COLOR = "#ffffff";
|
|
5
|
-
/** Map a builder mesh name to its slot id (null = not a paintable shelf part). */
|
|
6
|
-
export declare function shelfSlotIdForMeshName(name: string): ShelfSlotId | null;
|
|
7
|
-
/** Which slots a given shelf actually exposes (depends on style/flags). */
|
|
8
|
-
export declare function shelfSlots(node: ShelfNode): SlotDeclaration[];
|
|
9
|
-
//# sourceMappingURL=slots.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/shelf/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AAGtD,eAAO,MAAM,wBAAwB,YAAY,CAAA;AAEjD,kFAAkF;AAClF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAavE;AAED,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,EAAE,CAS7D"}
|
package/dist/shelf/slots.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// Visual parity with the retired DEFAULT_SHELF_MATERIAL (off-white).
|
|
2
|
-
export const SHELF_SLOT_DEFAULT_COLOR = '#ffffff';
|
|
3
|
-
/** Map a builder mesh name to its slot id (null = not a paintable shelf part). */
|
|
4
|
-
export function shelfSlotIdForMeshName(name) {
|
|
5
|
-
if (name.startsWith('shelf-board'))
|
|
6
|
-
return 'shelves';
|
|
7
|
-
if (name === 'shelf-back')
|
|
8
|
-
return 'back';
|
|
9
|
-
if (name.startsWith('shelf-side') ||
|
|
10
|
-
name.startsWith('shelf-post') ||
|
|
11
|
-
name.startsWith('shelf-divider') ||
|
|
12
|
-
name.startsWith('shelf-bracket') ||
|
|
13
|
-
name.startsWith('shelf-brace')) {
|
|
14
|
-
return 'frame';
|
|
15
|
-
}
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
/** Which slots a given shelf actually exposes (depends on style/flags). */
|
|
19
|
-
export function shelfSlots(node) {
|
|
20
|
-
const slots = [
|
|
21
|
-
{ slotId: 'shelves', label: 'Shelves', default: SHELF_SLOT_DEFAULT_COLOR },
|
|
22
|
-
];
|
|
23
|
-
const hasFrame = !(node.style === 'wall-shelf' && node.bracketStyle === 'hidden');
|
|
24
|
-
if (hasFrame)
|
|
25
|
-
slots.push({ slotId: 'frame', label: 'Frame', default: SHELF_SLOT_DEFAULT_COLOR });
|
|
26
|
-
const hasBack = node.style === 'cubby' || (node.style === 'bookshelf' && node.withBack);
|
|
27
|
-
if (hasBack)
|
|
28
|
-
slots.push({ slotId: 'back', label: 'Back', default: SHELF_SLOT_DEFAULT_COLOR });
|
|
29
|
-
return slots;
|
|
30
|
-
}
|
package/dist/slab/slots.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { SlotDeclaration } from '@pascal-app/core';
|
|
2
|
-
export type SlabSlotId = 'surface' | 'side';
|
|
3
|
-
export declare const SLAB_TOP_SLOT_DEFAULT = "library:wood-woodplank48";
|
|
4
|
-
export declare const SLAB_SIDE_SLOT_DEFAULT = "#cccccc";
|
|
5
|
-
/**
|
|
6
|
-
* A slab exposes two paintable faces: the top floor surface and its sides
|
|
7
|
-
* (vertical walls + underside).
|
|
8
|
-
*/
|
|
9
|
-
export declare function slabSlots(): SlotDeclaration[];
|
|
10
|
-
//# sourceMappingURL=slots.d.ts.map
|
package/dist/slab/slots.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/slab/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEvD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,CAAA;AAU3C,eAAO,MAAM,qBAAqB,6BAA6B,CAAA;AAC/D,eAAO,MAAM,sBAAsB,YAAY,CAAA;AAE/C;;;GAGG;AACH,wBAAgB,SAAS,IAAI,eAAe,EAAE,CAK7C"}
|
package/dist/slab/slots.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Declared default appearances for an unpainted slab in colored mode — a
|
|
2
|
-
// catalog `library:<id>` finish or a `#rrggbb` colour. Textures-off collapses
|
|
3
|
-
// both to the themed floor role (the escape hatch).
|
|
4
|
-
//
|
|
5
|
-
// `surface` (top face) keeps the wood floor default and the slot id used before
|
|
6
|
-
// the top/side split, so existing painted slabs keep their floor finish. `side`
|
|
7
|
-
// (walls + underside) defaults to a light grey so a slab's edges read as a
|
|
8
|
-
// distinct trim rather than wood end-grain.
|
|
9
|
-
export const SLAB_TOP_SLOT_DEFAULT = 'library:wood-woodplank48';
|
|
10
|
-
export const SLAB_SIDE_SLOT_DEFAULT = '#cccccc';
|
|
11
|
-
/**
|
|
12
|
-
* A slab exposes two paintable faces: the top floor surface and its sides
|
|
13
|
-
* (vertical walls + underside).
|
|
14
|
-
*/
|
|
15
|
-
export function slabSlots() {
|
|
16
|
-
return [
|
|
17
|
-
{ slotId: 'surface', label: 'Top', default: SLAB_TOP_SLOT_DEFAULT },
|
|
18
|
-
{ slotId: 'side', label: 'Sides', default: SLAB_SIDE_SLOT_DEFAULT },
|
|
19
|
-
];
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AnyNode, AnyNodeId, FloorPlacedFootprint, StairNode, StairSegmentNode } from '@pascal-app/core';
|
|
2
|
-
type SegmentTransform = {
|
|
3
|
-
position: [number, number, number];
|
|
4
|
-
rotation: number;
|
|
5
|
-
};
|
|
6
|
-
export declare function getStairFloorPlacedFootprints(stair: StairNode, nodes: Readonly<Record<AnyNodeId, AnyNode>>): FloorPlacedFootprint[];
|
|
7
|
-
export declare function getStairSegmentFloorPlacedFootprints(stair: StairNode, segments: readonly StairSegmentNode[]): FloorPlacedFootprint[];
|
|
8
|
-
export declare function computeStairSegmentFloorStackTransforms(segments: readonly StairSegmentNode[]): SegmentTransform[];
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=floor-stack.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"floor-stack.d.ts","sourceRoot":"","sources":["../../src/stair/floor-stack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AAEzB,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,GAC1C,oBAAoB,EAAE,CAUxB;AA+CD,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,oBAAoB,EAAE,CA4BxB;AAED,wBAAgB,uCAAuC,CACrD,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,gBAAgB,EAAE,CAgDpB"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
export function getStairFloorPlacedFootprints(stair, nodes) {
|
|
2
|
-
if ((stair.stairType ?? 'straight') !== 'straight') {
|
|
3
|
-
return getArcStairFloorPlacedFootprints(stair);
|
|
4
|
-
}
|
|
5
|
-
const segments = (stair.children ?? [])
|
|
6
|
-
.map((childId) => nodes[childId])
|
|
7
|
-
.filter((node) => node?.type === 'stair-segment');
|
|
8
|
-
return getStairSegmentFloorPlacedFootprints(stair, segments);
|
|
9
|
-
}
|
|
10
|
-
const MAX_ARC_FOOTPRINT_SWEEP = Math.PI / 12;
|
|
11
|
-
function getArcStairFloorPlacedFootprints(stair) {
|
|
12
|
-
const isSpiral = stair.stairType === 'spiral';
|
|
13
|
-
const innerRadius = Math.max(isSpiral ? 0.05 : 0.2, stair.innerRadius ?? (isSpiral ? 0.2 : 0.9));
|
|
14
|
-
const outerRadius = innerRadius + Math.max(stair.width ?? 1, 0.4);
|
|
15
|
-
const sweepAngle = stair.sweepAngle ?? (isSpiral ? Math.PI * 2 : Math.PI / 2);
|
|
16
|
-
const stepCount = Math.max(2, Math.round(stair.stepCount ?? 10));
|
|
17
|
-
const sliceCount = Math.max(stepCount, Math.ceil(Math.abs(sweepAngle) / MAX_ARC_FOOTPRINT_SWEEP));
|
|
18
|
-
const footprints = [];
|
|
19
|
-
for (let index = 0; index < sliceCount; index += 1) {
|
|
20
|
-
const startAngle = -sweepAngle / 2 + (sweepAngle * index) / sliceCount;
|
|
21
|
-
const endAngle = -sweepAngle / 2 + (sweepAngle * (index + 1)) / sliceCount;
|
|
22
|
-
const midAngle = (startAngle + endAngle) / 2;
|
|
23
|
-
const halfSweep = Math.abs(endAngle - startAngle) / 2;
|
|
24
|
-
const projectedInnerRadius = innerRadius * Math.cos(halfSweep);
|
|
25
|
-
const radialSize = outerRadius - projectedInnerRadius;
|
|
26
|
-
const tangentialSize = 2 * outerRadius * Math.sin(halfSweep);
|
|
27
|
-
const centerRadius = (outerRadius + projectedInnerRadius) / 2;
|
|
28
|
-
const [offsetX, offsetZ] = rotateXZ(Math.cos(midAngle) * centerRadius, Math.sin(midAngle) * centerRadius, stair.rotation);
|
|
29
|
-
footprints.push({
|
|
30
|
-
position: [stair.position[0] + offsetX, stair.position[1], stair.position[2] + offsetZ],
|
|
31
|
-
dimensions: [Math.max(radialSize, 0.01), 0.01, Math.max(tangentialSize, 0.01)],
|
|
32
|
-
rotation: [0, midAngle - stair.rotation, 0],
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
if (isSpiral && (stair.showCenterColumn ?? true)) {
|
|
36
|
-
const columnRadius = Math.max(0.05, Math.min(innerRadius * 0.72, innerRadius - 0.03));
|
|
37
|
-
footprints.push({
|
|
38
|
-
position: stair.position,
|
|
39
|
-
dimensions: [columnRadius * 2, 0.01, columnRadius * 2],
|
|
40
|
-
rotation: [0, 0, 0],
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
return footprints;
|
|
44
|
-
}
|
|
45
|
-
export function getStairSegmentFloorPlacedFootprints(stair, segments) {
|
|
46
|
-
const transforms = computeStairSegmentFloorStackTransforms(segments);
|
|
47
|
-
return segments.map((segment, index) => {
|
|
48
|
-
const transform = transforms[index];
|
|
49
|
-
const [centerOffsetX, centerOffsetZ] = rotateXZ(0, segment.length / 2, transform.rotation);
|
|
50
|
-
const centerInGroupX = transform.position[0] + centerOffsetX;
|
|
51
|
-
const centerInGroupZ = transform.position[2] + centerOffsetZ;
|
|
52
|
-
const [centerOffsetWorldX, centerOffsetWorldZ] = rotateXZ(centerInGroupX, centerInGroupZ, stair.rotation);
|
|
53
|
-
return {
|
|
54
|
-
position: [
|
|
55
|
-
stair.position[0] + centerOffsetWorldX,
|
|
56
|
-
stair.position[1] + transform.position[1],
|
|
57
|
-
stair.position[2] + centerOffsetWorldZ,
|
|
58
|
-
],
|
|
59
|
-
dimensions: [
|
|
60
|
-
segment.width,
|
|
61
|
-
Math.max(segment.height, segment.thickness, 0.01),
|
|
62
|
-
segment.length,
|
|
63
|
-
],
|
|
64
|
-
rotation: [0, stair.rotation + transform.rotation, 0],
|
|
65
|
-
};
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
export function computeStairSegmentFloorStackTransforms(segments) {
|
|
69
|
-
const transforms = [];
|
|
70
|
-
let currentX = 0;
|
|
71
|
-
let currentY = 0;
|
|
72
|
-
let currentZ = 0;
|
|
73
|
-
let currentRot = 0;
|
|
74
|
-
for (let index = 0; index < segments.length; index += 1) {
|
|
75
|
-
const segment = segments[index];
|
|
76
|
-
if (index > 0) {
|
|
77
|
-
const previous = segments[index - 1];
|
|
78
|
-
let attachX = 0;
|
|
79
|
-
let attachZ = 0;
|
|
80
|
-
let rotationDelta = 0;
|
|
81
|
-
switch (segment.attachmentSide) {
|
|
82
|
-
case 'front':
|
|
83
|
-
attachX = 0;
|
|
84
|
-
attachZ = previous.length;
|
|
85
|
-
rotationDelta = 0;
|
|
86
|
-
break;
|
|
87
|
-
case 'left':
|
|
88
|
-
attachX = previous.width / 2;
|
|
89
|
-
attachZ = previous.length / 2;
|
|
90
|
-
rotationDelta = Math.PI / 2;
|
|
91
|
-
break;
|
|
92
|
-
case 'right':
|
|
93
|
-
attachX = -previous.width / 2;
|
|
94
|
-
attachZ = previous.length / 2;
|
|
95
|
-
rotationDelta = -Math.PI / 2;
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
const [rotatedX, rotatedZ] = rotateXZ(attachX, attachZ, currentRot);
|
|
99
|
-
currentX += rotatedX;
|
|
100
|
-
currentY += previous.height;
|
|
101
|
-
currentZ += rotatedZ;
|
|
102
|
-
currentRot += rotationDelta;
|
|
103
|
-
}
|
|
104
|
-
transforms.push({
|
|
105
|
-
position: [currentX, currentY, currentZ],
|
|
106
|
-
rotation: currentRot,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return transforms;
|
|
110
|
-
}
|
|
111
|
-
function rotateXZ(x, z, angle) {
|
|
112
|
-
const cos = Math.cos(angle);
|
|
113
|
-
const sin = Math.sin(angle);
|
|
114
|
-
return [x * cos + z * sin, -x * sin + z * cos];
|
|
115
|
-
}
|
package/dist/stair/slots.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SlotDeclaration, StairNode } from '@pascal-app/core';
|
|
2
|
-
export type StairSlotId = 'treads' | 'body' | 'railing';
|
|
3
|
-
export declare const STAIR_TREADS_SLOT_DEFAULT = "library:wood-woodplank48";
|
|
4
|
-
export declare const STAIR_BODY_SLOT_DEFAULT = "library:preset-lightgrey";
|
|
5
|
-
export declare const STAIR_RAILING_SLOT_DEFAULT = "library:metal-steel";
|
|
6
|
-
export declare function stairSlots(node: StairNode): SlotDeclaration[];
|
|
7
|
-
//# sourceMappingURL=slots.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/stair/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAElE,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAA;AAEvD,eAAO,MAAM,yBAAyB,6BAA6B,CAAA;AACnE,eAAO,MAAM,uBAAuB,6BAA6B,CAAA;AACjE,eAAO,MAAM,0BAA0B,wBAAwB,CAAA;AAE/D,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,EAAE,CAW7D"}
|
package/dist/stair/slots.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const STAIR_TREADS_SLOT_DEFAULT = 'library:wood-woodplank48';
|
|
2
|
-
export const STAIR_BODY_SLOT_DEFAULT = 'library:preset-lightgrey';
|
|
3
|
-
export const STAIR_RAILING_SLOT_DEFAULT = 'library:metal-steel';
|
|
4
|
-
export function stairSlots(node) {
|
|
5
|
-
const slots = [
|
|
6
|
-
{ slotId: 'treads', label: 'Treads', default: STAIR_TREADS_SLOT_DEFAULT },
|
|
7
|
-
{ slotId: 'body', label: 'Body', default: STAIR_BODY_SLOT_DEFAULT },
|
|
8
|
-
];
|
|
9
|
-
if (node.railingMode && node.railingMode !== 'none') {
|
|
10
|
-
slots.push({ slotId: 'railing', label: 'Railing', default: STAIR_RAILING_SLOT_DEFAULT });
|
|
11
|
-
}
|
|
12
|
-
return slots;
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const useWallDrawingMode: import("zustand").UseBoundStore<import("zustand").StoreApi<{
|
|
2
|
-
mode: "line" | "rectangle";
|
|
3
|
-
toggle: () => void;
|
|
4
|
-
}>>;
|
|
5
|
-
/**
|
|
6
|
-
* R toggles line / rectangle drawing (the HUD's Shape chip cycles the same
|
|
7
|
-
* store). Both wall tools mount this: the 3D tool only exists once the canvas
|
|
8
|
-
* does, and split view mounts both, so one listener serves whichever is up.
|
|
9
|
-
* The mode outlives the tool: re-arming walls resumes the last shape used.
|
|
10
|
-
*/
|
|
11
|
-
export declare function useWallDrawingModeKeys(): void;
|
|
12
|
-
//# sourceMappingURL=drawing-mode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawing-mode.d.ts","sourceRoot":"","sources":["../../src/wall/drawing-mode.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;UACvB,MAAM,GAAG,WAAW;YAClB,MAAM,IAAI;GAOjB,CAAA;AAWH;;;;;GAKG;AACH,wBAAgB,sBAAsB,SAOrC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { emitter } from '@pascal-app/core';
|
|
2
|
-
import { isEditableKeyboardTarget } from '@pascal-app/editor';
|
|
3
|
-
import { useEffect } from 'react';
|
|
4
|
-
import { create } from 'zustand';
|
|
5
|
-
export const useWallDrawingMode = create((set, get) => ({
|
|
6
|
-
mode: 'line',
|
|
7
|
-
toggle: () => {
|
|
8
|
-
emitter.emit('tool:cancel');
|
|
9
|
-
set({ mode: get().mode === 'rectangle' ? 'line' : 'rectangle' });
|
|
10
|
-
},
|
|
11
|
-
}));
|
|
12
|
-
const onKeyDown = (e) => {
|
|
13
|
-
if (e.repeat || e.metaKey || e.ctrlKey || e.altKey)
|
|
14
|
-
return;
|
|
15
|
-
if (e.key !== 'r' && e.key !== 'R')
|
|
16
|
-
return;
|
|
17
|
-
if (isEditableKeyboardTarget(e.target))
|
|
18
|
-
return;
|
|
19
|
-
e.preventDefault();
|
|
20
|
-
useWallDrawingMode.getState().toggle();
|
|
21
|
-
};
|
|
22
|
-
let owners = 0;
|
|
23
|
-
/**
|
|
24
|
-
* R toggles line / rectangle drawing (the HUD's Shape chip cycles the same
|
|
25
|
-
* store). Both wall tools mount this: the 3D tool only exists once the canvas
|
|
26
|
-
* does, and split view mounts both, so one listener serves whichever is up.
|
|
27
|
-
* The mode outlives the tool: re-arming walls resumes the last shape used.
|
|
28
|
-
*/
|
|
29
|
-
export function useWallDrawingModeKeys() {
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
if (owners++ === 0)
|
|
32
|
-
window.addEventListener('keydown', onKeyDown);
|
|
33
|
-
return () => {
|
|
34
|
-
if (--owners === 0)
|
|
35
|
-
window.removeEventListener('keydown', onKeyDown);
|
|
36
|
-
};
|
|
37
|
-
}, []);
|
|
38
|
-
}
|
package/dist/wall/slots.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type SlotDeclaration, type WallNode } from '@pascal-app/core';
|
|
2
|
-
/**
|
|
3
|
-
* A wall exposes two paintable faces — interior + exterior. Painting writes
|
|
4
|
-
* `node.slots[interior|exterior]` via `wallPaint` like every other kind; this
|
|
5
|
-
* declaration surfaces the slot list + declared defaults for the picker and
|
|
6
|
-
* keeps walls on the same `{ slotId, label, default }` contract. The defaults
|
|
7
|
-
* come from core so the viewer's material resolver renders the identical value.
|
|
8
|
-
*/
|
|
9
|
-
export declare function wallSlots(node?: WallNode): SlotDeclaration[];
|
|
10
|
-
//# sourceMappingURL=slots.d.ts.map
|
package/dist/wall/slots.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/wall/slots.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAA;AAEzB;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,eAAe,EAAE,CAmF5D"}
|