door_models 5.3.9 → 5.4.0

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
@@ -102,7 +102,8 @@ const ConfiguratorProvider = _ref => {
102
102
  let {
103
103
  children,
104
104
  initialIs2D = false,
105
- initialMaterials = {}
105
+ initialMaterials = {},
106
+ totalDepth
106
107
  } = _ref;
107
108
  const [materials, setMaterials] = React.useState(initialMaterials);
108
109
  const [is2D, setIs2D] = React.useState(initialIs2D);
@@ -599,13 +600,35 @@ const ConfiguratorProvider = _ref => {
599
600
  };
600
601
  break;
601
602
  }
603
+ const baseTotalDepth = 103; // Define the reference depth for scaling (103mm is a common default)
604
+ const scaleFactor = totalDepth !== undefined && baseTotalDepth > 0 ? totalDepth / baseTotalDepth : 1;
605
+
606
+ // Apply the scaling factor to all depth-related settings
607
+ if (scaleFactor !== 1) {
608
+ if (newSettings.frameDepth !== undefined) newSettings.frameDepth *= scaleFactor;
609
+ if (newSettings.doorDepth !== undefined) newSettings.doorDepth *= scaleFactor;
610
+ if (newSettings.doorStopDepth !== undefined) newSettings.doorStopDepth *= scaleFactor;
611
+ if (newSettings.secondDoorStopDepth !== undefined) newSettings.secondDoorStopDepth *= scaleFactor;
612
+ if (newSettings.gasketDepth !== undefined) newSettings.gasketDepth *= scaleFactor;
613
+
614
+ // Handle string-based depths like "40mm" for notchDepth
615
+ if (typeof newSettings.notchDepth === "string") {
616
+ const num = parseInt(newSettings.notchDepth, 10);
617
+ if (!isNaN(num)) {
618
+ newSettings.notchDepth = "".concat(num * scaleFactor, "mm");
619
+ }
620
+ }
621
+ }
602
622
  const isMxCaf = frameType.startsWith("MXCAF");
603
623
  setFrontCoverPanel(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
604
- visible: isMxCaf
624
+ visible: isMxCaf,
625
+ depth: 12 * scaleFactor
605
626
  }));
606
627
  setBackCoverPanel(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
607
- visible: isMxCaf
628
+ visible: isMxCaf,
629
+ depth: 12 * scaleFactor
608
630
  }));
631
+ setGlassDepth(8 * scaleFactor);
609
632
  const {
610
633
  doorDepth
611
634
  } = newSettings,
@@ -616,7 +639,7 @@ const ConfiguratorProvider = _ref => {
616
639
  theDoorDepth: doorDepth
617
640
  }));
618
641
  }
619
- }, [frameType]);
642
+ }, [frameType, totalDepth]);
620
643
 
621
644
  // --- Exterior Fanlight Logic ---
622
645
  React.useEffect(() => {
@@ -824,14 +847,15 @@ const buildMaterial = (prop, textures) => {
824
847
  const sourceValue = typeof prop === "string" ? prop : prop.value;
825
848
  const opacity = typeof prop === "object" ? prop.opacity : 1;
826
849
  const params = {
827
- roughness: 0.8
850
+ roughness: 0.8,
851
+ side: THREE__namespace.DoubleSide
828
852
  };
829
853
  if (isHexColor(sourceValue)) {
830
854
  params.color = sourceValue;
831
855
  } else if (textures && textures[sourceValue]) {
832
856
  params.map = textures[sourceValue];
833
857
  } else {
834
- params.color = "#cccccc";
858
+ params.color = "yellow";
835
859
  }
836
860
  if (opacity !== undefined && opacity < 1) {
837
861
  params.transparent = true;
@@ -1611,296 +1635,292 @@ function DoorModels(_ref7) {
1611
1635
  })
1612
1636
  });
1613
1637
  }
1614
- return (
1615
- /*#__PURE__*/
1616
- // CHANGE START: Wrap the entire component in a parent group.
1617
- jsxRuntime.jsxs("group", {
1618
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1619
- visible: false,
1638
+ return /*#__PURE__*/jsxRuntime.jsxs("group", {
1639
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1640
+ visible: false,
1641
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1642
+ args: [totalWidthM, totalHeightM, frameDepthM]
1643
+ })
1644
+ }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1645
+ "position-y": yCenteringOffset + pivotNewPosition,
1646
+ children: [frontCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1647
+ "position-z": frontArchitraveZ,
1648
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1649
+ position: [0, topArchitraveY, 0],
1650
+ castShadow: true,
1651
+ material: allMaterials.frontCoverPanelMaterial,
1652
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1653
+ args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1654
+ })
1655
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1656
+ position: [leftArchitraveX, 0, 0],
1657
+ castShadow: true,
1658
+ material: allMaterials.frontCoverPanelMaterial,
1659
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1660
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1661
+ })
1662
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1663
+ position: [rightArchitraveX, 0, 0],
1664
+ castShadow: true,
1665
+ material: allMaterials.frontCoverPanelMaterial,
1666
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1667
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1668
+ })
1669
+ })]
1670
+ }), backCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1671
+ "position-z": backArchitraveZ,
1672
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1673
+ position: [0, topArchitraveY, 0],
1674
+ castShadow: true,
1675
+ material: allMaterials.backCoverPanelMaterial,
1676
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1677
+ args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1678
+ })
1679
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1680
+ position: [leftArchitraveX, 0, 0],
1681
+ castShadow: true,
1682
+ material: allMaterials.backCoverPanelMaterial,
1683
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1684
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1685
+ })
1686
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1687
+ position: [rightArchitraveX, 0, 0],
1688
+ castShadow: true,
1689
+ material: allMaterials.backCoverPanelMaterial,
1690
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1691
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1692
+ })
1693
+ })]
1694
+ }), exteriorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1695
+ position: [0, exteriorFanlightYPosition, 0],
1696
+ castShadow: true,
1697
+ material: allMaterials.exteriorFanlightMaterial,
1620
1698
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1621
- args: [totalWidthM, totalHeightM, frameDepthM]
1699
+ args: [totalOpeningWidthM + sidesFrameWidthM * 2, exteriorFanlightHeightM, exteriorFanlightDepthM]
1622
1700
  })
1623
- }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1624
- "position-y": yCenteringOffset + pivotNewPosition,
1625
- children: [frontCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1626
- "position-z": frontArchitraveZ,
1627
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1628
- position: [0, topArchitraveY, 0],
1629
- castShadow: true,
1630
- material: allMaterials.frontCoverPanelMaterial,
1631
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1632
- args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1633
- })
1634
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1635
- position: [leftArchitraveX, 0, 0],
1636
- castShadow: true,
1637
- material: allMaterials.frontCoverPanelMaterial,
1638
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1639
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1640
- })
1641
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1642
- position: [rightArchitraveX, 0, 0],
1643
- castShadow: true,
1644
- material: allMaterials.frontCoverPanelMaterial,
1645
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1646
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1647
- })
1648
- })]
1649
- }), backCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1650
- "position-z": backArchitraveZ,
1651
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1652
- position: [0, topArchitraveY, 0],
1653
- castShadow: true,
1654
- material: allMaterials.backCoverPanelMaterial,
1655
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1656
- args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1657
- })
1658
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1659
- position: [leftArchitraveX, 0, 0],
1660
- castShadow: true,
1661
- material: allMaterials.backCoverPanelMaterial,
1662
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1663
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1664
- })
1665
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1666
- position: [rightArchitraveX, 0, 0],
1667
- castShadow: true,
1668
- material: allMaterials.backCoverPanelMaterial,
1669
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1670
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1671
- })
1672
- })]
1673
- }), exteriorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1674
- position: [0, exteriorFanlightYPosition, 0],
1701
+ }), isFrameVisible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1702
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1703
+ castShadow: true,
1704
+ position: [0, topFrameCenterY, 0],
1705
+ children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1706
+ useGroups: true,
1707
+ children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1708
+ name: "frame-base",
1709
+ material: allMaterials.frameMaterial,
1710
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1711
+ args: [totalOpeningWidthM, topFrameWidthM, frameDepthM]
1712
+ })
1713
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1714
+ name: "cut-exterior",
1715
+ material: allMaterials.frameMaterial,
1716
+ position: [0, notchposition, 0],
1717
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1718
+ args: [totalOpeningWidthM + 0.01, notchWidthM, notchDepthM]
1719
+ })
1720
+ })]
1721
+ })
1722
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1723
+ castShadow: true,
1724
+ position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, 0],
1725
+ children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1726
+ useGroups: true,
1727
+ children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1728
+ name: "frame-base",
1729
+ material: allMaterials.frameMaterial,
1730
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1731
+ args: [sidesFrameWidthM, totalOpeningHeightM + 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: allMaterials.frameMaterial,
1736
+ position: [-notchposition, 0, 0],
1737
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1738
+ args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1739
+ })
1740
+ })]
1741
+ })
1742
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1743
+ castShadow: true,
1744
+ position: [totalOpeningWidthM / 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: allMaterials.frameMaterial,
1750
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1751
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, frameDepthM]
1752
+ })
1753
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1754
+ name: "cut-exterior",
1755
+ material: allMaterials.frameMaterial,
1756
+ position: [notchposition, 0, 0],
1757
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1758
+ args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1759
+ })
1760
+ })]
1761
+ })
1762
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1763
+ castShadow: true,
1764
+ position: [0, totalOpeningHeightM / 2 - doorStopWidthM / 2, doorStopPositionZ],
1765
+ material: allMaterials.doorStopMaterial,
1766
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1767
+ args: [totalOpeningWidthM, doorStopWidthM, doorStopDepthM]
1768
+ })
1769
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1675
1770
  castShadow: true,
1676
- material: allMaterials.exteriorFanlightMaterial,
1771
+ position: [-totalOpeningWidthM / 2 + doorStopWidthM / 2, 0, doorStopPositionZ],
1772
+ material: allMaterials.doorStopMaterial,
1677
1773
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1678
- args: [totalOpeningWidthM + sidesFrameWidthM * 2, exteriorFanlightHeightM, exteriorFanlightDepthM]
1774
+ args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1679
1775
  })
1680
- }), isFrameVisible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1776
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1777
+ castShadow: true,
1778
+ position: [totalOpeningWidthM / 2 - doorStopWidthM / 2, 0, doorStopPositionZ],
1779
+ material: allMaterials.doorStopMaterial,
1780
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1781
+ args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1782
+ })
1783
+ }), frameType !== "WF_FLI" && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1681
1784
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1682
1785
  castShadow: true,
1683
- position: [0, topFrameCenterY, 0],
1684
- children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1685
- useGroups: true,
1686
- children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1687
- name: "frame-base",
1688
- material: allMaterials.frameMaterial,
1689
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1690
- args: [totalOpeningWidthM, topFrameWidthM, frameDepthM]
1691
- })
1692
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1693
- name: "cut-exterior",
1694
- material: allMaterials.frameMaterial,
1695
- position: [0, notchposition, 0],
1696
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1697
- args: [totalOpeningWidthM + 0.01, notchWidthM, notchDepthM]
1698
- })
1699
- })]
1700
- })
1701
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1702
- castShadow: true,
1703
- position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, 0],
1704
- children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1705
- useGroups: true,
1706
- children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1707
- name: "frame-base",
1708
- material: allMaterials.frameMaterial,
1709
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1710
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, frameDepthM]
1711
- })
1712
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1713
- name: "cut-exterior",
1714
- material: allMaterials.frameMaterial,
1715
- position: [-notchposition, 0, 0],
1716
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1717
- args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1718
- })
1719
- })]
1720
- })
1721
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1722
- castShadow: true,
1723
- position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, 0],
1724
- children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1725
- useGroups: true,
1726
- children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1727
- name: "frame-base",
1728
- material: allMaterials.frameMaterial,
1729
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1730
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, frameDepthM]
1731
- })
1732
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1733
- name: "cut-exterior",
1734
- material: allMaterials.frameMaterial,
1735
- position: [notchposition, 0, 0],
1736
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1737
- args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1738
- })
1739
- })]
1740
- })
1741
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1742
- castShadow: true,
1743
- position: [0, totalOpeningHeightM / 2 - doorStopWidthM / 2, doorStopPositionZ],
1744
- material: allMaterials.doorStopMaterial,
1786
+ position: [0, topGasketYPosition, gasketZPosition],
1787
+ material: allMaterials.gasketMaterial,
1745
1788
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1746
- args: [totalOpeningWidthM, doorStopWidthM, doorStopDepthM]
1789
+ args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1747
1790
  })
1748
1791
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1749
1792
  castShadow: true,
1750
- position: [-totalOpeningWidthM / 2 + doorStopWidthM / 2, 0, doorStopPositionZ],
1751
- material: allMaterials.doorStopMaterial,
1793
+ position: [leftGasketXPosition - 0.005, -0.005, gasketZPosition],
1794
+ material: allMaterials.gasketMaterial,
1752
1795
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1753
- args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1796
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1754
1797
  })
1755
1798
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1756
1799
  castShadow: true,
1757
- position: [totalOpeningWidthM / 2 - doorStopWidthM / 2, 0, doorStopPositionZ],
1758
- material: allMaterials.doorStopMaterial,
1800
+ position: [rightGasketXPosition + 0.005, -0.005, gasketZPosition],
1801
+ material: allMaterials.gasketMaterial,
1759
1802
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1760
- args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1803
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1761
1804
  })
1762
- }), frameType !== "WF_FLI" && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1805
+ })]
1806
+ }), ["WDGF_WDG100", "WF_100", "WF_FLI"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsxs("group", {
1807
+ children: [/*#__PURE__*/jsxRuntime.jsxs("group", {
1808
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1809
+ castShadow: true,
1810
+ position: [0, totalOpeningHeightM / 2 - secondDoorStopWidthM / 2, secondDoorStopPositionZ],
1811
+ material: allMaterials.doorStopMaterial,
1812
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1813
+ args: [totalOpeningWidthM, secondDoorStopWidthM, secondDoorStopDepthM]
1814
+ })
1815
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1816
+ castShadow: true,
1817
+ position: [-totalOpeningWidthM / 2 + secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1818
+ material: allMaterials.doorStopMaterial,
1819
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1820
+ args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1821
+ })
1822
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1823
+ castShadow: true,
1824
+ position: [totalOpeningWidthM / 2 - secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1825
+ material: allMaterials.doorStopMaterial,
1826
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1827
+ args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1828
+ })
1829
+ })]
1830
+ }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1763
1831
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1764
1832
  castShadow: true,
1765
- position: [0, topGasketYPosition, gasketZPosition],
1833
+ position: [0, secondTopGasketYPosition - 0.005, secondGasketZPosition],
1766
1834
  material: allMaterials.gasketMaterial,
1767
1835
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1768
1836
  args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1769
1837
  })
1770
1838
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1771
1839
  castShadow: true,
1772
- position: [leftGasketXPosition - 0.005, -0.005, gasketZPosition],
1840
+ position: [secondLeftGasketXPosition - 0.005, -0.01, secondGasketZPosition],
1773
1841
  material: allMaterials.gasketMaterial,
1774
1842
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1775
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1843
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.04, gasketDepthM]
1776
1844
  })
1777
1845
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1778
1846
  castShadow: true,
1779
- position: [rightGasketXPosition + 0.005, -0.005, gasketZPosition],
1847
+ position: [secondRightGasketXPosition + 0.005, -0.01, secondGasketZPosition],
1780
1848
  material: allMaterials.gasketMaterial,
1781
1849
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1782
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1850
+ args: [gasketWidthM + 0.004, totalOpeningHeightM - 0.04, gasketDepthM]
1783
1851
  })
1784
1852
  })]
1785
- }), ["WDGF_WDG100", "WF_100", "WF_FLI"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsxs("group", {
1853
+ }), glassVisible && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1786
1854
  children: [/*#__PURE__*/jsxRuntime.jsxs("group", {
1787
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1855
+ children: [["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1856
+ castShadow: true,
1857
+ position: [0, topFrameCenterY - secondDoorStopWidthM / 2, leftGlass_Z],
1858
+ material: allMaterials.glassInfillMaterial,
1859
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1860
+ args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM + secondDoorStopWidthM, GlassPanelDepthM]
1861
+ })
1862
+ }), !["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1788
1863
  castShadow: true,
1789
- position: [0, totalOpeningHeightM / 2 - secondDoorStopWidthM / 2, secondDoorStopPositionZ],
1790
- material: allMaterials.doorStopMaterial,
1864
+ position: [0, topFrameCenterY, leftGlass_Z],
1865
+ material: allMaterials.glassInfillMaterial,
1791
1866
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1792
- args: [totalOpeningWidthM, secondDoorStopWidthM, secondDoorStopDepthM]
1867
+ args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM, GlassPanelDepthM]
1793
1868
  })
1794
1869
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1795
1870
  castShadow: true,
1796
- position: [-totalOpeningWidthM / 2 + secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1797
- material: allMaterials.doorStopMaterial,
1871
+ position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2 + secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1872
+ material: allMaterials.glassInfillMaterial,
1798
1873
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1799
- args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1874
+ args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1800
1875
  })
1801
1876
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1802
1877
  castShadow: true,
1803
- position: [totalOpeningWidthM / 2 - secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1804
- material: allMaterials.doorStopMaterial,
1878
+ position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2 - secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1879
+ material: allMaterials.glassInfillMaterial,
1805
1880
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1806
- args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1881
+ args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1807
1882
  })
1808
1883
  })]
1809
1884
  }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1810
1885
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1811
1886
  castShadow: true,
1812
- position: [0, secondTopGasketYPosition - 0.005, secondGasketZPosition],
1813
- material: allMaterials.gasketMaterial,
1887
+ position: [0, topFrameCenterY, rightGlass_Z],
1888
+ material: allMaterials.glassInfillMaterial,
1814
1889
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1815
- args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1890
+ args: [totalOpeningWidthM, topFrameWidthM, GlassPanelDepthM]
1816
1891
  })
1817
1892
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1818
1893
  castShadow: true,
1819
- position: [secondLeftGasketXPosition - 0.005, -0.01, secondGasketZPosition],
1820
- material: allMaterials.gasketMaterial,
1894
+ position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1895
+ material: allMaterials.glassInfillMaterial,
1821
1896
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1822
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.04, gasketDepthM]
1897
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1823
1898
  })
1824
1899
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1825
1900
  castShadow: true,
1826
- position: [secondRightGasketXPosition + 0.005, -0.01, secondGasketZPosition],
1827
- material: allMaterials.gasketMaterial,
1901
+ position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1902
+ material: allMaterials.glassInfillMaterial,
1828
1903
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1829
- args: [gasketWidthM + 0.004, totalOpeningHeightM - 0.04, gasketDepthM]
1904
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1830
1905
  })
1831
1906
  })]
1832
- }), glassVisible && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1833
- children: [/*#__PURE__*/jsxRuntime.jsxs("group", {
1834
- children: [["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1835
- castShadow: true,
1836
- position: [0, topFrameCenterY - secondDoorStopWidthM / 2, leftGlass_Z],
1837
- material: allMaterials.glassInfillMaterial,
1838
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1839
- args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM + secondDoorStopWidthM, GlassPanelDepthM]
1840
- })
1841
- }), !["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1842
- castShadow: true,
1843
- position: [0, topFrameCenterY, leftGlass_Z],
1844
- material: allMaterials.glassInfillMaterial,
1845
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1846
- args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM, GlassPanelDepthM]
1847
- })
1848
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1849
- castShadow: true,
1850
- position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2 + secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1851
- material: allMaterials.glassInfillMaterial,
1852
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1853
- args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1854
- })
1855
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1856
- castShadow: true,
1857
- position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2 - secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1858
- material: allMaterials.glassInfillMaterial,
1859
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1860
- args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1861
- })
1862
- })]
1863
- }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1864
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1865
- castShadow: true,
1866
- position: [0, topFrameCenterY, rightGlass_Z],
1867
- material: allMaterials.glassInfillMaterial,
1868
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1869
- args: [totalOpeningWidthM, topFrameWidthM, GlassPanelDepthM]
1870
- })
1871
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1872
- castShadow: true,
1873
- position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1874
- material: allMaterials.glassInfillMaterial,
1875
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1876
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1877
- })
1878
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1879
- castShadow: true,
1880
- position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1881
- material: allMaterials.glassInfillMaterial,
1882
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1883
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1884
- })
1885
- })]
1886
- })]
1887
1907
  })]
1888
1908
  })]
1889
- }), interiorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1890
- position: [0, interiorFanlightYPosition, doorCenterZ],
1891
- castShadow: true,
1892
- material: allMaterials.interiorFanlightMaterial,
1893
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1894
- args: [totalOpeningWidthM, interiorFanlightHeightM, doorDepthM]
1895
- })
1896
- }), doorInstances.map(instance => /*#__PURE__*/jsxRuntime.jsx(DoorLeaf, {
1897
- pivot: instance.pivot,
1898
- xOffset: instance.x,
1899
- materials: allMaterials
1900
- }, instance.key))]
1901
- })]
1902
- }) // CHANGE END: Close the new parent group
1903
- );
1909
+ })]
1910
+ }), interiorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1911
+ position: [0, interiorFanlightYPosition, doorCenterZ],
1912
+ castShadow: true,
1913
+ material: allMaterials.interiorFanlightMaterial,
1914
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1915
+ args: [totalOpeningWidthM, interiorFanlightHeightM, doorDepthM]
1916
+ })
1917
+ }), doorInstances.map(instance => /*#__PURE__*/jsxRuntime.jsx(DoorLeaf, {
1918
+ pivot: instance.pivot,
1919
+ xOffset: instance.x,
1920
+ materials: allMaterials
1921
+ }, instance.key))]
1922
+ })]
1923
+ });
1904
1924
  }
1905
1925
 
1906
1926
  // {
@@ -2274,20 +2294,24 @@ const DoorConfigurator = _ref => {
2274
2294
  is2D = false,
2275
2295
  totalWidth,
2276
2296
  totalHeight,
2277
- frameDepth
2297
+ totalDepth // Destructure the new prop
2278
2298
  } = _ref;
2279
- return /*#__PURE__*/jsxRuntime.jsx(ConfiguratorProvider, {
2280
- initialIs2D: is2D,
2281
- children: /*#__PURE__*/jsxRuntime.jsx(DoorModels, {
2282
- doorName: doorName,
2283
- materials: materials,
2284
- doorPivot: doorPivot,
2285
- doorOpening: doorOpening,
2286
- totalWidth: totalWidth,
2287
- totalHeight: totalHeight,
2288
- frameDepth: frameDepth
2299
+ return (
2300
+ /*#__PURE__*/
2301
+ // Pass the totalDepth prop to the Provider
2302
+ jsxRuntime.jsx(ConfiguratorProvider, {
2303
+ initialIs2D: is2D,
2304
+ totalDepth: totalDepth,
2305
+ children: /*#__PURE__*/jsxRuntime.jsx(DoorModels, {
2306
+ doorName: doorName,
2307
+ materials: materials,
2308
+ doorPivot: doorPivot,
2309
+ doorOpening: doorOpening,
2310
+ totalWidth: totalWidth,
2311
+ totalHeight: totalHeight
2312
+ })
2289
2313
  })
2290
- });
2314
+ );
2291
2315
  };
2292
2316
 
2293
2317
  exports["default"] = DoorConfigurator;