@roomle/web-sdk 5.1.0-alpha.9 → 5.1.0
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-DBo4bqkV.mjs → api-Woc5NOM1.mjs} +7 -4
- package/lib/api-Woc5NOM1.mjs.map +1 -0
- package/lib/asset-loader.worker-CE4O0JU-.mjs.map +1 -1
- package/lib/budgeteer.sw-yR2xApHT.mjs.map +1 -1
- package/lib/{component-raycast-helper-razJrkD8.mjs → component-raycast-helper-CaY2UMli.mjs} +2 -2
- package/lib/{component-raycast-helper-razJrkD8.mjs.map → component-raycast-helper-CaY2UMli.mjs.map} +1 -1
- package/lib/configurator-Bo_pnqDi.mjs +2 -0
- package/lib/configurator-i-Zl5omd.mjs +45 -0
- package/lib/{configurator-Bfbi3q7X.mjs.map → configurator-i-Zl5omd.mjs.map} +1 -1
- package/lib/{glb-viewer-CP0TDbjo.mjs → glb-viewer-C1-vP2Vq.mjs} +22 -22
- package/lib/{glb-viewer-CP0TDbjo.mjs.map → glb-viewer-C1-vP2Vq.mjs.map} +1 -1
- package/lib/glb-viewer-CaNU0FLF.mjs +2 -0
- package/lib/{highlight-coordinator-DwIDs-5n.mjs → highlight-coordinator-DKMaPGPo.mjs} +3 -3
- package/lib/{highlight-coordinator-DwIDs-5n.mjs.map → highlight-coordinator-DKMaPGPo.mjs.map} +1 -1
- package/lib/{homag-intelligence-1GdmdIBg.mjs → homag-intelligence-Dr0m9LxO.mjs} +9 -3
- package/lib/homag-intelligence-Dr0m9LxO.mjs.map +1 -0
- package/lib/{material-viewer-DJEEvr_2.mjs → material-viewer-CHzje_V0.mjs} +29 -29
- package/lib/{material-viewer-DJEEvr_2.mjs.map → material-viewer-CHzje_V0.mjs.map} +1 -1
- package/lib/{packages-Da2aAUP6.mjs → packages-DbOsSpKq.mjs} +5 -5
- package/lib/{packages-Da2aAUP6.mjs.map → packages-DbOsSpKq.mjs.map} +1 -1
- package/lib/{planner-B3gmGQ5h.mjs → planner-BOrph7M7.mjs} +14 -14
- package/lib/{planner-B3gmGQ5h.mjs.map → planner-BOrph7M7.mjs.map} +1 -1
- package/lib/planner-DXeyIHUx.mjs +2 -0
- package/lib/roomle-headless.d.ts +115 -8
- package/lib/roomle-headless.js +84 -84
- package/lib/roomle-headless.js.map +1 -1
- package/lib/{roomle-sdk-B7kJPhbu.mjs → roomle-sdk-CN9TqA78.mjs} +3248 -2957
- package/lib/roomle-sdk-CN9TqA78.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +115 -8
- package/lib/roomle-sdk.js +8 -8
- package/lib/{scene-renderer-CHMngNZI.mjs → scene-renderer-DGSgD6mp.mjs} +15 -15
- package/lib/{scene-renderer-CHMngNZI.mjs.map → scene-renderer-DGSgD6mp.mjs.map} +1 -1
- package/lib/{script-loader-Bgt0r8D_.mjs → script-loader-CL3F8sIY.mjs} +2 -2
- package/lib/{script-loader-Bgt0r8D_.mjs.map → script-loader-CL3F8sIY.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/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-CuB9x20N.mjs → stats-helper-C74q5Bje.mjs} +2 -2
- package/lib/{stats-helper-CuB9x20N.mjs.map → stats-helper-C74q5Bje.mjs.map} +1 -1
- package/lib/{threejs-utils-CrP6G-ow.mjs → threejs-utils-DHTRY4yW.mjs} +105 -112
- package/lib/{threejs-utils-CrP6G-ow.mjs.map → threejs-utils-DHTRY4yW.mjs.map} +1 -1
- package/lib/{tools-core-Bo2DwzBG.mjs → tools-core-D3kc3jRW.mjs} +6 -6
- package/lib/{tools-core-Bo2DwzBG.mjs.map → tools-core-D3kc3jRW.mjs.map} +1 -1
- package/package.json +2 -2
- package/lib/api-DBo4bqkV.mjs.map +0 -1
- package/lib/configurator-Bfbi3q7X.mjs +0 -45
- package/lib/configurator-BxIDaIsx.mjs +0 -2
- package/lib/glb-viewer-DYkOoOv-.mjs +0 -2
- package/lib/homag-intelligence-1GdmdIBg.mjs.map +0 -1
- package/lib/planner-BpzUs9MN.mjs +0 -2
- package/lib/roomle-sdk-B7kJPhbu.mjs.map +0 -1
|
@@ -375,7 +375,7 @@ var ee = {
|
|
|
375
375
|
}
|
|
376
376
|
}), O = function() {
|
|
377
377
|
return performance.now();
|
|
378
|
-
},
|
|
378
|
+
}, we = function() {
|
|
379
379
|
function e() {
|
|
380
380
|
var e = [...arguments];
|
|
381
381
|
this._tweens = {}, this._tweensAddedDuringUpdate = {}, this.add.apply(this, e);
|
|
@@ -414,17 +414,17 @@ var ee = {
|
|
|
414
414
|
n = Object.keys(this._tweensAddedDuringUpdate);
|
|
415
415
|
}
|
|
416
416
|
}, e;
|
|
417
|
-
}(),
|
|
417
|
+
}(), k = {
|
|
418
418
|
Linear: function(e, t) {
|
|
419
|
-
var n = e.length - 1, r = n * t, i = Math.floor(r), a =
|
|
419
|
+
var n = e.length - 1, r = n * t, i = Math.floor(r), a = k.Utils.Linear;
|
|
420
420
|
return t < 0 ? a(e[0], e[1], r) : t > 1 ? a(e[n], e[n - 1], n - r) : a(e[i], e[i + 1 > n ? n : i + 1], r - i);
|
|
421
421
|
},
|
|
422
422
|
Bezier: function(e, t) {
|
|
423
|
-
for (var n = 0, r = e.length - 1, i = Math.pow, a =
|
|
423
|
+
for (var n = 0, r = e.length - 1, i = Math.pow, a = k.Utils.Bernstein, o = 0; o <= r; o++) n += i(1 - t, r - o) * i(t, o) * e[o] * a(r, o);
|
|
424
424
|
return n;
|
|
425
425
|
},
|
|
426
426
|
CatmullRom: function(e, t) {
|
|
427
|
-
var n = e.length - 1, r = n * t, i = Math.floor(r), a =
|
|
427
|
+
var n = e.length - 1, r = n * t, i = Math.floor(r), a = k.Utils.CatmullRom;
|
|
428
428
|
return e[0] === e[n] ? (t < 0 && (i = Math.floor(r = n * (1 + t))), a(e[(i - 1 + n) % n], e[i], e[(i + 1) % n], e[(i + 2) % n], r - i)) : t < 0 ? e[0] - (a(e[0], e[0], e[1], e[1], -r) - e[0]) : t > 1 ? e[n] - (a(e[n], e[n], e[n - 1], e[n - 1], r - n) - e[n]) : a(e[i ? i - 1 : 0], e[i], e[n < i + 1 ? n : i + 1], e[n < i + 2 ? n : i + 2], r - i);
|
|
429
429
|
},
|
|
430
430
|
Utils: {
|
|
@@ -432,7 +432,7 @@ var ee = {
|
|
|
432
432
|
return (t - e) * n + e;
|
|
433
433
|
},
|
|
434
434
|
Bernstein: function(e, t) {
|
|
435
|
-
var n =
|
|
435
|
+
var n = k.Utils.Factorial;
|
|
436
436
|
return n(e) / n(t) / n(e - t);
|
|
437
437
|
},
|
|
438
438
|
Factorial: (function() {
|
|
@@ -449,14 +449,14 @@ var ee = {
|
|
|
449
449
|
return (2 * t - 2 * n + a + o) * c + (-3 * t + 3 * n - 2 * a - o) * s + a * i + t;
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
-
},
|
|
452
|
+
}, A = function() {
|
|
453
453
|
function e() {}
|
|
454
454
|
return e.nextId = function() {
|
|
455
455
|
return e._nextId++;
|
|
456
456
|
}, e._nextId = 0, e;
|
|
457
|
-
}(),
|
|
457
|
+
}(), j = new we(), M = function() {
|
|
458
458
|
function e(e, t) {
|
|
459
|
-
this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = D.Linear.None, this._interpolationFunction =
|
|
459
|
+
this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = D.Linear.None, this._interpolationFunction = k.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = A.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1, this._object = e, typeof t == "object" ? (this._group = t, t.add(this)) : t === !0 && (this._group = j, j.add(this));
|
|
460
460
|
}
|
|
461
461
|
return e.prototype.getId = function() {
|
|
462
462
|
return this._id;
|
|
@@ -546,7 +546,7 @@ var ee = {
|
|
|
546
546
|
}, e.prototype.easing = function(e) {
|
|
547
547
|
return e === void 0 && (e = D.Linear.None), this._easingFunction = e, this;
|
|
548
548
|
}, e.prototype.interpolation = function(e) {
|
|
549
|
-
return e === void 0 && (e =
|
|
549
|
+
return e === void 0 && (e = k.Linear), this._interpolationFunction = e, this;
|
|
550
550
|
}, e.prototype.chain = function() {
|
|
551
551
|
return this._chainedTweens = [...arguments], this;
|
|
552
552
|
}, e.prototype.onStart = function(e) {
|
|
@@ -596,107 +596,107 @@ var ee = {
|
|
|
596
596
|
typeof n == "string" ? this._valuesStartRepeat[e] = this._valuesStartRepeat[e] + parseFloat(n) : this._valuesStartRepeat[e] = this._valuesEnd[e], this._valuesEnd[e] = t;
|
|
597
597
|
}, e.autoStartOnUpdate = !1, e;
|
|
598
598
|
}();
|
|
599
|
-
|
|
600
|
-
var
|
|
601
|
-
|
|
599
|
+
A.nextId;
|
|
600
|
+
var N = j;
|
|
601
|
+
N.getAll.bind(N), N.removeAll.bind(N), N.add.bind(N), N.remove.bind(N), N.update.bind(N);
|
|
602
602
|
//#endregion
|
|
603
603
|
//#region packages/common-core/src/utils/threejs-utils.ts
|
|
604
|
-
var
|
|
604
|
+
var P = null;
|
|
605
605
|
globalThis.window !== void 0 && import("./dat.gui.module-B2PXSbre.mjs").then((e) => {
|
|
606
|
-
|
|
606
|
+
P = e.GUI;
|
|
607
607
|
}).catch(() => {});
|
|
608
|
-
var
|
|
608
|
+
var Te = .4, Ee = "#DDDDDD", De = .4, Oe = "#7B7B7B", ke = "#B1B1B1", Ae = "cameraFacingHidden", je = "cameraFacingIndicator", Me = .8, Ne = .9, Pe = (e) => e instanceof m ? e.capabilities.maxSamples : 16, Fe = (e) => e instanceof m ? e.capabilities.maxTextures : 16, Ie = (e) => e instanceof m ? e.capabilities.getMaxAnisotropy() : 16, Le = (t, n, r, i) => {
|
|
609
609
|
if (!t || !n || r === 0 || i === 0) return new e();
|
|
610
610
|
let a = t.clone(), o = r / 2, s = i / 2;
|
|
611
611
|
return a.project(n), a.x = Math.floor(a.x * o + o), a.y = Math.floor(-(a.y * s) + s), a.z = t.distanceTo(n.position), a;
|
|
612
|
-
},
|
|
612
|
+
}, Re = (t, n) => {
|
|
613
613
|
n ||= new e(0, 0, 0);
|
|
614
614
|
let r = new e(t.size.x / 1e3, t.size.z / 1e3, t.size.y / 1e3), i = new e(t.origin.x / 1e3, t.origin.z / 1e3, t.origin.y / -1e3);
|
|
615
615
|
return new c(new e(0, 0, -r.z).add(i).sub(n), new e(r.x, r.y, 0).add(i).add(n));
|
|
616
|
-
},
|
|
616
|
+
}, ze = (e) => (e.from /= 1e3, e.to /= 1e3, e), Be = (e, t) => {
|
|
617
617
|
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);
|
|
618
618
|
return n === a && r === o && i === s;
|
|
619
|
-
},
|
|
619
|
+
}, Ve = (e, t) => {
|
|
620
620
|
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);
|
|
621
621
|
return n === o && r === s && i === c && a === l;
|
|
622
|
-
},
|
|
622
|
+
}, He = (e, t) => {
|
|
623
623
|
let n = w(e.x), r = w(e.y), i = w(t.x), a = w(t.y);
|
|
624
624
|
return n === i && r === a;
|
|
625
|
-
},
|
|
626
|
-
e ||=
|
|
625
|
+
}, Ue = (e) => F(null, e), F = (e, t) => {
|
|
626
|
+
e ||= Ke(), e.name = t.id ? t.id.toString() : "";
|
|
627
627
|
let n = t.shading.version === "2" || t.shading.version?.startsWith("2.");
|
|
628
|
-
return e = n ?
|
|
629
|
-
},
|
|
628
|
+
return e = n ? Ge(e, t) : We(e, t), e.userData.materialVersion = n ? 2 : 1, e;
|
|
629
|
+
}, We = (e, t) => {
|
|
630
630
|
t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = _(t.shading.metallic, .5));
|
|
631
631
|
let n = !1;
|
|
632
|
-
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 = _(t.shading.occlusion, 1), e.roughness = _(t.shading.roughness, .5), e.alphaTest = _(t.shading.alphaCutoff, 0),
|
|
633
|
-
},
|
|
632
|
+
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 = _(t.shading.occlusion, 1), e.roughness = _(t.shading.roughness, .5), e.alphaTest = _(t.shading.alphaCutoff, 0), I(e.color, t.shading.basecolor), n || t.shading.doubleSided ? e.side = 2 : e.side = 0, e;
|
|
633
|
+
}, Ge = (e, t) => {
|
|
634
634
|
let n = !1, r = t.shading.transmission && t.shading.transmission > 0;
|
|
635
|
-
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,
|
|
635
|
+
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, I(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, I(e.specularColor, t.shading.specularColor), e.specularIntensity = t.shading.specularity ?? 1, e.roughness = t.shading.roughness ?? 0, e.aoMapIntensity = t.shading.occlusion ?? 1, I(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), I(e.sheenColor, t.shading.sheenColor), e.sheen = t.shading.sheenIntensity ?? 1, e.sheenRoughness = t.shading.sheenRoughness ?? 1, e.thickness = t.shading.thicknessFactor ?? 0;
|
|
636
636
|
let i = t.shading.attenuationDistance;
|
|
637
|
-
return r && i === 0 ? console.warn("invalid attenuation configuration for transmissive material -- Skipping attenuation color and distance configuration in material.") : (
|
|
638
|
-
},
|
|
637
|
+
return r && i === 0 ? console.warn("invalid attenuation configuration for transmissive material -- Skipping attenuation color and distance configuration in material.") : (I(e.attenuationColor, t.shading.attenuationColor), i != null && (e.attenuationDistance = i)), e.side = n || t.shading.doubleSided ? 2 : 0, e;
|
|
638
|
+
}, Ke = () => E.createMeshPhysicalMaterial({}), qe = (e, t = 1) => t === 2 ? Ye(e) : Je(e), Je = (e) => {
|
|
639
639
|
let t = {
|
|
640
640
|
alpha: e.opacity,
|
|
641
641
|
metallic: e.reflectivity,
|
|
642
|
-
basecolor:
|
|
642
|
+
basecolor: L(e.color),
|
|
643
643
|
roughness: e.roughness,
|
|
644
644
|
doubleSided: e.side === 2,
|
|
645
645
|
alphaCutoff: e.alphaTest,
|
|
646
646
|
transmission: e.transmission
|
|
647
647
|
};
|
|
648
648
|
return e.metalness === 1 ? t.metallic = 1 : t.metallic = e.reflectivity, t;
|
|
649
|
-
},
|
|
649
|
+
}, Ye = (e) => ({
|
|
650
650
|
version: "2.0.0",
|
|
651
651
|
alpha: e.opacity,
|
|
652
652
|
alphaCutoff: e.alphaTest,
|
|
653
|
-
basecolor:
|
|
653
|
+
basecolor: L(e.color),
|
|
654
654
|
transmission: e.transmission,
|
|
655
655
|
transmissionIOR: e.ior,
|
|
656
656
|
metallic: e.metalness,
|
|
657
657
|
doubleSided: e.side === 2,
|
|
658
|
-
specularColor:
|
|
658
|
+
specularColor: L(e.specularColor),
|
|
659
659
|
specularity: e.specularIntensity,
|
|
660
660
|
roughness: e.roughness,
|
|
661
661
|
occlusion: e.aoMapIntensity,
|
|
662
|
-
emissiveColor:
|
|
662
|
+
emissiveColor: L(e.emissive),
|
|
663
663
|
emissiveIntensity: e.emissiveIntensity,
|
|
664
664
|
clearcoatIntensity: e.clearcoat,
|
|
665
665
|
clearcoatRoughness: e.clearcoatRoughness,
|
|
666
666
|
clearcoatNormalScale: e.clearcoatNormalScale.x,
|
|
667
|
-
sheenColor:
|
|
667
|
+
sheenColor: L(e.sheenColor),
|
|
668
668
|
sheenIntensity: e.sheen,
|
|
669
669
|
sheenRoughness: e.sheenRoughness,
|
|
670
670
|
thicknessFactor: e.thickness,
|
|
671
|
-
attenuationColor:
|
|
671
|
+
attenuationColor: L(e.attenuationColor),
|
|
672
672
|
attenuationDistance: e.attenuationDistance
|
|
673
|
-
}),
|
|
673
|
+
}), I = (e, t) => {
|
|
674
674
|
if (t !== void 0) {
|
|
675
675
|
let n = new p(t.r, t.g, t.b);
|
|
676
676
|
e.copy(n.convertSRGBToLinear());
|
|
677
677
|
}
|
|
678
|
-
},
|
|
678
|
+
}, L = (e) => {
|
|
679
679
|
let t = e.clone().convertLinearToSRGB();
|
|
680
680
|
return {
|
|
681
681
|
r: t.r,
|
|
682
682
|
g: t.g,
|
|
683
683
|
b: t.b
|
|
684
684
|
};
|
|
685
|
-
},
|
|
686
|
-
|
|
687
|
-
let s =
|
|
685
|
+
}, R = null, Xe = (e, t, n, r, i, a, o = 16) => {
|
|
686
|
+
R || (R = new l(), R.crossOrigin = "");
|
|
687
|
+
let s = R;
|
|
688
688
|
return new Promise((c, l) => {
|
|
689
689
|
if (!e) {
|
|
690
690
|
console.warn("trying to add a texture without image", t), c();
|
|
691
691
|
return;
|
|
692
692
|
}
|
|
693
693
|
s.load(e, (e) => {
|
|
694
|
-
|
|
694
|
+
z(e, t, n, r, i, a, o), c();
|
|
695
695
|
}, (e) => {
|
|
696
696
|
l(e);
|
|
697
697
|
});
|
|
698
698
|
});
|
|
699
|
-
},
|
|
699
|
+
}, z = (e, t, r, i, a, o, s = 16) => {
|
|
700
700
|
if (e.anisotropy = i, e.wrapS = n, e.wrapT = n, s <= 8 && [
|
|
701
701
|
g.ORM,
|
|
702
702
|
g.EMRGB,
|
|
@@ -709,48 +709,48 @@ var we = .4, Te = "#DDDDDD", Ee = .4, De = "#7B7B7B", Oe = "#B1B1B1", ke = "came
|
|
|
709
709
|
console.warn("ORM maps are not supported on devices with only " + s + " texture units");
|
|
710
710
|
return;
|
|
711
711
|
}
|
|
712
|
-
e.repeat.set(a, o),
|
|
713
|
-
},
|
|
712
|
+
e.repeat.set(a, o), Ze(e, t, r), t.mapping === g.RGBA && (r.transparent = !0, r.userData.materialVersion === 1 && r.name.includes("glow") && (r.emissiveIntensity = .5, r.emissive = new p(16777215), r.emissiveMap = r.map)), r.needsUpdate = !0;
|
|
713
|
+
}, Ze = (e, n, r) => {
|
|
714
714
|
n.mapping === g.XYZ ? r.normalMap = e : n.mapping === g.ORM ? (r.aoMap = e, r.roughnessMap = e, r.metalnessMap = e) : n.mapping === g.EMRGB ? r.emissiveMap = e : n.mapping === g.CCRG ? (r.clearcoatMap = e, r.clearcoatRoughnessMap = e) : n.mapping === g.CCXYZ ? r.clearcoatNormalMap = e : n.mapping === g.SHRGBA ? (r.sheenColorMap = e, r.sheenRoughnessMap = e) : n.mapping === g.SPRGBA ? (r.specularColorMap = e, r.specularIntensityMap = e) : n.mapping === g.TTRG ? (r.transmissionMap = e, r.thicknessMap = e) : (e.colorSpace = t, r.map = e);
|
|
715
|
-
},
|
|
715
|
+
}, Qe = (e = !0) => {
|
|
716
716
|
if (!window.__RML_WEBGL_GUI__) {
|
|
717
|
-
if (!
|
|
717
|
+
if (!P) return null;
|
|
718
718
|
try {
|
|
719
|
-
window.__RML_WEBGL_GUI__ = new
|
|
719
|
+
window.__RML_WEBGL_GUI__ = new P({ autoPlace: e });
|
|
720
720
|
} catch {
|
|
721
721
|
return null;
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
return window.__RML_WEBGL_GUI__;
|
|
725
|
-
},
|
|
725
|
+
}, B = (e, t, n) => {
|
|
726
726
|
let r;
|
|
727
727
|
if (t.wallType.value === v.OuterWallRight && (r = h(t.rightNormal)), t.wallType.value === v.OuterWallLeft && (r = h(t.leftNormal)), !r) return !0;
|
|
728
728
|
let i = h(n).applyMatrix4(e.matrixWorldInverse);
|
|
729
729
|
return r = r.transformDirection(e.matrixWorldInverse), i.dot(r) >= 0;
|
|
730
|
-
},
|
|
730
|
+
}, V = (e) => {
|
|
731
731
|
let t = e?.getPlanElement();
|
|
732
732
|
return !t || !("getAttachedWall" in t) ? null : t.getAttachedWall();
|
|
733
|
-
},
|
|
734
|
-
let a = !1, o =
|
|
733
|
+
}, H = (e, t) => !e || !t ? !1 : typeof e.getId == "function" && typeof t.getId == "function" ? e.getId() === t.getId() : e === t, $e = (e, t, n = [], r = null, i = !1) => {
|
|
734
|
+
let a = !1, o = V(r);
|
|
735
735
|
for (let n of t) {
|
|
736
|
-
let t = !(
|
|
736
|
+
let t = !(H(n.getPlanElement(), o) || B(e, n.getKernelObject(), n.getPlanElement().getCenter()));
|
|
737
737
|
t !== n.isHiddenByCameraFacing() && (a = !0), n.setHiddenByCameraFacing(t);
|
|
738
738
|
}
|
|
739
739
|
for (let t of n) {
|
|
740
|
-
let n = t.getPlanElement(), r =
|
|
740
|
+
let n = t.getPlanElement(), r = V(t);
|
|
741
741
|
if (!n || !r) continue;
|
|
742
742
|
let s = n.getObjectCategory?.().value;
|
|
743
743
|
if (s !== y.DOOR && s !== y.WINDOW) continue;
|
|
744
|
-
let c =
|
|
744
|
+
let c = H(r, o) || B(e, r, r.getCenter()), l = t.getContainer().visible;
|
|
745
745
|
t.setHiddenByCameraFacing(!c && !i), l !== t.getContainer().visible && (a = !0);
|
|
746
746
|
}
|
|
747
747
|
return a;
|
|
748
|
-
},
|
|
748
|
+
}, et = (e, t, n = !0) => {
|
|
749
749
|
if (!e.userData.tween) if (t) if (e.transparent = !0, !n) e.opacity = .2;
|
|
750
750
|
else {
|
|
751
751
|
let t = { opacity: 1 };
|
|
752
752
|
e.userData.tween = !0;
|
|
753
|
-
let n = new
|
|
753
|
+
let n = new M(t).to({ opacity: .2 }, 400).easing(D.Sinusoidal.In).onUpdate(() => {
|
|
754
754
|
e.opacity = t.opacity;
|
|
755
755
|
}).onComplete(() => {
|
|
756
756
|
e.userData.tween = !1, window.TWEEN?.remove(n);
|
|
@@ -761,46 +761,46 @@ var we = .4, Te = "#DDDDDD", Ee = .4, De = "#7B7B7B", Oe = "#B1B1B1", ke = "came
|
|
|
761
761
|
else {
|
|
762
762
|
let t = { opacity: .2 };
|
|
763
763
|
e.userData.tween = !0;
|
|
764
|
-
let n = new
|
|
764
|
+
let n = new M(t).to({ opacity: 1 }, 400).easing(D.Sinusoidal.In).onUpdate(() => {
|
|
765
765
|
e.opacity = t.opacity;
|
|
766
766
|
}).onComplete(() => {
|
|
767
767
|
e.transparent = !1, e.userData.tween = !1, window.TWEEN?.remove(n);
|
|
768
768
|
}).start();
|
|
769
769
|
window.TWEEN?.add(n);
|
|
770
770
|
}
|
|
771
|
-
},
|
|
772
|
-
let o =
|
|
773
|
-
let n =
|
|
774
|
-
|
|
771
|
+
}, tt = (e, t, n, r, i, a) => {
|
|
772
|
+
let o = nt(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(D.Quadratic.InOut).onUpdate(() => {
|
|
773
|
+
let n = rt(l, u, d.t);
|
|
774
|
+
W(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
|
|
775
775
|
}).onComplete(() => {
|
|
776
|
-
|
|
776
|
+
W(e, s), a && a(), window.TWEEN?.remove(f);
|
|
777
777
|
}).onStop(() => {
|
|
778
778
|
window.TWEEN?.remove(f);
|
|
779
779
|
}).start();
|
|
780
780
|
return window.TWEEN?.add(f), f;
|
|
781
|
-
},
|
|
781
|
+
}, nt = (t, n) => {
|
|
782
782
|
let i = t.clone().invert().clone().multiply(n), a = new e(), s = new r();
|
|
783
783
|
i.decompose(a, s, new e());
|
|
784
|
-
let c =
|
|
784
|
+
let c = U(s), l = c.axis;
|
|
785
785
|
if (a.length() < .001 || Math.abs(c.angleRad) < .001 || l.length() < .001) return new o().identity();
|
|
786
786
|
let u = new e().setFromMatrixPosition(t), d = new e().setFromMatrixPosition(n), f = u.clone().sub(d), p = f.length(), m = new e().crossVectors(l, f).normalize();
|
|
787
787
|
f = new e().crossVectors(m, l).normalize();
|
|
788
788
|
let h = u.clone().add(d).multiplyScalar(.5);
|
|
789
789
|
return h = h.sub(m.clone().multiplyScalar(p * .5 / Math.tan(c.angleRad * .5))), new o().makeBasis(m, l, f).setPosition(h);
|
|
790
|
-
},
|
|
790
|
+
}, U = (t) => {
|
|
791
791
|
let n = Math.sqrt(1 - t.w * t.w);
|
|
792
792
|
return {
|
|
793
793
|
axis: new e(t.x, t.y, t.z).multiplyScalar(n === 0 ? 1 : 1 / n),
|
|
794
794
|
angleRad: 2 * Math.acos(t.w)
|
|
795
795
|
};
|
|
796
|
-
},
|
|
796
|
+
}, W = (e, t) => {
|
|
797
797
|
e.updateMatrix(), t.multiply(e.matrix.clone().invert()), e.applyMatrix4(t), e.updateMatrix();
|
|
798
|
-
},
|
|
798
|
+
}, rt = (t, n, i) => {
|
|
799
799
|
let a = new e(), s = new r(), c = new e();
|
|
800
800
|
t.decompose(a, s, c);
|
|
801
801
|
let l = new e(), u = new r(), d = new e();
|
|
802
802
|
n.decompose(l, u, d);
|
|
803
|
-
let f = new e().lerpVectors(a, l, i), p = new r().slerpQuaternions(s, u, i), m =
|
|
803
|
+
let f = new e().lerpVectors(a, l, i), p = new r().slerpQuaternions(s, u, i), m = U(s.clone().conjugate().multiply(u));
|
|
804
804
|
if (m.angleRad > Math.PI && (m.angleRad -= 2 * Math.PI), Math.abs(m.angleRad) > S(1) && a.length() > .001 && l.length() > .001) {
|
|
805
805
|
let t = a.clone().normalize().dot(l.clone().normalize());
|
|
806
806
|
if (Math.abs(t) < .999) {
|
|
@@ -810,29 +810,29 @@ var we = .4, Te = "#DDDDDD", Ee = .4, De = "#7B7B7B", Oe = "#B1B1B1", ke = "came
|
|
|
810
810
|
}
|
|
811
811
|
let h = new e().lerpVectors(c, d, i), g = new o();
|
|
812
812
|
return g.compose(f, p, h), g;
|
|
813
|
-
},
|
|
813
|
+
}, it = (e) => {
|
|
814
814
|
let t = new p();
|
|
815
815
|
return t.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), t;
|
|
816
|
-
},
|
|
816
|
+
}, G = (e, t) => {
|
|
817
817
|
t.transparent || (e.transparent = t.transparent, delete e.userData.postProcessingMaterialPlugin), e.opacity = t.opacity, e.needsUpdate = !0;
|
|
818
|
-
},
|
|
818
|
+
}, at = (e, t) => new Promise((n) => {
|
|
819
819
|
e.traverse((e) => {
|
|
820
820
|
if (e instanceof u) {
|
|
821
821
|
let r = e.material;
|
|
822
822
|
e.userData.tween && e.userData.tween.stop();
|
|
823
823
|
let i = { opacity: r.opacity };
|
|
824
824
|
t.transparent && (r.transparent = t.transparent);
|
|
825
|
-
let a = new
|
|
825
|
+
let a = new M(i);
|
|
826
826
|
a.toJSON = () => void 0, e.userData.tween = a, window.TWEEN?.add(a.to(t, 250).easing(D.Linear.None).onUpdate(() => {
|
|
827
827
|
r.opacity = i.opacity;
|
|
828
828
|
}).onStop(() => {
|
|
829
|
-
|
|
829
|
+
G(r, t), e.userData.tween = void 0;
|
|
830
830
|
}).onComplete(() => {
|
|
831
|
-
|
|
831
|
+
G(r, t), e.userData.tween = void 0, window.TWEEN?.remove(a), n();
|
|
832
832
|
}).start());
|
|
833
833
|
}
|
|
834
834
|
});
|
|
835
|
-
}),
|
|
835
|
+
}), ot = (e) => {
|
|
836
836
|
e.traverse((e) => {
|
|
837
837
|
if (e instanceof u) {
|
|
838
838
|
let t = e.material;
|
|
@@ -845,7 +845,7 @@ var we = .4, Te = "#DDDDDD", Ee = .4, De = "#7B7B7B", Oe = "#B1B1B1", ke = "came
|
|
|
845
845
|
transparent: t.transparent
|
|
846
846
|
};
|
|
847
847
|
t.transparent = n.transparent, t.opacity = n.opacity;
|
|
848
|
-
let i = new
|
|
848
|
+
let i = new M(n).to(r, 500).easing(D.Linear.None).onUpdate(() => {
|
|
849
849
|
t.opacity = n.opacity;
|
|
850
850
|
}).onComplete(() => {
|
|
851
851
|
t.transparent = r.transparent, window.TWEEN?.remove(i);
|
|
@@ -853,77 +853,70 @@ var we = .4, Te = "#DDDDDD", Ee = .4, De = "#7B7B7B", Oe = "#B1B1B1", ke = "came
|
|
|
853
853
|
window.TWEEN?.add(i);
|
|
854
854
|
}
|
|
855
855
|
});
|
|
856
|
-
},
|
|
856
|
+
}, st = (t, n) => {
|
|
857
857
|
let r = new c().setFromObject(t), i = r.getSize(new e()), a = Math.min(i.x, i.y, i.z), o = !0;
|
|
858
858
|
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;
|
|
859
|
-
},
|
|
860
|
-
e.type === "Mesh" ?
|
|
861
|
-
},
|
|
859
|
+
}, ct = (e) => {
|
|
860
|
+
e.type === "Mesh" ? q(e) : K(e);
|
|
861
|
+
}, K = (e) => {
|
|
862
862
|
!e || !e.children || e.children.length === 0 || e.children.forEach((e) => {
|
|
863
|
-
|
|
863
|
+
q(e);
|
|
864
864
|
});
|
|
865
|
-
},
|
|
865
|
+
}, q = (e) => {
|
|
866
866
|
if (e) {
|
|
867
867
|
try {
|
|
868
|
-
e.material &&
|
|
868
|
+
e.material && Y(e.material);
|
|
869
869
|
} catch (e) {
|
|
870
870
|
console.warn("disposeMesh: material dispose failed", e);
|
|
871
871
|
}
|
|
872
872
|
try {
|
|
873
|
-
e.geometry &&
|
|
873
|
+
e.geometry && J(e.geometry);
|
|
874
874
|
} catch (e) {
|
|
875
875
|
console.warn("disposeMesh: geometry dispose failed", e);
|
|
876
876
|
}
|
|
877
877
|
try {
|
|
878
|
-
e.children && e.children.length > 0 &&
|
|
878
|
+
e.children && e.children.length > 0 && K(e);
|
|
879
879
|
} catch (e) {
|
|
880
880
|
console.warn("disposeMesh: child dispose failed", e);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
},
|
|
883
|
+
}, J = (e) => {
|
|
884
884
|
e && e.dispose();
|
|
885
|
-
},
|
|
885
|
+
}, Y = (e) => {
|
|
886
886
|
e && (e.map && e.map.dispose(), e.normalMap && e.normalMap.dispose(), e.dispose());
|
|
887
|
-
},
|
|
887
|
+
}, X, lt = () => (X || (X = new d(), X.visible = !1), X), Z, ut = (e) => (Z ||= E.createMeshStandardMaterial({
|
|
888
888
|
color: e || "#FF0000",
|
|
889
889
|
transparent: !0,
|
|
890
890
|
opacity: .5,
|
|
891
891
|
visible: !0,
|
|
892
892
|
polygonOffset: !0,
|
|
893
893
|
polygonOffsetFactor: -1
|
|
894
|
-
}),
|
|
894
|
+
}), Z), dt = (e) => e.x === 0 && e.y === 0 && e.z === 0, ft = (e) => Number.isFinite(e.x) && Number.isFinite(e.y) && Number.isFinite(e.z), pt = (e, t) => {
|
|
895
895
|
let n = "";
|
|
896
896
|
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);
|
|
897
|
-
},
|
|
897
|
+
}, mt = (t) => {
|
|
898
898
|
let n = t.getWorldDirection(new e()).clone();
|
|
899
899
|
n.y = 0, n.lengthSq() < .01 && (n = new e(0, 1, 0), n.applyQuaternion(t.quaternion), n.y = 0), n.normalize();
|
|
900
900
|
let r = Math.asin(n.x);
|
|
901
901
|
return n.z < 0 && (r = Math.PI - r), r < 0 && (r += Math.PI * 2), r;
|
|
902
|
-
},
|
|
902
|
+
}, Q = (e, t) => {
|
|
903
903
|
if (!e || !t) return 0;
|
|
904
904
|
let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
|
|
905
905
|
return r && n || !r && !n ? 0 : n ? 1 : -1;
|
|
906
|
+
}, $ = (t) => {
|
|
907
|
+
if (t.isEmpty()) return 0;
|
|
908
|
+
let { x: n, y: r, z: i } = t.getSize(new e());
|
|
909
|
+
return n * r * i;
|
|
906
910
|
}, ht = (e, t) => {
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
if (
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
}
|
|
914
|
-
return n ? 1 : -1;
|
|
915
|
-
}, gt = (t, n) => {
|
|
916
|
-
let r = new c();
|
|
917
|
-
if (r.copy(t).intersect(n), r.isEmpty()) return 0;
|
|
918
|
-
let i = (t) => {
|
|
919
|
-
let n = new e();
|
|
920
|
-
return t.getSize(n), n.x * n.y * n.z;
|
|
921
|
-
}, a = i(t), o = i(r);
|
|
922
|
-
return a === 0 ? 0 : o / a;
|
|
923
|
-
}, _t = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, vt = (t, n, r, i = 1) => {
|
|
911
|
+
let n = Q(t, e);
|
|
912
|
+
if (n !== 0) return n > 0;
|
|
913
|
+
if (t.clone().expandByScalar(.001).containsBox(e)) return !1;
|
|
914
|
+
let r = $(e);
|
|
915
|
+
return r === 0 || r >= $(t) ? !1 : $(e.clone().intersect(t)) / r > .5;
|
|
916
|
+
}, gt = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, _t = (t, n, r, i = 1) => {
|
|
924
917
|
let a = n > r, o = a ? 15 : 0, s = a ? 0 : 10, l = t.getSize(new e()), u = t.getCenter(new e()), d = l.x > 2 * o ? l.x / 2 : o, f = l.z > 2 * s ? l.z / 2 : s;
|
|
925
918
|
return d *= i, f *= i, new c(new e(u.x - d, u.y, u.z - f), new e(u.x + d, u.y, u.z + f));
|
|
926
|
-
},
|
|
919
|
+
}, vt = (e) => {
|
|
927
920
|
let { x: t, y: n } = e;
|
|
928
921
|
return {
|
|
929
922
|
x: t,
|
|
@@ -948,6 +941,6 @@ var we = .4, Te = "#DDDDDD", Ee = .4, De = "#7B7B7B", Oe = "#B1B1B1", ke = "came
|
|
|
948
941
|
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 ");
|
|
949
942
|
};
|
|
950
943
|
//#endregion
|
|
951
|
-
export { D as $,
|
|
944
|
+
export { D as $, Pe as A, ee as At, ze as B, lt as C, oe as Ct, pt as D, te as Dt, _t as E, y as Et, $e as F, F as G, He as H, xt as I, vt as J, W as K, ht as L, Le as M, v as Mt, Qe as N, qe as O, ae as Ot, mt as P, dt as Q, gt as R, ot as S, ce as St, ut as T, se as Tt, Be as U, St as V, Ve as W, at as X, yt as Y, ft as Z, ct as _, de as _t, De as a, xe as at, q as b, b as bt, Te as c, ve as ct, Xe as d, he as dt, we as et, tt as f, ye as ft, Ue as g, me as gt, bt as h, pe as ht, Ne as i, Se as it, Fe as j, ne as jt, Ie as k, ie as kt, Ee as l, _e as lt, Q as m, S as mt, je as n, E as nt, Oe as o, T as ot, st as p, C as pt, et as q, Me as r, Ce as rt, ke as s, be as st, Ae as t, M as tt, z as u, ge as ut, J as v, fe as vt, it as w, re as wt, K as x, le as xt, Y as y, x as yt, Re as z };
|
|
952
945
|
|
|
953
|
-
//# sourceMappingURL=threejs-utils-
|
|
946
|
+
//# sourceMappingURL=threejs-utils-DHTRY4yW.mjs.map
|