@roomle/web-sdk 3.9.0 → 3.10.0-alpha.2
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/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/RoomleCore.js +5 -5
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{api-52cOotqw.mjs → api-BXU3pZnX.mjs} +10 -10
- package/lib/{api-52cOotqw.mjs.map → api-BXU3pZnX.mjs.map} +1 -1
- package/lib/asset-loader.worker-C911tbNL.mjs.map +1 -1
- package/lib/budgeteer.sw-D3VxiASa.mjs.map +1 -1
- package/lib/{component-dimensioning-12aJsCzQ.mjs → component-dimensioning-5iIw1f_3.mjs} +2 -2
- package/lib/{component-dimensioning-12aJsCzQ.mjs.map → component-dimensioning-5iIw1f_3.mjs.map} +1 -1
- package/lib/{component-raycast-helper-CcrmOq29.mjs → component-raycast-helper-O27_buEg.mjs} +2 -2
- package/lib/{component-raycast-helper-CcrmOq29.mjs.map → component-raycast-helper-O27_buEg.mjs.map} +1 -1
- package/lib/configurator-BIyxKNI0.mjs +2 -0
- package/lib/configurator-BwxEIDv7.mjs +45 -0
- package/lib/{configurator-D3ZKy6bf.mjs.map → configurator-BwxEIDv7.mjs.map} +1 -1
- package/lib/{glb-viewer-BJJ9OIlH.mjs → glb-viewer-C0Et5SO6.mjs} +17 -17
- package/lib/{glb-viewer-BJJ9OIlH.mjs.map → glb-viewer-C0Et5SO6.mjs.map} +1 -1
- package/lib/glb-viewer-DfMzLkqg.mjs +2 -0
- package/lib/{highlight-coordinator-BuFleG2q.mjs → highlight-coordinator-DdQ8yNjO.mjs} +2 -2
- package/lib/{highlight-coordinator-BuFleG2q.mjs.map → highlight-coordinator-DdQ8yNjO.mjs.map} +1 -1
- package/lib/{homag-intelligence-BxpMWKLs.mjs → homag-intelligence-DrKayEjK.mjs} +4 -4
- package/lib/homag-intelligence-DrKayEjK.mjs.map +1 -0
- package/lib/kernel-C7YDLxq8.mjs.map +1 -1
- package/lib/{main-QTvbXAvy.mjs → main-D2BulNeN.mjs} +5039 -4351
- package/lib/main-D2BulNeN.mjs.map +1 -0
- package/lib/{material-viewer-BPcCfvCC.mjs → material-viewer-CZQwo8Nc.mjs} +21 -21
- package/lib/material-viewer-CZQwo8Nc.mjs.map +1 -0
- package/lib/packages-BtLLQZLz.mjs +4 -0
- package/lib/planner-BF94NrwH.mjs +2 -0
- package/lib/planner-OgIPgZ1m.mjs +44 -0
- package/lib/{planner-C1-sOmHY.mjs.map → planner-OgIPgZ1m.mjs.map} +1 -1
- package/lib/roomle-headless.d.ts +521 -146
- package/lib/roomle-headless.js +45 -45
- package/lib/roomle-headless.js.map +1 -1
- package/lib/roomle-sdk.d.ts +521 -146
- package/lib/roomle-sdk.js +8 -8
- package/lib/{roomle-webgpu-renderer-BrZZeAGw.mjs → roomle-webgpu-renderer-5-aG3CMs.mjs} +2 -2
- package/lib/{roomle-webgpu-renderer-BrZZeAGw.mjs.map → roomle-webgpu-renderer-5-aG3CMs.mjs.map} +1 -1
- package/lib/{scene-renderer-3nhM4cEu.mjs → scene-renderer-DvXjoKHZ.mjs} +2 -2
- package/lib/{scene-renderer-3nhM4cEu.mjs.map → scene-renderer-DvXjoKHZ.mjs.map} +1 -1
- package/lib/{script-loader-3LiaLeLT.mjs → script-loader-CScqyQhc.mjs} +2 -2
- package/lib/{script-loader-3LiaLeLT.mjs.map → script-loader-CScqyQhc.mjs.map} +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +36 -24
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +5 -5
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{stats-helper-COC7Moh0.mjs → stats-helper-BYi5TI_H.mjs} +2 -2
- package/lib/{stats-helper-COC7Moh0.mjs.map → stats-helper-BYi5TI_H.mjs.map} +1 -1
- package/lib/{threejs-utils-CElderZe.mjs → threejs-utils-C4J_TZ0o.mjs} +61 -57
- package/lib/threejs-utils-C4J_TZ0o.mjs.map +1 -0
- package/lib/{tools-core-mkA4m80O.mjs → tools-core-BCkbEbim.mjs} +5 -5
- package/lib/{tools-core-mkA4m80O.mjs.map → tools-core-BCkbEbim.mjs.map} +1 -1
- package/package.json +1 -1
- package/lib/configurator-CarZpfPv.mjs +0 -2
- package/lib/configurator-D3ZKy6bf.mjs +0 -45
- package/lib/glb-viewer-CJ7BPqI-.mjs +0 -2
- package/lib/homag-intelligence-BxpMWKLs.mjs.map +0 -1
- package/lib/main-QTvbXAvy.mjs.map +0 -1
- package/lib/material-viewer-BPcCfvCC.mjs.map +0 -1
- package/lib/packages-JQ2uWInj.mjs +0 -4
- package/lib/planner-C1-sOmHY.mjs +0 -44
- package/lib/planner-CnRaQM_h.mjs +0 -2
- package/lib/threejs-utils-CElderZe.mjs.map +0 -1
|
@@ -9,27 +9,31 @@ var ee = {
|
|
|
9
9
|
}, te = {
|
|
10
10
|
FLOOR: 0,
|
|
11
11
|
ROOM: 1
|
|
12
|
-
}, ne =
|
|
12
|
+
}, ne = [
|
|
13
|
+
"startInteraction",
|
|
14
|
+
"resumeInteraction",
|
|
15
|
+
"endInteraction"
|
|
16
|
+
], re = {
|
|
13
17
|
NONE: 0,
|
|
14
18
|
WALL_SNAP_LEVEL: 1,
|
|
15
19
|
WALL_SNAP_LEVEL_SNAPPED: 2,
|
|
16
20
|
WALL_EDGE: 3,
|
|
17
21
|
DOCKING_VECTOR: 4,
|
|
18
22
|
OBJECT_CONTOUR: 5
|
|
19
|
-
},
|
|
23
|
+
}, ie = {
|
|
20
24
|
DEFAULT: 0,
|
|
21
25
|
DOCKING: 1,
|
|
22
26
|
COLLISION: 2
|
|
23
27
|
}, b = /* @__PURE__ */ function(e) {
|
|
24
28
|
return e[e.StandAloneWall = 0] = "StandAloneWall", e[e.OuterWallLeft = 1] = "OuterWallLeft", e[e.OuterWallRight = 2] = "OuterWallRight", e[e.InnerWall = 3] = "InnerWall", e;
|
|
25
|
-
}({}),
|
|
29
|
+
}({}), ae = {
|
|
26
30
|
DEFAULT: 0,
|
|
27
31
|
TERRAIN: 1
|
|
28
|
-
},
|
|
32
|
+
}, oe = {
|
|
29
33
|
WALL: 0,
|
|
30
34
|
EDGE: 1,
|
|
31
35
|
CONSTRUCTION: 2
|
|
32
|
-
},
|
|
36
|
+
}, se = {
|
|
33
37
|
OBJECT: 0,
|
|
34
38
|
DOOR: 1,
|
|
35
39
|
WINDOW: 2,
|
|
@@ -39,32 +43,32 @@ var ee = {
|
|
|
39
43
|
return Math.PI / 180 * e;
|
|
40
44
|
}, S = function(e) {
|
|
41
45
|
return 180 / Math.PI * e;
|
|
42
|
-
},
|
|
46
|
+
}, ce = function(e) {
|
|
43
47
|
return e >= 0 ? -180 + (e + 180) % 360 : 180 - (-e + 180) % 360;
|
|
44
|
-
},
|
|
48
|
+
}, le = function(e, t, n, r, i, a) {
|
|
45
49
|
e = Math.sqrt(e * e + n * n);
|
|
46
50
|
let o = i / a || 1, s = 2 * Math.atan(Math.tan(r * Math.PI / 180 / 2) * o) * 180 / Math.PI, c = x(r), l = t / 2 / Math.tan(c / 2), u = e / (2 * Math.atan(Math.PI * s / 360));
|
|
47
51
|
return Math.max(l, u);
|
|
48
52
|
}, C = function(e) {
|
|
49
53
|
return Math.round(e * 1e3) / 1e3;
|
|
50
|
-
}, le = function(e, t) {
|
|
51
|
-
return Math.abs(e.y - t.y) + Math.abs(e.x - t.x);
|
|
52
54
|
}, ue = function(e, t) {
|
|
55
|
+
return Math.abs(e.y - t.y) + Math.abs(e.x - t.x);
|
|
56
|
+
}, de = function(e, t) {
|
|
53
57
|
return Math.atan2(t.y - e.y, t.x - e.x);
|
|
54
|
-
},
|
|
58
|
+
}, fe = function(e) {
|
|
55
59
|
let t = S(e);
|
|
56
60
|
return t < 0 && (t = 180 + (180 + t)), t;
|
|
57
61
|
}, w = /* @__PURE__ */ function(e) {
|
|
58
62
|
return e[e.NODE = 0] = "NODE", e[e.WALL = 1] = "WALL", e[e.OBJECT = 2] = "OBJECT", e[e.FLOOR = 3] = "FLOOR", e[e.TEXT = 4] = "TEXT", e[e.MEASURE = 5] = "MEASURE", e[e.IMAGE = 6] = "IMAGE", e[e.CEILING = 7] = "CEILING", e;
|
|
59
|
-
}({}),
|
|
63
|
+
}({}), pe = {
|
|
60
64
|
LEFT: 0,
|
|
61
65
|
RIGHT: 1,
|
|
62
66
|
MIDDLE: 2
|
|
63
|
-
},
|
|
67
|
+
}, me = /* @__PURE__ */ function(e) {
|
|
64
68
|
return e[e.None = 0] = "None", e[e.CatalogItem = 1] = "CatalogItem", e[e.Material = 2] = "Material", e[e.RgbValue = 3] = "RgbValue", e;
|
|
65
|
-
}({}),
|
|
69
|
+
}({}), he = /* @__PURE__ */ function(e) {
|
|
66
70
|
return e[e.CONTINOUS = 0] = "CONTINOUS", e[e.CLICK_PER_CLICK = 1] = "CLICK_PER_CLICK", e;
|
|
67
|
-
}({}),
|
|
71
|
+
}({}), ge = {
|
|
68
72
|
WALL: 0,
|
|
69
73
|
ROOM_CONTOUR: 1,
|
|
70
74
|
CONTOUR: 2
|
|
@@ -448,21 +452,21 @@ var P = null;
|
|
|
448
452
|
globalThis.window !== void 0 && import("./dat.gui.module-CZ-DIWHM.mjs").then((e) => {
|
|
449
453
|
P = e.GUI;
|
|
450
454
|
}).catch(() => {});
|
|
451
|
-
var
|
|
455
|
+
var _e = .4, F = "#DDDDDD", I = .4, ve = "#7B7B7B", ye = "#B1B1B1", be = .8, xe = .9, Se = (e) => e instanceof g ? e.capabilities.maxSamples : 16, Ce = (e) => e instanceof g ? e.capabilities.maxTextures : 16, we = (e) => e instanceof g ? e.capabilities.getMaxAnisotropy() : 16, Te = (e, t, n, r) => {
|
|
452
456
|
if (!e || !t || n === 0 || r === 0) return new a();
|
|
453
457
|
let i = e.clone(), o = n / 2, s = r / 2;
|
|
454
458
|
return i.project(t), i.x = Math.floor(i.x * o + o), i.y = Math.floor(-(i.y * s) + s), i.z = e.distanceTo(t.position), i;
|
|
455
|
-
},
|
|
459
|
+
}, Ee = (e, t) => {
|
|
456
460
|
t ||= new a(0, 0, 0);
|
|
457
461
|
let n = new a(e.size.x / 1e3, e.size.z / 1e3, e.size.y / 1e3), r = new a(e.origin.x / 1e3, e.origin.z / 1e3, e.origin.y / -1e3);
|
|
458
462
|
return new u(new a(0, 0, -n.z).add(r).sub(t), new a(n.x, n.y, 0).add(r).add(t));
|
|
459
|
-
},
|
|
463
|
+
}, De = (e) => (e.from /= 1e3, e.to /= 1e3, e), Oe = (e, t) => {
|
|
460
464
|
let n = C(e.x), r = C(e.y), i = C(e.z), a = C(t.x), o = C(t.y), s = C(t.z);
|
|
461
465
|
return n === a && r === o && i === s;
|
|
462
|
-
},
|
|
466
|
+
}, ke = (e, t) => {
|
|
463
467
|
let n = C(e.w), r = C(e.x), i = C(e.y), a = C(e.z), o = C(t.w), s = C(t.x), c = C(t.y), l = C(t.z);
|
|
464
468
|
return n === o && r === s && i === c && a === l;
|
|
465
|
-
},
|
|
469
|
+
}, Ae = (e, t) => {
|
|
466
470
|
let n = C(e.x), r = C(e.y), i = C(t.x), a = C(t.y);
|
|
467
471
|
return n === i && r === a;
|
|
468
472
|
}, L = null, R = () => {
|
|
@@ -474,20 +478,20 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
474
478
|
}
|
|
475
479
|
let n = new o(e, 1, 1, t);
|
|
476
480
|
return n.needsUpdate = !0, n;
|
|
477
|
-
},
|
|
478
|
-
e ||=
|
|
481
|
+
}, je = (e) => z(null, e), z = (e, t) => {
|
|
482
|
+
e ||= Pe(), e.name = t.id ? t.id.toString() : "";
|
|
479
483
|
let n = t.shading.version === "2" || t.shading.version?.startsWith("2.");
|
|
480
|
-
return e = n ?
|
|
481
|
-
},
|
|
484
|
+
return e = n ? Ne(e, t) : Me(e, t), e.userData.materialVersion = n ? 2 : 1, e.map || (L ||= R(), e.map = L), e;
|
|
485
|
+
}, Me = (e, t) => {
|
|
482
486
|
t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = y(t.shading.metallic, .5));
|
|
483
487
|
let n = !1;
|
|
484
488
|
return t.shading.transmission && t.shading.transmission > 0 ? (e.opacity = 1 - t.shading.transmission, e.transparent = !0, e.depthWrite = !1, e.metalness = 0, n = !0) : t.shading.alpha !== void 0 && t.shading.alpha < 1 && (e.transparent = t.shading.alpha < 1, e.opacity = t.shading.alpha, e.depthWrite = t.shading.alpha >= 1, e.metalness = .5 * Math.max(0, t.shading.alpha), n = !0), e.aoMapIntensity = y(t.shading.occlusion, 1), e.roughness = y(t.shading.roughness, .5), e.alphaTest = y(t.shading.alphaCutoff, 0), B(e.color, t.shading.basecolor), n || t.shading.doubleSided ? e.side = 2 : e.side = 0, e;
|
|
485
|
-
},
|
|
489
|
+
}, Ne = (e, t) => {
|
|
486
490
|
let n = !1, r = t.shading.transmission && t.shading.transmission > 0;
|
|
487
491
|
t.shading.alpha !== void 0 && t.shading.alpha < 1 ? (e.transparent = !0, e.opacity = t.shading.alpha, e.depthWrite = !1, n = !0) : (e.transparent = !1, e.opacity = 1, e.depthWrite = !0), e.alphaTest = t.shading.alphaCutoff ?? 0, B(e.color, t.shading.basecolor), e.transmission = t.shading.transmission ?? 0, e.ior = Math.max(1, Math.min(2.33, t.shading.transmissionIOR ?? 1.5)), e.metalness = t.shading.metallic ?? 0, B(e.specularColor, t.shading.specularColor), e.specularIntensity = t.shading.specularity ?? 1, e.roughness = t.shading.roughness ?? 0, e.aoMapIntensity = t.shading.occlusion ?? 1, B(e.emissive, t.shading.emissiveColor), e.emissiveIntensity = t.shading.emissiveIntensity ?? 1, e.clearcoat = t.shading.clearcoatIntensity ?? 0, e.clearcoatRoughness = t.shading.clearcoatRoughness ?? 0, e.clearcoatNormalScale.setScalar(t.shading.clearcoatNormalScale ?? 1), B(e.sheenColor, t.shading.sheenColor), e.sheen = t.shading.sheenIntensity ?? 1, e.sheenRoughness = t.shading.sheenRoughness ?? 1, e.thickness = t.shading.thicknessFactor ?? 0;
|
|
488
492
|
let i = t.shading.attenuationDistance;
|
|
489
493
|
return r && i === 0 ? console.warn("invalid attenuation configuration for transmissive material -- Skipping attenuation color and distance configuration in material.") : (B(e.attenuationColor, t.shading.attenuationColor), i != null && (e.attenuationDistance = i)), e.side = n || t.shading.doubleSided ? 2 : 0, e;
|
|
490
|
-
},
|
|
494
|
+
}, Pe = () => T.createMeshPhysicalMaterial({}), Fe = (e, t = 1) => t === 2 ? Le(e) : Ie(e), Ie = (e) => {
|
|
491
495
|
let t = {
|
|
492
496
|
alpha: e.opacity,
|
|
493
497
|
metallic: e.reflectivity,
|
|
@@ -498,7 +502,7 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
498
502
|
transmission: e.transmission
|
|
499
503
|
};
|
|
500
504
|
return e.metalness === 1 ? t.metallic = 1 : t.metallic = e.reflectivity, t;
|
|
501
|
-
},
|
|
505
|
+
}, Le = (e) => ({
|
|
502
506
|
version: "2.0.0",
|
|
503
507
|
alpha: e.opacity,
|
|
504
508
|
alphaCutoff: e.alphaTest,
|
|
@@ -534,7 +538,7 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
534
538
|
g: t.g,
|
|
535
539
|
b: t.b
|
|
536
540
|
};
|
|
537
|
-
}, H = null,
|
|
541
|
+
}, H = null, Re = (e, t, n, r, i, a, o = 16) => {
|
|
538
542
|
H || (H = new p(), H.crossOrigin = "");
|
|
539
543
|
let s = H;
|
|
540
544
|
return new Promise((c, l) => {
|
|
@@ -561,10 +565,10 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
561
565
|
console.warn("ORM maps are not supported on devices with only " + s + " texture units");
|
|
562
566
|
return;
|
|
563
567
|
}
|
|
564
|
-
e.repeat.set(a, o),
|
|
565
|
-
},
|
|
568
|
+
e.repeat.set(a, o), ze(e, t, n), t.mapping === v.RGBA && (n.transparent = !0, n.userData.materialVersion === 1 && n.name.includes("glow") && (n.emissiveIntensity = .5, n.emissive = new h(16777215), n.emissiveMap = n.map)), n.needsUpdate = !0;
|
|
569
|
+
}, ze = (t, n, r) => {
|
|
566
570
|
n.mapping === v.XYZ ? (r.normalMap = t, r.map === R() && (r.map = null)) : n.mapping === v.ORM ? (r.aoMap = t, r.roughnessMap = t, r.metalnessMap = t) : n.mapping === v.EMRGB ? r.emissiveMap = t : n.mapping === v.CCRG ? (r.clearcoatMap = t, r.clearcoatRoughnessMap = t) : n.mapping === v.CCXYZ ? r.clearcoatNormalMap = t : n.mapping === v.SHRGBA ? (r.sheenColorMap = t, r.sheenRoughnessMap = t) : n.mapping === v.SPRGBA ? (r.specularColorMap = t, r.specularIntensityMap = t) : n.mapping === v.TTRG ? (r.transmissionMap = t, r.thicknessMap = t) : (t.colorSpace = e, r.map = t);
|
|
567
|
-
},
|
|
571
|
+
}, Be = (e = !0) => {
|
|
568
572
|
if (!window.__RML_WEBGL_GUI__) {
|
|
569
573
|
if (!P) return null;
|
|
570
574
|
try {
|
|
@@ -574,7 +578,7 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
574
578
|
}
|
|
575
579
|
}
|
|
576
580
|
return window.__RML_WEBGL_GUI__ ?? null;
|
|
577
|
-
},
|
|
581
|
+
}, Ve = (e, t) => {
|
|
578
582
|
let n = !1;
|
|
579
583
|
for (let r of t) {
|
|
580
584
|
let t = r.getKernelObject(), i;
|
|
@@ -587,7 +591,7 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
587
591
|
a !== r.getContainer().visible && (n = !0), a ? r.setContainerVisibility(!0) : r.isSelected || r.setContainerVisibility(!1);
|
|
588
592
|
}
|
|
589
593
|
return n;
|
|
590
|
-
},
|
|
594
|
+
}, He = (e, t, n = !0) => {
|
|
591
595
|
if (!e.userData.tween) if (t) if (e.transparent = !0, !n) e.opacity = .2;
|
|
592
596
|
else {
|
|
593
597
|
let t = { opacity: 1 };
|
|
@@ -610,9 +614,9 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
610
614
|
}).start();
|
|
611
615
|
window.TWEEN?.add(n);
|
|
612
616
|
}
|
|
613
|
-
},
|
|
614
|
-
let o =
|
|
615
|
-
let n =
|
|
617
|
+
}, Ue = (e, t, n, r, i, a) => {
|
|
618
|
+
let o = We(n, r), s = i.clone().multiply(r).multiply(t), c = o.clone().invert(), l = c.clone().multiply(n), u = c.clone().multiply(r), d = { t: 0 }, f = new M(d).to({ t: 1 }, 400).easing(E.Quadratic.InOut).onUpdate(() => {
|
|
619
|
+
let n = Ge(l, u, d.t);
|
|
616
620
|
G(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
|
|
617
621
|
}).onComplete(() => {
|
|
618
622
|
G(e, s), a && a(), window.TWEEN?.remove(f);
|
|
@@ -620,7 +624,7 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
620
624
|
window.TWEEN?.remove(f);
|
|
621
625
|
}).start();
|
|
622
626
|
return window.TWEEN?.add(f), f;
|
|
623
|
-
},
|
|
627
|
+
}, We = (e, t) => {
|
|
624
628
|
let n = e.clone().invert().clone().multiply(t), i = new a(), o = new r();
|
|
625
629
|
n.decompose(i, o, new a());
|
|
626
630
|
let s = W(o), c = s.axis;
|
|
@@ -637,7 +641,7 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
637
641
|
};
|
|
638
642
|
}, G = (e, t) => {
|
|
639
643
|
e.updateMatrix(), t.multiply(e.matrix.clone().invert()), e.applyMatrix4(t), e.updateMatrix();
|
|
640
|
-
},
|
|
644
|
+
}, Ge = (e, t, n) => {
|
|
641
645
|
let i = new a(), o = new r(), s = new a();
|
|
642
646
|
e.decompose(i, o, s);
|
|
643
647
|
let c = new a(), l = new r(), u = new a();
|
|
@@ -652,12 +656,12 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
652
656
|
}
|
|
653
657
|
let h = new a().lerpVectors(s, u, n), g = new m();
|
|
654
658
|
return g.compose(d, f, h), g;
|
|
655
|
-
},
|
|
659
|
+
}, Ke = (e) => {
|
|
656
660
|
let t = new h();
|
|
657
661
|
return t.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), t;
|
|
658
662
|
}, K = (e, t) => {
|
|
659
663
|
t.transparent || (e.transparent = t.transparent, delete e.userData.postProcessingMaterialPlugin), e.opacity = t.opacity, e.needsUpdate = !0;
|
|
660
|
-
},
|
|
664
|
+
}, qe = (e, t) => new Promise((n) => {
|
|
661
665
|
e.traverse((e) => {
|
|
662
666
|
if (e instanceof c) {
|
|
663
667
|
let r = e.material;
|
|
@@ -674,7 +678,7 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
674
678
|
}).start());
|
|
675
679
|
}
|
|
676
680
|
});
|
|
677
|
-
}),
|
|
681
|
+
}), Je = (e) => {
|
|
678
682
|
e.traverse((e) => {
|
|
679
683
|
if (e instanceof c) {
|
|
680
684
|
let t = e.material;
|
|
@@ -695,10 +699,10 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
695
699
|
window.TWEEN?.add(i);
|
|
696
700
|
}
|
|
697
701
|
});
|
|
698
|
-
},
|
|
702
|
+
}, Ye = (e, t) => {
|
|
699
703
|
let n = new u().setFromObject(e), r = n.getSize(new a()), i = Math.min(r.x, r.y, r.z), o = !0;
|
|
700
704
|
return i > 5 && (console.warn("GLB seems to be too big (" + i + ")", t), o = !1), n.min.y < -.01 && (console.warn("GLB seems to be under the floor (" + n.min.y + "): ", t), o = !1), o;
|
|
701
|
-
},
|
|
705
|
+
}, Xe = (e) => {
|
|
702
706
|
e.type === "Mesh" ? J(e) : q(e);
|
|
703
707
|
}, q = (e) => {
|
|
704
708
|
!e || !e.children || e.children.length === 0 || e.children.forEach((e) => {
|
|
@@ -726,35 +730,35 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
726
730
|
e && e.dispose();
|
|
727
731
|
}, X = (e) => {
|
|
728
732
|
e && (e.map && e.map.dispose(), e.normalMap && e.normalMap.dispose(), e.dispose());
|
|
729
|
-
}, Z,
|
|
733
|
+
}, Z, Ze = () => (Z || (Z = new f(), Z.visible = !1), Z), Q, Qe = (e) => (Q ||= T.createMeshStandardMaterial({
|
|
730
734
|
color: e || "#FF0000",
|
|
731
735
|
transparent: !0,
|
|
732
736
|
opacity: .5,
|
|
733
737
|
visible: !0,
|
|
734
738
|
polygonOffset: !0,
|
|
735
739
|
polygonOffsetFactor: -1
|
|
736
|
-
}), Q), $ = (e) => e.x === 0 && e.y === 0 && e.z === 0,
|
|
740
|
+
}), Q), $e = (e) => e.x === 0 && e.y === 0 && e.z === 0, et = (e) => Number.isFinite(e.x) && Number.isFinite(e.y) && Number.isFinite(e.z), tt = (e, t) => {
|
|
737
741
|
let n = "";
|
|
738
742
|
return !e && e !== "" ? null : (e.materialId && e.materialId !== "" ? n = e.materialId : e.catalogItemId && e.catalogItemId !== "" ? n = e.catalogItemId : e.rgbValue > 0 ? n = "rgb" + JSON.stringify(e.rgbValue) : e.length > 0 ? n = e : t && t.value === w.WALL ? n = "default_wall_material_" + e.getSourceType().value : t && t.value === w.CEILING && (n = "default_ceiling_material_" + e.getSourceType().value), n);
|
|
739
|
-
}, $
|
|
743
|
+
}, $ = (e) => {
|
|
740
744
|
let t = e.getWorldDirection(new a()).clone();
|
|
741
745
|
t.y = 0, t.lengthSq() < .01 && (t = new a(0, 1, 0), t.applyQuaternion(e.quaternion), t.y = 0), t.normalize();
|
|
742
746
|
let n = Math.asin(t.x);
|
|
743
747
|
return t.z < 0 && (n = Math.PI - n), n < 0 && (n += Math.PI * 2), n;
|
|
744
|
-
},
|
|
748
|
+
}, nt = (e, t) => {
|
|
745
749
|
if (!e || !t) return 0;
|
|
746
750
|
let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
|
|
747
751
|
return r && n || !r && !n ? 0 : n === !0 ? 1 : -1;
|
|
748
|
-
},
|
|
752
|
+
}, rt = (e, t) => {
|
|
749
753
|
if (!e || !t) return 0;
|
|
750
754
|
let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
|
|
751
755
|
if (r && n) return 0;
|
|
752
756
|
if (!r && !n) {
|
|
753
|
-
let n =
|
|
757
|
+
let n = it(e, t);
|
|
754
758
|
return n === .5 ? 0 : n > .5 ? -1 : 1;
|
|
755
759
|
}
|
|
756
760
|
return n === !0 ? 1 : -1;
|
|
757
|
-
},
|
|
761
|
+
}, it = (e, t) => {
|
|
758
762
|
let n = new u();
|
|
759
763
|
if (n.copy(e).intersect(t), n.isEmpty()) return 0;
|
|
760
764
|
let r = (e) => {
|
|
@@ -762,34 +766,34 @@ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be
|
|
|
762
766
|
return e.getSize(t), t.x * t.y * t.z;
|
|
763
767
|
}, i = r(e), o = r(n);
|
|
764
768
|
return i === 0 ? 0 : o / i;
|
|
765
|
-
},
|
|
769
|
+
}, at = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, ot = (e, t, n, r = 1) => {
|
|
766
770
|
let i = t > n, o = i ? 15 : 0, s = i ? 0 : 10, c = e.getSize(new a()), l = e.getCenter(new a()), d = c.x > 2 * o ? c.x / 2 : o, f = c.z > 2 * s ? c.z / 2 : s;
|
|
767
771
|
return d *= r, f *= r, new u(new a(l.x - d, l.y, l.z - f), new a(l.x + d, l.y, l.z + f));
|
|
768
|
-
},
|
|
772
|
+
}, st = (e) => {
|
|
769
773
|
let { x: t, y: n } = e;
|
|
770
774
|
return {
|
|
771
775
|
x: t,
|
|
772
776
|
y: n
|
|
773
777
|
};
|
|
774
|
-
},
|
|
778
|
+
}, ct = (e) => {
|
|
775
779
|
let { x: t, y: n, z: r } = e;
|
|
776
780
|
return {
|
|
777
781
|
x: t,
|
|
778
782
|
y: n,
|
|
779
783
|
z: r
|
|
780
784
|
};
|
|
781
|
-
},
|
|
785
|
+
}, lt = (e, t, n) => new a().setFromSphericalCoords(e, Math.PI * (1 - n), Math.PI * 2 * (1 - t)), ut = (e) => {
|
|
782
786
|
let t = new n();
|
|
783
787
|
return e.environment && (t.environment = e.environment.clone()), e.userData.environmentDefinition && (t.userData.environmentDefinition = e.userData.environmentDefinition.clone()), t.userData.shadowFromEnvironment = e.userData.shadowFromEnvironment, t;
|
|
784
|
-
},
|
|
788
|
+
}, dt = (e, t) => {
|
|
785
789
|
let n = new l(), r = new m().multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse);
|
|
786
790
|
n.setFromProjectionMatrix(r);
|
|
787
791
|
let i = t.getCenter(new a());
|
|
788
792
|
return n.containsPoint(i);
|
|
789
|
-
},
|
|
793
|
+
}, ft = (e) => {
|
|
790
794
|
e.lights_fragment_begin = "\n vec3 geometryPosition = - vViewPosition;\n vec3 geometryNormal = normal;\n vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n vec3 geometryClearcoatNormal = vec3( 0.0 );\n #ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n #endif\n\n // OPTIMIZATION: Early exit for transparent/invisible materials\n #ifdef USE_ALPHATEST\n if ( diffuseColor.a < alphaTest ) discard;\n #endif\n\n // OPTIMIZATION: Cache expensive calculations\n float NdotV = saturate( dot( geometryNormal, geometryViewDir ) );\n\n #ifdef USE_IRIDESCENCE\n float dotNVi = NdotV; // Reuse calculated value\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n // OPTIMIZATION: Skip iridescence calculations if effect is minimal\n if ( material.iridescence > 0.01 ) {\n material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n #endif\n\n IncidentLight directLight;\n\n // OPTIMIZATION: Early exit if material has no metalness or roughness variation\n #ifdef USE_ROUGHNESSMAP\n bool hasRoughnessVariation = true;\n #else\n bool hasRoughnessVariation = false;\n #endif\n\n #ifdef USE_METALNESSMAP\n bool hasMetalnessVariation = true;\n #else\n bool hasMetalnessVariation = false;\n #endif\n\n #if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n\n // OPTIMIZATION: Enhanced visibility and distance checks\n #if defined( RE_Direct )\n if ( directLight.visible ) {\n // OPTIMIZATION: Skip lights with negligible contribution based on color intensity\n float lightIntensity = dot( directLight.color, vec3( 0.299, 0.587, 0.114 ) );\n if ( lightIntensity > 0.001 ) {\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n }\n #endif\n }\n #pragma unroll_loop_end\n #endif\n\n #if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n\n // OPTIMIZATION: Enhanced visibility checks for spot lights\n #if defined( RE_Direct )\n if ( directLight.visible ) {\n // OPTIMIZATION: Skip spot light map calculation if light contribution is minimal\n float lightIntensity = dot( directLight.color, vec3( 0.299, 0.587, 0.114 ) );\n if ( lightIntensity > 0.001 ) {\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n if ( inSpotLightMap ) {\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = directLight.color * spotColor.rgb;\n }\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n }\n #endif\n }\n #pragma unroll_loop_end\n #endif\n\n #if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n\n // OPTIMIZATION: Skip very dim directional lights\n #if defined( RE_Direct )\n float lightIntensity = dot( directLight.color, vec3( 0.299, 0.587, 0.114 ) );\n if ( directLight.visible && lightIntensity > 0.001 ) {\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #endif\n }\n #pragma unroll_loop_end\n #endif\n\n #if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n // OPTIMIZATION: Simple rect area light processing - Three.js handles distance internally\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n #endif\n\n // OPTIMIZATION: Streamlined indirect lighting with early exits\n #if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n // OPTIMIZATION: Skip light probe calculation if ambient is sufficient\n float ambientIntensity = dot( irradiance, vec3( 0.299, 0.587, 0.114 ) );\n\n #if defined( USE_LIGHT_PROBES )\n if ( ambientIntensity < 0.9 ) {\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n }\n #endif\n\n #if ( NUM_HEMI_LIGHTS > 0 )\n if ( ambientIntensity < 0.9 ) {\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n vec3 hemiContribution = getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n // OPTIMIZATION: Skip negligible hemisphere light contributions\n if ( dot( hemiContribution, vec3( 0.299, 0.587, 0.114 ) ) > 0.001 ) {\n irradiance += hemiContribution;\n }\n }\n #pragma unroll_loop_end\n }\n #endif\n #endif\n\n #if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n #endif", e.lights_pars_begin = e.lights_pars_begin.replace("light.color = pointLight.color;", "\n light.color = pointLight.color * step( lightDistance, pointLight.distance );\n ");
|
|
791
795
|
};
|
|
792
796
|
//#endregion
|
|
793
|
-
export {
|
|
797
|
+
export { O as $, Ce as A, Ae as B, Ke as C, Fe as D, tt as E, dt as F, He as G, ke as H, at as I, qe as J, st as K, Ee as L, Be as M, $ as N, we as O, Ve as P, E as Q, De as R, rt as S, b as St, ot as T, z as U, Oe as V, G as W, $e as X, et as Y, lt as Z, X as _, se as _t, ye as a, w as at, Je as b, ee as bt, U as c, ue as ct, Ye as d, fe as dt, M as et, nt as f, S as ft, Y as g, re as gt, Xe as h, ae as ht, ve as i, me as it, Te as j, Se as k, Re as l, le as lt, je as m, oe as mt, xe as n, ge as nt, _e as o, pe as ot, ut as p, x as pt, ct as q, I as r, he as rt, F as s, de as st, be as t, T as tt, Ue as u, ce as ut, J as v, te as vt, Qe as w, Ze as x, ne as xt, q as y, ie as yt, ft as z };
|
|
794
798
|
|
|
795
|
-
//# sourceMappingURL=threejs-utils-
|
|
799
|
+
//# sourceMappingURL=threejs-utils-C4J_TZ0o.mjs.map
|