@roomle/web-sdk 5.1.0-alpha.4 → 5.1.0-alpha.5
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/{BufferGeometry-Bl5whHAB.mjs → BufferGeometry-CxlpBjLq.mjs} +192 -195
- package/lib/BufferGeometry-CxlpBjLq.mjs.map +1 -0
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/{GLTFExporter-yQ7mMauu.mjs → GLTFExporter-DeNw0qAI.mjs} +86 -80
- package/lib/GLTFExporter-DeNw0qAI.mjs.map +1 -0
- package/lib/GaussianBlurNode-BR1cKBsX.mjs +65 -0
- package/lib/GaussianBlurNode-BR1cKBsX.mjs.map +1 -0
- package/lib/{Object3D-BHdngbxB.mjs → Object3D-CALIQdg1.mjs} +142 -59
- package/lib/Object3D-CALIQdg1.mjs.map +1 -0
- package/lib/{Pass-DLiMLT5k.mjs → Pass-DCljS3Z-.mjs} +4 -4
- package/lib/{Pass-DLiMLT5k.mjs.map → Pass-DCljS3Z-.mjs.map} +1 -1
- package/lib/{PointLightHelper-CuPSBuDU.mjs → PointLightHelper-C_0CYp7R.mjs} +35 -32
- package/lib/PointLightHelper-C_0CYp7R.mjs.map +1 -0
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{SpotLightHelper-m-Rh8vGU.mjs → SpotLightHelper-UUIHn43T.mjs} +22 -19
- package/lib/SpotLightHelper-UUIHn43T.mjs.map +1 -0
- package/lib/{USDZExporter-MdkuT226.mjs → USDZExporter-BBNw7Hey.mjs} +6 -3
- package/lib/USDZExporter-BBNw7Hey.mjs.map +1 -0
- package/lib/{Vector4-C7TlIAyy.mjs → Vector4-BOcWTZJI.mjs} +2 -2
- package/lib/Vector4-BOcWTZJI.mjs.map +1 -0
- package/lib/{api-Bznmr-xZ.mjs → api-CwEjmjrn.mjs} +2 -2
- package/lib/{api-Bznmr-xZ.mjs.map → api-CwEjmjrn.mjs.map} +1 -1
- package/lib/{banana-for-scale-DpKXNBt_.mjs → banana-for-scale-Cf41yXTl.mjs} +3 -3
- package/lib/{banana-for-scale-DpKXNBt_.mjs.map → banana-for-scale-Cf41yXTl.mjs.map} +1 -1
- package/lib/{common-utils-DbL4tku0.mjs → common-utils-OTJQGohe.mjs} +3 -3
- package/lib/common-utils-OTJQGohe.mjs.map +1 -0
- package/lib/{component-dimensioning-BaUqwqYJ.mjs → component-dimensioning-yPK46Y5o.mjs} +26 -26
- package/lib/{component-dimensioning-BaUqwqYJ.mjs.map → component-dimensioning-yPK46Y5o.mjs.map} +1 -1
- package/lib/{component-raycast-helper-4i8b4E5B.mjs → component-raycast-helper-CnpnRaFg.mjs} +15 -15
- package/lib/{component-raycast-helper-4i8b4E5B.mjs.map → component-raycast-helper-CnpnRaFg.mjs.map} +1 -1
- package/lib/{configurator-CDw_c6tB.mjs → configurator-iYlO_buA.mjs} +4 -4
- package/lib/{configurator-CDw_c6tB.mjs.map → configurator-iYlO_buA.mjs.map} +1 -1
- package/lib/configurator-y7zIaUe_.mjs +2 -0
- package/lib/{continuous-drawing-helper-DqHIR_qF.mjs → continuous-drawing-helper-CTfGRTfH.mjs} +3 -3
- package/lib/{continuous-drawing-helper-DqHIR_qF.mjs.map → continuous-drawing-helper-CTfGRTfH.mjs.map} +1 -1
- package/lib/dimensioning-helper-CQlesi-m.mjs +2 -0
- package/lib/{dimensioning-helper-CGPjS2hW.mjs → dimensioning-helper-DSlkLDmx.mjs} +42 -36
- package/lib/dimensioning-helper-DSlkLDmx.mjs.map +1 -0
- package/lib/{glb-viewer-B-Zr743e.mjs → glb-viewer-AGV-_xKd.mjs} +33 -33
- package/lib/{glb-viewer-B-Zr743e.mjs.map → glb-viewer-AGV-_xKd.mjs.map} +1 -1
- package/lib/glb-viewer-DSzNR4CI.mjs +2 -0
- package/lib/{highlight-coordinator-4gkjde82.mjs → highlight-coordinator-DU6oFunq.mjs} +6 -6
- package/lib/{highlight-coordinator-4gkjde82.mjs.map → highlight-coordinator-DU6oFunq.mjs.map} +1 -1
- package/lib/{homag-intelligence-D7S7r-Gc.mjs → homag-intelligence-D_yBv0ig.mjs} +3 -3
- package/lib/{homag-intelligence-D7S7r-Gc.mjs.map → homag-intelligence-D_yBv0ig.mjs.map} +1 -1
- package/lib/{hosek-wilkie-sky-iMar2iw-.mjs → hosek-wilkie-sky-DmTvnxMA.mjs} +33 -33
- package/lib/{hosek-wilkie-sky-iMar2iw-.mjs.map → hosek-wilkie-sky-DmTvnxMA.mjs.map} +1 -1
- package/lib/{imos-ix-poc-export-helper-CyGqK7nu.mjs → imos-ix-poc-export-helper-BGN97m8W.mjs} +3 -3
- package/lib/{imos-ix-poc-export-helper-CyGqK7nu.mjs.map → imos-ix-poc-export-helper-BGN97m8W.mjs.map} +1 -1
- package/lib/{kernel-utils-BvatnA7U.mjs → kernel-utils-BYKmP0mf.mjs} +13 -13
- package/lib/{kernel-utils-BvatnA7U.mjs.map → kernel-utils-BYKmP0mf.mjs.map} +1 -1
- package/lib/{material-viewer-CTsSfTfL.mjs → material-viewer-BuBSXGw6.mjs} +18 -18
- package/lib/{material-viewer-CTsSfTfL.mjs.map → material-viewer-BuBSXGw6.mjs.map} +1 -1
- package/lib/{packages-BXAZEcKa.mjs → packages-CduZDHYG.mjs} +5 -5
- package/lib/{packages-BXAZEcKa.mjs.map → packages-CduZDHYG.mjs.map} +1 -1
- package/lib/planner-B-SWR4R8.mjs +2 -0
- package/lib/{planner-jvLAnYww.mjs → planner-BuBkFbra.mjs} +3 -3
- package/lib/{planner-jvLAnYww.mjs.map → planner-BuBkFbra.mjs.map} +1 -1
- package/lib/{plugin-system-CRaC04G5.mjs → plugin-system-CPf99Zkf.mjs} +2 -2
- package/lib/{plugin-system-CRaC04G5.mjs.map → plugin-system-CPf99Zkf.mjs.map} +1 -1
- package/lib/{render-cache-DCPIQbO1.mjs → render-cache-CPppt7Rd.mjs} +5 -5
- package/lib/{render-cache-DCPIQbO1.mjs.map → render-cache-CPppt7Rd.mjs.map} +1 -1
- package/lib/{render-order-BPF2wDMw.mjs → render-order-a0QAbB7Q.mjs} +2 -2
- package/lib/{render-order-BPF2wDMw.mjs.map → render-order-a0QAbB7Q.mjs.map} +1 -1
- package/lib/roomle-headless.d.ts +0 -2
- package/lib/roomle-headless.js +14 -14
- package/lib/{roomle-renderer-Ato6RMrd.mjs → roomle-renderer-UJINLYxS.mjs} +2 -2
- package/lib/{roomle-renderer-Ato6RMrd.mjs.map → roomle-renderer-UJINLYxS.mjs.map} +1 -1
- package/lib/{roomle-sdk-CBwhwX_e.mjs → roomle-sdk-CcNdTp_n.mjs} +1844 -1889
- package/lib/roomle-sdk-CcNdTp_n.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +0 -2
- package/lib/roomle-sdk.js +7 -7
- package/lib/{roomle-webgpu-renderer-BfZKcXSz.mjs → roomle-webgpu-renderer-BSvxbopA.mjs} +900 -707
- package/lib/roomle-webgpu-renderer-BSvxbopA.mjs.map +1 -0
- package/lib/{scene-renderer-BHYZac3H.mjs → scene-renderer--DzrpIl_.mjs} +309 -309
- package/lib/{scene-renderer-BHYZac3H.mjs.map → scene-renderer--DzrpIl_.mjs.map} +1 -1
- package/lib/{script-loader-CvnG6LgL.mjs → script-loader-D6i0wQ_j.mjs} +2 -2
- package/lib/{script-loader-CvnG6LgL.mjs.map → script-loader-D6i0wQ_j.mjs.map} +1 -1
- package/lib/{shading-settings-BBhR7KcS.mjs → shading-settings-6v-7O_Sz.mjs} +49 -49
- package/lib/{shading-settings-BBhR7KcS.mjs.map → shading-settings-6v-7O_Sz.mjs.map} +1 -1
- package/lib/src-6KtBPZXp.mjs +2 -0
- package/lib/{src-HhklrVDg.mjs → src-Dg0wYIom.mjs} +150 -150
- package/lib/{src-HhklrVDg.mjs.map → src-Dg0wYIom.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-PndcZCzL.mjs → stats-helper-DYjPPDnz.mjs} +2 -2
- package/lib/{stats-helper-PndcZCzL.mjs.map → stats-helper-DYjPPDnz.mjs.map} +1 -1
- package/lib/{three.core-0KaTx8dm.mjs → three.core-BTUCraWz.mjs} +976 -884
- package/lib/three.core-BTUCraWz.mjs.map +1 -0
- package/lib/{three.module-dym6j3lO.mjs → three.module-DUSFrLM6.mjs} +1789 -1739
- package/lib/three.module-DUSFrLM6.mjs.map +1 -0
- package/lib/three.tsl-De6A-G56.mjs +158 -0
- package/lib/three.tsl-De6A-G56.mjs.map +1 -0
- package/lib/three.tsl-DtfvggFX.mjs +2 -0
- package/lib/three.webgpu-B1OhMci_.mjs +3 -0
- package/lib/{three.webgpu-D3nSEIjD.mjs → three.webgpu-wPiwbpFM.mjs} +5806 -4926
- package/lib/three.webgpu-wPiwbpFM.mjs.map +1 -0
- package/lib/{threejs-utils-v1uOvccg.mjs → threejs-utils-lVSsgAiQ.mjs} +68 -68
- package/lib/{threejs-utils-v1uOvccg.mjs.map → threejs-utils-lVSsgAiQ.mjs.map} +1 -1
- package/lib/{tools-core-B29U-88K.mjs → tools-core-CRGER_KC.mjs} +3 -3
- package/lib/{tools-core-B29U-88K.mjs.map → tools-core-CRGER_KC.mjs.map} +1 -1
- package/lib/{webgpu-BHAP6BLI.mjs → webgpu-BxYJfBjz.mjs} +555 -555
- package/lib/{webgpu-BHAP6BLI.mjs.map → webgpu-BxYJfBjz.mjs.map} +1 -1
- package/package.json +5 -5
- package/lib/BufferGeometry-Bl5whHAB.mjs.map +0 -1
- package/lib/GLTFExporter-yQ7mMauu.mjs.map +0 -1
- package/lib/GaussianBlurNode-DNBEf5-n.mjs +0 -59
- package/lib/GaussianBlurNode-DNBEf5-n.mjs.map +0 -1
- package/lib/Object3D-BHdngbxB.mjs.map +0 -1
- package/lib/PointLightHelper-CuPSBuDU.mjs.map +0 -1
- package/lib/SpotLightHelper-m-Rh8vGU.mjs.map +0 -1
- package/lib/USDZExporter-MdkuT226.mjs.map +0 -1
- package/lib/Vector4-C7TlIAyy.mjs.map +0 -1
- package/lib/common-utils-DbL4tku0.mjs.map +0 -1
- package/lib/configurator-BYQdWEvf.mjs +0 -2
- package/lib/dimensioning-helper-CGPjS2hW.mjs.map +0 -1
- package/lib/dimensioning-helper-VndKlIXS.mjs +0 -2
- package/lib/glb-viewer-Bd5Xn6Oq.mjs +0 -2
- package/lib/planner-DMk3T4ts.mjs +0 -2
- package/lib/roomle-sdk-CBwhwX_e.mjs.map +0 -1
- package/lib/roomle-webgpu-renderer-BfZKcXSz.mjs.map +0 -1
- package/lib/src-Bbq3Hqzn.mjs +0 -2
- package/lib/three.core-0KaTx8dm.mjs.map +0 -1
- package/lib/three.module-dym6j3lO.mjs.map +0 -1
- package/lib/three.tsl-BTc4fg8T.mjs +0 -2
- package/lib/three.tsl-Cf0-sCqB.mjs +0 -152
- package/lib/three.tsl-Cf0-sCqB.mjs.map +0 -1
- package/lib/three.webgpu-ClICiWlK.mjs +0 -3
- package/lib/three.webgpu-D3nSEIjD.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as m } from "./three.module-
|
|
3
|
-
import { a as h } from "./kernel-utils-
|
|
4
|
-
import { U as g, b as _ } from "./common-utils-
|
|
1
|
+
import { Ei as e, Hr as t, Pr as n, Rn as r, Wr as i, _n as a, cn as o, dt as s, f as c, li as l, ln as u, un as d, vn as f, w as p } from "./three.core-BTUCraWz.mjs";
|
|
2
|
+
import { r as m } from "./three.module-DUSFrLM6.mjs";
|
|
3
|
+
import { a as h } from "./kernel-utils-BYKmP0mf.mjs";
|
|
4
|
+
import { U as g, b as _ } from "./common-utils-OTJQGohe.mjs";
|
|
5
5
|
//#region packages/typings/planner.ts
|
|
6
6
|
var ee = {
|
|
7
7
|
CONFIGURATOR: 0,
|
|
@@ -84,10 +84,10 @@ var ee = {
|
|
|
84
84
|
CONTOUR: 2
|
|
85
85
|
}, w = class {
|
|
86
86
|
static createMeshPhysicalMaterial(e) {
|
|
87
|
-
return new
|
|
87
|
+
return new a(e);
|
|
88
88
|
}
|
|
89
89
|
static createMeshStandardMaterial(e) {
|
|
90
|
-
return new
|
|
90
|
+
return new f(e);
|
|
91
91
|
}
|
|
92
92
|
}, T = Object.freeze({
|
|
93
93
|
Linear: Object.freeze({
|
|
@@ -462,14 +462,14 @@ var N = null;
|
|
|
462
462
|
globalThis.window !== void 0 && import("./dat.gui.module-CSOnFjd0.mjs").then((e) => {
|
|
463
463
|
N = e.GUI;
|
|
464
464
|
}).catch(() => {});
|
|
465
|
-
var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "cameraFacingHidden", Se = "cameraFacingIndicator", Ce = .8, we = .9, Te = (e) => e instanceof m ? e.capabilities.maxSamples : 16, Ee = (e) => e instanceof m ? e.capabilities.maxTextures : 16, De = (e) => e instanceof m ? e.capabilities.getMaxAnisotropy() : 16, Oe = (
|
|
466
|
-
if (!
|
|
467
|
-
let a =
|
|
468
|
-
return a.project(n), a.x = Math.floor(a.x * o + o), a.y = Math.floor(-(a.y * s) + s), a.z =
|
|
469
|
-
}, ke = (
|
|
470
|
-
n ||= new
|
|
471
|
-
let r = new t
|
|
472
|
-
return new c(new
|
|
465
|
+
var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "cameraFacingHidden", Se = "cameraFacingIndicator", Ce = .8, we = .9, Te = (e) => e instanceof m ? e.capabilities.maxSamples : 16, Ee = (e) => e instanceof m ? e.capabilities.maxTextures : 16, De = (e) => e instanceof m ? e.capabilities.getMaxAnisotropy() : 16, Oe = (t, n, r, i) => {
|
|
466
|
+
if (!t || !n || r === 0 || i === 0) return new e();
|
|
467
|
+
let a = t.clone(), o = r / 2, s = i / 2;
|
|
468
|
+
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;
|
|
469
|
+
}, ke = (t, n) => {
|
|
470
|
+
n ||= new e(0, 0, 0);
|
|
471
|
+
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);
|
|
472
|
+
return new c(new e(0, 0, -r.z).add(i).sub(n), new e(r.x, r.y, 0).add(i).add(n));
|
|
473
473
|
}, Ae = (e) => (e.from /= 1e3, e.to /= 1e3, e), je = (e, t) => {
|
|
474
474
|
let n = S(e.x), r = S(e.y), i = S(e.z), a = S(t.x), o = S(t.y), s = S(t.z);
|
|
475
475
|
return n === a && r === o && i === s;
|
|
@@ -540,7 +540,7 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
540
540
|
b: t.b
|
|
541
541
|
};
|
|
542
542
|
}, z = null, Ve = (e, t, n, r, i, a, o = 16) => {
|
|
543
|
-
z || (z = new
|
|
543
|
+
z || (z = new l(), z.crossOrigin = "");
|
|
544
544
|
let s = z;
|
|
545
545
|
return new Promise((c, l) => {
|
|
546
546
|
if (!e) {
|
|
@@ -553,8 +553,8 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
553
553
|
l(e);
|
|
554
554
|
});
|
|
555
555
|
});
|
|
556
|
-
}, B = (e, t,
|
|
557
|
-
if (e.anisotropy =
|
|
556
|
+
}, B = (e, t, r, i, a, o, s = 16) => {
|
|
557
|
+
if (e.anisotropy = i, e.wrapS = n, e.wrapT = n, s <= 8 && [
|
|
558
558
|
g.ORM,
|
|
559
559
|
g.EMRGB,
|
|
560
560
|
g.CCRG,
|
|
@@ -566,9 +566,9 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
566
566
|
console.warn("ORM maps are not supported on devices with only " + s + " texture units");
|
|
567
567
|
return;
|
|
568
568
|
}
|
|
569
|
-
e.repeat.set(a, o), He(e, t,
|
|
570
|
-
}, He = (
|
|
571
|
-
n.mapping === g.XYZ ? r.normalMap =
|
|
569
|
+
e.repeat.set(a, o), He(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;
|
|
570
|
+
}, He = (e, n, r) => {
|
|
571
|
+
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);
|
|
572
572
|
}, Ue = (e = !0) => {
|
|
573
573
|
if (!window.__RML_WEBGL_GUI__) {
|
|
574
574
|
if (!N) return null;
|
|
@@ -635,38 +635,38 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
635
635
|
window.TWEEN?.remove(f);
|
|
636
636
|
}).start();
|
|
637
637
|
return window.TWEEN?.add(f), f;
|
|
638
|
-
}, qe = (
|
|
639
|
-
let i =
|
|
640
|
-
i.decompose(a,
|
|
641
|
-
let
|
|
642
|
-
if (a.length() < .001 || Math.abs(
|
|
643
|
-
let
|
|
644
|
-
|
|
645
|
-
let h =
|
|
646
|
-
return h = h.sub(m.clone().multiplyScalar(p * .5 / Math.tan(
|
|
647
|
-
}, W = (
|
|
648
|
-
let n = Math.sqrt(1 -
|
|
638
|
+
}, qe = (t, n) => {
|
|
639
|
+
let i = t.clone().invert().clone().multiply(n), a = new e(), s = new r();
|
|
640
|
+
i.decompose(a, s, new e());
|
|
641
|
+
let c = W(s), l = c.axis;
|
|
642
|
+
if (a.length() < .001 || Math.abs(c.angleRad) < .001 || l.length() < .001) return new o().identity();
|
|
643
|
+
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();
|
|
644
|
+
f = new e().crossVectors(m, l).normalize();
|
|
645
|
+
let h = u.clone().add(d).multiplyScalar(.5);
|
|
646
|
+
return h = h.sub(m.clone().multiplyScalar(p * .5 / Math.tan(c.angleRad * .5))), new o().makeBasis(m, l, f).setPosition(h);
|
|
647
|
+
}, W = (t) => {
|
|
648
|
+
let n = Math.sqrt(1 - t.w * t.w);
|
|
649
649
|
return {
|
|
650
|
-
axis: new t
|
|
651
|
-
angleRad: 2 * Math.acos(
|
|
650
|
+
axis: new e(t.x, t.y, t.z).multiplyScalar(n === 0 ? 1 : 1 / n),
|
|
651
|
+
angleRad: 2 * Math.acos(t.w)
|
|
652
652
|
};
|
|
653
653
|
}, G = (e, t) => {
|
|
654
654
|
e.updateMatrix(), t.multiply(e.matrix.clone().invert()), e.applyMatrix4(t), e.updateMatrix();
|
|
655
|
-
}, Je = (
|
|
656
|
-
let a = new
|
|
657
|
-
|
|
658
|
-
let
|
|
659
|
-
n.decompose(
|
|
660
|
-
let
|
|
661
|
-
if (m.angleRad > Math.PI && (m.angleRad -= 2 * Math.PI), Math.abs(m.angleRad) > b(1) && a.length() > .001 &&
|
|
662
|
-
let
|
|
663
|
-
if (Math.abs(
|
|
664
|
-
let n = new
|
|
665
|
-
|
|
655
|
+
}, Je = (t, n, i) => {
|
|
656
|
+
let a = new e(), s = new r(), c = new e();
|
|
657
|
+
t.decompose(a, s, c);
|
|
658
|
+
let l = new e(), u = new r(), d = new e();
|
|
659
|
+
n.decompose(l, u, d);
|
|
660
|
+
let f = new e().lerpVectors(a, l, i), p = new r().slerpQuaternions(s, u, i), m = W(s.clone().conjugate().multiply(u));
|
|
661
|
+
if (m.angleRad > Math.PI && (m.angleRad -= 2 * Math.PI), Math.abs(m.angleRad) > b(1) && a.length() > .001 && l.length() > .001) {
|
|
662
|
+
let t = a.clone().normalize().dot(l.clone().normalize());
|
|
663
|
+
if (Math.abs(t) < .999) {
|
|
664
|
+
let n = new e().crossVectors(a, l), o = new r().setFromAxisAngle(n.normalize(), Math.acos(t) * i), s = a.length() * i + l.length() * (1 - i);
|
|
665
|
+
f = a.applyQuaternion(o).normalize().multiplyScalar(s);
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
|
-
let h = new
|
|
669
|
-
return g.compose(
|
|
668
|
+
let h = new e().lerpVectors(c, d, i), g = new o();
|
|
669
|
+
return g.compose(f, p, h), g;
|
|
670
670
|
}, Ye = (e) => {
|
|
671
671
|
let t = new p();
|
|
672
672
|
return t.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), t;
|
|
@@ -674,7 +674,7 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
674
674
|
t.transparent || (e.transparent = t.transparent, delete e.userData.postProcessingMaterialPlugin), e.opacity = t.opacity, e.needsUpdate = !0;
|
|
675
675
|
}, Xe = (e, t) => new Promise((n) => {
|
|
676
676
|
e.traverse((e) => {
|
|
677
|
-
if (e instanceof
|
|
677
|
+
if (e instanceof u) {
|
|
678
678
|
let r = e.material;
|
|
679
679
|
e.userData.tween && e.userData.tween.stop();
|
|
680
680
|
let i = { opacity: r.opacity };
|
|
@@ -691,7 +691,7 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
691
691
|
});
|
|
692
692
|
}), Ze = (e) => {
|
|
693
693
|
e.traverse((e) => {
|
|
694
|
-
if (e instanceof
|
|
694
|
+
if (e instanceof u) {
|
|
695
695
|
let t = e.material;
|
|
696
696
|
if (t.opacity === 0) return;
|
|
697
697
|
let n = {
|
|
@@ -710,8 +710,8 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
710
710
|
window.TWEEN?.add(i);
|
|
711
711
|
}
|
|
712
712
|
});
|
|
713
|
-
}, Qe = (
|
|
714
|
-
let r = new c().setFromObject(
|
|
713
|
+
}, Qe = (t, n) => {
|
|
714
|
+
let r = new c().setFromObject(t), i = r.getSize(new e()), a = Math.min(i.x, i.y, i.z), o = !0;
|
|
715
715
|
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;
|
|
716
716
|
}, $e = (e) => {
|
|
717
717
|
e.type === "Mesh" ? J(e) : q(e);
|
|
@@ -741,7 +741,7 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
741
741
|
e && e.dispose();
|
|
742
742
|
}, X = (e) => {
|
|
743
743
|
e && (e.map && e.map.dispose(), e.normalMap && e.normalMap.dispose(), e.dispose());
|
|
744
|
-
}, Z, et = () => (Z || (Z = new
|
|
744
|
+
}, Z, et = () => (Z || (Z = new d(), Z.visible = !1), Z), Q, tt = (e) => (Q ||= w.createMeshStandardMaterial({
|
|
745
745
|
color: e || "#FF0000",
|
|
746
746
|
transparent: !0,
|
|
747
747
|
opacity: .5,
|
|
@@ -751,9 +751,9 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
751
751
|
}), Q), nt = (e) => e.x === 0 && e.y === 0 && e.z === 0, rt = (e) => Number.isFinite(e.x) && Number.isFinite(e.y) && Number.isFinite(e.z), it = (e, t) => {
|
|
752
752
|
let n = "";
|
|
753
753
|
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 === C.WALL ? n = "default_wall_material_" + e.getSourceType().value : t && t.value === C.CEILING && (n = "default_ceiling_material_" + e.getSourceType().value), n);
|
|
754
|
-
}, $ = (
|
|
755
|
-
let n =
|
|
756
|
-
n.y = 0, n.lengthSq() < .01 && (n = new
|
|
754
|
+
}, $ = (t) => {
|
|
755
|
+
let n = t.getWorldDirection(new e()).clone();
|
|
756
|
+
n.y = 0, n.lengthSq() < .01 && (n = new e(0, 1, 0), n.applyQuaternion(t.quaternion), n.y = 0), n.normalize();
|
|
757
757
|
let r = Math.asin(n.x);
|
|
758
758
|
return n.z < 0 && (r = Math.PI - r), r < 0 && (r += Math.PI * 2), r;
|
|
759
759
|
}, at = (e, t) => {
|
|
@@ -769,17 +769,17 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
769
769
|
return n === .5 ? 0 : n > .5 ? -1 : 1;
|
|
770
770
|
}
|
|
771
771
|
return n ? 1 : -1;
|
|
772
|
-
}, st = (
|
|
772
|
+
}, st = (t, n) => {
|
|
773
773
|
let r = new c();
|
|
774
|
-
if (r.copy(
|
|
775
|
-
let i = (
|
|
776
|
-
let n = new
|
|
777
|
-
return
|
|
778
|
-
}, a = i(
|
|
774
|
+
if (r.copy(t).intersect(n), r.isEmpty()) return 0;
|
|
775
|
+
let i = (t) => {
|
|
776
|
+
let n = new e();
|
|
777
|
+
return t.getSize(n), n.x * n.y * n.z;
|
|
778
|
+
}, a = i(t), o = i(r);
|
|
779
779
|
return a === 0 ? 0 : o / a;
|
|
780
|
-
}, ct = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, lt = (
|
|
781
|
-
let a = n > r, o = a ? 15 : 0, s = a ? 0 : 10, l =
|
|
782
|
-
return d *= i, f *= i, new c(new
|
|
780
|
+
}, ct = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, lt = (t, n, r, i = 1) => {
|
|
781
|
+
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;
|
|
782
|
+
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));
|
|
783
783
|
}, ut = (e) => {
|
|
784
784
|
let { x: t, y: n } = e;
|
|
785
785
|
return {
|
|
@@ -794,12 +794,12 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
794
794
|
z: r
|
|
795
795
|
};
|
|
796
796
|
}, ft = (e) => {
|
|
797
|
-
let t = new
|
|
797
|
+
let t = new i();
|
|
798
798
|
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;
|
|
799
|
-
}, pt = (
|
|
800
|
-
let r = new s(), i = new
|
|
799
|
+
}, pt = (t, n) => {
|
|
800
|
+
let r = new s(), i = new o().multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse);
|
|
801
801
|
r.setFromProjectionMatrix(i);
|
|
802
|
-
let a = n.getCenter(new
|
|
802
|
+
let a = n.getCenter(new e());
|
|
803
803
|
return r.containsPoint(a);
|
|
804
804
|
}, mt = (e) => {
|
|
805
805
|
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 ");
|
|
@@ -807,4 +807,4 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
|
|
|
807
807
|
//#endregion
|
|
808
808
|
export { T as $, De as A, Ae as B, et as C, ee as Ct, lt as D, tt as E, $ as F, I as G, Ne as H, We as I, ut as J, G as K, pt as L, Ee as M, Oe as N, it as O, Ue as P, nt as Q, ct as R, Ze as S, ie as St, Ye as T, v as Tt, je as U, mt as V, Me as W, Xe as X, dt as Y, rt as Z, $e as _, re as _t, F as a, he as at, J as b, te as bt, ve as c, fe as ct, Ve as d, le as dt, D as et, Ke as f, pe as ft, Pe as g, oe as gt, ft as h, ce as ht, we as i, ge as it, Te as j, Re as k, P as l, de as lt, at as m, b as mt, Se as n, w as nt, ye as o, C as ot, Qe as p, x as pt, Ge as q, Ce as r, _e as rt, be as s, me as st, xe as t, j as tt, B as u, ue as ut, Y as v, se as vt, ot as w, ne as wt, q as x, ae as xt, X as y, y as yt, ke as z };
|
|
809
809
|
|
|
810
|
-
//# sourceMappingURL=threejs-utils-
|
|
810
|
+
//# sourceMappingURL=threejs-utils-lVSsgAiQ.mjs.map
|