door_models 5.3.9 → 5.4.1

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(() => {
@@ -726,61 +749,74 @@ const useConfigurator = () => {
726
749
 
727
750
  const availableMaterials = {
728
751
  black: new THREE__namespace.MeshStandardMaterial({
729
- color: "#000000"
752
+ color: "#000000",
753
+ side: THREE__namespace.DoubleSide
730
754
  }),
731
755
  metal: new THREE__namespace.MeshStandardMaterial({
732
756
  color: "#aaaaaa",
733
757
  metalness: 1.0,
734
- roughness: 0.4
758
+ roughness: 0.4,
759
+ side: THREE__namespace.DoubleSide
735
760
  }),
736
761
  darkgrey: new THREE__namespace.MeshStandardMaterial({
737
- color: "#5e5e5e"
762
+ color: "#5e5e5e",
763
+ side: THREE__namespace.DoubleSide
738
764
  }),
739
765
  grey: new THREE__namespace.MeshStandardMaterial({
740
- color: "#cccccc"
766
+ color: "#cccccc",
767
+ side: THREE__namespace.DoubleSide
741
768
  }),
742
769
  yellow: new THREE__namespace.MeshStandardMaterial({
743
- color: "#ffff00"
770
+ color: "#ffff00",
771
+ side: THREE__namespace.DoubleSide
744
772
  }),
745
773
  darkBrown: new THREE__namespace.MeshStandardMaterial({
746
- color: "#a0522d"
774
+ color: "#a0522d",
775
+ side: THREE__namespace.DoubleSide
747
776
  }),
748
777
  brown: new THREE__namespace.MeshStandardMaterial({
749
- color: "#d2b48c"
778
+ color: "#d2b48c",
779
+ side: THREE__namespace.DoubleSide
750
780
  }),
751
781
  glass: new THREE__namespace.MeshStandardMaterial({
752
782
  color: "#ffffff",
753
783
  roughness: 0.1,
754
784
  transparent: true,
755
- opacity: 0.7
785
+ opacity: 0.7,
786
+ side: THREE__namespace.DoubleSide
756
787
  }),
757
788
  aluminum: new THREE__namespace.MeshStandardMaterial({
758
789
  color: "#abb0aa",
759
790
  metalness: 0.8,
760
791
  roughness: 0.5,
761
- envMapIntensity: 1.2
792
+ envMapIntensity: 1.2,
793
+ side: THREE__namespace.DoubleSide
762
794
  }),
763
795
  aluminumBrighter: new THREE__namespace.MeshStandardMaterial({
764
796
  color: "#cdcdcd",
765
797
  metalness: 0.8,
766
798
  roughness: 0.5,
767
- envMapIntensity: 1.2
799
+ envMapIntensity: 1.2,
800
+ side: THREE__namespace.DoubleSide
768
801
  }),
769
802
  aluminumExtraBrighter: new THREE__namespace.MeshStandardMaterial({
770
803
  color: "#ececec",
771
804
  metalness: 0.8,
772
805
  roughness: 0.5,
773
- envMapIntensity: 1.2
806
+ envMapIntensity: 1.2,
807
+ side: THREE__namespace.DoubleSide
774
808
  }),
775
809
  silver: new THREE__namespace.MeshStandardMaterial({
776
810
  color: "#c0c0c0",
777
811
  metalness: 1.0,
778
- roughness: 0.2
812
+ roughness: 0.2,
813
+ side: THREE__namespace.DoubleSide
779
814
  }),
780
815
  gold: new THREE__namespace.MeshStandardMaterial({
781
816
  color: "#ffd700",
782
817
  metalness: 1.0,
783
- roughness: 0.3
818
+ roughness: 0.3,
819
+ side: THREE__namespace.DoubleSide
784
820
  }),
785
821
  diamond: new THREE__namespace.MeshStandardMaterial({
786
822
  color: "#e0f7fa",
@@ -788,20 +824,24 @@ const availableMaterials = {
788
824
  roughness: 0.05,
789
825
  transparent: true,
790
826
  opacity: 0.9,
791
- envMapIntensity: 1.5
827
+ envMapIntensity: 1.5,
828
+ side: THREE__namespace.DoubleSide
792
829
  }),
793
830
  test_material: new THREE__namespace.MeshStandardMaterial({
794
831
  color: "red",
795
- roughness: 0.1
832
+ roughness: 0.1,
833
+ side: THREE__namespace.DoubleSide
796
834
  })
797
835
  };
798
836
  new THREE__namespace.MeshStandardMaterial({
799
837
  color: "#cccccc",
800
- roughness: 0.8
838
+ roughness: 0.8,
839
+ side: THREE__namespace.DoubleSide
801
840
  });
802
841
  new THREE__namespace.MeshStandardMaterial({
803
842
  color: "#000",
804
- roughness: 0.8
843
+ roughness: 0.8,
844
+ side: THREE__namespace.DoubleSide
805
845
  });
806
846
 
807
847
  // Helper function to check for hex color codes
@@ -824,14 +864,15 @@ const buildMaterial = (prop, textures) => {
824
864
  const sourceValue = typeof prop === "string" ? prop : prop.value;
825
865
  const opacity = typeof prop === "object" ? prop.opacity : 1;
826
866
  const params = {
827
- roughness: 0.8
867
+ roughness: 0.8,
868
+ side: THREE__namespace.DoubleSide
828
869
  };
829
870
  if (isHexColor(sourceValue)) {
830
871
  params.color = sourceValue;
831
872
  } else if (textures && textures[sourceValue]) {
832
873
  params.map = textures[sourceValue];
833
874
  } else {
834
- params.color = "#cccccc";
875
+ params.color = "yellow";
835
876
  }
836
877
  if (opacity !== undefined && opacity < 1) {
837
878
  params.transparent = true;
@@ -1611,296 +1652,292 @@ function DoorModels(_ref7) {
1611
1652
  })
1612
1653
  });
1613
1654
  }
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,
1655
+ return /*#__PURE__*/jsxRuntime.jsxs("group", {
1656
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1657
+ visible: false,
1658
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1659
+ args: [totalWidthM, totalHeightM, frameDepthM]
1660
+ })
1661
+ }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1662
+ "position-y": yCenteringOffset + pivotNewPosition,
1663
+ children: [frontCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1664
+ "position-z": frontArchitraveZ,
1665
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1666
+ position: [0, topArchitraveY, 0],
1667
+ castShadow: true,
1668
+ material: allMaterials.frontCoverPanelMaterial,
1669
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1670
+ args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1671
+ })
1672
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1673
+ position: [leftArchitraveX, 0, 0],
1674
+ castShadow: true,
1675
+ material: allMaterials.frontCoverPanelMaterial,
1676
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1677
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1678
+ })
1679
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1680
+ position: [rightArchitraveX, 0, 0],
1681
+ castShadow: true,
1682
+ material: allMaterials.frontCoverPanelMaterial,
1683
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1684
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1685
+ })
1686
+ })]
1687
+ }), backCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1688
+ "position-z": backArchitraveZ,
1689
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1690
+ position: [0, topArchitraveY, 0],
1691
+ castShadow: true,
1692
+ material: allMaterials.backCoverPanelMaterial,
1693
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1694
+ args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1695
+ })
1696
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1697
+ position: [leftArchitraveX, 0, 0],
1698
+ castShadow: true,
1699
+ material: allMaterials.backCoverPanelMaterial,
1700
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1701
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1702
+ })
1703
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1704
+ position: [rightArchitraveX, 0, 0],
1705
+ castShadow: true,
1706
+ material: allMaterials.backCoverPanelMaterial,
1707
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1708
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1709
+ })
1710
+ })]
1711
+ }), exteriorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1712
+ position: [0, exteriorFanlightYPosition, 0],
1713
+ castShadow: true,
1714
+ material: allMaterials.exteriorFanlightMaterial,
1620
1715
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1621
- args: [totalWidthM, totalHeightM, frameDepthM]
1716
+ args: [totalOpeningWidthM + sidesFrameWidthM * 2, exteriorFanlightHeightM, exteriorFanlightDepthM]
1622
1717
  })
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],
1718
+ }), isFrameVisible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1719
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1675
1720
  castShadow: true,
1676
- material: allMaterials.exteriorFanlightMaterial,
1721
+ position: [0, topFrameCenterY, 0],
1722
+ children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1723
+ useGroups: true,
1724
+ children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1725
+ name: "frame-base",
1726
+ material: allMaterials.frameMaterial,
1727
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1728
+ args: [totalOpeningWidthM, topFrameWidthM, frameDepthM]
1729
+ })
1730
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1731
+ name: "cut-exterior",
1732
+ material: allMaterials.frameMaterial,
1733
+ position: [0, notchposition, 0],
1734
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1735
+ args: [totalOpeningWidthM + 0.01, notchWidthM, notchDepthM]
1736
+ })
1737
+ })]
1738
+ })
1739
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1740
+ castShadow: true,
1741
+ position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, 0],
1742
+ children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1743
+ useGroups: true,
1744
+ children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1745
+ name: "frame-base",
1746
+ material: allMaterials.frameMaterial,
1747
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1748
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, frameDepthM]
1749
+ })
1750
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1751
+ name: "cut-exterior",
1752
+ material: allMaterials.frameMaterial,
1753
+ position: [-notchposition, 0, 0],
1754
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1755
+ args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1756
+ })
1757
+ })]
1758
+ })
1759
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1760
+ castShadow: true,
1761
+ position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, 0],
1762
+ children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1763
+ useGroups: true,
1764
+ children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1765
+ name: "frame-base",
1766
+ material: allMaterials.frameMaterial,
1767
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1768
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, frameDepthM]
1769
+ })
1770
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1771
+ name: "cut-exterior",
1772
+ material: allMaterials.frameMaterial,
1773
+ position: [notchposition, 0, 0],
1774
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1775
+ args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1776
+ })
1777
+ })]
1778
+ })
1779
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1780
+ castShadow: true,
1781
+ position: [0, totalOpeningHeightM / 2 - doorStopWidthM / 2, doorStopPositionZ],
1782
+ material: allMaterials.doorStopMaterial,
1783
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1784
+ args: [totalOpeningWidthM, doorStopWidthM, doorStopDepthM]
1785
+ })
1786
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1787
+ castShadow: true,
1788
+ position: [-totalOpeningWidthM / 2 + doorStopWidthM / 2, 0, doorStopPositionZ],
1789
+ material: allMaterials.doorStopMaterial,
1677
1790
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1678
- args: [totalOpeningWidthM + sidesFrameWidthM * 2, exteriorFanlightHeightM, exteriorFanlightDepthM]
1791
+ args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1679
1792
  })
1680
- }), isFrameVisible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1793
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1794
+ castShadow: true,
1795
+ position: [totalOpeningWidthM / 2 - doorStopWidthM / 2, 0, doorStopPositionZ],
1796
+ material: allMaterials.doorStopMaterial,
1797
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1798
+ args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1799
+ })
1800
+ }), frameType !== "WF_FLI" && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1681
1801
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1682
1802
  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,
1803
+ position: [0, topGasketYPosition, gasketZPosition],
1804
+ material: allMaterials.gasketMaterial,
1745
1805
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1746
- args: [totalOpeningWidthM, doorStopWidthM, doorStopDepthM]
1806
+ args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1747
1807
  })
1748
1808
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1749
1809
  castShadow: true,
1750
- position: [-totalOpeningWidthM / 2 + doorStopWidthM / 2, 0, doorStopPositionZ],
1751
- material: allMaterials.doorStopMaterial,
1810
+ position: [leftGasketXPosition - 0.005, -0.005, gasketZPosition],
1811
+ material: allMaterials.gasketMaterial,
1752
1812
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1753
- args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1813
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1754
1814
  })
1755
1815
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1756
1816
  castShadow: true,
1757
- position: [totalOpeningWidthM / 2 - doorStopWidthM / 2, 0, doorStopPositionZ],
1758
- material: allMaterials.doorStopMaterial,
1817
+ position: [rightGasketXPosition + 0.005, -0.005, gasketZPosition],
1818
+ material: allMaterials.gasketMaterial,
1759
1819
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1760
- args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1820
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1761
1821
  })
1762
- }), frameType !== "WF_FLI" && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1822
+ })]
1823
+ }), ["WDGF_WDG100", "WF_100", "WF_FLI"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsxs("group", {
1824
+ children: [/*#__PURE__*/jsxRuntime.jsxs("group", {
1825
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1826
+ castShadow: true,
1827
+ position: [0, totalOpeningHeightM / 2 - secondDoorStopWidthM / 2, secondDoorStopPositionZ],
1828
+ material: allMaterials.doorStopMaterial,
1829
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1830
+ args: [totalOpeningWidthM, secondDoorStopWidthM, secondDoorStopDepthM]
1831
+ })
1832
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1833
+ castShadow: true,
1834
+ position: [-totalOpeningWidthM / 2 + secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1835
+ material: allMaterials.doorStopMaterial,
1836
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1837
+ args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1838
+ })
1839
+ }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1840
+ castShadow: true,
1841
+ position: [totalOpeningWidthM / 2 - secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1842
+ material: allMaterials.doorStopMaterial,
1843
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1844
+ args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1845
+ })
1846
+ })]
1847
+ }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1763
1848
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1764
1849
  castShadow: true,
1765
- position: [0, topGasketYPosition, gasketZPosition],
1850
+ position: [0, secondTopGasketYPosition - 0.005, secondGasketZPosition],
1766
1851
  material: allMaterials.gasketMaterial,
1767
1852
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1768
1853
  args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1769
1854
  })
1770
1855
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1771
1856
  castShadow: true,
1772
- position: [leftGasketXPosition - 0.005, -0.005, gasketZPosition],
1857
+ position: [secondLeftGasketXPosition - 0.005, -0.01, secondGasketZPosition],
1773
1858
  material: allMaterials.gasketMaterial,
1774
1859
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1775
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1860
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.04, gasketDepthM]
1776
1861
  })
1777
1862
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1778
1863
  castShadow: true,
1779
- position: [rightGasketXPosition + 0.005, -0.005, gasketZPosition],
1864
+ position: [secondRightGasketXPosition + 0.005, -0.01, secondGasketZPosition],
1780
1865
  material: allMaterials.gasketMaterial,
1781
1866
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1782
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1867
+ args: [gasketWidthM + 0.004, totalOpeningHeightM - 0.04, gasketDepthM]
1783
1868
  })
1784
1869
  })]
1785
- }), ["WDGF_WDG100", "WF_100", "WF_FLI"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsxs("group", {
1870
+ }), glassVisible && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1786
1871
  children: [/*#__PURE__*/jsxRuntime.jsxs("group", {
1787
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1872
+ children: [["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1873
+ castShadow: true,
1874
+ position: [0, topFrameCenterY - secondDoorStopWidthM / 2, leftGlass_Z],
1875
+ material: allMaterials.glassInfillMaterial,
1876
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1877
+ args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM + secondDoorStopWidthM, GlassPanelDepthM]
1878
+ })
1879
+ }), !["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1788
1880
  castShadow: true,
1789
- position: [0, totalOpeningHeightM / 2 - secondDoorStopWidthM / 2, secondDoorStopPositionZ],
1790
- material: allMaterials.doorStopMaterial,
1881
+ position: [0, topFrameCenterY, leftGlass_Z],
1882
+ material: allMaterials.glassInfillMaterial,
1791
1883
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1792
- args: [totalOpeningWidthM, secondDoorStopWidthM, secondDoorStopDepthM]
1884
+ args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM, GlassPanelDepthM]
1793
1885
  })
1794
1886
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1795
1887
  castShadow: true,
1796
- position: [-totalOpeningWidthM / 2 + secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1797
- material: allMaterials.doorStopMaterial,
1888
+ position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2 + secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1889
+ material: allMaterials.glassInfillMaterial,
1798
1890
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1799
- args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1891
+ args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1800
1892
  })
1801
1893
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1802
1894
  castShadow: true,
1803
- position: [totalOpeningWidthM / 2 - secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1804
- material: allMaterials.doorStopMaterial,
1895
+ position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2 - secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1896
+ material: allMaterials.glassInfillMaterial,
1805
1897
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1806
- args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1898
+ args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1807
1899
  })
1808
1900
  })]
1809
1901
  }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1810
1902
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1811
1903
  castShadow: true,
1812
- position: [0, secondTopGasketYPosition - 0.005, secondGasketZPosition],
1813
- material: allMaterials.gasketMaterial,
1904
+ position: [0, topFrameCenterY, rightGlass_Z],
1905
+ material: allMaterials.glassInfillMaterial,
1814
1906
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1815
- args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1907
+ args: [totalOpeningWidthM, topFrameWidthM, GlassPanelDepthM]
1816
1908
  })
1817
1909
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1818
1910
  castShadow: true,
1819
- position: [secondLeftGasketXPosition - 0.005, -0.01, secondGasketZPosition],
1820
- material: allMaterials.gasketMaterial,
1911
+ position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1912
+ material: allMaterials.glassInfillMaterial,
1821
1913
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1822
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.04, gasketDepthM]
1914
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1823
1915
  })
1824
1916
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1825
1917
  castShadow: true,
1826
- position: [secondRightGasketXPosition + 0.005, -0.01, secondGasketZPosition],
1827
- material: allMaterials.gasketMaterial,
1918
+ position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1919
+ material: allMaterials.glassInfillMaterial,
1828
1920
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1829
- args: [gasketWidthM + 0.004, totalOpeningHeightM - 0.04, gasketDepthM]
1921
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1830
1922
  })
1831
1923
  })]
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
1924
  })]
1888
1925
  })]
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
- );
1926
+ })]
1927
+ }), interiorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1928
+ position: [0, interiorFanlightYPosition, doorCenterZ],
1929
+ castShadow: true,
1930
+ material: allMaterials.interiorFanlightMaterial,
1931
+ children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1932
+ args: [totalOpeningWidthM, interiorFanlightHeightM, doorDepthM]
1933
+ })
1934
+ }), doorInstances.map(instance => /*#__PURE__*/jsxRuntime.jsx(DoorLeaf, {
1935
+ pivot: instance.pivot,
1936
+ xOffset: instance.x,
1937
+ materials: allMaterials
1938
+ }, instance.key))]
1939
+ })]
1940
+ });
1904
1941
  }
1905
1942
 
1906
1943
  // {
@@ -2274,20 +2311,24 @@ const DoorConfigurator = _ref => {
2274
2311
  is2D = false,
2275
2312
  totalWidth,
2276
2313
  totalHeight,
2277
- frameDepth
2314
+ totalDepth // Destructure the new prop
2278
2315
  } = _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
2316
+ return (
2317
+ /*#__PURE__*/
2318
+ // Pass the totalDepth prop to the Provider
2319
+ jsxRuntime.jsx(ConfiguratorProvider, {
2320
+ initialIs2D: is2D,
2321
+ totalDepth: totalDepth,
2322
+ children: /*#__PURE__*/jsxRuntime.jsx(DoorModels, {
2323
+ doorName: doorName,
2324
+ materials: materials,
2325
+ doorPivot: doorPivot,
2326
+ doorOpening: doorOpening,
2327
+ totalWidth: totalWidth,
2328
+ totalHeight: totalHeight
2329
+ })
2289
2330
  })
2290
- });
2331
+ );
2291
2332
  };
2292
2333
 
2293
2334
  exports["default"] = DoorConfigurator;