door_models 5.1.5 → 5.1.7
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 +154 -152
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +154 -152
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -336,8 +336,9 @@ const ConfiguratorProvider = _ref => {
|
|
|
336
336
|
setOcculus(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
337
337
|
visible: newConfig.occulusVisible
|
|
338
338
|
}));
|
|
339
|
+
setCpid(cpidToParse);
|
|
339
340
|
showMessage("Configuration Applied!", "success");
|
|
340
|
-
}, [setBodyType, setExteriorFanlight, setExteriorFanlightType, setFrameType, setInteriorFanlight, setOcculus, setIsDoubleDoor, setTotalWidth]);
|
|
341
|
+
}, [setCpid, setBodyType, setExteriorFanlight, setExteriorFanlightType, setFrameType, setInteriorFanlight, setOcculus, setIsDoubleDoor, setTotalWidth]);
|
|
341
342
|
|
|
342
343
|
// --- BodyType Effect ---
|
|
343
344
|
React.useEffect(() => {
|
|
@@ -1628,6 +1629,9 @@ function DoorModels(_ref7) {
|
|
|
1628
1629
|
x: 0
|
|
1629
1630
|
}];
|
|
1630
1631
|
}, [isDoubleDoor, doorWidthM, doorPivot]);
|
|
1632
|
+
if (cpid !== doorName) {
|
|
1633
|
+
return null;
|
|
1634
|
+
}
|
|
1631
1635
|
if (is2D) {
|
|
1632
1636
|
return /*#__PURE__*/jsxRuntime.jsx("group", {
|
|
1633
1637
|
"position-y": yCenteringOffset + 0.1,
|
|
@@ -2206,180 +2210,178 @@ function DoorLeaf(_ref8) {
|
|
|
2206
2210
|
}
|
|
2207
2211
|
return true;
|
|
2208
2212
|
}, [isFrameVisible, frameType, isGlassDoor]);
|
|
2209
|
-
return /*#__PURE__*/jsxRuntime.
|
|
2210
|
-
|
|
2211
|
-
|
|
2213
|
+
return /*#__PURE__*/jsxRuntime.jsxs("group", {
|
|
2214
|
+
"position-x": xOffset,
|
|
2215
|
+
children: [isStandardHingeVisible && standardHingeYPositions.map((y, index) => /*#__PURE__*/jsxRuntime.jsxs("group", {
|
|
2216
|
+
position: [hingeSideX, doorYPosition + y, hingeZ],
|
|
2217
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2218
|
+
material: hingeBodyMaterial,
|
|
2219
|
+
position: [0, separatorHeightM / 2 + barrelPartHeight / 2, 0],
|
|
2220
|
+
castShadow: true,
|
|
2221
|
+
children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
|
|
2222
|
+
args: [hingeRadiusM, hingeRadiusM, barrelPartHeight, 32]
|
|
2223
|
+
})
|
|
2224
|
+
}), /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2225
|
+
material: hingeAccentMaterial,
|
|
2226
|
+
position: [0, separatorHeightM / 2 + barrelPartHeight + capHeightM / 2, 0],
|
|
2227
|
+
castShadow: true,
|
|
2228
|
+
children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
|
|
2229
|
+
args: [hingeRadiusM, hingeRadiusM, capHeightM, 32]
|
|
2230
|
+
})
|
|
2231
|
+
})]
|
|
2232
|
+
}, "frame-hinge-".concat(index))), /*#__PURE__*/jsxRuntime.jsxs(three.a.group, {
|
|
2233
|
+
position: [hingeSideX, doorYPosition, hingeZ],
|
|
2234
|
+
rotation: rotation.to((x, y, z) => [x, y, z]),
|
|
2235
|
+
onClick: handleClick,
|
|
2236
|
+
onPointerOver: () => document.body.style.cursor = "pointer",
|
|
2237
|
+
onPointerOut: () => document.body.style.cursor = "auto",
|
|
2212
2238
|
children: [isStandardHingeVisible && standardHingeYPositions.map((y, index) => /*#__PURE__*/jsxRuntime.jsxs("group", {
|
|
2213
|
-
position: [
|
|
2239
|
+
position: [0, y, 0],
|
|
2214
2240
|
children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2215
2241
|
material: hingeBodyMaterial,
|
|
2216
|
-
position: [0, separatorHeightM / 2
|
|
2242
|
+
position: [0, -separatorHeightM / 2 - barrelPartHeight / 2, 0],
|
|
2217
2243
|
castShadow: true,
|
|
2218
2244
|
children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
|
|
2219
2245
|
args: [hingeRadiusM, hingeRadiusM, barrelPartHeight, 32]
|
|
2220
2246
|
})
|
|
2221
2247
|
}), /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2222
2248
|
material: hingeAccentMaterial,
|
|
2223
|
-
position: [0, separatorHeightM / 2
|
|
2249
|
+
position: [0, -separatorHeightM / 2 - barrelPartHeight - capHeightM / 2, 0],
|
|
2224
2250
|
castShadow: true,
|
|
2225
2251
|
children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
|
|
2226
2252
|
args: [hingeRadiusM, hingeRadiusM, capHeightM, 32]
|
|
2227
2253
|
})
|
|
2254
|
+
}), /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2255
|
+
material: hingeAccentMaterial,
|
|
2256
|
+
position: [0, 0, 0],
|
|
2257
|
+
castShadow: true,
|
|
2258
|
+
children: /*#__PURE__*/jsxRuntime.jsx("cylinderGeometry", {
|
|
2259
|
+
args: [hingeRadiusM, hingeRadiusM, separatorHeightM, 32]
|
|
2260
|
+
})
|
|
2228
2261
|
})]
|
|
2229
|
-
}, "
|
|
2230
|
-
position: [
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
material:
|
|
2276
|
-
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2277
|
-
args: [doorWidthM, mainDoorHeightM, doorDepthM]
|
|
2278
|
-
})
|
|
2279
|
-
}), /*#__PURE__*/jsxRuntime.jsx(DoorStopCuts, {
|
|
2280
|
-
visible: frameType === "WDGF_WDG100" || frameType === "WF_100" || frameType === "WF_FLI",
|
|
2281
|
-
width: doorWidthM,
|
|
2282
|
-
height: totalOpeningHeightM,
|
|
2283
|
-
stopWidth: doorStopWidthM,
|
|
2284
|
-
stopDepth: doorStopDepthM,
|
|
2285
|
-
stopPositionZ: doorStopPositionZ,
|
|
2286
|
-
centerZ: doorCenterZ,
|
|
2287
|
-
glassDepthOffset: GlassPanelDepthM / 2,
|
|
2288
|
-
material: doorMaterial,
|
|
2289
|
-
setName: "1"
|
|
2290
|
-
}), /*#__PURE__*/jsxRuntime.jsx(DoorStopCuts, {
|
|
2291
|
-
visible: frameType === "WDGF_WDG100" || frameType === "WF_100" || frameType === "WF_FLI",
|
|
2292
|
-
width: doorWidthM,
|
|
2293
|
-
height: totalOpeningHeightM,
|
|
2294
|
-
stopWidth: secondDoorStopWidthM,
|
|
2295
|
-
stopDepth: secondDoorStopDepthM,
|
|
2296
|
-
stopPositionZ: secondDoorStopPositionZ,
|
|
2297
|
-
centerZ: doorCenterZ,
|
|
2298
|
-
glassDepthOffset: GlassPanelDepthM / 2,
|
|
2299
|
-
material: doorMaterial,
|
|
2300
|
-
setName: "2"
|
|
2301
|
-
}), glassVisible && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2302
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2303
|
-
position: [0, 0, frontGlassOffsetZ],
|
|
2304
|
-
castShadow: true,
|
|
2305
|
-
material: glassInfillMaterial,
|
|
2306
|
-
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2307
|
-
args: [doorWidthM, mainDoorHeightM, GlassPanelDepthM]
|
|
2308
|
-
})
|
|
2309
|
-
}), frameType !== "WDGF_WDG100" && frameType !== "WF_100" && /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2310
|
-
position: [0, 0, backGlassOffsetZ],
|
|
2311
|
-
castShadow: true,
|
|
2312
|
-
material: glassInfillMaterial,
|
|
2313
|
-
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2314
|
-
args: [doorWidthM, mainDoorHeightM, GlassPanelDepthM]
|
|
2315
|
-
})
|
|
2316
|
-
}), (frameType === "WDGF_WDG100" || frameType === "WF_100") && /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2317
|
-
position: [0, -secondDoorStopWidthM / 2, backGlassOffsetZ],
|
|
2318
|
-
castShadow: true,
|
|
2319
|
-
material: glassInfillMaterial,
|
|
2320
|
-
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2321
|
-
args: [doorWidthM - 2 * secondDoorStopWidthM, mainDoorHeightM - secondDoorStopWidthM, GlassPanelDepthM]
|
|
2322
|
-
})
|
|
2323
|
-
})]
|
|
2324
|
-
}), occulus.visible && occulusWidthM > 0 && occulusHeightM > 0 && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
|
|
2325
|
-
material: placeholderMaterial,
|
|
2326
|
-
position: [occulusPositionXM, occulusPositionYM, 0],
|
|
2327
|
-
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2328
|
-
args: [occulusWidthM, occulusHeightM, doorDepthM + 0.01]
|
|
2329
|
-
})
|
|
2330
|
-
})]
|
|
2331
|
-
})
|
|
2332
|
-
}), frontDoorPlane.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2333
|
-
position: [0, 0, doorDepthM / 2 + 0.0005],
|
|
2334
|
-
castShadow: true,
|
|
2335
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
|
|
2336
|
-
useGroups: true,
|
|
2337
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
|
|
2338
|
-
material: frontDoorPlaneMaterial,
|
|
2339
|
-
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2340
|
-
args: [doorWidthM, mainDoorHeightM, 0.001]
|
|
2341
|
-
})
|
|
2342
|
-
}), occulus.visible && occulusWidthM > 0 && occulusHeightM > 0 && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
|
|
2343
|
-
position: [occulusPositionXM, occulusPositionYM, 0],
|
|
2262
|
+
}, "door-hinge-".concat(index))), isGlassDoor && isFrameVisible && glassHingeYPositions.map((y, index) => /*#__PURE__*/jsxRuntime.jsx(GlassHinge, {
|
|
2263
|
+
position: [0, y, doorOffsetZ + 0.0001],
|
|
2264
|
+
pivot: pivot,
|
|
2265
|
+
frameSideWidth: sidesFrameWidthM,
|
|
2266
|
+
doorDepthM: doorDepthM,
|
|
2267
|
+
material: hingeBodyMaterial,
|
|
2268
|
+
gasketMaterial: gasketMaterial
|
|
2269
|
+
}, "glass-hinge-".concat(index))), /*#__PURE__*/jsxRuntime.jsxs("group", {
|
|
2270
|
+
position: [-hingeSideX, 0, doorOffsetZ],
|
|
2271
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2272
|
+
castShadow: true,
|
|
2273
|
+
receiveShadow: true,
|
|
2274
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
|
|
2275
|
+
useGroups: true,
|
|
2276
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
|
|
2277
|
+
name: "door-base",
|
|
2278
|
+
material: doorMaterial,
|
|
2279
|
+
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2280
|
+
args: [doorWidthM, mainDoorHeightM, doorDepthM]
|
|
2281
|
+
})
|
|
2282
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DoorStopCuts, {
|
|
2283
|
+
visible: frameType === "WDGF_WDG100" || frameType === "WF_100" || frameType === "WF_FLI",
|
|
2284
|
+
width: doorWidthM,
|
|
2285
|
+
height: totalOpeningHeightM,
|
|
2286
|
+
stopWidth: doorStopWidthM,
|
|
2287
|
+
stopDepth: doorStopDepthM,
|
|
2288
|
+
stopPositionZ: doorStopPositionZ,
|
|
2289
|
+
centerZ: doorCenterZ,
|
|
2290
|
+
glassDepthOffset: GlassPanelDepthM / 2,
|
|
2291
|
+
material: doorMaterial,
|
|
2292
|
+
setName: "1"
|
|
2293
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DoorStopCuts, {
|
|
2294
|
+
visible: frameType === "WDGF_WDG100" || frameType === "WF_100" || frameType === "WF_FLI",
|
|
2295
|
+
width: doorWidthM,
|
|
2296
|
+
height: totalOpeningHeightM,
|
|
2297
|
+
stopWidth: secondDoorStopWidthM,
|
|
2298
|
+
stopDepth: secondDoorStopDepthM,
|
|
2299
|
+
stopPositionZ: secondDoorStopPositionZ,
|
|
2300
|
+
centerZ: doorCenterZ,
|
|
2301
|
+
glassDepthOffset: GlassPanelDepthM / 2,
|
|
2302
|
+
material: doorMaterial,
|
|
2303
|
+
setName: "2"
|
|
2304
|
+
}), glassVisible && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2305
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2306
|
+
position: [0, 0, frontGlassOffsetZ],
|
|
2307
|
+
castShadow: true,
|
|
2308
|
+
material: glassInfillMaterial,
|
|
2344
2309
|
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2345
|
-
args: [
|
|
2310
|
+
args: [doorWidthM, mainDoorHeightM, GlassPanelDepthM]
|
|
2346
2311
|
})
|
|
2347
|
-
})
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
castShadow: true,
|
|
2352
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
|
|
2353
|
-
useGroups: true,
|
|
2354
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
|
|
2355
|
-
material: backDoorPlaneMaterial,
|
|
2312
|
+
}), frameType !== "WDGF_WDG100" && frameType !== "WF_100" && /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2313
|
+
position: [0, 0, backGlassOffsetZ],
|
|
2314
|
+
castShadow: true,
|
|
2315
|
+
material: glassInfillMaterial,
|
|
2356
2316
|
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2357
|
-
args: [doorWidthM, mainDoorHeightM,
|
|
2317
|
+
args: [doorWidthM, mainDoorHeightM, GlassPanelDepthM]
|
|
2358
2318
|
})
|
|
2359
|
-
}),
|
|
2360
|
-
position: [
|
|
2319
|
+
}), (frameType === "WDGF_WDG100" || frameType === "WF_100") && /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2320
|
+
position: [0, -secondDoorStopWidthM / 2, backGlassOffsetZ],
|
|
2321
|
+
castShadow: true,
|
|
2322
|
+
material: glassInfillMaterial,
|
|
2361
2323
|
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2362
|
-
args: [
|
|
2324
|
+
args: [doorWidthM - 2 * secondDoorStopWidthM, mainDoorHeightM - secondDoorStopWidthM, GlassPanelDepthM]
|
|
2363
2325
|
})
|
|
2364
2326
|
})]
|
|
2365
|
-
})
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2327
|
+
}), occulus.visible && occulusWidthM > 0 && occulusHeightM > 0 && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
|
|
2328
|
+
material: placeholderMaterial,
|
|
2329
|
+
position: [occulusPositionXM, occulusPositionYM, 0],
|
|
2330
|
+
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2331
|
+
args: [occulusWidthM, occulusHeightM, doorDepthM + 0.01]
|
|
2332
|
+
})
|
|
2333
|
+
})]
|
|
2334
|
+
})
|
|
2335
|
+
}), frontDoorPlane.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2336
|
+
position: [0, 0, doorDepthM / 2 + 0.0005],
|
|
2337
|
+
castShadow: true,
|
|
2338
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
|
|
2339
|
+
useGroups: true,
|
|
2340
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
|
|
2341
|
+
material: frontDoorPlaneMaterial,
|
|
2342
|
+
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2343
|
+
args: [doorWidthM, mainDoorHeightM, 0.001]
|
|
2344
|
+
})
|
|
2345
|
+
}), occulus.visible && occulusWidthM > 0 && occulusHeightM > 0 && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
|
|
2346
|
+
position: [occulusPositionXM, occulusPositionYM, 0],
|
|
2347
|
+
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2348
|
+
args: [occulusWidthM, occulusHeightM, 0.002]
|
|
2349
|
+
})
|
|
2350
|
+
})]
|
|
2351
|
+
})
|
|
2352
|
+
}), backDoorPlane.visible && /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2353
|
+
position: [0, 0, -doorDepthM / 2 - 0.0005],
|
|
2354
|
+
castShadow: true,
|
|
2355
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(csg.Geometry, {
|
|
2356
|
+
useGroups: true,
|
|
2357
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(csg.Base, {
|
|
2358
|
+
material: backDoorPlaneMaterial,
|
|
2359
|
+
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2360
|
+
args: [doorWidthM, mainDoorHeightM, 0.0001]
|
|
2361
|
+
})
|
|
2362
|
+
}), occulus.visible && occulusWidthM > 0 && occulusHeightM > 0 && /*#__PURE__*/jsxRuntime.jsx(csg.Subtraction, {
|
|
2363
|
+
position: [occulusPositionXM, occulusPositionYM, 0],
|
|
2364
|
+
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2365
|
+
args: [occulusWidthM, occulusHeightM, 0.002]
|
|
2366
|
+
})
|
|
2367
|
+
})]
|
|
2368
|
+
})
|
|
2369
|
+
}), occulus.visible && occulus.infillVisible && occulusWidthM > 0 && occulusHeightM > 0 && /*#__PURE__*/jsxRuntime.jsx("mesh", {
|
|
2370
|
+
position: [occulusPositionXM, occulusPositionYM, 0],
|
|
2371
|
+
castShadow: true,
|
|
2372
|
+
material: occulusInfillMaterial,
|
|
2373
|
+
children: /*#__PURE__*/jsxRuntime.jsx("boxGeometry", {
|
|
2374
|
+
args: [occulusWidthM, occulusHeightM, occulusInfillDepthM]
|
|
2375
|
+
})
|
|
2376
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DoorHandle, {
|
|
2377
|
+
bodyType: bodyType,
|
|
2378
|
+
handleX: handleX,
|
|
2379
|
+
handleHeightM: handleHeightM,
|
|
2380
|
+
doorDepthM: doorDepthM,
|
|
2381
|
+
doorPivot: pivot
|
|
2380
2382
|
})]
|
|
2381
2383
|
})]
|
|
2382
|
-
})
|
|
2384
|
+
})]
|
|
2383
2385
|
});
|
|
2384
2386
|
}
|
|
2385
2387
|
|