door_models 5.0.4 → 5.0.6

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/index.cjs.js CHANGED
@@ -193,8 +193,8 @@ const ConfiguratorProvider = _ref => {
193
193
  const [testHingeMaterial, setTestHingeMaterial] = React.useState("metal");
194
194
  const [testFrontCoverPanelMaterial, setTestFrontCoverPanelMaterial] = React.useState("aluminum");
195
195
  const [testBackCoverPanelMaterial, setTestBackCoverPanelMaterial] = React.useState("aluminum");
196
-
197
- //
196
+ const doorHeight = 0;
197
+ const [newPivotPosition, setNewPivotPosition] = React.useState(0);
198
198
  const [parseMessage, setParseMessage] = React.useState({
199
199
  type: "",
200
200
  text: ""
@@ -203,6 +203,8 @@ const ConfiguratorProvider = _ref => {
203
203
  setIs2D(initialIs2D);
204
204
  }, [initialIs2D]);
205
205
  const handleParseCpid = React.useCallback(cpidToParse => {
206
+ setTotalHeight(2700);
207
+ setTotalWidth(974);
206
208
  const showMessage = function (text) {
207
209
  let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "error";
208
210
  setParseMessage({
@@ -248,6 +250,9 @@ const ConfiguratorProvider = _ref => {
248
250
  newConfig.fanlightVisible = false;
249
251
  currentIndex++;
250
252
  } else if (validFanlights.includes(fanlightPart)) {
253
+ setExteriorFanlight(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
254
+ height: 300
255
+ }));
251
256
  newConfig.fanlightVisible = true;
252
257
  newConfig.fanlightType = fanlightPart;
253
258
  currentIndex++;
@@ -274,6 +279,12 @@ const ConfiguratorProvider = _ref => {
274
279
  newConfig.bodyType = tempBody;
275
280
  if (bodyPartRaw.endsWith("OCC")) {
276
281
  newConfig.occulusVisible = true;
282
+ setOcculus(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
283
+ x1: 150,
284
+ x2: 150,
285
+ y1: 150,
286
+ y2: 150
287
+ }));
277
288
  }
278
289
  currentIndex += 2;
279
290
  frameFound = true;
@@ -285,6 +296,9 @@ const ConfiguratorProvider = _ref => {
285
296
  }
286
297
  for (let i = currentIndex; i < parts.length; i++) {
287
298
  if (parts[i] === "IFL") {
299
+ setInteriorFanlight(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
300
+ height: 300
301
+ }));
288
302
  newConfig.interiorFanlightVisible = true;
289
303
  } else if (parts[i] === "OCC") {
290
304
  newConfig.occulusVisible = true;
@@ -607,13 +621,13 @@ const ConfiguratorProvider = _ref => {
607
621
  }));
608
622
  setTestExteriorFanlightMaterial("metal");
609
623
  break;
610
- case "ALDGL":
624
+ case "ALDGFL":
611
625
  setExteriorFanlight(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
612
626
  depth: doorFrame.frameDepth
613
627
  }));
614
628
  setTestExteriorFanlightMaterial("glass");
615
629
  break;
616
- case "ALSGL":
630
+ case "ALSGFL":
617
631
  setExteriorFanlight(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
618
632
  depth: 40
619
633
  }));
@@ -621,6 +635,11 @@ const ConfiguratorProvider = _ref => {
621
635
  break;
622
636
  }
623
637
  }, [exteriorFanlight.visible, exteriorFanlightType, doorFrame.frameDepth, setTestExteriorFanlightMaterial, setExteriorFanlight]);
638
+ React.useEffect(() => {
639
+ setOcculus(prevOcculus => _objectSpread2(_objectSpread2({}, prevOcculus), {}, {
640
+ depth: door.theDoorDepth
641
+ }));
642
+ }, [door.theDoorDepth]);
624
643
  React.useEffect(() => {
625
644
  const topThkValue = parseInt(doorFrame.topThk) || 0;
626
645
  const exteriorFanlightHeight = exteriorFanlight.visible ? exteriorFanlight.height : 0;
@@ -698,7 +717,10 @@ const ConfiguratorProvider = _ref => {
698
717
  setGlassVisible,
699
718
  glassDepth,
700
719
  setGlassDepth,
701
- handleParseCpid
720
+ handleParseCpid,
721
+ newPivotPosition,
722
+ setNewPivotPosition,
723
+ doorHeight
702
724
  },
703
725
  children: children
704
726
  });
@@ -796,22 +818,22 @@ function StandardHandle(_ref) {
796
818
  frameType // 👈
797
819
  } = _ref;
798
820
  // --- Base Dimensions ---
799
- const roseRadius = 0.025;
821
+ const roseRadius = 0.035;
800
822
 
801
823
  // --- Thickness ---
802
824
  // default 5mm, but 8mm + 1–2mm if WDG frame
803
825
  const roseThickness = frameType === "WDGF_WDG100" ? 0.008 + 0.0015 // average: 9.5mm
804
826
  : 0.005; // 5mm default
805
827
 
806
- const handleRadius = 0.009;
807
- const handleLength = 0.12;
828
+ const handleRadius = 0.015;
829
+ const handleLength = 0.2;
808
830
 
809
831
  // face offset based on thickness
810
832
  const faceZ = doorDepthM / 2 + roseThickness / 2;
811
- const connectorLength = handleLength - 0.08;
833
+ const connectorLength = handleLength / 3;
812
834
  const cornerFrontZ = faceZ + roseThickness + connectorLength;
813
835
  const cornerBackZ = -faceZ - roseThickness - connectorLength;
814
- const roseGapY = 0.012;
836
+ const roseGapY = 0.07;
815
837
  return /*#__PURE__*/jsxRuntime.jsxs("group", {
816
838
  position: position,
817
839
  children: [[faceZ, -faceZ].map((z, i) => /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
@@ -909,13 +931,13 @@ function StandardHandle(_ref) {
909
931
  position: [0, 0.0075, 0],
910
932
  material: availableMaterials.aluminumBrighter,
911
933
  children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
912
- args: [0.008, 0.008, roseThickness, 32]
934
+ args: [0.01, 0.01, roseThickness, 32]
913
935
  })
914
936
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
915
937
  position: [0, -0.0075, 0],
916
938
  material: availableMaterials.aluminumBrighter,
917
939
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
918
- args: [0.008, 0.015, roseThickness]
940
+ args: [0.01, 0.015, roseThickness]
919
941
  })
920
942
  })]
921
943
  })]
@@ -1029,12 +1051,12 @@ function GlassHandle(_ref3) {
1029
1051
  doorPivot
1030
1052
  } = _ref3;
1031
1053
  // --- Dimensions ---
1032
- const roseRadius = 0.025;
1054
+ const roseRadius = 0.035;
1033
1055
  const roseThickness = 0.005;
1034
- const handleRadius = 0.009;
1035
- const handleLength = 0.12;
1056
+ const handleRadius = 0.015;
1057
+ const handleLength = 0.2;
1036
1058
  const faceZ = doorDepthM / 2 + roseThickness / 2;
1037
- const connectorLength = handleLength - 0.08;
1059
+ const connectorLength = handleLength / 3;
1038
1060
  return /*#__PURE__*/jsxRuntime.jsxs("group", {
1039
1061
  position: position,
1040
1062
  children: [[faceZ, -faceZ].map((z, i) => /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
@@ -1056,13 +1078,13 @@ function GlassHandle(_ref3) {
1056
1078
  position: [0, 0.0075, 0],
1057
1079
  material: availableMaterials.aluminum,
1058
1080
  children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
1059
- args: [0.008, 0.008, roseThickness, 32]
1081
+ args: [0.01, 0.01, roseThickness, 32]
1060
1082
  })
1061
1083
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1062
1084
  position: [0, -0.0075, 0],
1063
1085
  material: availableMaterials.aluminum,
1064
1086
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1065
- args: [0.008, 0.015, roseThickness]
1087
+ args: [0.01, 0.015, roseThickness]
1066
1088
  })
1067
1089
  })]
1068
1090
  })]
@@ -1311,6 +1333,7 @@ function DoorModels(_ref7) {
1311
1333
  testFrontCoverPanelMaterial,
1312
1334
  testBackCoverPanelMaterial,
1313
1335
  glassDepth,
1336
+ cpid,
1314
1337
  handleParseCpid
1315
1338
  } = useConfigurator();
1316
1339
  React.useEffect(() => {
@@ -1397,6 +1420,12 @@ function DoorModels(_ref7) {
1397
1420
  secondDoorStopDepth,
1398
1421
  secondDoorStopOffset
1399
1422
  } = doorFrame;
1423
+ const initialDoorHeight = React.useRef(doorHeight);
1424
+
1425
+ // useEffect(() => {
1426
+ // initialDoorHeight.current = doorHeight;
1427
+ // }, [cpid]);
1428
+
1400
1429
  const {
1401
1430
  height: interiorFanlightHeightValue
1402
1431
  } = interiorFanlight;
@@ -1523,7 +1552,7 @@ function DoorModels(_ref7) {
1523
1552
  const totalFrameHeightM = totalOpeningHeightM + topFrameWidthM;
1524
1553
 
1525
1554
  // --- Centering Logic ---
1526
- const yCenteringOffset = -(topFrameWidthM + exteriorFanlightHeightM) / 2;
1555
+ const yCenteringOffset = -topFrameWidthM / 2;
1527
1556
  const sideFrameCenterY = topFrameWidthM / 2;
1528
1557
  const interiorFanlightYPosition = totalOpeningHeightM / 2 - interiorFanlightHeightM / 2;
1529
1558
  const doorYPosition = -totalOpeningHeightM / 2 + mainDoorHeightM / 2;
@@ -1578,6 +1607,12 @@ function DoorModels(_ref7) {
1578
1607
 
1579
1608
  // --- HINGE VISIBILITY LOGIC ---
1580
1609
  const isGlassDoor = React.useMemo(() => ["SG8", "SG10", "SG12"].includes(bodyType), [bodyType]);
1610
+ const pivotNewPosition = (doorHeight - initialDoorHeight.current) / 2 / 1000;
1611
+ console.log("////////");
1612
+ console.log("initialDoorHeight.current", initialDoorHeight.current);
1613
+ console.log("doorHeight", doorHeight);
1614
+ console.log("pivotNewPosition", pivotNewPosition);
1615
+ console.log("////////");
1581
1616
 
1582
1617
  // Calculate evenly spaced hinge positions
1583
1618
  const standardHingeYPositions = React.useMemo(() => {
@@ -1625,424 +1660,416 @@ function DoorModels(_ref7) {
1625
1660
  })
1626
1661
  });
1627
1662
  }
1628
- return /*#__PURE__*/jsxRuntime.jsxs("group", {
1629
- "position-y": yCenteringOffset,
1630
- children: [frontCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1631
- "position-z": frontArchitraveZ,
1632
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1633
- position: [0, topArchitraveY, 0],
1634
- castShadow: true,
1635
- material: frontCoverPanelMaterial,
1636
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1637
- args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1638
- })
1639
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1640
- position: [leftArchitraveX, sideArchitraveCenterY, 0],
1641
- castShadow: true,
1642
- material: frontCoverPanelMaterial,
1643
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1644
- args: [architraveProfileM, sideArchitraveHeight, architraveDepthM]
1645
- })
1646
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1647
- position: [rightArchitraveX, sideArchitraveCenterY, 0],
1648
- castShadow: true,
1649
- material: frontCoverPanelMaterial,
1650
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1651
- args: [architraveProfileM, sideArchitraveHeight, architraveDepthM]
1652
- })
1653
- })]
1654
- }), backCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1655
- "position-z": backArchitraveZ,
1656
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1657
- position: [0, topArchitraveY, 0],
1658
- castShadow: true,
1659
- material: backCoverPanelMaterial,
1660
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1661
- args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1662
- })
1663
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1664
- position: [leftArchitraveX, sideArchitraveCenterY, 0],
1665
- castShadow: true,
1666
- material: backCoverPanelMaterial,
1667
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1668
- args: [architraveProfileM, sideArchitraveHeight, architraveDepthM]
1669
- })
1670
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1671
- position: [rightArchitraveX, sideArchitraveCenterY, 0],
1672
- castShadow: true,
1673
- material: backCoverPanelMaterial,
1674
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1675
- args: [architraveProfileM, sideArchitraveHeight, architraveDepthM]
1676
- })
1677
- })]
1678
- }), exteriorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1679
- position: [0, exteriorFanlightYPosition, exteriorFanlightZPosition],
1680
- castShadow: true,
1681
- material: exteriorFanlightMaterial,
1682
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1683
- args: [totalFrameWidth, exteriorFanlightHeightM, exteriorFanlightDepthM]
1684
- })
1685
- }), isFrameVisible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1686
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1687
- castShadow: true,
1688
- position: [0, topFrameCenterY, 0],
1689
- children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1690
- useGroups: true,
1691
- children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1692
- name: "frame-base",
1693
- material: frameMaterial,
1694
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1695
- args: [doorWidthM, topFrameWidthM, frameDepthM]
1696
- })
1697
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1698
- name: "cut-exterior",
1699
- material: frameMaterial,
1700
- position: [0, notchposition, 0],
1701
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1702
- args: [doorWidthM + 0.01, notchWidthM, notchDepthM]
1703
- })
1704
- })]
1705
- })
1706
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1707
- castShadow: true,
1708
- position: [-doorWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, 0],
1709
- children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1710
- useGroups: true,
1711
- children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1712
- name: "frame-base",
1713
- material: frameMaterial,
1714
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1715
- args: [sidesFrameWidthM, totalFrameHeightM, frameDepthM]
1716
- })
1717
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1718
- name: "cut-exterior",
1719
- material: frameMaterial,
1720
- position: [-notchposition, 0, 0],
1721
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1722
- args: [notchWidthM, totalFrameHeightM + 0.01, notchDepthM]
1723
- })
1724
- })]
1725
- })
1726
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1727
- castShadow: true,
1728
- position: [doorWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, 0],
1729
- children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1730
- useGroups: true,
1731
- children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1732
- name: "frame-base",
1733
- material: frameMaterial,
1734
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1735
- args: [sidesFrameWidthM, totalFrameHeightM, frameDepthM]
1736
- })
1737
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1738
- name: "cut-exterior",
1739
- material: frameMaterial,
1740
- position: [notchposition, 0, 0],
1741
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1742
- args: [notchWidthM, totalFrameHeightM + 0.01, notchDepthM]
1743
- })
1744
- })]
1745
- })
1746
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1747
- castShadow: true,
1748
- position: [0, totalOpeningHeightM / 2 - doorStopWidthM / 2, doorStopPositionZ],
1749
- material: doorStopMaterial,
1750
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1751
- args: [doorWidthM, doorStopWidthM, doorStopDepthM]
1752
- })
1753
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1754
- castShadow: true,
1755
- position: [-doorWidthM / 2 + doorStopWidthM / 2, 0, doorStopPositionZ],
1756
- material: doorStopMaterial,
1757
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1758
- args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1759
- })
1760
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1663
+ return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
1664
+ children: /*#__PURE__*/jsxRuntime.jsxs("group", {
1665
+ "position-y": yCenteringOffset + pivotNewPosition,
1666
+ children: [frontCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1667
+ "position-z": frontArchitraveZ,
1668
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1669
+ position: [0, topArchitraveY, 0],
1670
+ castShadow: true,
1671
+ material: frontCoverPanelMaterial,
1672
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1673
+ args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1674
+ })
1675
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1676
+ position: [leftArchitraveX, sideArchitraveCenterY, 0],
1677
+ castShadow: true,
1678
+ material: frontCoverPanelMaterial,
1679
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1680
+ args: [architraveProfileM, sideArchitraveHeight, architraveDepthM]
1681
+ })
1682
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1683
+ position: [rightArchitraveX, sideArchitraveCenterY, 0],
1684
+ castShadow: true,
1685
+ material: frontCoverPanelMaterial,
1686
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1687
+ args: [architraveProfileM, sideArchitraveHeight, architraveDepthM]
1688
+ })
1689
+ })]
1690
+ }), backCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1691
+ "position-z": backArchitraveZ,
1692
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1693
+ position: [0, topArchitraveY, 0],
1694
+ castShadow: true,
1695
+ material: backCoverPanelMaterial,
1696
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1697
+ args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1698
+ })
1699
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1700
+ position: [leftArchitraveX, sideArchitraveCenterY, 0],
1701
+ castShadow: true,
1702
+ material: backCoverPanelMaterial,
1703
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1704
+ args: [architraveProfileM, sideArchitraveHeight, architraveDepthM]
1705
+ })
1706
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1707
+ position: [rightArchitraveX, sideArchitraveCenterY, 0],
1708
+ castShadow: true,
1709
+ material: backCoverPanelMaterial,
1710
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1711
+ args: [architraveProfileM, sideArchitraveHeight, architraveDepthM]
1712
+ })
1713
+ })]
1714
+ }), exteriorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1715
+ position: [0, exteriorFanlightYPosition, exteriorFanlightZPosition],
1761
1716
  castShadow: true,
1762
- position: [doorWidthM / 2 - doorStopWidthM / 2, 0, doorStopPositionZ],
1763
- material: doorStopMaterial,
1717
+ material: exteriorFanlightMaterial,
1764
1718
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1765
- args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1719
+ args: [totalFrameWidth, exteriorFanlightHeightM, exteriorFanlightDepthM]
1766
1720
  })
1767
- }), frameType !== "WF_FLI" && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1721
+ }), isFrameVisible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1768
1722
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1769
1723
  castShadow: true,
1770
- position: [0, topGasketYPosition, gasketZPosition],
1771
- material: gasketMaterial,
1724
+ position: [0, topFrameCenterY, 0],
1725
+ children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1726
+ useGroups: true,
1727
+ children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1728
+ name: "frame-base",
1729
+ material: frameMaterial,
1730
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1731
+ args: [doorWidthM, topFrameWidthM, frameDepthM]
1732
+ })
1733
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1734
+ name: "cut-exterior",
1735
+ material: frameMaterial,
1736
+ position: [0, notchposition, 0],
1737
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1738
+ args: [doorWidthM + 0.01, notchWidthM, notchDepthM]
1739
+ })
1740
+ })]
1741
+ })
1742
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1743
+ castShadow: true,
1744
+ position: [-doorWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, 0],
1745
+ children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1746
+ useGroups: true,
1747
+ children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1748
+ name: "frame-base",
1749
+ material: frameMaterial,
1750
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1751
+ args: [sidesFrameWidthM, totalFrameHeightM, frameDepthM]
1752
+ })
1753
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1754
+ name: "cut-exterior",
1755
+ material: frameMaterial,
1756
+ position: [-notchposition, 0, 0],
1757
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1758
+ args: [notchWidthM, totalFrameHeightM + 0.01, notchDepthM]
1759
+ })
1760
+ })]
1761
+ })
1762
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1763
+ castShadow: true,
1764
+ position: [doorWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, 0],
1765
+ children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1766
+ useGroups: true,
1767
+ children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1768
+ name: "frame-base",
1769
+ material: frameMaterial,
1770
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1771
+ args: [sidesFrameWidthM, totalFrameHeightM, frameDepthM]
1772
+ })
1773
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1774
+ name: "cut-exterior",
1775
+ material: frameMaterial,
1776
+ position: [notchposition, 0, 0],
1777
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1778
+ args: [notchWidthM, totalFrameHeightM + 0.01, notchDepthM]
1779
+ })
1780
+ })]
1781
+ })
1782
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1783
+ castShadow: true,
1784
+ position: [0, totalOpeningHeightM / 2 - doorStopWidthM / 2, doorStopPositionZ],
1785
+ material: doorStopMaterial,
1772
1786
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1773
- args: [doorWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1787
+ args: [doorWidthM, doorStopWidthM, doorStopDepthM]
1774
1788
  })
1775
1789
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1776
1790
  castShadow: true,
1777
- position: [leftGasketXPosition - 0.005, -0.005, gasketZPosition],
1778
- material: gasketMaterial,
1791
+ position: [-doorWidthM / 2 + doorStopWidthM / 2, 0, doorStopPositionZ],
1792
+ material: doorStopMaterial,
1779
1793
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1780
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1794
+ args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1781
1795
  })
1782
1796
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1783
1797
  castShadow: true,
1784
- position: [rightGasketXPosition + 0.005, -0.005, gasketZPosition],
1785
- material: gasketMaterial,
1798
+ position: [doorWidthM / 2 - doorStopWidthM / 2, 0, doorStopPositionZ],
1799
+ material: doorStopMaterial,
1786
1800
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1787
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1801
+ args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1788
1802
  })
1789
- })]
1790
- }), (frameType === "WDGF_WDG100" || frameType === "WF_100" || frameType === "WF_FLI") && /*#__PURE__*/jsxRuntime.jsxs("group", {
1791
- children: [/*#__PURE__*/jsxRuntime.jsxs("group", {
1792
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1793
- castShadow: true,
1794
- position: [0, totalOpeningHeightM / 2 - secondDoorStopWidthM / 2, secondDoorStopPositionZ],
1795
- material: doorStopMaterial,
1796
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1797
- args: [doorWidthM, secondDoorStopWidthM, secondDoorStopDepthM]
1798
- })
1799
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1800
- castShadow: true,
1801
- position: [-doorWidthM / 2 + secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1802
- material: doorStopMaterial,
1803
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1804
- args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1805
- })
1806
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1807
- castShadow: true,
1808
- position: [doorWidthM / 2 - secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1809
- material: doorStopMaterial,
1810
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1811
- args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1812
- })
1813
- })]
1814
- }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1803
+ }), frameType !== "WF_FLI" && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1815
1804
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1816
1805
  castShadow: true,
1817
- position: [0, secondTopGasketYPosition - 0.005, secondGasketZPosition],
1806
+ position: [0, topGasketYPosition, gasketZPosition],
1818
1807
  material: gasketMaterial,
1819
1808
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1820
1809
  args: [doorWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1821
1810
  })
1822
1811
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1823
1812
  castShadow: true,
1824
- position: [secondLeftGasketXPosition - 0.005, -0.01, secondGasketZPosition],
1813
+ position: [leftGasketXPosition - 0.005, -0.005, gasketZPosition],
1825
1814
  material: gasketMaterial,
1826
1815
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1827
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.04, gasketDepthM]
1816
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1828
1817
  })
1829
1818
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1830
1819
  castShadow: true,
1831
- position: [secondRightGasketXPosition + 0.005, -0.01, secondGasketZPosition],
1820
+ position: [rightGasketXPosition + 0.005, -0.005, gasketZPosition],
1832
1821
  material: gasketMaterial,
1833
1822
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1834
- args: [gasketWidthM + 0.004, totalOpeningHeightM - 0.04, gasketDepthM]
1823
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1835
1824
  })
1836
1825
  })]
1837
- }), glassVisible && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1826
+ }), (frameType === "WDGF_WDG100" || frameType === "WF_100" || frameType === "WF_FLI") && /*#__PURE__*/jsxRuntime.jsxs("group", {
1838
1827
  children: [/*#__PURE__*/jsxRuntime.jsxs("group", {
1839
- children: [(frameType === "WDGF_WDG100" || frameType === "WF_100") && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1840
- castShadow: true,
1841
- position: [0, topFrameCenterY - secondDoorStopWidthM / 2, leftGlass_Z],
1842
- material: glassInfillMaterial,
1843
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1844
- args: [doorWidthM - 2 * secondDoorStopWidthM, topFrameWidthM + secondDoorStopWidthM, GlassPanelDepthM]
1845
- })
1846
- }), frameType !== "WDGF_WDG100" && frameType !== "WF_100" && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1828
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1847
1829
  castShadow: true,
1848
- position: [0, topFrameCenterY, leftGlass_Z],
1849
- material: glassInfillMaterial,
1830
+ position: [0, totalOpeningHeightM / 2 - secondDoorStopWidthM / 2, secondDoorStopPositionZ],
1831
+ material: doorStopMaterial,
1850
1832
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1851
- args: [doorWidthM - 2 * secondDoorStopWidthM, topFrameWidthM, GlassPanelDepthM]
1833
+ args: [doorWidthM, secondDoorStopWidthM, secondDoorStopDepthM]
1852
1834
  })
1853
1835
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1854
1836
  castShadow: true,
1855
- position: [-doorWidthM / 2 - sidesFrameWidthM / 2 + secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1856
- material: glassInfillMaterial,
1837
+ position: [-doorWidthM / 2 + secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1838
+ material: doorStopMaterial,
1857
1839
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1858
- args: [sidesFrameWidthM + secondDoorStopWidthM, totalFrameHeightM, GlassPanelDepthM]
1840
+ args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1859
1841
  })
1860
1842
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1861
1843
  castShadow: true,
1862
- position: [doorWidthM / 2 + sidesFrameWidthM / 2 - secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1863
- material: glassInfillMaterial,
1844
+ position: [doorWidthM / 2 - secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1845
+ material: doorStopMaterial,
1864
1846
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1865
- args: [sidesFrameWidthM + secondDoorStopWidthM, totalFrameHeightM, GlassPanelDepthM]
1847
+ args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1866
1848
  })
1867
1849
  })]
1868
1850
  }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1869
1851
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1870
1852
  castShadow: true,
1871
- position: [0, topFrameCenterY, rightGlass_Z],
1872
- material: glassInfillMaterial,
1853
+ position: [0, secondTopGasketYPosition - 0.005, secondGasketZPosition],
1854
+ material: gasketMaterial,
1873
1855
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1874
- args: [doorWidthM, topFrameWidthM, GlassPanelDepthM]
1856
+ args: [doorWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1875
1857
  })
1876
1858
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1877
1859
  castShadow: true,
1878
- position: [-doorWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1879
- material: glassInfillMaterial,
1860
+ position: [secondLeftGasketXPosition - 0.005, -0.01, secondGasketZPosition],
1861
+ material: gasketMaterial,
1880
1862
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1881
- args: [sidesFrameWidthM, totalFrameHeightM, GlassPanelDepthM]
1863
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.04, gasketDepthM]
1882
1864
  })
1883
1865
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1884
1866
  castShadow: true,
1885
- position: [doorWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1886
- material: glassInfillMaterial,
1867
+ position: [secondRightGasketXPosition + 0.005, -0.01, secondGasketZPosition],
1868
+ material: gasketMaterial,
1887
1869
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1888
- args: [sidesFrameWidthM, totalFrameHeightM, GlassPanelDepthM]
1870
+ args: [gasketWidthM + 0.004, totalOpeningHeightM - 0.04, gasketDepthM]
1889
1871
  })
1890
1872
  })]
1873
+ }), glassVisible && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1874
+ children: [/*#__PURE__*/jsxRuntime.jsxs("group", {
1875
+ children: [(frameType === "WDGF_WDG100" || frameType === "WF_100") && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1876
+ castShadow: true,
1877
+ position: [0, topFrameCenterY - secondDoorStopWidthM / 2, leftGlass_Z],
1878
+ material: glassInfillMaterial,
1879
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1880
+ args: [doorWidthM - 2 * secondDoorStopWidthM, topFrameWidthM + secondDoorStopWidthM, GlassPanelDepthM]
1881
+ })
1882
+ }), frameType !== "WDGF_WDG100" && frameType !== "WF_100" && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1883
+ castShadow: true,
1884
+ position: [0, topFrameCenterY, leftGlass_Z],
1885
+ material: glassInfillMaterial,
1886
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1887
+ args: [doorWidthM - 2 * secondDoorStopWidthM, topFrameWidthM, GlassPanelDepthM]
1888
+ })
1889
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1890
+ castShadow: true,
1891
+ position: [-doorWidthM / 2 - sidesFrameWidthM / 2 + secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1892
+ material: glassInfillMaterial,
1893
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1894
+ args: [sidesFrameWidthM + secondDoorStopWidthM, totalFrameHeightM, GlassPanelDepthM]
1895
+ })
1896
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1897
+ castShadow: true,
1898
+ position: [doorWidthM / 2 + sidesFrameWidthM / 2 - secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1899
+ material: glassInfillMaterial,
1900
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1901
+ args: [sidesFrameWidthM + secondDoorStopWidthM, totalFrameHeightM, GlassPanelDepthM]
1902
+ })
1903
+ })]
1904
+ }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1905
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1906
+ castShadow: true,
1907
+ position: [0, topFrameCenterY, rightGlass_Z],
1908
+ material: glassInfillMaterial,
1909
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1910
+ args: [doorWidthM, topFrameWidthM, GlassPanelDepthM]
1911
+ })
1912
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1913
+ castShadow: true,
1914
+ position: [-doorWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1915
+ material: glassInfillMaterial,
1916
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1917
+ args: [sidesFrameWidthM, totalFrameHeightM, GlassPanelDepthM]
1918
+ })
1919
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1920
+ castShadow: true,
1921
+ position: [doorWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1922
+ material: glassInfillMaterial,
1923
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1924
+ args: [sidesFrameWidthM, totalFrameHeightM, GlassPanelDepthM]
1925
+ })
1926
+ })]
1927
+ })]
1891
1928
  })]
1892
1929
  })]
1893
- })]
1894
- }), interiorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1895
- position: [0, interiorFanlightYPosition, doorCenterZ],
1896
- castShadow: true,
1897
- material: interiorFanlightMaterial,
1898
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1899
- args: [doorWidthM, interiorFanlightHeightM, doorDepthM]
1900
- })
1901
- }), isStandardHingeVisible && standardHingeYPositions.map((y, index) => /*#__PURE__*/jsxRuntime.jsxs("group", {
1902
- position: [hingeSideX, doorYPosition + y, hingeZ],
1903
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1904
- material: hingeBodyMaterial,
1905
- position: [0, separatorHeightM / 2 + barrelPartHeight / 2, 0],
1906
- castShadow: true,
1907
- children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
1908
- args: [hingeRadiusM, hingeRadiusM, barrelPartHeight, 32]
1909
- })
1910
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1911
- material: hingeAccentMaterial,
1912
- position: [0, separatorHeightM / 2 + barrelPartHeight + capHeightM / 2, 0],
1930
+ }), interiorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1931
+ position: [0, interiorFanlightYPosition, doorCenterZ],
1913
1932
  castShadow: true,
1914
- children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
1915
- args: [hingeRadiusM, hingeRadiusM, capHeightM, 32]
1933
+ material: interiorFanlightMaterial,
1934
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1935
+ args: [doorWidthM, interiorFanlightHeightM, doorDepthM]
1916
1936
  })
1917
- })]
1918
- }, "frame-hinge-".concat(index))), /*#__PURE__*/jsxRuntime.jsxs(three.a.group, {
1919
- position: [hingeSideX, doorYPosition, hingeZ],
1920
- rotation: rotation.to((x, y, z) => [x, y, z]),
1921
- onClick: handleClick,
1922
- onPointerOver: () => document.body.style.cursor = "pointer",
1923
- onPointerOut: () => document.body.style.cursor = "auto",
1924
- children: [isStandardHingeVisible && standardHingeYPositions.map((y, index) => /*#__PURE__*/jsxRuntime.jsxs("group", {
1925
- position: [0, y, 0],
1937
+ }), isStandardHingeVisible && standardHingeYPositions.map((y, index) => /*#__PURE__*/jsxRuntime.jsxs("group", {
1938
+ position: [hingeSideX, doorYPosition + y, hingeZ],
1926
1939
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1927
1940
  material: hingeBodyMaterial,
1928
- position: [0, -separatorHeightM / 2 - barrelPartHeight / 2, 0],
1941
+ position: [0, separatorHeightM / 2 + barrelPartHeight / 2, 0],
1929
1942
  castShadow: true,
1930
1943
  children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
1931
1944
  args: [hingeRadiusM, hingeRadiusM, barrelPartHeight, 32]
1932
1945
  })
1933
1946
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1934
1947
  material: hingeAccentMaterial,
1935
- position: [0, -separatorHeightM / 2 - barrelPartHeight - capHeightM / 2, 0],
1948
+ position: [0, separatorHeightM / 2 + barrelPartHeight + capHeightM / 2, 0],
1936
1949
  castShadow: true,
1937
1950
  children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
1938
1951
  args: [hingeRadiusM, hingeRadiusM, capHeightM, 32]
1939
1952
  })
1940
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1941
- material: hingeAccentMaterial,
1942
- position: [0, 0, 0],
1943
- castShadow: true,
1944
- children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
1945
- args: [hingeRadiusM, hingeRadiusM, separatorHeightM, 32]
1946
- })
1947
1953
  })]
1948
- }, "door-hinge-".concat(index))), isGlassDoor && isFrameVisible && glassHingeYPositions.map((y, index) => /*#__PURE__*/jsxRuntime.jsx(GlassHinge, {
1949
- position: [0, y, doorOffsetZ],
1950
- pivot: doorPivot,
1951
- frameSideWidth: sidesFrameWidthM,
1952
- doorDepthM: doorDepthM,
1953
- material: hingeBodyMaterial,
1954
- gasketMaterial: gasketMaterial
1955
- }, "glass-hinge-".concat(index))), /*#__PURE__*/jsxRuntime.jsxs("group", {
1956
- position: [-hingeSideX, 0, doorOffsetZ],
1957
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1958
- castShadow: true,
1959
- children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1960
- useGroups: true,
1961
- children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1962
- name: "door-base",
1963
- material: doorMaterial,
1964
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1965
- args: [doorWidthM, mainDoorHeightM, doorDepthM]
1966
- })
1967
- }), /*#__PURE__*/jsxRuntime.jsx(DoorStopCuts, {
1968
- visible: frameType === "WDGF_WDG100" || frameType === "WF_100" || frameType === "WF_FLI",
1969
- width: doorWidthM,
1970
- height: totalOpeningHeightM,
1971
- stopWidth: doorStopWidthM,
1972
- stopDepth: doorStopDepthM,
1973
- stopPositionZ: doorStopPositionZ,
1974
- centerZ: doorCenterZ,
1975
- glassDepthOffset: GlassPanelDepthM / 2,
1976
- material: doorMaterial,
1977
- setName: "1"
1978
- }), /*#__PURE__*/jsxRuntime.jsx(DoorStopCuts, {
1979
- visible: frameType === "WDGF_WDG100" || frameType === "WF_100" || frameType === "WF_FLI",
1980
- width: doorWidthM,
1981
- height: totalOpeningHeightM,
1982
- stopWidth: secondDoorStopWidthM,
1983
- stopDepth: secondDoorStopDepthM,
1984
- stopPositionZ: secondDoorStopPositionZ,
1985
- centerZ: doorCenterZ,
1986
- glassDepthOffset: GlassPanelDepthM / 2,
1987
- material: doorMaterial,
1988
- setName: "2"
1989
- }), glassVisible && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1990
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1991
- position: [0, 0, frontGlassOffsetZ],
1992
- castShadow: true,
1993
- material: glassInfillMaterial,
1994
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1995
- args: [doorWidthM, mainDoorHeightM, GlassPanelDepthM]
1996
- })
1997
- }), frameType !== "WDGF_WDG100" && frameType !== "WF_100" && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1998
- position: [0, 0, backGlassOffsetZ],
1999
- castShadow: true,
2000
- material: glassInfillMaterial,
1954
+ }, "frame-hinge-".concat(index))), /*#__PURE__*/jsxRuntime.jsxs(three.a.group, {
1955
+ position: [hingeSideX, doorYPosition, hingeZ],
1956
+ rotation: rotation.to((x, y, z) => [x, y, z]),
1957
+ onClick: handleClick,
1958
+ onPointerOver: () => document.body.style.cursor = "pointer",
1959
+ onPointerOut: () => document.body.style.cursor = "auto",
1960
+ children: [isStandardHingeVisible && standardHingeYPositions.map((y, index) => /*#__PURE__*/jsxRuntime.jsxs("group", {
1961
+ position: [0, y, 0],
1962
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1963
+ material: hingeBodyMaterial,
1964
+ position: [0, -separatorHeightM / 2 - barrelPartHeight / 2, 0],
1965
+ castShadow: true,
1966
+ children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
1967
+ args: [hingeRadiusM, hingeRadiusM, barrelPartHeight, 32]
1968
+ })
1969
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1970
+ material: hingeAccentMaterial,
1971
+ position: [0, -separatorHeightM / 2 - barrelPartHeight - capHeightM / 2, 0],
1972
+ castShadow: true,
1973
+ children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
1974
+ args: [hingeRadiusM, hingeRadiusM, capHeightM, 32]
1975
+ })
1976
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1977
+ material: hingeAccentMaterial,
1978
+ position: [0, 0, 0],
1979
+ castShadow: true,
1980
+ children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
1981
+ args: [hingeRadiusM, hingeRadiusM, separatorHeightM, 32]
1982
+ })
1983
+ })]
1984
+ }, "door-hinge-".concat(index))), isGlassDoor && isFrameVisible && glassHingeYPositions.map((y, index) => /*#__PURE__*/jsxRuntime.jsx(GlassHinge, {
1985
+ position: [0, y, doorOffsetZ],
1986
+ pivot: doorPivot,
1987
+ frameSideWidth: sidesFrameWidthM,
1988
+ doorDepthM: doorDepthM,
1989
+ material: hingeBodyMaterial,
1990
+ gasketMaterial: gasketMaterial
1991
+ }, "glass-hinge-".concat(index))), /*#__PURE__*/jsxRuntime.jsxs("group", {
1992
+ position: [-hingeSideX, 0, doorOffsetZ],
1993
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1994
+ castShadow: true,
1995
+ children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1996
+ useGroups: true,
1997
+ children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1998
+ name: "door-base",
1999
+ material: doorMaterial,
2001
2000
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
2002
- args: [doorWidthM, mainDoorHeightM, GlassPanelDepthM]
2001
+ args: [doorWidthM, mainDoorHeightM, doorDepthM]
2003
2002
  })
2004
- }), (frameType === "WDGF_WDG100" || frameType === "WF_100") && /*#__PURE__*/jsxRuntime.jsx("mesh", {
2005
- position: [0, -secondDoorStopWidthM / 2, backGlassOffsetZ],
2006
- castShadow: true,
2007
- material: glassInfillMaterial,
2003
+ }), /*#__PURE__*/jsxRuntime.jsx(DoorStopCuts, {
2004
+ visible: frameType === "WDGF_WDG100" || frameType === "WF_100" || frameType === "WF_FLI",
2005
+ width: doorWidthM,
2006
+ height: totalOpeningHeightM,
2007
+ stopWidth: doorStopWidthM,
2008
+ stopDepth: doorStopDepthM,
2009
+ stopPositionZ: doorStopPositionZ,
2010
+ centerZ: doorCenterZ,
2011
+ glassDepthOffset: GlassPanelDepthM / 2,
2012
+ material: doorMaterial,
2013
+ setName: "1"
2014
+ }), /*#__PURE__*/jsxRuntime.jsx(DoorStopCuts, {
2015
+ visible: frameType === "WDGF_WDG100" || frameType === "WF_100" || frameType === "WF_FLI",
2016
+ width: doorWidthM,
2017
+ height: totalOpeningHeightM,
2018
+ stopWidth: secondDoorStopWidthM,
2019
+ stopDepth: secondDoorStopDepthM,
2020
+ stopPositionZ: secondDoorStopPositionZ,
2021
+ centerZ: doorCenterZ,
2022
+ glassDepthOffset: GlassPanelDepthM / 2,
2023
+ material: doorMaterial,
2024
+ setName: "2"
2025
+ }), glassVisible && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2026
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
2027
+ position: [0, 0, frontGlassOffsetZ],
2028
+ castShadow: true,
2029
+ material: glassInfillMaterial,
2030
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
2031
+ args: [doorWidthM, mainDoorHeightM, GlassPanelDepthM]
2032
+ })
2033
+ }), frameType !== "WDGF_WDG100" && frameType !== "WF_100" && /*#__PURE__*/jsxRuntime.jsx("mesh", {
2034
+ position: [0, 0, backGlassOffsetZ],
2035
+ castShadow: true,
2036
+ material: glassInfillMaterial,
2037
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
2038
+ args: [doorWidthM, mainDoorHeightM, GlassPanelDepthM]
2039
+ })
2040
+ }), (frameType === "WDGF_WDG100" || frameType === "WF_100") && /*#__PURE__*/jsxRuntime.jsx("mesh", {
2041
+ position: [0, -secondDoorStopWidthM / 2, backGlassOffsetZ],
2042
+ castShadow: true,
2043
+ material: glassInfillMaterial,
2044
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
2045
+ args: [doorWidthM - 2 * secondDoorStopWidthM, mainDoorHeightM - secondDoorStopWidthM, GlassPanelDepthM]
2046
+ })
2047
+ })]
2048
+ }), occulus.visible && occulusWidthM > 0 && occulusHeightM > 0 && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
2049
+ material: placeholderMaterial,
2050
+ position: [occulusPositionXM, occulusPositionYM, 0],
2008
2051
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
2009
- args: [doorWidthM - 2 * secondDoorStopWidthM, mainDoorHeightM - secondDoorStopWidthM, GlassPanelDepthM]
2052
+ args: [occulusWidthM, occulusHeightM, doorDepthM + 0.01]
2010
2053
  })
2011
2054
  })]
2012
- }), occulus.visible && occulusWidthM > 0 && occulusHeightM > 0 && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
2013
- material: placeholderMaterial,
2014
- position: [occulusPositionXM, occulusPositionYM, 0],
2015
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
2016
- args: [occulusWidthM, occulusHeightM, doorDepthM + 0.01]
2017
- })
2018
- })]
2019
- })
2020
- }), occulus.visible && occulus.infillVisible && occulusWidthM > 0 && occulusHeightM > 0 && /*#__PURE__*/jsxRuntime.jsx("mesh", {
2021
- position: [occulusPositionXM, occulusPositionYM, 0],
2022
- castShadow: true,
2023
- material: occulusInfillMaterial,
2024
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
2025
- args: [occulusWidthM, occulusHeightM, occulusInfillDepthM]
2026
- })
2027
- }), /*#__PURE__*/jsxRuntime.jsx(DoorHandle, {
2028
- bodyType: bodyType,
2029
- handleX: handleX,
2030
- handleHeightM: handleHeightM,
2031
- doorDepthM: doorDepthM,
2032
- doorPivot: doorPivot
2055
+ })
2056
+ }), occulus.visible && occulus.infillVisible && occulusWidthM > 0 && occulusHeightM > 0 && /*#__PURE__*/jsxRuntime.jsx("mesh", {
2057
+ position: [occulusPositionXM, occulusPositionYM, 0],
2058
+ castShadow: true,
2059
+ material: occulusInfillMaterial,
2060
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
2061
+ args: [occulusWidthM, occulusHeightM, occulusInfillDepthM]
2062
+ })
2063
+ }), /*#__PURE__*/jsxRuntime.jsx(DoorHandle, {
2064
+ bodyType: bodyType,
2065
+ handleX: handleX,
2066
+ handleHeightM: handleHeightM,
2067
+ doorDepthM: doorDepthM,
2068
+ doorPivot: doorPivot
2069
+ })]
2033
2070
  })]
2034
2071
  })]
2035
- }), isPlaneVisible && /*#__PURE__*/jsxRuntime.jsxs("mesh", {
2036
- receiveShadow: true,
2037
- rotation: [-Math.PI / 2, 0, 0],
2038
- position: [0, -totalOpeningHeightM / 2 - yCenteringOffset - 0.01, 0],
2039
- children: [/*#__PURE__*/jsxRuntime.jsx("planeGeometry", {
2040
- args: [10, 10]
2041
- }), /*#__PURE__*/jsxRuntime.jsx("meshStandardMaterial", {
2042
- color: "#f9f9f9",
2043
- side: THREE__namespace.DoubleSide
2044
- })]
2045
- })]
2072
+ })
2046
2073
  });
2047
2074
  }
2048
2075