door_models 5.5.0 → 5.5.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/4876aee6b84794a5.glb +0 -0
- package/dist/8c2e7b96d0c65ccb.glb +0 -0
- package/dist/index.cjs.js +82 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +82 -37
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -1
|
Binary file
|
|
Binary file
|
package/dist/index.cjs.js
CHANGED
|
@@ -295,7 +295,7 @@ const doorSettings = {
|
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
297
|
|
|
298
|
-
const _excluded = ["doorDepth"];
|
|
298
|
+
const _excluded$2 = ["doorDepth"];
|
|
299
299
|
const ConfiguratorContext = /*#__PURE__*/React.createContext(undefined);
|
|
300
300
|
const ConfiguratorProvider = _ref => {
|
|
301
301
|
let {
|
|
@@ -592,7 +592,7 @@ const ConfiguratorProvider = _ref => {
|
|
|
592
592
|
const {
|
|
593
593
|
doorDepth
|
|
594
594
|
} = newSettings,
|
|
595
|
-
newFrameSettings = _objectWithoutProperties(newSettings, _excluded);
|
|
595
|
+
newFrameSettings = _objectWithoutProperties(newSettings, _excluded$2);
|
|
596
596
|
setDoorFrame(prev => _objectSpread2(_objectSpread2({}, prev), newFrameSettings));
|
|
597
597
|
if (doorDepth !== undefined) {
|
|
598
598
|
setDoor(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
@@ -2006,6 +2006,82 @@ function GlassHandle(_ref) {
|
|
|
2006
2006
|
});
|
|
2007
2007
|
}
|
|
2008
2008
|
|
|
2009
|
+
var frontGLB = "4876aee6b84794a5.glb";
|
|
2010
|
+
|
|
2011
|
+
const _excluded$1 = ["color"];
|
|
2012
|
+
function HandlerStandardFront(_ref) {
|
|
2013
|
+
let {
|
|
2014
|
+
color
|
|
2015
|
+
} = _ref,
|
|
2016
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
2017
|
+
const {
|
|
2018
|
+
nodes,
|
|
2019
|
+
materials
|
|
2020
|
+
} = drei.useGLTF(frontGLB);
|
|
2021
|
+
React__default["default"].useLayoutEffect(() => {
|
|
2022
|
+
if (color) {
|
|
2023
|
+
Object.values(materials).forEach(material => {
|
|
2024
|
+
material.color.set(color);
|
|
2025
|
+
});
|
|
2026
|
+
}
|
|
2027
|
+
}, [materials, color]);
|
|
2028
|
+
return /*#__PURE__*/jsxRuntime.jsxs("group", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2029
|
+
dispose: null,
|
|
2030
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2031
|
+
geometry: nodes["001"].geometry,
|
|
2032
|
+
material: nodes["001"].material,
|
|
2033
|
+
position: [0, 0, 0.005]
|
|
2034
|
+
}), /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2035
|
+
geometry: nodes["002"].geometry,
|
|
2036
|
+
material: nodes["002"].material,
|
|
2037
|
+
rotation: [0, 0, -Math.PI / 2]
|
|
2038
|
+
}), /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2039
|
+
geometry: nodes["003"].geometry,
|
|
2040
|
+
material: nodes["003"].material,
|
|
2041
|
+
position: [0, -0.07, 0.006]
|
|
2042
|
+
})]
|
|
2043
|
+
}));
|
|
2044
|
+
}
|
|
2045
|
+
drei.useGLTF.preload(frontGLB);
|
|
2046
|
+
|
|
2047
|
+
var backGLB = "8c2e7b96d0c65ccb.glb";
|
|
2048
|
+
|
|
2049
|
+
const _excluded = ["color"];
|
|
2050
|
+
function HandlerStandardBack(_ref) {
|
|
2051
|
+
let {
|
|
2052
|
+
color
|
|
2053
|
+
} = _ref,
|
|
2054
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
2055
|
+
const {
|
|
2056
|
+
nodes,
|
|
2057
|
+
materials
|
|
2058
|
+
} = drei.useGLTF(backGLB);
|
|
2059
|
+
React__default["default"].useLayoutEffect(() => {
|
|
2060
|
+
if (color) {
|
|
2061
|
+
Object.values(materials).forEach(material => {
|
|
2062
|
+
material.color.set(color);
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2065
|
+
}, [materials, color]);
|
|
2066
|
+
return /*#__PURE__*/jsxRuntime.jsxs("group", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2067
|
+
dispose: null,
|
|
2068
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2069
|
+
geometry: nodes["001"].geometry,
|
|
2070
|
+
material: nodes["001"].material,
|
|
2071
|
+
position: [0, 0, 0.005]
|
|
2072
|
+
}), /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2073
|
+
geometry: nodes["002"].geometry,
|
|
2074
|
+
material: nodes["002"].material,
|
|
2075
|
+
rotation: [0, 0, Math.PI / 2]
|
|
2076
|
+
}), /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2077
|
+
geometry: nodes["003"].geometry,
|
|
2078
|
+
material: nodes["003"].material,
|
|
2079
|
+
position: [0, -0.07, 0.006]
|
|
2080
|
+
})]
|
|
2081
|
+
}));
|
|
2082
|
+
}
|
|
2083
|
+
drei.useGLTF.preload(backGLB);
|
|
2084
|
+
|
|
2009
2085
|
function StandardHandle(_ref) {
|
|
2010
2086
|
let {
|
|
2011
2087
|
position,
|
|
@@ -2014,41 +2090,12 @@ function StandardHandle(_ref) {
|
|
|
2014
2090
|
frameType,
|
|
2015
2091
|
handleColor
|
|
2016
2092
|
} = _ref;
|
|
2017
|
-
const frontGLTF = drei.useGLTF("/glb/HandlerStandardFront.glb");
|
|
2018
|
-
const backGLTF = drei.useGLTF("/glb/HandlerStandardBack.glb");
|
|
2019
|
-
|
|
2020
|
-
// Apply color to front handle materials
|
|
2021
|
-
React__default["default"].useEffect(() => {
|
|
2022
|
-
if (frontGLTF.materials) {
|
|
2023
|
-
Object.values(frontGLTF.materials).forEach(material => {
|
|
2024
|
-
if (material) {
|
|
2025
|
-
material.color.set(handleColor);
|
|
2026
|
-
}
|
|
2027
|
-
});
|
|
2028
|
-
}
|
|
2029
|
-
}, [frontGLTF.materials, handleColor]);
|
|
2030
|
-
|
|
2031
|
-
// Apply color to back handle materials
|
|
2032
|
-
React__default["default"].useEffect(() => {
|
|
2033
|
-
if (backGLTF.materials) {
|
|
2034
|
-
Object.values(backGLTF.materials).forEach(material => {
|
|
2035
|
-
if (material) {
|
|
2036
|
-
material.color.set(handleColor);
|
|
2037
|
-
}
|
|
2038
|
-
});
|
|
2039
|
-
}
|
|
2040
|
-
}, [backGLTF.materials, handleColor]);
|
|
2041
|
-
|
|
2042
2093
|
// --- Thickness ---
|
|
2043
2094
|
// default 5mm, but 8mm + 1–2mm if WDG frame
|
|
2044
2095
|
const roseThickness = frameType === "WDGF_WDG100" ? 0.008 + 0.0015 : 0.005;
|
|
2045
2096
|
|
|
2046
2097
|
// face offset based on thickness
|
|
2047
2098
|
const faceZ = doorDepthM / 2 + roseThickness / 2;
|
|
2048
|
-
|
|
2049
|
-
// Clone scenes
|
|
2050
|
-
const frontScene = React__default["default"].useMemo(() => frontGLTF.nodes.Scene.clone() || frontGLTF.nodes.root.clone(), [frontGLTF]);
|
|
2051
|
-
const backScene = React__default["default"].useMemo(() => backGLTF.nodes.Scene.clone() || backGLTF.nodes.root.clone(), [backGLTF]);
|
|
2052
2099
|
return /*#__PURE__*/jsxRuntime.jsx("group", {
|
|
2053
2100
|
scale: 1.5,
|
|
2054
2101
|
position: position,
|
|
@@ -2056,16 +2103,14 @@ function StandardHandle(_ref) {
|
|
|
2056
2103
|
scale: [doorPivot === "left" ? -1 : 1, 1, 1],
|
|
2057
2104
|
children: [/*#__PURE__*/jsxRuntime.jsx("group", {
|
|
2058
2105
|
position: [0, 0, faceZ],
|
|
2059
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
2060
|
-
|
|
2061
|
-
castShadow: CAST_SHADOW_MESHES
|
|
2106
|
+
children: /*#__PURE__*/jsxRuntime.jsx(HandlerStandardFront, {
|
|
2107
|
+
color: handleColor
|
|
2062
2108
|
})
|
|
2063
2109
|
}), /*#__PURE__*/jsxRuntime.jsx("group", {
|
|
2064
2110
|
position: [0, 0, -faceZ],
|
|
2065
2111
|
rotation: [0, Math.PI, 0],
|
|
2066
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
2067
|
-
|
|
2068
|
-
castShadow: CAST_SHADOW_MESHES
|
|
2112
|
+
children: /*#__PURE__*/jsxRuntime.jsx(HandlerStandardBack, {
|
|
2113
|
+
color: handleColor
|
|
2069
2114
|
})
|
|
2070
2115
|
})]
|
|
2071
2116
|
})
|