@roomle/web-sdk 4.3.0-alpha.2 → 4.3.0-alpha.4
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.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{api-C430uhWG.mjs → api-C-enDIJZ.mjs} +2 -2
- package/lib/{api-C430uhWG.mjs.map → api-C-enDIJZ.mjs.map} +1 -1
- package/lib/asset-loader.worker-eqHzNAwa.mjs.map +1 -1
- package/lib/budgeteer.sw-BUMElkO1.mjs.map +1 -1
- package/lib/{component-dimensioning-BXN285kw.mjs → component-dimensioning-rJ6hbyvw.mjs} +2 -2
- package/lib/{component-dimensioning-BXN285kw.mjs.map → component-dimensioning-rJ6hbyvw.mjs.map} +1 -1
- package/lib/{component-raycast-helper-CADFRMLS.mjs → component-raycast-helper-CLX5fLt9.mjs} +2 -2
- package/lib/{component-raycast-helper-CADFRMLS.mjs.map → component-raycast-helper-CLX5fLt9.mjs.map} +1 -1
- package/lib/configurator-BfdyDYqe.mjs +2 -0
- package/lib/{configurator-CUiTTJmW.mjs → configurator-D8Bfu2_w.mjs} +4 -4
- package/lib/{configurator-CUiTTJmW.mjs.map → configurator-D8Bfu2_w.mjs.map} +1 -1
- package/lib/glb-viewer-BFYG-bD2.mjs +2 -0
- package/lib/{glb-viewer-DB5c3Qk5.mjs → glb-viewer-DMg1tKfk.mjs} +11 -11
- package/lib/{glb-viewer-DB5c3Qk5.mjs.map → glb-viewer-DMg1tKfk.mjs.map} +1 -1
- package/lib/{highlight-coordinator-RCfVwPHC.mjs → highlight-coordinator-JwAVkMeS.mjs} +2 -2
- package/lib/{highlight-coordinator-RCfVwPHC.mjs.map → highlight-coordinator-JwAVkMeS.mjs.map} +1 -1
- package/lib/{homag-intelligence-8eBT714O.mjs → homag-intelligence-CbzWp4pY.mjs} +3 -3
- package/lib/{homag-intelligence-8eBT714O.mjs.map → homag-intelligence-CbzWp4pY.mjs.map} +1 -1
- package/lib/{material-viewer-CfZwcbei.mjs → material-viewer-C4oV4F7e.mjs} +19 -19
- package/lib/{material-viewer-CfZwcbei.mjs.map → material-viewer-C4oV4F7e.mjs.map} +1 -1
- package/lib/{packages-0GadOkxt.mjs → packages-Pc3dsyed.mjs} +5 -5
- package/lib/{packages-0GadOkxt.mjs.map → packages-Pc3dsyed.mjs.map} +1 -1
- package/lib/{planner-CyQKj8Ok.mjs → planner-B3IWgziF.mjs} +3 -3
- package/lib/{planner-CyQKj8Ok.mjs.map → planner-B3IWgziF.mjs.map} +1 -1
- package/lib/planner-BhnBEaPV.mjs +2 -0
- package/lib/roomle-headless.d.ts +25 -1
- package/lib/roomle-headless.js +9 -9
- package/lib/{roomle-sdk-CpgzRTKP.mjs → roomle-sdk-Be4K-H8u.mjs} +3526 -3203
- package/lib/roomle-sdk-Be4K-H8u.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +25 -1
- package/lib/roomle-sdk.js +8 -8
- package/lib/{scene-renderer-CSBoi_8w.mjs → scene-renderer-C8Lh-lff.mjs} +2 -2
- package/lib/{scene-renderer-CSBoi_8w.mjs.map → scene-renderer-C8Lh-lff.mjs.map} +1 -1
- package/lib/{script-loader-BmScoq7Y.mjs → script-loader-CzikXnNg.mjs} +2 -2
- package/lib/{script-loader-BmScoq7Y.mjs.map → script-loader-CzikXnNg.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 +1 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js +1 -0
- 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.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{stats-helper-P4jYV8as.mjs → stats-helper-Ddg1O4fO.mjs} +2 -2
- package/lib/{stats-helper-P4jYV8as.mjs.map → stats-helper-Ddg1O4fO.mjs.map} +1 -1
- package/lib/{threejs-utils-DKJ0uer7.mjs → threejs-utils-D5DMIzUO.mjs} +108 -98
- package/lib/threejs-utils-D5DMIzUO.mjs.map +1 -0
- package/lib/{tools-core-CAEfSB8I.mjs → tools-core-CVdBXX3L.mjs} +3 -3
- package/lib/{tools-core-CAEfSB8I.mjs.map → tools-core-CVdBXX3L.mjs.map} +1 -1
- package/package.json +2 -2
- package/lib/configurator-9ICb3RBz.mjs +0 -2
- package/lib/glb-viewer-_gIYHXT9.mjs +0 -2
- package/lib/planner-D63FNjtX.mjs +0 -2
- package/lib/roomle-sdk-CpgzRTKP.mjs.map +0 -1
- package/lib/threejs-utils-DKJ0uer7.mjs.map +0 -1
|
@@ -42,21 +42,21 @@ var ee = {
|
|
|
42
42
|
WALL: 0,
|
|
43
43
|
EDGE: 1,
|
|
44
44
|
CONSTRUCTION: 2
|
|
45
|
-
},
|
|
45
|
+
}, x = {
|
|
46
46
|
OBJECT: 0,
|
|
47
47
|
DOOR: 1,
|
|
48
48
|
WINDOW: 2,
|
|
49
49
|
CONSTRUCTION: 3,
|
|
50
50
|
UNKNOWN: 4
|
|
51
|
-
}, x = function(e) {
|
|
52
|
-
return Math.PI / 180 * e;
|
|
53
51
|
}, S = function(e) {
|
|
52
|
+
return Math.PI / 180 * e;
|
|
53
|
+
}, C = function(e) {
|
|
54
54
|
return 180 / Math.PI * e;
|
|
55
|
-
},
|
|
55
|
+
}, le = function(e) {
|
|
56
56
|
return e >= 0 ? -180 + (e + 180) % 360 : 180 - (-e + 180) % 360;
|
|
57
|
-
},
|
|
57
|
+
}, ue = function(e, t, n, r, i, a) {
|
|
58
58
|
e = Math.sqrt(e * e + n * n);
|
|
59
|
-
let o = i / a || 1, s = 2 * Math.atan(Math.tan(r * Math.PI / 180 / 2) * o) * 180 / Math.PI, c =
|
|
59
|
+
let o = i / a || 1, s = 2 * Math.atan(Math.tan(r * Math.PI / 180 / 2) * o) * 180 / Math.PI, c = S(r), l = t / 2 / Math.tan(c / 2), u = e / (2 * Math.atan(Math.PI * s / 360));
|
|
60
60
|
return Math.max(l, u);
|
|
61
61
|
}, w = function(e) {
|
|
62
62
|
return Math.round(e * 1e3) / 1e3;
|
|
@@ -65,7 +65,7 @@ var ee = {
|
|
|
65
65
|
}, fe = function(e, t) {
|
|
66
66
|
return Math.atan2(t.y - e.y, t.x - e.x);
|
|
67
67
|
}, pe = function(e) {
|
|
68
|
-
let t =
|
|
68
|
+
let t = C(e);
|
|
69
69
|
return t < 0 && (t = 180 + (180 + t)), t;
|
|
70
70
|
}, T = /* @__PURE__ */ function(e) {
|
|
71
71
|
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;
|
|
@@ -461,25 +461,25 @@ var F = null;
|
|
|
461
461
|
globalThis.window !== void 0 && import("./dat.gui.module-B2PXSbre.mjs").then((e) => {
|
|
462
462
|
F = e.GUI;
|
|
463
463
|
}).catch(() => {});
|
|
464
|
-
var
|
|
464
|
+
var ve = .4, ye = "#DDDDDD", be = .4, xe = "#7B7B7B", Se = "#B1B1B1", Ce = "cameraFacingHidden", we = "cameraFacingIndicator", Te = .8, Ee = .9, De = (e) => e instanceof g ? e.capabilities.maxSamples : 16, Oe = (e) => e instanceof g ? e.capabilities.maxTextures : 16, ke = (e) => e instanceof g ? e.capabilities.getMaxAnisotropy() : 16, Ae = (e, n, r, i) => {
|
|
465
465
|
if (!e || !n || r === 0 || i === 0) return new t();
|
|
466
466
|
let a = e.clone(), o = r / 2, s = i / 2;
|
|
467
467
|
return a.project(n), a.x = Math.floor(a.x * o + o), a.y = Math.floor(-(a.y * s) + s), a.z = e.distanceTo(n.position), a;
|
|
468
|
-
},
|
|
468
|
+
}, je = (e, n) => {
|
|
469
469
|
n ||= new t(0, 0, 0);
|
|
470
470
|
let r = new t(e.size.x / 1e3, e.size.z / 1e3, e.size.y / 1e3), i = new t(e.origin.x / 1e3, e.origin.z / 1e3, e.origin.y / -1e3);
|
|
471
471
|
return new u(new t(0, 0, -r.z).add(i).sub(n), new t(r.x, r.y, 0).add(i).add(n));
|
|
472
|
-
},
|
|
472
|
+
}, Me = (e) => (e.from /= 1e3, e.to /= 1e3, e), Ne = (e, t) => {
|
|
473
473
|
let n = w(e.x), r = w(e.y), i = w(e.z), a = w(t.x), o = w(t.y), s = w(t.z);
|
|
474
474
|
return n === a && r === o && i === s;
|
|
475
|
-
},
|
|
475
|
+
}, Pe = (e, t) => {
|
|
476
476
|
let n = w(e.w), r = w(e.x), i = w(e.y), a = w(e.z), o = w(t.w), s = w(t.x), c = w(t.y), l = w(t.z);
|
|
477
477
|
return n === o && r === s && i === c && a === l;
|
|
478
|
-
},
|
|
478
|
+
}, Fe = (e, t) => {
|
|
479
479
|
let n = w(e.x), r = w(e.y), i = w(t.x), a = w(t.y);
|
|
480
480
|
return n === i && r === a;
|
|
481
|
-
},
|
|
482
|
-
if (
|
|
481
|
+
}, I = null, L = () => {
|
|
482
|
+
if (I) return I;
|
|
483
483
|
let e = new Uint8Array(4);
|
|
484
484
|
for (let t = 0; t < 1; t++) {
|
|
485
485
|
let n = t * 4;
|
|
@@ -487,81 +487,81 @@ var I = .4, ve = "#DDDDDD", ye = .4, be = "#7B7B7B", xe = "#B1B1B1", Se = .8, Ce
|
|
|
487
487
|
}
|
|
488
488
|
let t = new o(e, 1, 1, n);
|
|
489
489
|
return t.needsUpdate = !0, t;
|
|
490
|
-
},
|
|
491
|
-
e ||=
|
|
490
|
+
}, Ie = (e) => R(null, e), R = (e, t) => {
|
|
491
|
+
e ||= ze(), e.name = t.id ? t.id.toString() : "";
|
|
492
492
|
let n = t.shading.version === "2" || t.shading.version?.startsWith("2.");
|
|
493
|
-
return e = n ?
|
|
494
|
-
},
|
|
493
|
+
return e = n ? Re(e, t) : Le(e, t), e.userData.materialVersion = n ? 2 : 1, e.map || (I ||= L(), e.map = I), e;
|
|
494
|
+
}, Le = (e, t) => {
|
|
495
495
|
t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = y(t.shading.metallic, .5));
|
|
496
496
|
let n = !1;
|
|
497
|
-
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),
|
|
498
|
-
},
|
|
497
|
+
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), z(e.color, t.shading.basecolor), n || t.shading.doubleSided ? e.side = 2 : e.side = 0, e;
|
|
498
|
+
}, Re = (e, t) => {
|
|
499
499
|
let n = !1, r = t.shading.transmission && t.shading.transmission > 0;
|
|
500
|
-
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,
|
|
500
|
+
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, z(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, z(e.specularColor, t.shading.specularColor), e.specularIntensity = t.shading.specularity ?? 1, e.roughness = t.shading.roughness ?? 0, e.aoMapIntensity = t.shading.occlusion ?? 1, z(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), z(e.sheenColor, t.shading.sheenColor), e.sheen = t.shading.sheenIntensity ?? 1, e.sheenRoughness = t.shading.sheenRoughness ?? 1, e.thickness = t.shading.thicknessFactor ?? 0;
|
|
501
501
|
let i = t.shading.attenuationDistance;
|
|
502
|
-
return r && i === 0 ? console.warn("invalid attenuation configuration for transmissive material -- Skipping attenuation color and distance configuration in material.") : (
|
|
503
|
-
},
|
|
502
|
+
return r && i === 0 ? console.warn("invalid attenuation configuration for transmissive material -- Skipping attenuation color and distance configuration in material.") : (z(e.attenuationColor, t.shading.attenuationColor), i != null && (e.attenuationDistance = i)), e.side = n || t.shading.doubleSided ? 2 : 0, e;
|
|
503
|
+
}, ze = () => E.createMeshPhysicalMaterial({}), Be = (e, t = 1) => t === 2 ? He(e) : Ve(e), Ve = (e) => {
|
|
504
504
|
let t = {
|
|
505
505
|
alpha: e.opacity,
|
|
506
506
|
metallic: e.reflectivity,
|
|
507
|
-
basecolor:
|
|
507
|
+
basecolor: B(e.color),
|
|
508
508
|
roughness: e.roughness,
|
|
509
509
|
doubleSided: e.side === 2,
|
|
510
510
|
alphaCutoff: e.alphaTest,
|
|
511
511
|
transmission: e.transmission
|
|
512
512
|
};
|
|
513
513
|
return e.metalness === 1 ? t.metallic = 1 : t.metallic = e.reflectivity, t;
|
|
514
|
-
},
|
|
514
|
+
}, He = (e) => ({
|
|
515
515
|
version: "2.0.0",
|
|
516
516
|
alpha: e.opacity,
|
|
517
517
|
alphaCutoff: e.alphaTest,
|
|
518
|
-
basecolor:
|
|
518
|
+
basecolor: B(e.color),
|
|
519
519
|
transmission: e.transmission,
|
|
520
520
|
transmissionIOR: e.ior,
|
|
521
521
|
metallic: e.metalness,
|
|
522
522
|
doubleSided: e.side === 2,
|
|
523
|
-
specularColor:
|
|
523
|
+
specularColor: B(e.specularColor),
|
|
524
524
|
specularity: e.specularIntensity,
|
|
525
525
|
roughness: e.roughness,
|
|
526
526
|
occlusion: e.aoMapIntensity,
|
|
527
|
-
emissiveColor:
|
|
527
|
+
emissiveColor: B(e.emissive),
|
|
528
528
|
emissiveIntensity: e.emissiveIntensity,
|
|
529
529
|
clearcoatIntensity: e.clearcoat,
|
|
530
530
|
clearcoatRoughness: e.clearcoatRoughness,
|
|
531
531
|
clearcoatNormalScale: e.clearcoatNormalScale.x,
|
|
532
|
-
sheenColor:
|
|
532
|
+
sheenColor: B(e.sheenColor),
|
|
533
533
|
sheenIntensity: e.sheen,
|
|
534
534
|
sheenRoughness: e.sheenRoughness,
|
|
535
535
|
thicknessFactor: e.thickness,
|
|
536
|
-
attenuationColor:
|
|
536
|
+
attenuationColor: B(e.attenuationColor),
|
|
537
537
|
attenuationDistance: e.attenuationDistance
|
|
538
|
-
}),
|
|
538
|
+
}), z = (e, t) => {
|
|
539
539
|
if (t !== void 0) {
|
|
540
540
|
let n = new h(t.r, t.g, t.b);
|
|
541
541
|
e.copy(n.convertSRGBToLinear());
|
|
542
542
|
}
|
|
543
|
-
},
|
|
543
|
+
}, B = (e) => {
|
|
544
544
|
let t = e.clone().convertLinearToSRGB();
|
|
545
545
|
return {
|
|
546
546
|
r: t.r,
|
|
547
547
|
g: t.g,
|
|
548
548
|
b: t.b
|
|
549
549
|
};
|
|
550
|
-
},
|
|
551
|
-
|
|
552
|
-
let s =
|
|
550
|
+
}, V = null, Ue = (e, t, n, r, i, a, o = 16) => {
|
|
551
|
+
V || (V = new p(), V.crossOrigin = "");
|
|
552
|
+
let s = V;
|
|
553
553
|
return new Promise((c, l) => {
|
|
554
554
|
if (!e) {
|
|
555
555
|
console.warn("trying to add a texture without image", t), c();
|
|
556
556
|
return;
|
|
557
557
|
}
|
|
558
558
|
s.load(e, (e) => {
|
|
559
|
-
|
|
559
|
+
H(e, t, n, r, i, a, o), c();
|
|
560
560
|
}, (e) => {
|
|
561
561
|
l(e);
|
|
562
562
|
});
|
|
563
563
|
});
|
|
564
|
-
},
|
|
564
|
+
}, H = (e, t, n, r, i, o, s = 16) => {
|
|
565
565
|
if (e.anisotropy = r, e.wrapS = a, e.wrapT = a, s <= 8 && [
|
|
566
566
|
v.ORM,
|
|
567
567
|
v.EMRGB,
|
|
@@ -574,10 +574,10 @@ var I = .4, ve = "#DDDDDD", ye = .4, be = "#7B7B7B", xe = "#B1B1B1", Se = .8, Ce
|
|
|
574
574
|
console.warn("ORM maps are not supported on devices with only " + s + " texture units");
|
|
575
575
|
return;
|
|
576
576
|
}
|
|
577
|
-
e.repeat.set(i, o),
|
|
578
|
-
},
|
|
579
|
-
n.mapping === v.XYZ ? (r.normalMap = t, r.map ===
|
|
580
|
-
},
|
|
577
|
+
e.repeat.set(i, o), We(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;
|
|
578
|
+
}, We = (t, n, r) => {
|
|
579
|
+
n.mapping === v.XYZ ? (r.normalMap = t, r.map === L() && (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);
|
|
580
|
+
}, Ge = (e = !0) => {
|
|
581
581
|
if (!window.__RML_WEBGL_GUI__) {
|
|
582
582
|
if (!F) return null;
|
|
583
583
|
try {
|
|
@@ -587,20 +587,30 @@ var I = .4, ve = "#DDDDDD", ye = .4, be = "#7B7B7B", xe = "#B1B1B1", Se = .8, Ce
|
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
return window.__RML_WEBGL_GUI__ ?? null;
|
|
590
|
-
},
|
|
591
|
-
let
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
590
|
+
}, U = (e, t, n) => {
|
|
591
|
+
let r;
|
|
592
|
+
if (t.wallType.value === b.OuterWallRight && (r = _(t.rightNormal)), t.wallType.value === b.OuterWallLeft && (r = _(t.leftNormal)), !r) return !0;
|
|
593
|
+
let i = _(n).applyMatrix4(e.matrixWorldInverse);
|
|
594
|
+
return r = r.transformDirection(e.matrixWorldInverse), i.dot(r) >= 0;
|
|
595
|
+
}, W = (e) => {
|
|
596
|
+
let t = e?.getPlanElement();
|
|
597
|
+
return !t || !("getAttachedWall" in t) ? null : t.getAttachedWall();
|
|
598
|
+
}, G = (e, t) => !e || !t ? !1 : typeof e.getId == "function" && typeof t.getId == "function" ? e.getId() === t.getId() : e === t, Ke = (e, t, n = [], r = null) => {
|
|
599
|
+
let i = !1, a = W(r);
|
|
600
|
+
for (let n of t) {
|
|
601
|
+
let t = !(G(n.getPlanElement(), a) || U(e, n.getKernelObject(), n.getPlanElement().getCenter()));
|
|
602
|
+
t !== n.isHiddenByCameraFacing() && (i = !0), n.setHiddenByCameraFacing(t);
|
|
601
603
|
}
|
|
602
|
-
|
|
603
|
-
|
|
604
|
+
for (let t of n) {
|
|
605
|
+
let n = t.getPlanElement(), r = W(t);
|
|
606
|
+
if (!n || !r) continue;
|
|
607
|
+
let o = n.getObjectCategory?.().value;
|
|
608
|
+
if (o !== x.DOOR && o !== x.WINDOW) continue;
|
|
609
|
+
let s = G(r, a) || U(e, r, r.getCenter()), c = t.getContainer().visible;
|
|
610
|
+
t.setHiddenByCameraFacing(!s), c !== t.getContainer().visible && (i = !0);
|
|
611
|
+
}
|
|
612
|
+
return i;
|
|
613
|
+
}, qe = (e, t, n = !0) => {
|
|
604
614
|
if (!e.userData.tween) if (t) if (e.transparent = !0, !n) e.opacity = .2;
|
|
605
615
|
else {
|
|
606
616
|
let t = { opacity: 1 };
|
|
@@ -623,40 +633,40 @@ var I = .4, ve = "#DDDDDD", ye = .4, be = "#7B7B7B", xe = "#B1B1B1", Se = .8, Ce
|
|
|
623
633
|
}).start();
|
|
624
634
|
window.TWEEN?.add(n);
|
|
625
635
|
}
|
|
626
|
-
},
|
|
627
|
-
let o =
|
|
628
|
-
let n =
|
|
629
|
-
|
|
636
|
+
}, Je = (e, t, n, r, i, a) => {
|
|
637
|
+
let o = Ye(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 N(d).to({ t: 1 }, 400).easing(D.Quadratic.InOut).onUpdate(() => {
|
|
638
|
+
let n = Xe(l, u, d.t);
|
|
639
|
+
q(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
|
|
630
640
|
}).onComplete(() => {
|
|
631
|
-
|
|
641
|
+
q(e, s), a && a(), window.TWEEN?.remove(f);
|
|
632
642
|
}).onStop(() => {
|
|
633
643
|
window.TWEEN?.remove(f);
|
|
634
644
|
}).start();
|
|
635
645
|
return window.TWEEN?.add(f), f;
|
|
636
|
-
},
|
|
646
|
+
}, Ye = (e, n) => {
|
|
637
647
|
let r = e.clone().invert().clone().multiply(n), a = new t(), o = new i();
|
|
638
648
|
r.decompose(a, o, new t());
|
|
639
|
-
let s =
|
|
649
|
+
let s = K(o), c = s.axis;
|
|
640
650
|
if (a.length() < .001 || Math.abs(s.angleRad) < .001 || c.length() < .001) return new m().identity();
|
|
641
651
|
let l = new t().setFromMatrixPosition(e), u = new t().setFromMatrixPosition(n), d = l.clone().sub(u), f = d.length(), p = new t().crossVectors(c, d).normalize();
|
|
642
652
|
d = new t().crossVectors(p, c).normalize();
|
|
643
653
|
let h = l.clone().add(u).multiplyScalar(.5);
|
|
644
654
|
return h = h.sub(p.clone().multiplyScalar(f * .5 / Math.tan(s.angleRad * .5))), new m().makeBasis(p, c, d).setPosition(h);
|
|
645
|
-
},
|
|
655
|
+
}, K = (e) => {
|
|
646
656
|
let n = Math.sqrt(1 - e.w * e.w);
|
|
647
657
|
return {
|
|
648
658
|
axis: new t(e.x, e.y, e.z).multiplyScalar(n === 0 ? 1 : 1 / n),
|
|
649
659
|
angleRad: 2 * Math.acos(e.w)
|
|
650
660
|
};
|
|
651
|
-
},
|
|
661
|
+
}, q = (e, t) => {
|
|
652
662
|
e.updateMatrix(), t.multiply(e.matrix.clone().invert()), e.applyMatrix4(t), e.updateMatrix();
|
|
653
|
-
},
|
|
663
|
+
}, Xe = (e, n, r) => {
|
|
654
664
|
let a = new t(), o = new i(), s = new t();
|
|
655
665
|
e.decompose(a, o, s);
|
|
656
666
|
let c = new t(), l = new i(), u = new t();
|
|
657
667
|
n.decompose(c, l, u);
|
|
658
|
-
let d = new t().lerpVectors(a, c, r), f = new i().slerpQuaternions(o, l, r), p =
|
|
659
|
-
if (p.angleRad > Math.PI && (p.angleRad -= 2 * Math.PI), Math.abs(p.angleRad) >
|
|
668
|
+
let d = new t().lerpVectors(a, c, r), f = new i().slerpQuaternions(o, l, r), p = K(o.clone().conjugate().multiply(l));
|
|
669
|
+
if (p.angleRad > Math.PI && (p.angleRad -= 2 * Math.PI), Math.abs(p.angleRad) > S(1) && a.length() > .001 && c.length() > .001) {
|
|
660
670
|
let e = a.clone().normalize().dot(c.clone().normalize());
|
|
661
671
|
if (Math.abs(e) < .999) {
|
|
662
672
|
let n = new t().crossVectors(a, c), o = new i().setFromAxisAngle(n.normalize(), Math.acos(e) * r), s = a.length() * r + c.length() * (1 - r);
|
|
@@ -665,12 +675,12 @@ var I = .4, ve = "#DDDDDD", ye = .4, be = "#7B7B7B", xe = "#B1B1B1", Se = .8, Ce
|
|
|
665
675
|
}
|
|
666
676
|
let h = new t().lerpVectors(s, u, r), g = new m();
|
|
667
677
|
return g.compose(d, f, h), g;
|
|
668
|
-
},
|
|
678
|
+
}, Ze = (e) => {
|
|
669
679
|
let t = new h();
|
|
670
680
|
return t.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), t;
|
|
671
|
-
},
|
|
681
|
+
}, J = (e, t) => {
|
|
672
682
|
t.transparent || (e.transparent = t.transparent, delete e.userData.postProcessingMaterialPlugin), e.opacity = t.opacity, e.needsUpdate = !0;
|
|
673
|
-
},
|
|
683
|
+
}, Qe = (e, t) => new Promise((n) => {
|
|
674
684
|
e.traverse((e) => {
|
|
675
685
|
if (e instanceof c) {
|
|
676
686
|
let r = e.material;
|
|
@@ -681,13 +691,13 @@ var I = .4, ve = "#DDDDDD", ye = .4, be = "#7B7B7B", xe = "#B1B1B1", Se = .8, Ce
|
|
|
681
691
|
a.toJSON = () => void 0, e.userData.tween = a, window.TWEEN?.add(a.to(t, 250).easing(D.Linear.None).onUpdate(() => {
|
|
682
692
|
r.opacity = i.opacity;
|
|
683
693
|
}).onStop(() => {
|
|
684
|
-
|
|
694
|
+
J(r, t), e.userData.tween = void 0;
|
|
685
695
|
}).onComplete(() => {
|
|
686
|
-
|
|
696
|
+
J(r, t), e.userData.tween = void 0, window.TWEEN?.remove(a), n();
|
|
687
697
|
}).start());
|
|
688
698
|
}
|
|
689
699
|
});
|
|
690
|
-
}),
|
|
700
|
+
}), $e = (e) => {
|
|
691
701
|
e.traverse((e) => {
|
|
692
702
|
if (e instanceof c) {
|
|
693
703
|
let t = e.material;
|
|
@@ -708,66 +718,66 @@ var I = .4, ve = "#DDDDDD", ye = .4, be = "#7B7B7B", xe = "#B1B1B1", Se = .8, Ce
|
|
|
708
718
|
window.TWEEN?.add(i);
|
|
709
719
|
}
|
|
710
720
|
});
|
|
711
|
-
},
|
|
721
|
+
}, et = (e, n) => {
|
|
712
722
|
let r = new u().setFromObject(e), i = r.getSize(new t()), a = Math.min(i.x, i.y, i.z), o = !0;
|
|
713
723
|
return a > 5 && (console.warn("GLB seems to be too big (" + a + ")", n), o = !1), r.min.y < -.01 && (console.warn("GLB seems to be under the floor (" + r.min.y + "): ", n), o = !1), o;
|
|
714
|
-
},
|
|
715
|
-
e.type === "Mesh" ?
|
|
716
|
-
},
|
|
724
|
+
}, tt = (e) => {
|
|
725
|
+
e.type === "Mesh" ? X(e) : Y(e);
|
|
726
|
+
}, Y = (e) => {
|
|
717
727
|
!e || !e.children || e.children.length === 0 || e.children.forEach((e) => {
|
|
718
|
-
|
|
728
|
+
X(e);
|
|
719
729
|
});
|
|
720
|
-
},
|
|
730
|
+
}, X = (e) => {
|
|
721
731
|
if (e) {
|
|
722
732
|
try {
|
|
723
|
-
e.material &&
|
|
733
|
+
e.material && Q(e.material);
|
|
724
734
|
} catch (e) {
|
|
725
735
|
console.warn("disposeMesh: material dispose failed", e);
|
|
726
736
|
}
|
|
727
737
|
try {
|
|
728
|
-
e.geometry &&
|
|
738
|
+
e.geometry && Z(e.geometry);
|
|
729
739
|
} catch (e) {
|
|
730
740
|
console.warn("disposeMesh: geometry dispose failed", e);
|
|
731
741
|
}
|
|
732
742
|
try {
|
|
733
|
-
e.children && e.children.length > 0 &&
|
|
743
|
+
e.children && e.children.length > 0 && Y(e);
|
|
734
744
|
} catch (e) {
|
|
735
745
|
console.warn("disposeMesh: child dispose failed", e);
|
|
736
746
|
}
|
|
737
747
|
}
|
|
738
|
-
},
|
|
748
|
+
}, Z = (e) => {
|
|
739
749
|
e && e.dispose();
|
|
740
|
-
},
|
|
750
|
+
}, Q = (e) => {
|
|
741
751
|
e && (e.map && e.map.dispose(), e.normalMap && e.normalMap.dispose(), e.dispose());
|
|
742
|
-
},
|
|
752
|
+
}, $, nt = () => ($ || ($ = new f(), $.visible = !1), $), rt, it = (e) => (rt ||= E.createMeshStandardMaterial({
|
|
743
753
|
color: e || "#FF0000",
|
|
744
754
|
transparent: !0,
|
|
745
755
|
opacity: .5,
|
|
746
756
|
visible: !0,
|
|
747
757
|
polygonOffset: !0,
|
|
748
758
|
polygonOffsetFactor: -1
|
|
749
|
-
}),
|
|
759
|
+
}), rt), at = (e) => e.x === 0 && e.y === 0 && e.z === 0, ot = (e) => Number.isFinite(e.x) && Number.isFinite(e.y) && Number.isFinite(e.z), st = (e, t) => {
|
|
750
760
|
let n = "";
|
|
751
761
|
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 === T.WALL ? n = "default_wall_material_" + e.getSourceType().value : t && t.value === T.CEILING && (n = "default_ceiling_material_" + e.getSourceType().value), n);
|
|
752
|
-
},
|
|
762
|
+
}, ct = (e) => {
|
|
753
763
|
let n = e.getWorldDirection(new t()).clone();
|
|
754
764
|
n.y = 0, n.lengthSq() < .01 && (n = new t(0, 1, 0), n.applyQuaternion(e.quaternion), n.y = 0), n.normalize();
|
|
755
765
|
let r = Math.asin(n.x);
|
|
756
766
|
return n.z < 0 && (r = Math.PI - r), r < 0 && (r += Math.PI * 2), r;
|
|
757
|
-
},
|
|
767
|
+
}, lt = (e, t) => {
|
|
758
768
|
if (!e || !t) return 0;
|
|
759
769
|
let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
|
|
760
770
|
return r && n || !r && !n ? 0 : n === !0 ? 1 : -1;
|
|
761
|
-
},
|
|
771
|
+
}, ut = (e, t) => {
|
|
762
772
|
if (!e || !t) return 0;
|
|
763
773
|
let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
|
|
764
774
|
if (r && n) return 0;
|
|
765
775
|
if (!r && !n) {
|
|
766
|
-
let n =
|
|
776
|
+
let n = dt(e, t);
|
|
767
777
|
return n === .5 ? 0 : n > .5 ? -1 : 1;
|
|
768
778
|
}
|
|
769
779
|
return n === !0 ? 1 : -1;
|
|
770
|
-
},
|
|
780
|
+
}, dt = (e, n) => {
|
|
771
781
|
let r = new u();
|
|
772
782
|
if (r.copy(e).intersect(n), r.isEmpty()) return 0;
|
|
773
783
|
let i = (e) => {
|
|
@@ -775,34 +785,34 @@ var I = .4, ve = "#DDDDDD", ye = .4, be = "#7B7B7B", xe = "#B1B1B1", Se = .8, Ce
|
|
|
775
785
|
return e.getSize(n), n.x * n.y * n.z;
|
|
776
786
|
}, a = i(e), o = i(r);
|
|
777
787
|
return a === 0 ? 0 : o / a;
|
|
778
|
-
},
|
|
788
|
+
}, ft = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, pt = (e, n, r, i = 1) => {
|
|
779
789
|
let a = n > r, o = a ? 15 : 0, s = a ? 0 : 10, c = e.getSize(new t()), l = e.getCenter(new t()), d = c.x > 2 * o ? c.x / 2 : o, f = c.z > 2 * s ? c.z / 2 : s;
|
|
780
790
|
return d *= i, f *= i, new u(new t(l.x - d, l.y, l.z - f), new t(l.x + d, l.y, l.z + f));
|
|
781
|
-
},
|
|
791
|
+
}, mt = (e) => {
|
|
782
792
|
let { x: t, y: n } = e;
|
|
783
793
|
return {
|
|
784
794
|
x: t,
|
|
785
795
|
y: n
|
|
786
796
|
};
|
|
787
|
-
},
|
|
797
|
+
}, ht = (e) => {
|
|
788
798
|
let { x: t, y: n, z: r } = e;
|
|
789
799
|
return {
|
|
790
800
|
x: t,
|
|
791
801
|
y: n,
|
|
792
802
|
z: r
|
|
793
803
|
};
|
|
794
|
-
},
|
|
804
|
+
}, gt = (e, n, r) => new t().setFromSphericalCoords(e, Math.PI * (1 - r), Math.PI * 2 * (1 - n)), _t = (e) => {
|
|
795
805
|
let t = new r();
|
|
796
806
|
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;
|
|
797
|
-
},
|
|
807
|
+
}, vt = (e, n) => {
|
|
798
808
|
let r = new l(), i = new m().multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse);
|
|
799
809
|
r.setFromProjectionMatrix(i);
|
|
800
810
|
let a = n.getCenter(new t());
|
|
801
811
|
return r.containsPoint(a);
|
|
802
|
-
},
|
|
812
|
+
}, yt = (e) => {
|
|
803
813
|
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 ");
|
|
804
814
|
};
|
|
805
815
|
//#endregion
|
|
806
|
-
export {
|
|
816
|
+
export { gt as $, ke as A, Me as B, nt as C, ie as Ct, pt as D, it as E, b as Et, ct as F, R as G, Fe as H, Ke as I, mt as J, q as K, vt as L, Oe as M, Ae as N, st as O, Ge as P, at as Q, ft as R, $e as S, ae as St, Ze as T, ne as Tt, Ne as U, yt as V, Pe as W, Qe as X, ht as Y, ot as Z, tt as _, oe as _t, be as a, ge as at, X as b, x as bt, ve as c, me as ct, Ue as d, ue as dt, D as et, Je as f, le as ft, Ie as g, ce as gt, _t as h, S as ht, Ee as i, _e as it, De as j, Be as k, ye as l, fe as lt, lt as m, C as mt, we as n, N as nt, xe as o, he as ot, et as p, pe as pt, qe as q, Te as r, E as rt, Se as s, T as st, Ce as t, k as tt, H as u, de as ut, Z as v, re as vt, ut as w, ee as wt, Y as x, te as xt, Q as y, se as yt, je as z };
|
|
807
817
|
|
|
808
|
-
//# sourceMappingURL=threejs-utils-
|
|
818
|
+
//# sourceMappingURL=threejs-utils-D5DMIzUO.mjs.map
|