iflow-engine-base 4.0.0 → 4.0.10

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.
@@ -1,5 +1,5 @@
1
- import { n as R, ay as S, h as E, w as b, j as x, H as A, E as k, Q as F, p as I, W as y, a as v, T as f, i as P, a4 as m, V as p, b as D } from "./three-vendor-XSz124jq.js";
2
- import { C as L, W as w, E as T, c as z, r as _ } from "./sdk-runtime-fnXycr6Y.js";
1
+ import { n as R, az as S, h as E, w as b, j as x, K as A, E as k, Q as F, p as I, W as y, a as v, T as f, i as P, a6 as m, V as p, b as D } from "./three-vendor-DolVXUca.js";
2
+ import { C as L, W as w, E as T, c as z, r as _ } from "./sdk-runtime-DJ9E8kq3.js";
3
3
  class V {
4
4
  scene;
5
5
  panoramaSphere = null;
@@ -101,7 +101,7 @@ class V {
101
101
  this.scene.clear();
102
102
  }
103
103
  }
104
- class H {
104
+ class K {
105
105
  camera;
106
106
  minFov;
107
107
  maxFov;
@@ -199,7 +199,7 @@ class H {
199
199
  this.camera = null;
200
200
  }
201
201
  }
202
- class K {
202
+ class O {
203
203
  renderer;
204
204
  container;
205
205
  animationId = null;
@@ -328,7 +328,7 @@ class K {
328
328
  this.pauseRendering(), this.container.contains(this.renderer.domElement) && this.container.removeChild(this.renderer.domElement), this.watermark.dispose(), this.renderer.dispose(), this.renderer.forceContextLoss(), this.onBeforeRenderCallback = void 0, this.onAfterRenderCallback = void 0;
329
329
  }
330
330
  }
331
- class O {
331
+ class H {
332
332
  camera;
333
333
  domElement;
334
334
  cameraModule;
@@ -547,7 +547,7 @@ class X {
547
547
  domElement;
548
548
  cameraModule;
549
549
  constructor(e, t) {
550
- this.cameraModule = e, this.domElement = t, this.controls = new O(e, t);
550
+ this.cameraModule = e, this.domElement = t, this.controls = new H(e, t);
551
551
  }
552
552
  /**
553
553
  * 初始化控制模块
@@ -1273,12 +1273,12 @@ class N {
1273
1273
  if (!n)
1274
1274
  throw new Error(`Container with id "${t.containerId}" not found`);
1275
1275
  try {
1276
- this.eventModule = new Y(), this.sceneModule = new V(t.sphereRadius), this.cameraModule = new H(
1276
+ this.eventModule = new Y(), this.sceneModule = new V(t.sphereRadius), this.cameraModule = new K(
1277
1277
  n,
1278
1278
  t.fov,
1279
1279
  t.minFov,
1280
1280
  t.maxFov
1281
- ), this.renderModule = new K(n, !0), this.controlModule = new X(
1281
+ ), this.renderModule = new O(n, !0), this.controlModule = new X(
1282
1282
  this.cameraModule,
1283
1283
  this.renderModule.getDomElement()
1284
1284
  );
@@ -1,5 +1,5 @@
1
- import { n as Js, C as st, H as Zs, V as v, b as N, O as $s, W as en, M as J, Q as ge, a as tn, f as qt, j as be, B as sn, h as ft, r as it, aW as ze, aX as Pt, aY as at, a3 as Bt, aZ as ms, a_ as yn, a$ as xn, b0 as In, b1 as Tn, a2 as wn, b2 as En, b3 as Bn, l as lt, b4 as As, b5 as gs, b6 as vn, k as Cs, b7 as Fn, t as Je, ay as Ss, D as Kt, ao as bn, w as ys, q as Dn, Z as We, b8 as qe, aF as xs, s as Mn, b9 as Rn, ah as Pn, ba as On, bb as nn, aN as Is, bc as kn, an as Ln, bd as Ne, be as mt, p as Hn } from "./three-vendor-XSz124jq.js";
2
- import { C as Un, c as zn, E as _n, r as Qn } from "./sdk-runtime-fnXycr6Y.js";
1
+ import { n as Js, C as st, K as Zs, V as v, b as N, O as $s, W as en, M as J, Q as ge, a as tn, f as qt, j as be, B as sn, h as ft, r as it, aW as ze, aX as Pt, aY as at, a5 as Bt, aZ as ms, a_ as yn, a$ as xn, b0 as In, b1 as Tn, a4 as wn, b2 as En, b3 as Bn, l as lt, b4 as As, b5 as gs, b6 as vn, k as Cs, b7 as Fn, t as Je, az as Ss, D as Kt, ap as bn, w as ys, q as Dn, $ as We, b8 as qe, aF as xs, s as Mn, b9 as Rn, aj as Pn, ba as On, bb as nn, aN as Is, bc as kn, H as Ln, bd as Ne, be as mt, p as Hn } from "./three-vendor-DolVXUca.js";
2
+ import { C as Un, c as zn, E as _n, r as Qn } from "./sdk-runtime-DJ9E8kq3.js";
3
3
  var De = /* @__PURE__ */ ((m) => (m.LoadStart = "gaussian-load-start", m.LoadProgress = "gaussian-load-progress", m.Loaded = "gaussian-loaded", m.LoadError = "gaussian-load-error", m.SceneRemoved = "gaussian-scene-removed", m.FpsUpdated = "gaussian-fps-updated", m.ViewChanged = "gaussian-view-changed", m))(De || {});
4
4
  class Nn {
5
5
  listeners = /* @__PURE__ */ new Map();
@@ -1,6 +1,6 @@
1
- import { g as xX, J as KN } from "./sdk-vendor-DKP0f5lz.js";
2
- import { bf as Ii, bg as TX } from "./three-vendor-XSz124jq.js";
3
- import { l as vX, L as EX, E as CX, d as JN, e as wX, c as $C, a as SX, f as IX, r as DX, h as XC } from "./sdk-runtime-fnXycr6Y.js";
1
+ import { g as xX, J as KN } from "./sdk-vendor-CPnf2j9F.js";
2
+ import { bf as Ii, bg as TX } from "./three-vendor-DolVXUca.js";
3
+ import { l as vX, L as EX, E as CX, d as JN, e as wX, c as $C, a as SX, f as IX, r as DX, h as XC } from "./sdk-runtime-DJ9E8kq3.js";
4
4
  var QN = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
5
  function Fb(e) {
6
6
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -1,64 +1,76 @@
1
- import { s as O, a as D, b as U } from "./sdk-assets-CMjpGLbQ.js";
2
- import "./engine-3d-CEP_oxL3.js";
3
- import { G as p, j as v, I as N, M as G, C as B, bj as j, a$ as k, y as q } from "./three-vendor-XSz124jq.js";
4
- var M = /* @__PURE__ */ ((s) => (s.ModelLoadStart = "model-load-start", s.ModelLoadProgress = "model-load-progress", s.ModelLoaded = "model-loaded", s.ModelError = "model-error", s.SelectionChanged = "selection-changed", s.HoverChanged = "hover-changed", s.Click = "click", s.MouseMove = "mouse-move", s.ModelPlaceSelected = "model-place-selected", s.ModelCalibrationChanged = "model-calibration-changed", s.CameraChanged = "camera-changed", s.CameraIdle = "camera-idle", s.EngineFree = "engine-free", s.EngineBusy = "engine-busy", s.MeasureChanged = "measure-changed", s.MeasureClick = "measure-click", s.SectionMove = "section-move", s.LoadingCompleted = "loading_completed", s))(M || {});
5
- const b = "__isModelUrlGroup", f = "__modelDepthBias", T = 4, H = 5e5;
6
- function C(s) {
1
+ import { s as A, a as G, b as U } from "./sdk-assets-Cf6dJkM2.js";
2
+ import "./engine-3d-DouCKYY-.js";
3
+ import { bj as v, G as m, M as N, C as B, bk as j, a$ as k, y as W } from "./three-vendor-DolVXUca.js";
4
+ var b = /* @__PURE__ */ ((s) => (s.ModelLoadStart = "model-load-start", s.ModelLoadProgress = "model-load-progress", s.ModelLoaded = "model-loaded", s.ModelError = "model-error", s.SelectionChanged = "selection-changed", s.HoverChanged = "hover-changed", s.Click = "click", s.MouseMove = "mouse-move", s.ModelPlaceSelected = "model-place-selected", s.ModelCalibrationChanged = "model-calibration-changed", s.CameraChanged = "camera-changed", s.CameraIdle = "camera-idle", s.EngineFree = "engine-free", s.EngineBusy = "engine-busy", s.MeasureChanged = "measure-changed", s.MeasureClick = "measure-click", s.SectionMove = "section-move", s.LoadingCompleted = "loading_completed", s))(b || {});
5
+ function q() {
6
+ return O(new v());
7
+ }
8
+ function O(s, e = []) {
9
+ const t = s;
10
+ return t.isClippingGroup !== !0 && Object.defineProperty(t, "isClippingGroup", {
11
+ value: !0,
12
+ enumerable: !0
13
+ }), t.clippingPlanes = e, t.enabled = !0, t.clipIntersection = !1, t.clipShadows = !1, t;
14
+ }
15
+ const M = "__isModelUrlGroup", h = "__modelDepthBias", _ = 4, H = 5e5;
16
+ function R(s) {
7
17
  return s.__modelGroupMap instanceof Map || (s.__modelGroupMap = /* @__PURE__ */ new Map()), s.__modelGroupMap;
8
18
  }
9
- function P(s) {
19
+ function T(s) {
10
20
  return s.__modelObjectIndexMap instanceof Map || (s.__modelObjectIndexMap = /* @__PURE__ */ new Map()), s.__modelObjectIndexMap;
11
21
  }
12
22
  function E(s, e) {
13
- s.url = e, s.name = e, s.userData = s.userData ?? {}, s.userData[b] = !0;
23
+ s.url = e, s.name = e, s.userData = s.userData ?? {}, s.userData[M] = !0;
14
24
  }
15
25
  function x(s, e) {
16
- return s instanceof p ? e == null ? s.userData?.[b] === !0 : s.userData?.[b] === !0 && s.url === e : !1;
26
+ return s instanceof m ? e == null ? s.userData?.[M] === !0 : s.userData?.[M] === !0 && s.url === e : !1;
17
27
  }
18
28
  function y(s, e) {
19
29
  return s?.models?.find?.((t) => t?.url === e);
20
30
  }
21
- function ee(s, e, t) {
31
+ function te(s, e, t) {
22
32
  if (typeof t != "string" || t.length === 0)
23
33
  return;
24
34
  const r = y(s, e);
25
35
  r != null && (Array.isArray(r.urls) || (r.urls = []), r.urls.includes(t) || r.urls.push(t));
26
36
  }
27
- function m(s, e) {
28
- const t = C(s), r = t.get(e);
37
+ function f(s, e) {
38
+ const t = R(s), r = t.get(e);
29
39
  if (r && r.parent != null)
30
40
  return r;
31
41
  const n = y(s, e);
32
- if (n?.group instanceof p && n.group.parent != null)
42
+ if (n?.group instanceof m && n.group.parent != null)
33
43
  return E(n.group, e), t.set(e, n.group), n.group;
34
- const a = s?.scene?.children?.find?.((i) => i instanceof p ? x(i, e) ? !0 : i.name === e && i.url === e : !1);
44
+ const a = s?.scene?.children?.find?.((i) => i instanceof m ? x(i, e) ? !0 : i.name === e && i.url === e : !1);
35
45
  return a != null ? (E(a, e), t.set(e, a), n != null && (n.group = a), a) : null;
36
46
  }
37
- function te(s, e) {
38
- const t = m(s, e);
39
- return t == null ? new G() : (t.updateWorldMatrix(!0, !1), t.matrixWorld.clone());
40
- }
41
47
  function se(s, e) {
42
- const t = m(s, e);
43
- if (t != null)
44
- return t;
45
- const r = new p();
46
- E(r, e), s.scene.add(r), C(s).set(e, r);
47
- const a = y(s, e);
48
- return a != null && (a.group = r), r;
48
+ const t = f(s, e);
49
+ return t == null ? new N() : (t.updateWorldMatrix(!0, !1), t.matrixWorld.clone());
50
+ }
51
+ function re(s, e) {
52
+ const t = typeof s.__getActiveWebGPUClippingPlanes == "function" ? s.__getActiveWebGPUClippingPlanes() : s.sectionPlane, r = f(s, e);
53
+ if (r != null) {
54
+ const o = O(r, t);
55
+ return o.clipShadows = !0, o;
56
+ }
57
+ const n = q();
58
+ n.clippingPlanes = Array.isArray(t) ? t : [], n.clipIntersection = !1, n.clipShadows = !0, E(n, e), s.scene.add(n), R(s).set(e, n);
59
+ const i = y(s, e);
60
+ return i != null && (i.group = n), n;
49
61
  }
50
62
  function V(s) {
51
63
  const e = [], t = /* @__PURE__ */ new Set();
52
64
  return (Array.isArray(s?.models) ? s.models : []).forEach((n) => {
53
65
  if (n?.url == null)
54
66
  return;
55
- const a = m(s, n.url);
67
+ const a = f(s, n.url);
56
68
  a == null || t.has(a.uuid) || (t.add(a.uuid), e.push(a));
57
69
  }), s?.scene?.children?.forEach?.((n) => {
58
70
  !x(n) || t.has(n.uuid) || (t.add(n.uuid), e.push(n));
59
71
  }), e;
60
72
  }
61
- function I(s, e) {
73
+ function w(s, e) {
62
74
  const t = [], r = /* @__PURE__ */ new Set();
63
75
  return V(s).forEach((a) => {
64
76
  a.traverse((i) => {
@@ -74,10 +86,7 @@ function I(s, e) {
74
86
  }
75
87
  }), t;
76
88
  }
77
- function re(s) {
78
- return I(s, (e) => e instanceof v && !(e instanceof N));
79
- }
80
- function W(s) {
89
+ function z(s) {
81
90
  if (typeof s.__modelObjectIndexSeed == "number")
82
91
  return;
83
92
  let e = -1;
@@ -85,64 +94,64 @@ function W(s) {
85
94
  typeof t?.index == "number" && Number.isFinite(t.index) && (e = Math.max(e, t.index));
86
95
  }), s.__modelObjectIndexSeed = e + 1;
87
96
  }
88
- function z(s) {
89
- W(s);
97
+ function Q(s) {
98
+ z(s);
90
99
  const e = s.__modelObjectIndexSeed;
91
100
  return s.__modelObjectIndexSeed += 1, e;
92
101
  }
93
102
  function ne(s, e, t) {
94
- const r = typeof t == "number" ? t : z(s);
95
- return e.index = r, P(s).set(r, e), r;
103
+ const r = typeof t == "number" ? t : Q(s);
104
+ return e.index = r, T(s).set(r, e), r;
96
105
  }
97
106
  function ae(s) {
98
107
  s.updateMatrix(), s.matrixAutoUpdate = !1;
99
108
  }
100
- function Q(s) {
109
+ function K(s) {
101
110
  return Number.isFinite(s) && s >= 3;
102
111
  }
103
112
  function ie(s, e) {
104
- return e <= H && Q(s);
113
+ return e <= H && K(s);
105
114
  }
106
115
  function L(s) {
107
116
  return Array.isArray(s) ? s : s != null ? [s] : [];
108
117
  }
109
- function K(s) {
118
+ function X(s) {
110
119
  return 1 + (Number.isFinite(s) ? Math.abs(Math.floor(s)) : 0) % 16 * 0.125;
111
120
  }
112
121
  function oe(s, e) {
113
- const t = typeof e == "number" ? e : s?.index, r = K(t);
122
+ const t = typeof e == "number" ? e : s?.index, r = X(t);
114
123
  L(s?.material).forEach((n) => {
115
124
  n.userData = n.userData ?? {};
116
- const a = n.userData[f] ?? {};
117
- n.userData[f] = {
125
+ const a = n.userData[h] ?? {};
126
+ n.userData[h] = {
118
127
  ...a,
119
128
  enabled: !0,
120
129
  factor: 1,
121
130
  units: r
122
- }, n.polygonOffset = !0, n.polygonOffsetFactor = 1, n.polygonOffsetUnits = r + (a.edgeActive ? T : 0), n.needsUpdate = !0;
131
+ }, n.polygonOffset = !0, n.polygonOffsetFactor = 1, n.polygonOffsetUnits = r + (a.edgeActive ? _ : 0), n.needsUpdate = !0;
123
132
  });
124
133
  }
125
134
  function le(s, e) {
126
135
  L(s?.material).forEach((t) => {
127
136
  t.userData = t.userData ?? {};
128
- const r = t.userData[f] ?? {}, n = r.enabled ? r.units : t.polygonOffsetUnits ?? 0, a = r.enabled ? r.factor : t.polygonOffsetFactor ?? 1;
129
- t.userData[f] = {
137
+ const r = t.userData[h] ?? {}, n = r.enabled ? r.units : t.polygonOffsetUnits ?? 0, a = r.enabled ? r.factor : t.polygonOffsetFactor ?? 1;
138
+ t.userData[h] = {
130
139
  ...r,
131
140
  edgeActive: e
132
- }, r.enabled || e ? (t.polygonOffset = !0, t.polygonOffsetFactor = a, t.polygonOffsetUnits = n + (e ? T : 0)) : t.polygonOffset = !1, t.needsUpdate = !0;
141
+ }, r.enabled || e ? (t.polygonOffset = !0, t.polygonOffsetFactor = a, t.polygonOffsetUnits = n + (e ? _ : 0)) : t.polygonOffset = !1, t.needsUpdate = !0;
133
142
  });
134
143
  }
135
144
  function ue(s, e) {
136
145
  if (!Number.isFinite(e))
137
146
  return;
138
- const t = P(s), r = t.get(e);
147
+ const t = T(s), r = t.get(e);
139
148
  if (r && r.parent != null)
140
149
  return r;
141
150
  r && r.parent == null && t.delete(e);
142
- const n = I(s, (a) => a.index === e)[0];
151
+ const n = w(s, (a) => a.index === e)[0];
143
152
  return n != null ? (t.set(e, n), n) : s?.scene?.children?.find?.((a) => a?.index === e);
144
153
  }
145
- class de {
154
+ class ce {
146
155
  options;
147
156
  snapshots = /* @__PURE__ */ new Map();
148
157
  isDisposed = !1;
@@ -161,7 +170,7 @@ class de {
161
170
  }
162
171
  /** 注册模型加载事件并立即处理当前已有模型。 */
163
172
  init(e = {}) {
164
- this.isDisposed || (Object.keys(e).length > 0 && (this.options.enabled = e.enabled ?? this.options.enabled, (e.rules != null || e.materialName != null || e.materialParams != null) && (this.options.rules = this.normalizeRules(e))), this.eventsBound || (this.engine.events?.on?.(M.LoadingCompleted, this.handleLoadingCompleted), this.eventsBound = !0), this.options.enabled && this.replaceAll());
173
+ this.isDisposed || (Object.keys(e).length > 0 && (this.options.enabled = e.enabled ?? this.options.enabled, (e.rules != null || e.materialName != null || e.materialParams != null) && (this.options.rules = this.normalizeRules(e))), this.eventsBound || (this.engine.events?.on?.(b.LoadingCompleted, this.handleLoadingCompleted), this.eventsBound = !0), this.options.enabled && this.replaceAll());
165
174
  }
166
175
  isEnabled() {
167
176
  return this.options.enabled;
@@ -209,13 +218,13 @@ class de {
209
218
  if (this.isDisposed || !this.options.enabled)
210
219
  return 0;
211
220
  const e = /* @__PURE__ */ new Set();
212
- return I(this.engine, (t) => (this.collectObjectMaterials(t, e), !1)), this.applyMaterials(e);
221
+ return w(this.engine, (t) => (this.collectObjectMaterials(t, e), !1)), this.applyMaterials(e);
213
222
  }
214
223
  /** 替换指定模型 URL 或模型对象中的材质。 */
215
224
  replaceModel(e) {
216
225
  if (this.isDisposed || !this.options.enabled)
217
226
  return 0;
218
- const t = typeof e == "string" ? m(this.engine, e) : e;
227
+ const t = typeof e == "string" ? f(this.engine, e) : e;
219
228
  if (t == null)
220
229
  return 0;
221
230
  const r = /* @__PURE__ */ new Set();
@@ -249,7 +258,7 @@ class de {
249
258
  }), this.snapshots.clear(), this.engine.requestComposerRender?.();
250
259
  }
251
260
  dispose() {
252
- this.isDisposed || (this.eventsBound && (this.engine.events?.off?.(M.LoadingCompleted, this.handleLoadingCompleted), this.eventsBound = !1), this.restoreAll(), this.isDisposed = !0);
261
+ this.isDisposed || (this.eventsBound && (this.engine.events?.off?.(b.LoadingCompleted, this.handleLoadingCompleted), this.eventsBound = !1), this.restoreAll(), this.isDisposed = !0);
253
262
  }
254
263
  normalizeRules(e) {
255
264
  return Array.isArray(e.rules) ? e.rules.map((t) => ({
@@ -296,7 +305,7 @@ class de {
296
305
  r !== void 0 && (t in e || t === "envMapIntensity") && (e[t] = r);
297
306
  }
298
307
  }
299
- const X = {
308
+ const Y = {
300
309
  vxgi: {
301
310
  // VXGI 需要体素化整套场景,默认关闭以避免影响现有项目的初始化性能。
302
311
  enabled: !1,
@@ -556,7 +565,7 @@ const X = {
556
565
  * GTAO 渲染分辨率倍率;1 为全分辨率,0.5 的像素数约为全分辨率的四分之一。
557
566
  * 性能:按宽高平方影响采样、带宽和显存,是 GTAO 最有效的性能调优项。
558
567
  */
559
- resolutionScale: 0.5,
568
+ resolutionScale: 1,
560
569
  /**
561
570
  * 遮蔽半径,单位为场景单位。
562
571
  * 性能:主要影响搜索范围和结果,不直接增加固定采样数;过大可能增加有效纹理访问。
@@ -594,18 +603,18 @@ const X = {
594
603
  */
595
604
  useTemporalFiltering: !0
596
605
  }
597
- }, S = ["vxgi", "ssgi", "gtao", "ssr", "traa"];
598
- function Y() {
606
+ }, I = ["vxgi", "ssgi", "gtao", "ssr", "traa"];
607
+ function $() {
599
608
  const s = {};
600
- return S.forEach((e) => {
601
- const { enabled: t, ...r } = X[e];
609
+ return I.forEach((e) => {
610
+ const { enabled: t, ...r } = Y[e];
602
611
  s[e] = { ...r };
603
612
  }), s;
604
613
  }
605
- function o(s, e, t, r, n, a = {}) {
606
- const i = Y();
607
- return S.forEach((l) => {
608
- Object.assign(i[l], a[l] ?? {});
614
+ function l(s, e, t, r, n, a = {}) {
615
+ const i = $();
616
+ return I.forEach((o) => {
617
+ Object.assign(i[o], a[o] ?? {});
609
618
  }), {
610
619
  level: s,
611
620
  name: e,
@@ -621,35 +630,35 @@ function o(s, e, t, r, n, a = {}) {
621
630
  parameters: i
622
631
  };
623
632
  }
624
- const ce = [
625
- o(1, "L1", !1, 512, {}),
626
- o(2, "L2", !1, 512, { gtao: !0 }, { gtao: { resolutionScale: 0.5, samples: 4, scale: 0.25, useTemporalFiltering: !1 } }),
627
- o(3, "L3", !0, 512, { gtao: !0 }, { gtao: { resolutionScale: 0.5, samples: 4, scale: 0.3, useTemporalFiltering: !1 } }),
628
- o(4, "L4", !0, 1024, { gtao: !0 }, { gtao: { resolutionScale: 0.5, samples: 6, scale: 0.35, useTemporalFiltering: !1 } }),
629
- o(5, "L5", !0, 1024, { gtao: !0, traa: !0 }, { gtao: { resolutionScale: 0.5, samples: 6, scale: 0.4 } }),
630
- o(6, "L6", !0, 2048, { gtao: !0, traa: !0 }, { gtao: { resolutionScale: 0.75, samples: 8, scale: 0.45 } }),
631
- o(7, "L7", !0, 2048, { gtao: !0, ssgi: !0, traa: !0 }, { gtao: { resolutionScale: 0.5, samples: 6, scale: 0.25 }, ssgi: { sliceCount: 1, stepCount: 2, aoIntensity: 0.45, giIntensity: 1 } }),
633
+ const de = [
634
+ l(1, "L1", !1, 512, {}),
635
+ l(2, "L2", !1, 512, { gtao: !0 }, { gtao: { resolutionScale: 0.5, samples: 4, scale: 0.25, useTemporalFiltering: !1 } }),
636
+ l(3, "L3", !0, 512, { gtao: !0 }, { gtao: { resolutionScale: 0.5, samples: 4, scale: 0.3, useTemporalFiltering: !1 } }),
637
+ l(4, "L4", !0, 1024, { gtao: !0 }, { gtao: { resolutionScale: 0.5, samples: 6, scale: 0.35, useTemporalFiltering: !1 } }),
638
+ l(5, "L5", !0, 1024, { gtao: !0, traa: !0 }, { gtao: { resolutionScale: 0.5, samples: 6, scale: 0.4 } }),
639
+ l(6, "L6", !0, 2048, { gtao: !0, traa: !0 }, { gtao: { resolutionScale: 0.75, samples: 8, scale: 0.45 } }),
640
+ l(7, "L7", !0, 2048, { gtao: !0, ssgi: !0, traa: !0 }, { gtao: { resolutionScale: 1, samples: 6, scale: 0.25 }, ssgi: { sliceCount: 1, stepCount: 2, aoIntensity: 0.45, giIntensity: 1 } }),
632
641
  // Level 8 完整继承 defaults.ts 的参数,作为十二档画质的中间基准。
633
- o(8, "L8", !0, 2048, { gtao: !0, ssgi: !0, traa: !0, ssr: !0 }),
634
- o(9, "L9", !0, 2048, { gtao: !0, ssgi: !0, traa: !0, ssr: !0 }, { gtao: { resolutionScale: 0.75, samples: 12, scale: 0.55 }, ssgi: { sliceCount: 1, stepCount: 3, aoIntensity: 1.05, giIntensity: 2.1 }, ssr: { resolutionScale: 0.6, quality: 0.6, blurQuality: 2 } }),
635
- o(10, "L10", !0, 2048, { gtao: !0, ssgi: !0, traa: !0, ssr: !0 }, { gtao: { resolutionScale: 1, samples: 12, scale: 0.6 }, ssgi: { sliceCount: 2, stepCount: 4, aoIntensity: 1.1, giIntensity: 2.2 }, ssr: { resolutionScale: 0.75, quality: 0.7, binaryRefine: !0, blurQuality: 2 } }),
636
- o(11, "L11", !0, 4096, { gtao: !0, ssgi: !0, traa: !0, ssr: !0 }, { gtao: { resolutionScale: 1, samples: 16, scale: 0.7 }, ssgi: { sliceCount: 2, stepCount: 6, aoIntensity: 1.2, giIntensity: 2.4 }, ssr: { resolutionScale: 1, quality: 0.8, binaryRefine: !0, blurQuality: 3 } }),
637
- o(12, "L12", !0, 4096, { vxgi: !0, gtao: !0, ssgi: !0, traa: !0, ssr: !0 }, { vxgi: { resolution: 128, coneCount: 4, bounces: 1 }, gtao: { resolutionScale: 1, samples: 20, scale: 0.8 }, ssgi: { sliceCount: 3, stepCount: 8, aoIntensity: 1.3, giIntensity: 2.6 }, ssr: { resolutionScale: 1, quality: 0.9, binaryRefine: !0, blurQuality: 3 } })
638
- ], he = [
642
+ l(8, "L8", !0, 2048, { gtao: !0, ssgi: !0, traa: !0, ssr: !0 }),
643
+ l(9, "L9", !0, 2048, { gtao: !0, ssgi: !0, traa: !0, ssr: !0 }, { gtao: { resolutionScale: 1, samples: 12, scale: 0.55 }, ssgi: { sliceCount: 1, stepCount: 3, aoIntensity: 1.05, giIntensity: 2.1 }, ssr: { resolutionScale: 0.6, quality: 0.6, blurQuality: 2 } }),
644
+ l(10, "L10", !0, 2048, { gtao: !0, ssgi: !0, traa: !0, ssr: !0 }, { gtao: { resolutionScale: 1, samples: 12, scale: 0.6 }, ssgi: { sliceCount: 2, stepCount: 4, aoIntensity: 1.1, giIntensity: 2.2 }, ssr: { resolutionScale: 0.75, quality: 0.7, binaryRefine: !0, blurQuality: 2 } }),
645
+ l(11, "L11", !0, 4096, { gtao: !0, ssgi: !0, traa: !0, ssr: !0 }, { gtao: { resolutionScale: 1, samples: 16, scale: 0.7 }, ssgi: { sliceCount: 2, stepCount: 6, aoIntensity: 1.2, giIntensity: 2.4 }, ssr: { resolutionScale: 1, quality: 0.8, binaryRefine: !0, blurQuality: 3 } }),
646
+ l(12, "L12", !0, 4096, { vxgi: !0, gtao: !0, ssgi: !0, traa: !0, ssr: !0 }, { vxgi: { resolution: 128, coneCount: 4, bounces: 1 }, gtao: { resolutionScale: 1, samples: 20, scale: 0.8 }, ssgi: { sliceCount: 3, stepCount: 8, aoIntensity: 1.3, giIntensity: 2.6 }, ssr: { resolutionScale: 1, quality: 0.9, binaryRefine: !0, blurQuality: 3 } })
647
+ ], pe = [
639
648
  { id: "indoor", name: "Indoor", category: "indoor", hdrId: "11", hdrIntensity: 0.45, ambientIntensity: 0.5, directionalIntensity: 2 },
640
649
  { id: "outdoor", name: "Outdoor", category: "outdoor", hdrId: "1", hdrIntensity: 0.5, ambientIntensity: 0.2, directionalIntensity: 3 }
641
650
  ];
642
- function pe(s) {
651
+ function he(s) {
643
652
  return {
644
653
  ...s,
645
654
  shadow: { ...s.shadow },
646
655
  effects: { ...s.effects },
647
656
  parameters: Object.fromEntries(
648
- S.map((e) => [e, { ...s.parameters[e] }])
657
+ I.map((e) => [e, { ...s.parameters[e] }])
649
658
  )
650
659
  };
651
660
  }
652
- const R = {
661
+ const P = {
653
662
  enabled: !1,
654
663
  // 默认关闭,避免改变现有渲染结果;需要时传入 enabled: true。
655
664
  targetLuminance: 0.45,
@@ -672,7 +681,7 @@ const R = {
672
681
  // 忽略最暗的 10% 像素,降低黑色背景的影响。
673
682
  highPercentile: 0.8
674
683
  // 忽略最亮的 10% 像素,降低灯光/窗户的影响。
675
- }, u = "v3-auto-exposure", _ = 1e-4, g = 2e-3;
684
+ }, u = "v3-auto-exposure", C = 1e-4, g = 2e-3;
676
685
  class fe {
677
686
  engine;
678
687
  renderer;
@@ -724,8 +733,8 @@ class fe {
724
733
  this.disposed || (this.disposed = !0, this.engine.setIdleFrameRateExempt?.(u, !1), this.probeTarget?.dispose(), this.probeTarget = null);
725
734
  }
726
735
  resolveOptions(e) {
727
- const t = typeof e == "boolean" ? { ...R, enabled: e } : { ...R, ...e ?? {} };
728
- return t.targetLuminance = Math.max(t.targetLuminance, _), t.minExposure = Math.max(t.minExposure, 0.01), t.maxExposure = Math.max(t.maxExposure, t.minExposure), t.lowPercentile = Math.min(Math.max(t.lowPercentile, 0), 0.45), t.highPercentile = Math.min(Math.max(t.highPercentile, t.lowPercentile + 0.1), 1), t.measurementInterval = Math.max(t.measurementInterval, 50), t.probeWidth = Math.max(4, Math.floor(t.probeWidth)), t.probeHeight = Math.max(4, Math.floor(t.probeHeight)), t;
736
+ const t = typeof e == "boolean" ? { ...P, enabled: e } : { ...P, ...e ?? {} };
737
+ return t.targetLuminance = Math.max(t.targetLuminance, C), t.minExposure = Math.max(t.minExposure, 0.01), t.maxExposure = Math.max(t.maxExposure, t.minExposure), t.lowPercentile = Math.min(Math.max(t.lowPercentile, 0), 0.45), t.highPercentile = Math.min(Math.max(t.highPercentile, t.lowPercentile + 0.1), 1), t.measurementInterval = Math.max(t.measurementInterval, 50), t.probeWidth = Math.max(4, Math.floor(t.probeWidth)), t.probeHeight = Math.max(4, Math.floor(t.probeHeight)), t;
729
738
  }
730
739
  ensureProbeTarget() {
731
740
  this.probeTarget && this.probeTarget.width === this.options.probeWidth && this.probeTarget.height === this.options.probeHeight || (this.probeTarget?.dispose(), this.probeTarget = new j(this.options.probeWidth, this.options.probeHeight, {
@@ -733,7 +742,7 @@ class fe {
733
742
  depthBuffer: !0,
734
743
  stencilBuffer: !1,
735
744
  samples: 0
736
- }), this.probeTarget.texture.colorSpace = q, this.probeTarget.texture.generateMipmaps = !1);
745
+ }), this.probeTarget.texture.colorSpace = W, this.probeTarget.texture.generateMipmaps = !1);
737
746
  }
738
747
  async measureScene() {
739
748
  if (this.disposed || !this.renderer?.readRenderTargetPixelsAsync) return;
@@ -743,13 +752,13 @@ class fe {
743
752
  const t = this.renderer.getRenderTarget?.() ?? null, r = [];
744
753
  let n = !1;
745
754
  const a = () => {
746
- n || (n = !0, r.forEach(({ object: i, visible: l }) => {
747
- i.visible = l;
755
+ n || (n = !0, r.forEach(({ object: i, visible: o }) => {
756
+ i.visible = o;
748
757
  }));
749
758
  };
750
759
  try {
751
- this.scene.traverse((d) => {
752
- d.userData?.excludeFromAutoExposure === !0 && (r.push({ object: d, visible: d.visible }), d.visible = !1);
760
+ this.scene.traverse((c) => {
761
+ c.userData?.excludeFromAutoExposure === !0 && (r.push({ object: c, visible: c.visible }), c.visible = !1);
753
762
  }), this.renderer.setRenderTarget(e), this.renderer.render(this.scene, this.engine.camera), a(), this.restoreRenderTarget(t);
754
763
  const i = await this.renderer.readRenderTargetPixelsAsync(
755
764
  e,
@@ -759,9 +768,9 @@ class fe {
759
768
  e.height
760
769
  );
761
770
  if (this.disposed) return;
762
- const l = this.calculateTrimmedLuminance(i);
763
- if (l === null) return;
764
- this.targetExposure = this.clampExposure(this.options.targetLuminance / l), this.engine.requestComposerRender?.();
771
+ const o = this.calculateTrimmedLuminance(i);
772
+ if (o === null) return;
773
+ this.targetExposure = this.clampExposure(this.options.targetLuminance / o), this.engine.requestComposerRender?.();
765
774
  } catch (i) {
766
775
  console.warn("v3 自动曝光测光失败,将继续使用当前曝光。", i);
767
776
  } finally {
@@ -777,26 +786,26 @@ class fe {
777
786
  calculateTrimmedLuminance(e) {
778
787
  const t = [];
779
788
  for (let i = 0; i + 3 < e.length; i += 4) {
780
- if (h(e[i + 3]) <= 0.01) continue;
781
- const d = Math.max(0, h(e[i])), w = Math.max(0, h(e[i + 1])), F = Math.max(0, h(e[i + 2])), A = 0.2126 * d + 0.7152 * w + 0.0722 * F;
782
- Number.isFinite(A) && t.push(A);
789
+ if (p(e[i + 3]) <= 0.01) continue;
790
+ const c = Math.max(0, p(e[i])), F = Math.max(0, p(e[i + 1])), D = Math.max(0, p(e[i + 2])), S = 0.2126 * c + 0.7152 * F + 0.0722 * D;
791
+ Number.isFinite(S) && t.push(S);
783
792
  }
784
793
  if (t.length === 0) return null;
785
- t.sort((i, l) => i - l);
794
+ t.sort((i, o) => i - o);
786
795
  const r = Math.floor(t.length * this.options.lowPercentile), n = Math.max(r + 1, Math.ceil(t.length * this.options.highPercentile));
787
796
  let a = 0;
788
797
  for (let i = r; i < n; i += 1) a += t[i];
789
- return Math.max(a / (n - r), _);
798
+ return Math.max(a / (n - r), C);
790
799
  }
791
800
  clampExposure(e) {
792
801
  return Math.min(Math.max(e, this.options.minExposure), this.options.maxExposure);
793
802
  }
794
803
  }
795
- function h(s) {
804
+ function p(s) {
796
805
  const e = s & 32768 ? -1 : 1, t = s >> 10 & 31, r = s & 1023;
797
806
  return t === 0 ? e * (r / 1024) * 2 ** -14 : t === 31 ? r === 0 ? e * (1 / 0) : NaN : e * (1 + r / 1024) * 2 ** (t - 15);
798
807
  }
799
- const me = {
808
+ const ge = {
800
809
  Initialized: "gis:initialized",
801
810
  CameraChanged: "gis:camera-changed",
802
811
  ModelLoadStart: "gis:model-load-start",
@@ -807,62 +816,62 @@ const me = {
807
816
  ViewerError: "gis:viewer-error",
808
817
  Destroyed: "gis:destroyed"
809
818
  };
810
- async function c(s) {
811
- s?.assetFiles ? await O(s.assetFiles) : s?.assetFile ? await D(s.assetFile) : s?.assetBaseUrl && await O(null), s?.assetBaseUrl && U(s.assetBaseUrl);
819
+ async function d(s) {
820
+ s?.assetFiles ? await A(s.assetFiles) : s?.assetFile ? await G(s.assetFile) : s?.assetBaseUrl && await A(null), s?.assetBaseUrl && U(s.assetBaseUrl);
812
821
  }
813
- async function ge(s, e) {
814
- if (await c(s), (e ?? (typeof navigator < "u" && "gpu" in navigator ? "webgpu" : "webgl")) === "webgpu") {
815
- const { EngineKernelV3: n } = await import("./EngineKernel-BN8tMHPw.js"), a = new n(s);
822
+ async function me(s, e) {
823
+ if (await d(s), (e ?? (typeof navigator < "u" && "gpu" in navigator ? "webgpu" : "webgl")) === "webgpu") {
824
+ const { EngineKernelV3: n } = await import("./EngineKernel-Kg-SdrzV.js"), a = new n(s);
816
825
  return await a.ready, a;
817
826
  }
818
- const { EngineKernelV2: r } = await import("./engine-3d-CEP_oxL3.js").then((n) => n.c);
827
+ const { EngineKernelV2: r } = await import("./engine-3d-DouCKYY-.js").then((n) => n.e);
819
828
  return new r(s);
820
829
  }
821
- async function Me(s) {
822
- await c(s);
823
- const { EngineKernel2d: e } = await import("./engine-2d-DNl3JeLt.js").then((t) => t.E);
830
+ async function be(s) {
831
+ await d(s);
832
+ const { EngineKernel2d: e } = await import("./engine-2d-BsdGqViB.js").then((t) => t.E);
824
833
  return new e(s);
825
834
  }
826
- async function be(s) {
827
- await c(s);
828
- const { EngineKernel720: e } = await import("./engine-720-50HCftiR.js");
835
+ async function Me(s) {
836
+ await d(s);
837
+ const { EngineKernel720: e } = await import("./engine-720-DvQtPJ60.js");
829
838
  return new e(s);
830
839
  }
831
840
  async function Ee(s) {
832
- await c(s);
833
- const { EngineKernelGaussian: e } = await import("./engine-gaussian-FZvEweZh.js");
841
+ await d(s);
842
+ const { EngineKernelGaussian: e } = await import("./engine-gaussian-BqR-uPbs.js");
834
843
  return new e(s);
835
844
  }
836
845
  async function xe(s) {
837
- await c(s);
838
- const { EngineKernelGIS: e } = await import("./engine-gis-ClS_rnhI.js").then((t) => t.E);
846
+ await d(s);
847
+ const { EngineKernelGIS: e } = await import("./engine-gis-CgZIsySE.js").then((t) => t.E);
839
848
  return new e(s);
840
849
  }
841
850
  export {
842
851
  fe as A,
843
- X as D,
844
- M as E,
845
- de as M,
852
+ Y as D,
853
+ b as E,
854
+ ce as M,
846
855
  ue as a,
847
- se as b,
856
+ re as b,
848
857
  ne as c,
849
858
  oe as d,
850
- ee as e,
859
+ te as e,
851
860
  ae as f,
852
- te as g,
853
- m as h,
854
- I as i,
855
- ce as j,
856
- pe as k,
857
- he as l,
858
- le as m,
859
- re as n,
860
- me as o,
861
- ge as p,
862
- Me as q,
863
- be as r,
861
+ se as g,
862
+ f as h,
863
+ w as i,
864
+ de as j,
865
+ he as k,
866
+ pe as l,
867
+ O as m,
868
+ le as n,
869
+ ge as o,
870
+ me as p,
871
+ be as q,
872
+ Me as r,
864
873
  ie as s,
865
874
  Ee as t,
866
875
  xe as u,
867
- R as v
876
+ P as v
868
877
  };
@@ -1,8 +1,8 @@
1
- import { bh as w } from "./three-vendor-XSz124jq.js";
1
+ import { bh as w } from "./three-vendor-DolVXUca.js";
2
2
  const S = "__BIM_ENGINE_SDK_ASSET_BASE__", b = "__BIM_ENGINE_SDK_ASSET_FILE_MAP__", g = "__BIM_ENGINE_SDK_ASSET_FILE_URLS__", A = "__BIM_ENGINE_SDK_ASSET_FILE_SESSION__", j = "https://unpkg.com/iflow-engine-base-3d@3.12.21/dist/", L = "https://__bim_engine_sdk_asset__/", M = ["assets/", "fonts/", "draco/", "basis/", "texture/", "prompt/"];
3
3
  let _ = null;
4
4
  async function R() {
5
- return _ || (_ = import("./sdk-vendor-DKP0f5lz.js").then((t) => t.j).then((t) => t.default ?? t)), _;
5
+ return _ || (_ = import("./sdk-vendor-CPnf2j9F.js").then((t) => t.j).then((t) => t.default ?? t)), _;
6
6
  }
7
7
  function a() {
8
8
  return typeof globalThis < "u" ? globalThis : null;