door_models 5.3.7 → 5.3.9

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
@@ -804,8 +804,6 @@ new THREE__namespace.MeshStandardMaterial({
804
804
  roughness: 0.8
805
805
  });
806
806
 
807
- // Type definition for a material prop (string or object with opacity)
808
-
809
807
  // Helper function to check for hex color codes
810
808
  const isHexColor = str => /^#([0-9A-F]{3}){1,2}$/i.test(str);
811
809
 
@@ -830,13 +828,9 @@ const buildMaterial = (prop, textures) => {
830
828
  };
831
829
  if (isHexColor(sourceValue)) {
832
830
  params.color = sourceValue;
833
- }
834
- // Check if it's a URL and if it exists in the pre-loaded texture map
835
- else if (textures && textures[sourceValue]) {
831
+ } else if (textures && textures[sourceValue]) {
836
832
  params.map = textures[sourceValue];
837
- }
838
- // Fallback for invalid values
839
- else {
833
+ } else {
840
834
  params.color = "#cccccc";
841
835
  }
842
836
  if (opacity !== undefined && opacity < 1) {
@@ -845,8 +839,6 @@ const buildMaterial = (prop, textures) => {
845
839
  }
846
840
  return new THREE__namespace.MeshStandardMaterial(params);
847
841
  };
848
-
849
- // getFirstValidValue remains useful for fallbacks, so we keep it.
850
842
  const getFirstValidValue = values => {
851
843
  for (const val of values) {
852
844
  if (val) {
@@ -1413,7 +1405,10 @@ function DoorModels(_ref7) {
1413
1405
  doorName,
1414
1406
  materials: materialsProp,
1415
1407
  doorPivot: doorPivotProp,
1416
- doorOpening: doorOpeningProp
1408
+ doorOpening: doorOpeningProp,
1409
+ totalWidth: totalWidthProp,
1410
+ totalHeight: totalHeightProp,
1411
+ frameDepth: frameDepthProp
1417
1412
  } = _ref7;
1418
1413
  const {
1419
1414
  is2D,
@@ -1422,6 +1417,7 @@ function DoorModels(_ref7) {
1422
1417
  door,
1423
1418
  setDoor,
1424
1419
  doorFrame,
1420
+ setDoorFrame,
1425
1421
  interiorFanlight,
1426
1422
  exteriorFanlight,
1427
1423
  frontCoverPanel,
@@ -1431,7 +1427,9 @@ function DoorModels(_ref7) {
1431
1427
  glassDepth,
1432
1428
  handleParseCpid,
1433
1429
  isDoubleDoor,
1434
- setMaterials
1430
+ setMaterials,
1431
+ setTotalWidth,
1432
+ setTotalHeight
1435
1433
  } = useConfigurator();
1436
1434
  React.useEffect(() => {
1437
1435
  if (doorName) {
@@ -1443,12 +1441,6 @@ function DoorModels(_ref7) {
1443
1441
  setMaterials(materialsProp);
1444
1442
  }
1445
1443
  }, [materialsProp, setMaterials]);
1446
- React.useEffect(() => {
1447
- if (doorName) handleParseCpid(doorName);
1448
- }, [doorName, handleParseCpid]);
1449
- React.useEffect(() => {
1450
- if (materialsProp) setMaterials(materialsProp);
1451
- }, [materialsProp, setMaterials]);
1452
1444
  React.useEffect(() => {
1453
1445
  if (doorPivotProp || doorOpeningProp) {
1454
1446
  setDoor(prevDoor => _objectSpread2(_objectSpread2(_objectSpread2({}, prevDoor), doorPivotProp && {
@@ -1458,6 +1450,23 @@ function DoorModels(_ref7) {
1458
1450
  }));
1459
1451
  }
1460
1452
  }, [doorPivotProp, doorOpeningProp, setDoor]);
1453
+ React.useEffect(() => {
1454
+ if (totalWidthProp !== undefined) {
1455
+ setTotalWidth(totalWidthProp);
1456
+ }
1457
+ }, [totalWidthProp, setTotalWidth]);
1458
+ React.useEffect(() => {
1459
+ if (totalHeightProp !== undefined) {
1460
+ setTotalHeight(totalHeightProp);
1461
+ }
1462
+ }, [totalHeightProp, setTotalHeight]);
1463
+ React.useEffect(() => {
1464
+ if (frameDepthProp !== undefined) {
1465
+ setDoorFrame(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
1466
+ frameDepth: frameDepthProp
1467
+ }));
1468
+ }
1469
+ }, [frameDepthProp, setDoorFrame]);
1461
1470
 
1462
1471
  // --- Material Logic (Centralized in parent component) ---
1463
1472
  const allMaterials = useDoorMaterials(materialsProp);
@@ -1511,6 +1520,8 @@ function DoorModels(_ref7) {
1511
1520
  const sidesThkValue = parseInt(sidesThk) || 20;
1512
1521
 
1513
1522
  // Convert dimensions from mm to meters
1523
+ const totalWidthM = totalWidthProp !== undefined ? totalWidthProp / 1000 : totalWidth / 1000;
1524
+ const totalHeightM = totalHeightProp !== undefined ? totalHeightProp / 1000 : doorHeight / 1000;
1514
1525
  const interiorFanlightHeightM = interiorFanlightHeight / 1000;
1515
1526
  const doorWidthM = doorWidth / 1000;
1516
1527
  const totalOpeningHeightM = doorHeight / 1000;
@@ -1600,287 +1611,296 @@ function DoorModels(_ref7) {
1600
1611
  })
1601
1612
  });
1602
1613
  }
1603
- return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
1604
- children: /*#__PURE__*/jsxRuntime.jsxs("group", {
1605
- "position-y": yCenteringOffset + pivotNewPosition,
1606
- children: [frontCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1607
- "position-z": frontArchitraveZ,
1608
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1609
- position: [0, topArchitraveY, 0],
1610
- castShadow: true,
1611
- material: allMaterials.frontCoverPanelMaterial,
1612
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1613
- args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1614
- })
1615
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1616
- position: [leftArchitraveX, 0, 0],
1617
- castShadow: true,
1618
- material: allMaterials.frontCoverPanelMaterial,
1619
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1620
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1621
- })
1622
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1623
- position: [rightArchitraveX, 0, 0],
1624
- castShadow: true,
1625
- material: allMaterials.frontCoverPanelMaterial,
1626
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1627
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1628
- })
1629
- })]
1630
- }), backCoverPanel.visible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1631
- "position-z": backArchitraveZ,
1632
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1633
- position: [0, topArchitraveY, 0],
1634
- castShadow: true,
1635
- material: allMaterials.backCoverPanelMaterial,
1636
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1637
- args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1638
- })
1639
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1640
- position: [leftArchitraveX, 0, 0],
1641
- castShadow: true,
1642
- material: allMaterials.backCoverPanelMaterial,
1643
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1644
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1645
- })
1646
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1647
- position: [rightArchitraveX, 0, 0],
1648
- castShadow: true,
1649
- material: allMaterials.backCoverPanelMaterial,
1650
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1651
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1652
- })
1653
- })]
1654
- }), exteriorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1655
- position: [0, exteriorFanlightYPosition, 0],
1656
- castShadow: true,
1657
- material: allMaterials.exteriorFanlightMaterial,
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,
1658
1620
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1659
- args: [totalOpeningWidthM + sidesFrameWidthM * 2, exteriorFanlightHeightM, exteriorFanlightDepthM]
1621
+ args: [totalWidthM, totalHeightM, frameDepthM]
1660
1622
  })
1661
- }), isFrameVisible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1662
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1663
- castShadow: true,
1664
- position: [0, topFrameCenterY, 0],
1665
- children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1666
- useGroups: true,
1667
- children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1668
- name: "frame-base",
1669
- material: allMaterials.frameMaterial,
1670
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1671
- args: [totalOpeningWidthM, topFrameWidthM, frameDepthM]
1672
- })
1673
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1674
- name: "cut-exterior",
1675
- material: allMaterials.frameMaterial,
1676
- position: [0, notchposition, 0],
1677
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1678
- args: [totalOpeningWidthM + 0.01, notchWidthM, notchDepthM]
1679
- })
1680
- })]
1681
- })
1682
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1683
- castShadow: true,
1684
- position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, 0],
1685
- children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
1686
- useGroups: true,
1687
- children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
1688
- name: "frame-base",
1689
- material: allMaterials.frameMaterial,
1690
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1691
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, frameDepthM]
1692
- })
1693
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
1694
- name: "cut-exterior",
1695
- material: allMaterials.frameMaterial,
1696
- position: [-notchposition, 0, 0],
1697
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1698
- args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1699
- })
1700
- })]
1701
- })
1702
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1703
- castShadow: true,
1704
- position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, 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: [sidesFrameWidthM, totalOpeningHeightM + 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: [notchposition, 0, 0],
1717
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1718
- args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1719
- })
1720
- })]
1721
- })
1722
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1723
- castShadow: true,
1724
- position: [0, totalOpeningHeightM / 2 - doorStopWidthM / 2, doorStopPositionZ],
1725
- material: allMaterials.doorStopMaterial,
1726
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1727
- args: [totalOpeningWidthM, doorStopWidthM, doorStopDepthM]
1728
- })
1729
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1730
- castShadow: true,
1731
- position: [-totalOpeningWidthM / 2 + doorStopWidthM / 2, 0, doorStopPositionZ],
1732
- material: allMaterials.doorStopMaterial,
1733
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1734
- args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1735
- })
1736
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
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],
1737
1675
  castShadow: true,
1738
- position: [totalOpeningWidthM / 2 - doorStopWidthM / 2, 0, doorStopPositionZ],
1739
- material: allMaterials.doorStopMaterial,
1676
+ material: allMaterials.exteriorFanlightMaterial,
1740
1677
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1741
- args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1678
+ args: [totalOpeningWidthM + sidesFrameWidthM * 2, exteriorFanlightHeightM, exteriorFanlightDepthM]
1742
1679
  })
1743
- }), frameType !== "WF_FLI" && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1680
+ }), isFrameVisible && /*#__PURE__*/jsxRuntime.jsxs("group", {
1744
1681
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1745
1682
  castShadow: true,
1746
- position: [0, topGasketYPosition, gasketZPosition],
1747
- material: allMaterials.gasketMaterial,
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,
1748
1745
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1749
- args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1746
+ args: [totalOpeningWidthM, doorStopWidthM, doorStopDepthM]
1750
1747
  })
1751
1748
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1752
1749
  castShadow: true,
1753
- position: [leftGasketXPosition - 0.005, -0.005, gasketZPosition],
1754
- material: allMaterials.gasketMaterial,
1750
+ position: [-totalOpeningWidthM / 2 + doorStopWidthM / 2, 0, doorStopPositionZ],
1751
+ material: allMaterials.doorStopMaterial,
1755
1752
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1756
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1753
+ args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1757
1754
  })
1758
1755
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1759
1756
  castShadow: true,
1760
- position: [rightGasketXPosition + 0.005, -0.005, gasketZPosition],
1761
- material: allMaterials.gasketMaterial,
1757
+ position: [totalOpeningWidthM / 2 - doorStopWidthM / 2, 0, doorStopPositionZ],
1758
+ material: allMaterials.doorStopMaterial,
1762
1759
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1763
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1760
+ args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1764
1761
  })
1765
- })]
1766
- }), ["WDGF_WDG100", "WF_100", "WF_FLI"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsxs("group", {
1767
- children: [/*#__PURE__*/jsxRuntime.jsxs("group", {
1762
+ }), frameType !== "WF_FLI" && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1768
1763
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1769
1764
  castShadow: true,
1770
- position: [0, totalOpeningHeightM / 2 - secondDoorStopWidthM / 2, secondDoorStopPositionZ],
1771
- material: allMaterials.doorStopMaterial,
1772
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1773
- args: [totalOpeningWidthM, secondDoorStopWidthM, secondDoorStopDepthM]
1774
- })
1775
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1776
- castShadow: true,
1777
- position: [-totalOpeningWidthM / 2 + secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1778
- material: allMaterials.doorStopMaterial,
1779
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1780
- args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1781
- })
1782
- }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1783
- castShadow: true,
1784
- position: [totalOpeningWidthM / 2 - secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1785
- material: allMaterials.doorStopMaterial,
1786
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1787
- args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1788
- })
1789
- })]
1790
- }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1791
- children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1792
- castShadow: true,
1793
- position: [0, secondTopGasketYPosition - 0.005, secondGasketZPosition],
1765
+ position: [0, topGasketYPosition, gasketZPosition],
1794
1766
  material: allMaterials.gasketMaterial,
1795
1767
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1796
1768
  args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1797
1769
  })
1798
1770
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1799
1771
  castShadow: true,
1800
- position: [secondLeftGasketXPosition - 0.005, -0.01, secondGasketZPosition],
1772
+ position: [leftGasketXPosition - 0.005, -0.005, gasketZPosition],
1801
1773
  material: allMaterials.gasketMaterial,
1802
1774
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1803
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.04, gasketDepthM]
1775
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1804
1776
  })
1805
1777
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1806
1778
  castShadow: true,
1807
- position: [secondRightGasketXPosition + 0.005, -0.01, secondGasketZPosition],
1779
+ position: [rightGasketXPosition + 0.005, -0.005, gasketZPosition],
1808
1780
  material: allMaterials.gasketMaterial,
1809
1781
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1810
- args: [gasketWidthM + 0.004, totalOpeningHeightM - 0.04, gasketDepthM]
1782
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1811
1783
  })
1812
1784
  })]
1813
- }), glassVisible && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1785
+ }), ["WDGF_WDG100", "WF_100", "WF_FLI"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsxs("group", {
1814
1786
  children: [/*#__PURE__*/jsxRuntime.jsxs("group", {
1815
- children: [["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1816
- castShadow: true,
1817
- position: [0, topFrameCenterY - secondDoorStopWidthM / 2, leftGlass_Z],
1818
- material: allMaterials.glassInfillMaterial,
1819
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1820
- args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM + secondDoorStopWidthM, GlassPanelDepthM]
1821
- })
1822
- }), !["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1787
+ children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1823
1788
  castShadow: true,
1824
- position: [0, topFrameCenterY, leftGlass_Z],
1825
- material: allMaterials.glassInfillMaterial,
1789
+ position: [0, totalOpeningHeightM / 2 - secondDoorStopWidthM / 2, secondDoorStopPositionZ],
1790
+ material: allMaterials.doorStopMaterial,
1826
1791
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1827
- args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM, GlassPanelDepthM]
1792
+ args: [totalOpeningWidthM, secondDoorStopWidthM, secondDoorStopDepthM]
1828
1793
  })
1829
1794
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1830
1795
  castShadow: true,
1831
- position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2 + secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1832
- material: allMaterials.glassInfillMaterial,
1796
+ position: [-totalOpeningWidthM / 2 + secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1797
+ material: allMaterials.doorStopMaterial,
1833
1798
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1834
- args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1799
+ args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1835
1800
  })
1836
1801
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1837
1802
  castShadow: true,
1838
- position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2 - secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1839
- material: allMaterials.glassInfillMaterial,
1803
+ position: [totalOpeningWidthM / 2 - secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1804
+ material: allMaterials.doorStopMaterial,
1840
1805
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1841
- args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1806
+ args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1842
1807
  })
1843
1808
  })]
1844
1809
  }), /*#__PURE__*/jsxRuntime.jsxs("group", {
1845
1810
  children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
1846
1811
  castShadow: true,
1847
- position: [0, topFrameCenterY, rightGlass_Z],
1848
- material: allMaterials.glassInfillMaterial,
1812
+ position: [0, secondTopGasketYPosition - 0.005, secondGasketZPosition],
1813
+ material: allMaterials.gasketMaterial,
1849
1814
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1850
- args: [totalOpeningWidthM, topFrameWidthM, GlassPanelDepthM]
1815
+ args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1851
1816
  })
1852
1817
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1853
1818
  castShadow: true,
1854
- position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1855
- material: allMaterials.glassInfillMaterial,
1819
+ position: [secondLeftGasketXPosition - 0.005, -0.01, secondGasketZPosition],
1820
+ material: allMaterials.gasketMaterial,
1856
1821
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1857
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1822
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.04, gasketDepthM]
1858
1823
  })
1859
1824
  }), /*#__PURE__*/jsxRuntime.jsx("mesh", {
1860
1825
  castShadow: true,
1861
- position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1862
- material: allMaterials.glassInfillMaterial,
1826
+ position: [secondRightGasketXPosition + 0.005, -0.01, secondGasketZPosition],
1827
+ material: allMaterials.gasketMaterial,
1863
1828
  children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1864
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1829
+ args: [gasketWidthM + 0.004, totalOpeningHeightM - 0.04, gasketDepthM]
1865
1830
  })
1866
1831
  })]
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
+ })]
1867
1887
  })]
1868
1888
  })]
1869
- })]
1870
- }), interiorFanlight.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
1871
- position: [0, interiorFanlightYPosition, doorCenterZ],
1872
- castShadow: true,
1873
- material: allMaterials.interiorFanlightMaterial,
1874
- children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
1875
- args: [totalOpeningWidthM, interiorFanlightHeightM, doorDepthM]
1876
- })
1877
- }), doorInstances.map(instance => /*#__PURE__*/jsxRuntime.jsx(DoorLeaf, {
1878
- pivot: instance.pivot,
1879
- xOffset: instance.x,
1880
- materials: allMaterials
1881
- }, instance.key))]
1882
- })
1883
- });
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
+ );
1884
1904
  }
1885
1905
 
1886
1906
  // {
@@ -2251,7 +2271,10 @@ const DoorConfigurator = _ref => {
2251
2271
  materials,
2252
2272
  doorPivot,
2253
2273
  doorOpening,
2254
- is2D = false
2274
+ is2D = false,
2275
+ totalWidth,
2276
+ totalHeight,
2277
+ frameDepth
2255
2278
  } = _ref;
2256
2279
  return /*#__PURE__*/jsxRuntime.jsx(ConfiguratorProvider, {
2257
2280
  initialIs2D: is2D,
@@ -2259,7 +2282,10 @@ const DoorConfigurator = _ref => {
2259
2282
  doorName: doorName,
2260
2283
  materials: materials,
2261
2284
  doorPivot: doorPivot,
2262
- doorOpening: doorOpening
2285
+ doorOpening: doorOpening,
2286
+ totalWidth: totalWidth,
2287
+ totalHeight: totalHeight,
2288
+ frameDepth: frameDepth
2263
2289
  })
2264
2290
  });
2265
2291
  };