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.esm.js CHANGED
@@ -777,8 +777,6 @@ new THREE.MeshStandardMaterial({
777
777
  roughness: 0.8
778
778
  });
779
779
 
780
- // Type definition for a material prop (string or object with opacity)
781
-
782
780
  // Helper function to check for hex color codes
783
781
  const isHexColor = str => /^#([0-9A-F]{3}){1,2}$/i.test(str);
784
782
 
@@ -803,13 +801,9 @@ const buildMaterial = (prop, textures) => {
803
801
  };
804
802
  if (isHexColor(sourceValue)) {
805
803
  params.color = sourceValue;
806
- }
807
- // Check if it's a URL and if it exists in the pre-loaded texture map
808
- else if (textures && textures[sourceValue]) {
804
+ } else if (textures && textures[sourceValue]) {
809
805
  params.map = textures[sourceValue];
810
- }
811
- // Fallback for invalid values
812
- else {
806
+ } else {
813
807
  params.color = "#cccccc";
814
808
  }
815
809
  if (opacity !== undefined && opacity < 1) {
@@ -818,8 +812,6 @@ const buildMaterial = (prop, textures) => {
818
812
  }
819
813
  return new THREE.MeshStandardMaterial(params);
820
814
  };
821
-
822
- // getFirstValidValue remains useful for fallbacks, so we keep it.
823
815
  const getFirstValidValue = values => {
824
816
  for (const val of values) {
825
817
  if (val) {
@@ -1386,7 +1378,10 @@ function DoorModels(_ref7) {
1386
1378
  doorName,
1387
1379
  materials: materialsProp,
1388
1380
  doorPivot: doorPivotProp,
1389
- doorOpening: doorOpeningProp
1381
+ doorOpening: doorOpeningProp,
1382
+ totalWidth: totalWidthProp,
1383
+ totalHeight: totalHeightProp,
1384
+ frameDepth: frameDepthProp
1390
1385
  } = _ref7;
1391
1386
  const {
1392
1387
  is2D,
@@ -1395,6 +1390,7 @@ function DoorModels(_ref7) {
1395
1390
  door,
1396
1391
  setDoor,
1397
1392
  doorFrame,
1393
+ setDoorFrame,
1398
1394
  interiorFanlight,
1399
1395
  exteriorFanlight,
1400
1396
  frontCoverPanel,
@@ -1404,7 +1400,9 @@ function DoorModels(_ref7) {
1404
1400
  glassDepth,
1405
1401
  handleParseCpid,
1406
1402
  isDoubleDoor,
1407
- setMaterials
1403
+ setMaterials,
1404
+ setTotalWidth,
1405
+ setTotalHeight
1408
1406
  } = useConfigurator();
1409
1407
  useEffect(() => {
1410
1408
  if (doorName) {
@@ -1416,12 +1414,6 @@ function DoorModels(_ref7) {
1416
1414
  setMaterials(materialsProp);
1417
1415
  }
1418
1416
  }, [materialsProp, setMaterials]);
1419
- useEffect(() => {
1420
- if (doorName) handleParseCpid(doorName);
1421
- }, [doorName, handleParseCpid]);
1422
- useEffect(() => {
1423
- if (materialsProp) setMaterials(materialsProp);
1424
- }, [materialsProp, setMaterials]);
1425
1417
  useEffect(() => {
1426
1418
  if (doorPivotProp || doorOpeningProp) {
1427
1419
  setDoor(prevDoor => _objectSpread2(_objectSpread2(_objectSpread2({}, prevDoor), doorPivotProp && {
@@ -1431,6 +1423,23 @@ function DoorModels(_ref7) {
1431
1423
  }));
1432
1424
  }
1433
1425
  }, [doorPivotProp, doorOpeningProp, setDoor]);
1426
+ useEffect(() => {
1427
+ if (totalWidthProp !== undefined) {
1428
+ setTotalWidth(totalWidthProp);
1429
+ }
1430
+ }, [totalWidthProp, setTotalWidth]);
1431
+ useEffect(() => {
1432
+ if (totalHeightProp !== undefined) {
1433
+ setTotalHeight(totalHeightProp);
1434
+ }
1435
+ }, [totalHeightProp, setTotalHeight]);
1436
+ useEffect(() => {
1437
+ if (frameDepthProp !== undefined) {
1438
+ setDoorFrame(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
1439
+ frameDepth: frameDepthProp
1440
+ }));
1441
+ }
1442
+ }, [frameDepthProp, setDoorFrame]);
1434
1443
 
1435
1444
  // --- Material Logic (Centralized in parent component) ---
1436
1445
  const allMaterials = useDoorMaterials(materialsProp);
@@ -1484,6 +1493,8 @@ function DoorModels(_ref7) {
1484
1493
  const sidesThkValue = parseInt(sidesThk) || 20;
1485
1494
 
1486
1495
  // Convert dimensions from mm to meters
1496
+ const totalWidthM = totalWidthProp !== undefined ? totalWidthProp / 1000 : totalWidth / 1000;
1497
+ const totalHeightM = totalHeightProp !== undefined ? totalHeightProp / 1000 : doorHeight / 1000;
1487
1498
  const interiorFanlightHeightM = interiorFanlightHeight / 1000;
1488
1499
  const doorWidthM = doorWidth / 1000;
1489
1500
  const totalOpeningHeightM = doorHeight / 1000;
@@ -1573,287 +1584,296 @@ function DoorModels(_ref7) {
1573
1584
  })
1574
1585
  });
1575
1586
  }
1576
- return /*#__PURE__*/jsx(Fragment, {
1577
- children: /*#__PURE__*/jsxs("group", {
1578
- "position-y": yCenteringOffset + pivotNewPosition,
1579
- children: [frontCoverPanel.visible && /*#__PURE__*/jsxs("group", {
1580
- "position-z": frontArchitraveZ,
1581
- children: [/*#__PURE__*/jsx("mesh", {
1582
- position: [0, topArchitraveY, 0],
1583
- castShadow: true,
1584
- material: allMaterials.frontCoverPanelMaterial,
1585
- children: /*#__PURE__*/jsx("boxGeometry", {
1586
- args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1587
- })
1588
- }), /*#__PURE__*/jsx("mesh", {
1589
- position: [leftArchitraveX, 0, 0],
1590
- castShadow: true,
1591
- material: allMaterials.frontCoverPanelMaterial,
1592
- children: /*#__PURE__*/jsx("boxGeometry", {
1593
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1594
- })
1595
- }), /*#__PURE__*/jsx("mesh", {
1596
- position: [rightArchitraveX, 0, 0],
1597
- castShadow: true,
1598
- material: allMaterials.frontCoverPanelMaterial,
1599
- children: /*#__PURE__*/jsx("boxGeometry", {
1600
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1601
- })
1602
- })]
1603
- }), backCoverPanel.visible && /*#__PURE__*/jsxs("group", {
1604
- "position-z": backArchitraveZ,
1605
- children: [/*#__PURE__*/jsx("mesh", {
1606
- position: [0, topArchitraveY, 0],
1607
- castShadow: true,
1608
- material: allMaterials.backCoverPanelMaterial,
1609
- children: /*#__PURE__*/jsx("boxGeometry", {
1610
- args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1611
- })
1612
- }), /*#__PURE__*/jsx("mesh", {
1613
- position: [leftArchitraveX, 0, 0],
1614
- castShadow: true,
1615
- material: allMaterials.backCoverPanelMaterial,
1616
- children: /*#__PURE__*/jsx("boxGeometry", {
1617
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1618
- })
1619
- }), /*#__PURE__*/jsx("mesh", {
1620
- position: [rightArchitraveX, 0, 0],
1621
- castShadow: true,
1622
- material: allMaterials.backCoverPanelMaterial,
1623
- children: /*#__PURE__*/jsx("boxGeometry", {
1624
- args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1625
- })
1626
- })]
1627
- }), exteriorFanlight.visible && /*#__PURE__*/jsx("mesh", {
1628
- position: [0, exteriorFanlightYPosition, 0],
1629
- castShadow: true,
1630
- material: allMaterials.exteriorFanlightMaterial,
1587
+ return (
1588
+ /*#__PURE__*/
1589
+ // CHANGE START: Wrap the entire component in a parent group.
1590
+ jsxs("group", {
1591
+ children: [/*#__PURE__*/jsx("mesh", {
1592
+ visible: false,
1631
1593
  children: /*#__PURE__*/jsx("boxGeometry", {
1632
- args: [totalOpeningWidthM + sidesFrameWidthM * 2, exteriorFanlightHeightM, exteriorFanlightDepthM]
1594
+ args: [totalWidthM, totalHeightM, frameDepthM]
1633
1595
  })
1634
- }), isFrameVisible && /*#__PURE__*/jsxs("group", {
1635
- children: [/*#__PURE__*/jsx("mesh", {
1636
- castShadow: true,
1637
- position: [0, topFrameCenterY, 0],
1638
- children: /*#__PURE__*/jsxs(Geometry, {
1639
- useGroups: true,
1640
- children: [/*#__PURE__*/jsx(Base, {
1641
- name: "frame-base",
1642
- material: allMaterials.frameMaterial,
1643
- children: /*#__PURE__*/jsx("boxGeometry", {
1644
- args: [totalOpeningWidthM, topFrameWidthM, frameDepthM]
1645
- })
1646
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsx(Subtraction, {
1647
- name: "cut-exterior",
1648
- material: allMaterials.frameMaterial,
1649
- position: [0, notchposition, 0],
1650
- children: /*#__PURE__*/jsx("boxGeometry", {
1651
- args: [totalOpeningWidthM + 0.01, notchWidthM, notchDepthM]
1652
- })
1653
- })]
1654
- })
1655
- }), /*#__PURE__*/jsx("mesh", {
1656
- castShadow: true,
1657
- position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, 0],
1658
- children: /*#__PURE__*/jsxs(Geometry, {
1659
- useGroups: true,
1660
- children: [/*#__PURE__*/jsx(Base, {
1661
- name: "frame-base",
1662
- material: allMaterials.frameMaterial,
1663
- children: /*#__PURE__*/jsx("boxGeometry", {
1664
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, frameDepthM]
1665
- })
1666
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsx(Subtraction, {
1667
- name: "cut-exterior",
1668
- material: allMaterials.frameMaterial,
1669
- position: [-notchposition, 0, 0],
1670
- children: /*#__PURE__*/jsx("boxGeometry", {
1671
- args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1672
- })
1673
- })]
1674
- })
1675
- }), /*#__PURE__*/jsx("mesh", {
1676
- castShadow: true,
1677
- position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, 0],
1678
- children: /*#__PURE__*/jsxs(Geometry, {
1679
- useGroups: true,
1680
- children: [/*#__PURE__*/jsx(Base, {
1681
- name: "frame-base",
1682
- material: allMaterials.frameMaterial,
1683
- children: /*#__PURE__*/jsx("boxGeometry", {
1684
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, frameDepthM]
1685
- })
1686
- }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsx(Subtraction, {
1687
- name: "cut-exterior",
1688
- material: allMaterials.frameMaterial,
1689
- position: [notchposition, 0, 0],
1690
- children: /*#__PURE__*/jsx("boxGeometry", {
1691
- args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1692
- })
1693
- })]
1694
- })
1695
- }), /*#__PURE__*/jsx("mesh", {
1696
- castShadow: true,
1697
- position: [0, totalOpeningHeightM / 2 - doorStopWidthM / 2, doorStopPositionZ],
1698
- material: allMaterials.doorStopMaterial,
1699
- children: /*#__PURE__*/jsx("boxGeometry", {
1700
- args: [totalOpeningWidthM, doorStopWidthM, doorStopDepthM]
1701
- })
1702
- }), /*#__PURE__*/jsx("mesh", {
1703
- castShadow: true,
1704
- position: [-totalOpeningWidthM / 2 + doorStopWidthM / 2, 0, doorStopPositionZ],
1705
- material: allMaterials.doorStopMaterial,
1706
- children: /*#__PURE__*/jsx("boxGeometry", {
1707
- args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1708
- })
1709
- }), /*#__PURE__*/jsx("mesh", {
1596
+ }), /*#__PURE__*/jsxs("group", {
1597
+ "position-y": yCenteringOffset + pivotNewPosition,
1598
+ children: [frontCoverPanel.visible && /*#__PURE__*/jsxs("group", {
1599
+ "position-z": frontArchitraveZ,
1600
+ children: [/*#__PURE__*/jsx("mesh", {
1601
+ position: [0, topArchitraveY, 0],
1602
+ castShadow: true,
1603
+ material: allMaterials.frontCoverPanelMaterial,
1604
+ children: /*#__PURE__*/jsx("boxGeometry", {
1605
+ args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1606
+ })
1607
+ }), /*#__PURE__*/jsx("mesh", {
1608
+ position: [leftArchitraveX, 0, 0],
1609
+ castShadow: true,
1610
+ material: allMaterials.frontCoverPanelMaterial,
1611
+ children: /*#__PURE__*/jsx("boxGeometry", {
1612
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1613
+ })
1614
+ }), /*#__PURE__*/jsx("mesh", {
1615
+ position: [rightArchitraveX, 0, 0],
1616
+ castShadow: true,
1617
+ material: allMaterials.frontCoverPanelMaterial,
1618
+ children: /*#__PURE__*/jsx("boxGeometry", {
1619
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1620
+ })
1621
+ })]
1622
+ }), backCoverPanel.visible && /*#__PURE__*/jsxs("group", {
1623
+ "position-z": backArchitraveZ,
1624
+ children: [/*#__PURE__*/jsx("mesh", {
1625
+ position: [0, topArchitraveY, 0],
1626
+ castShadow: true,
1627
+ material: allMaterials.backCoverPanelMaterial,
1628
+ children: /*#__PURE__*/jsx("boxGeometry", {
1629
+ args: [topArchitraveWidth, architraveProfileM, architraveDepthM]
1630
+ })
1631
+ }), /*#__PURE__*/jsx("mesh", {
1632
+ position: [leftArchitraveX, 0, 0],
1633
+ castShadow: true,
1634
+ material: allMaterials.backCoverPanelMaterial,
1635
+ children: /*#__PURE__*/jsx("boxGeometry", {
1636
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1637
+ })
1638
+ }), /*#__PURE__*/jsx("mesh", {
1639
+ position: [rightArchitraveX, 0, 0],
1640
+ castShadow: true,
1641
+ material: allMaterials.backCoverPanelMaterial,
1642
+ children: /*#__PURE__*/jsx("boxGeometry", {
1643
+ args: [architraveProfileM, totalOpeningHeightM, architraveDepthM]
1644
+ })
1645
+ })]
1646
+ }), exteriorFanlight.visible && /*#__PURE__*/jsx("mesh", {
1647
+ position: [0, exteriorFanlightYPosition, 0],
1710
1648
  castShadow: true,
1711
- position: [totalOpeningWidthM / 2 - doorStopWidthM / 2, 0, doorStopPositionZ],
1712
- material: allMaterials.doorStopMaterial,
1649
+ material: allMaterials.exteriorFanlightMaterial,
1713
1650
  children: /*#__PURE__*/jsx("boxGeometry", {
1714
- args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1651
+ args: [totalOpeningWidthM + sidesFrameWidthM * 2, exteriorFanlightHeightM, exteriorFanlightDepthM]
1715
1652
  })
1716
- }), frameType !== "WF_FLI" && /*#__PURE__*/jsxs(Fragment, {
1653
+ }), isFrameVisible && /*#__PURE__*/jsxs("group", {
1717
1654
  children: [/*#__PURE__*/jsx("mesh", {
1718
1655
  castShadow: true,
1719
- position: [0, topGasketYPosition, gasketZPosition],
1720
- material: allMaterials.gasketMaterial,
1656
+ position: [0, topFrameCenterY, 0],
1657
+ children: /*#__PURE__*/jsxs(Geometry, {
1658
+ useGroups: true,
1659
+ children: [/*#__PURE__*/jsx(Base, {
1660
+ name: "frame-base",
1661
+ material: allMaterials.frameMaterial,
1662
+ children: /*#__PURE__*/jsx("boxGeometry", {
1663
+ args: [totalOpeningWidthM, topFrameWidthM, frameDepthM]
1664
+ })
1665
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsx(Subtraction, {
1666
+ name: "cut-exterior",
1667
+ material: allMaterials.frameMaterial,
1668
+ position: [0, notchposition, 0],
1669
+ children: /*#__PURE__*/jsx("boxGeometry", {
1670
+ args: [totalOpeningWidthM + 0.01, notchWidthM, notchDepthM]
1671
+ })
1672
+ })]
1673
+ })
1674
+ }), /*#__PURE__*/jsx("mesh", {
1675
+ castShadow: true,
1676
+ position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, 0],
1677
+ children: /*#__PURE__*/jsxs(Geometry, {
1678
+ useGroups: true,
1679
+ children: [/*#__PURE__*/jsx(Base, {
1680
+ name: "frame-base",
1681
+ material: allMaterials.frameMaterial,
1682
+ children: /*#__PURE__*/jsx("boxGeometry", {
1683
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, frameDepthM]
1684
+ })
1685
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsx(Subtraction, {
1686
+ name: "cut-exterior",
1687
+ material: allMaterials.frameMaterial,
1688
+ position: [-notchposition, 0, 0],
1689
+ children: /*#__PURE__*/jsx("boxGeometry", {
1690
+ args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1691
+ })
1692
+ })]
1693
+ })
1694
+ }), /*#__PURE__*/jsx("mesh", {
1695
+ castShadow: true,
1696
+ position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, 0],
1697
+ children: /*#__PURE__*/jsxs(Geometry, {
1698
+ useGroups: true,
1699
+ children: [/*#__PURE__*/jsx(Base, {
1700
+ name: "frame-base",
1701
+ material: allMaterials.frameMaterial,
1702
+ children: /*#__PURE__*/jsx("boxGeometry", {
1703
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, frameDepthM]
1704
+ })
1705
+ }), !["MXF_40", "MXF_50", "MXCAF_40", "MXCAF_50"].includes(frameType) && /*#__PURE__*/jsx(Subtraction, {
1706
+ name: "cut-exterior",
1707
+ material: allMaterials.frameMaterial,
1708
+ position: [notchposition, 0, 0],
1709
+ children: /*#__PURE__*/jsx("boxGeometry", {
1710
+ args: [notchWidthM, totalOpeningHeightM + topFrameWidthM + 0.01, notchDepthM]
1711
+ })
1712
+ })]
1713
+ })
1714
+ }), /*#__PURE__*/jsx("mesh", {
1715
+ castShadow: true,
1716
+ position: [0, totalOpeningHeightM / 2 - doorStopWidthM / 2, doorStopPositionZ],
1717
+ material: allMaterials.doorStopMaterial,
1721
1718
  children: /*#__PURE__*/jsx("boxGeometry", {
1722
- args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1719
+ args: [totalOpeningWidthM, doorStopWidthM, doorStopDepthM]
1723
1720
  })
1724
1721
  }), /*#__PURE__*/jsx("mesh", {
1725
1722
  castShadow: true,
1726
- position: [leftGasketXPosition - 0.005, -0.005, gasketZPosition],
1727
- material: allMaterials.gasketMaterial,
1723
+ position: [-totalOpeningWidthM / 2 + doorStopWidthM / 2, 0, doorStopPositionZ],
1724
+ material: allMaterials.doorStopMaterial,
1728
1725
  children: /*#__PURE__*/jsx("boxGeometry", {
1729
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1726
+ args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1730
1727
  })
1731
1728
  }), /*#__PURE__*/jsx("mesh", {
1732
1729
  castShadow: true,
1733
- position: [rightGasketXPosition + 0.005, -0.005, gasketZPosition],
1734
- material: allMaterials.gasketMaterial,
1730
+ position: [totalOpeningWidthM / 2 - doorStopWidthM / 2, 0, doorStopPositionZ],
1731
+ material: allMaterials.doorStopMaterial,
1735
1732
  children: /*#__PURE__*/jsx("boxGeometry", {
1736
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1733
+ args: [doorStopWidthM, totalOpeningHeightM, doorStopDepthM]
1737
1734
  })
1738
- })]
1739
- }), ["WDGF_WDG100", "WF_100", "WF_FLI"].includes(frameType) && /*#__PURE__*/jsxs("group", {
1740
- children: [/*#__PURE__*/jsxs("group", {
1735
+ }), frameType !== "WF_FLI" && /*#__PURE__*/jsxs(Fragment, {
1741
1736
  children: [/*#__PURE__*/jsx("mesh", {
1742
1737
  castShadow: true,
1743
- position: [0, totalOpeningHeightM / 2 - secondDoorStopWidthM / 2, secondDoorStopPositionZ],
1744
- material: allMaterials.doorStopMaterial,
1745
- children: /*#__PURE__*/jsx("boxGeometry", {
1746
- args: [totalOpeningWidthM, secondDoorStopWidthM, secondDoorStopDepthM]
1747
- })
1748
- }), /*#__PURE__*/jsx("mesh", {
1749
- castShadow: true,
1750
- position: [-totalOpeningWidthM / 2 + secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1751
- material: allMaterials.doorStopMaterial,
1752
- children: /*#__PURE__*/jsx("boxGeometry", {
1753
- args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1754
- })
1755
- }), /*#__PURE__*/jsx("mesh", {
1756
- castShadow: true,
1757
- position: [totalOpeningWidthM / 2 - secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1758
- material: allMaterials.doorStopMaterial,
1759
- children: /*#__PURE__*/jsx("boxGeometry", {
1760
- args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1761
- })
1762
- })]
1763
- }), /*#__PURE__*/jsxs("group", {
1764
- children: [/*#__PURE__*/jsx("mesh", {
1765
- castShadow: true,
1766
- position: [0, secondTopGasketYPosition - 0.005, secondGasketZPosition],
1738
+ position: [0, topGasketYPosition, gasketZPosition],
1767
1739
  material: allMaterials.gasketMaterial,
1768
1740
  children: /*#__PURE__*/jsx("boxGeometry", {
1769
1741
  args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1770
1742
  })
1771
1743
  }), /*#__PURE__*/jsx("mesh", {
1772
1744
  castShadow: true,
1773
- position: [secondLeftGasketXPosition - 0.005, -0.01, secondGasketZPosition],
1745
+ position: [leftGasketXPosition - 0.005, -0.005, gasketZPosition],
1774
1746
  material: allMaterials.gasketMaterial,
1775
1747
  children: /*#__PURE__*/jsx("boxGeometry", {
1776
- args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.04, gasketDepthM]
1748
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1777
1749
  })
1778
1750
  }), /*#__PURE__*/jsx("mesh", {
1779
1751
  castShadow: true,
1780
- position: [secondRightGasketXPosition + 0.005, -0.01, secondGasketZPosition],
1752
+ position: [rightGasketXPosition + 0.005, -0.005, gasketZPosition],
1781
1753
  material: allMaterials.gasketMaterial,
1782
1754
  children: /*#__PURE__*/jsx("boxGeometry", {
1783
- args: [gasketWidthM + 0.004, totalOpeningHeightM - 0.04, gasketDepthM]
1755
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.02, gasketDepthM]
1784
1756
  })
1785
1757
  })]
1786
- }), glassVisible && /*#__PURE__*/jsxs(Fragment, {
1758
+ }), ["WDGF_WDG100", "WF_100", "WF_FLI"].includes(frameType) && /*#__PURE__*/jsxs("group", {
1787
1759
  children: [/*#__PURE__*/jsxs("group", {
1788
- children: [["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsx("mesh", {
1789
- castShadow: true,
1790
- position: [0, topFrameCenterY - secondDoorStopWidthM / 2, leftGlass_Z],
1791
- material: allMaterials.glassInfillMaterial,
1792
- children: /*#__PURE__*/jsx("boxGeometry", {
1793
- args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM + secondDoorStopWidthM, GlassPanelDepthM]
1794
- })
1795
- }), !["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsx("mesh", {
1760
+ children: [/*#__PURE__*/jsx("mesh", {
1796
1761
  castShadow: true,
1797
- position: [0, topFrameCenterY, leftGlass_Z],
1798
- material: allMaterials.glassInfillMaterial,
1762
+ position: [0, totalOpeningHeightM / 2 - secondDoorStopWidthM / 2, secondDoorStopPositionZ],
1763
+ material: allMaterials.doorStopMaterial,
1799
1764
  children: /*#__PURE__*/jsx("boxGeometry", {
1800
- args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM, GlassPanelDepthM]
1765
+ args: [totalOpeningWidthM, secondDoorStopWidthM, secondDoorStopDepthM]
1801
1766
  })
1802
1767
  }), /*#__PURE__*/jsx("mesh", {
1803
1768
  castShadow: true,
1804
- position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2 + secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1805
- material: allMaterials.glassInfillMaterial,
1769
+ position: [-totalOpeningWidthM / 2 + secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1770
+ material: allMaterials.doorStopMaterial,
1806
1771
  children: /*#__PURE__*/jsx("boxGeometry", {
1807
- args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1772
+ args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1808
1773
  })
1809
1774
  }), /*#__PURE__*/jsx("mesh", {
1810
1775
  castShadow: true,
1811
- position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2 - secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1812
- material: allMaterials.glassInfillMaterial,
1776
+ position: [totalOpeningWidthM / 2 - secondDoorStopWidthM / 2, 0, secondDoorStopPositionZ],
1777
+ material: allMaterials.doorStopMaterial,
1813
1778
  children: /*#__PURE__*/jsx("boxGeometry", {
1814
- args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1779
+ args: [secondDoorStopWidthM, totalOpeningHeightM, secondDoorStopDepthM]
1815
1780
  })
1816
1781
  })]
1817
1782
  }), /*#__PURE__*/jsxs("group", {
1818
1783
  children: [/*#__PURE__*/jsx("mesh", {
1819
1784
  castShadow: true,
1820
- position: [0, topFrameCenterY, rightGlass_Z],
1821
- material: allMaterials.glassInfillMaterial,
1785
+ position: [0, secondTopGasketYPosition - 0.005, secondGasketZPosition],
1786
+ material: allMaterials.gasketMaterial,
1822
1787
  children: /*#__PURE__*/jsx("boxGeometry", {
1823
- args: [totalOpeningWidthM, topFrameWidthM, GlassPanelDepthM]
1788
+ args: [totalOpeningWidthM - 0.03, gasketWidthM + 0.005, gasketDepthM]
1824
1789
  })
1825
1790
  }), /*#__PURE__*/jsx("mesh", {
1826
1791
  castShadow: true,
1827
- position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1828
- material: allMaterials.glassInfillMaterial,
1792
+ position: [secondLeftGasketXPosition - 0.005, -0.01, secondGasketZPosition],
1793
+ material: allMaterials.gasketMaterial,
1829
1794
  children: /*#__PURE__*/jsx("boxGeometry", {
1830
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1795
+ args: [gasketWidthM + 0.005, totalOpeningHeightM - 0.04, gasketDepthM]
1831
1796
  })
1832
1797
  }), /*#__PURE__*/jsx("mesh", {
1833
1798
  castShadow: true,
1834
- position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1835
- material: allMaterials.glassInfillMaterial,
1799
+ position: [secondRightGasketXPosition + 0.005, -0.01, secondGasketZPosition],
1800
+ material: allMaterials.gasketMaterial,
1836
1801
  children: /*#__PURE__*/jsx("boxGeometry", {
1837
- args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1802
+ args: [gasketWidthM + 0.004, totalOpeningHeightM - 0.04, gasketDepthM]
1838
1803
  })
1839
1804
  })]
1805
+ }), glassVisible && /*#__PURE__*/jsxs(Fragment, {
1806
+ children: [/*#__PURE__*/jsxs("group", {
1807
+ children: [["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsx("mesh", {
1808
+ castShadow: true,
1809
+ position: [0, topFrameCenterY - secondDoorStopWidthM / 2, leftGlass_Z],
1810
+ material: allMaterials.glassInfillMaterial,
1811
+ children: /*#__PURE__*/jsx("boxGeometry", {
1812
+ args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM + secondDoorStopWidthM, GlassPanelDepthM]
1813
+ })
1814
+ }), !["WDGF_WDG100", "WF_100"].includes(frameType) && /*#__PURE__*/jsx("mesh", {
1815
+ castShadow: true,
1816
+ position: [0, topFrameCenterY, leftGlass_Z],
1817
+ material: allMaterials.glassInfillMaterial,
1818
+ children: /*#__PURE__*/jsx("boxGeometry", {
1819
+ args: [totalOpeningWidthM - 2 * secondDoorStopWidthM, topFrameWidthM, GlassPanelDepthM]
1820
+ })
1821
+ }), /*#__PURE__*/jsx("mesh", {
1822
+ castShadow: true,
1823
+ position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2 + secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1824
+ material: allMaterials.glassInfillMaterial,
1825
+ children: /*#__PURE__*/jsx("boxGeometry", {
1826
+ args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1827
+ })
1828
+ }), /*#__PURE__*/jsx("mesh", {
1829
+ castShadow: true,
1830
+ position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2 - secondDoorStopWidthM / 2, sideFrameCenterY, leftGlass_Z],
1831
+ material: allMaterials.glassInfillMaterial,
1832
+ children: /*#__PURE__*/jsx("boxGeometry", {
1833
+ args: [sidesFrameWidthM + secondDoorStopWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1834
+ })
1835
+ })]
1836
+ }), /*#__PURE__*/jsxs("group", {
1837
+ children: [/*#__PURE__*/jsx("mesh", {
1838
+ castShadow: true,
1839
+ position: [0, topFrameCenterY, rightGlass_Z],
1840
+ material: allMaterials.glassInfillMaterial,
1841
+ children: /*#__PURE__*/jsx("boxGeometry", {
1842
+ args: [totalOpeningWidthM, topFrameWidthM, GlassPanelDepthM]
1843
+ })
1844
+ }), /*#__PURE__*/jsx("mesh", {
1845
+ castShadow: true,
1846
+ position: [-totalOpeningWidthM / 2 - sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1847
+ material: allMaterials.glassInfillMaterial,
1848
+ children: /*#__PURE__*/jsx("boxGeometry", {
1849
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1850
+ })
1851
+ }), /*#__PURE__*/jsx("mesh", {
1852
+ castShadow: true,
1853
+ position: [totalOpeningWidthM / 2 + sidesFrameWidthM / 2, sideFrameCenterY, rightGlass_Z],
1854
+ material: allMaterials.glassInfillMaterial,
1855
+ children: /*#__PURE__*/jsx("boxGeometry", {
1856
+ args: [sidesFrameWidthM, totalOpeningHeightM + topFrameWidthM, GlassPanelDepthM]
1857
+ })
1858
+ })]
1859
+ })]
1840
1860
  })]
1841
1861
  })]
1842
- })]
1843
- }), interiorFanlight.visible && /*#__PURE__*/jsx("mesh", {
1844
- position: [0, interiorFanlightYPosition, doorCenterZ],
1845
- castShadow: true,
1846
- material: allMaterials.interiorFanlightMaterial,
1847
- children: /*#__PURE__*/jsx("boxGeometry", {
1848
- args: [totalOpeningWidthM, interiorFanlightHeightM, doorDepthM]
1849
- })
1850
- }), doorInstances.map(instance => /*#__PURE__*/jsx(DoorLeaf, {
1851
- pivot: instance.pivot,
1852
- xOffset: instance.x,
1853
- materials: allMaterials
1854
- }, instance.key))]
1855
- })
1856
- });
1862
+ }), interiorFanlight.visible && /*#__PURE__*/jsx("mesh", {
1863
+ position: [0, interiorFanlightYPosition, doorCenterZ],
1864
+ castShadow: true,
1865
+ material: allMaterials.interiorFanlightMaterial,
1866
+ children: /*#__PURE__*/jsx("boxGeometry", {
1867
+ args: [totalOpeningWidthM, interiorFanlightHeightM, doorDepthM]
1868
+ })
1869
+ }), doorInstances.map(instance => /*#__PURE__*/jsx(DoorLeaf, {
1870
+ pivot: instance.pivot,
1871
+ xOffset: instance.x,
1872
+ materials: allMaterials
1873
+ }, instance.key))]
1874
+ })]
1875
+ }) // CHANGE END: Close the new parent group
1876
+ );
1857
1877
  }
1858
1878
 
1859
1879
  // {
@@ -2224,7 +2244,10 @@ const DoorConfigurator = _ref => {
2224
2244
  materials,
2225
2245
  doorPivot,
2226
2246
  doorOpening,
2227
- is2D = false
2247
+ is2D = false,
2248
+ totalWidth,
2249
+ totalHeight,
2250
+ frameDepth
2228
2251
  } = _ref;
2229
2252
  return /*#__PURE__*/jsx(ConfiguratorProvider, {
2230
2253
  initialIs2D: is2D,
@@ -2232,7 +2255,10 @@ const DoorConfigurator = _ref => {
2232
2255
  doorName: doorName,
2233
2256
  materials: materials,
2234
2257
  doorPivot: doorPivot,
2235
- doorOpening: doorOpening
2258
+ doorOpening: doorOpening,
2259
+ totalWidth: totalWidth,
2260
+ totalHeight: totalHeight,
2261
+ frameDepth: frameDepth
2236
2262
  })
2237
2263
  });
2238
2264
  };