iflow-engine-base 3.10.8 → 3.10.9

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,6 +1,6 @@
1
- import { n as R, as as S, h as E, aM as b, j as x, t as A, E as k, Q as F, p as I, W as y, a as v, T as f, i as P, K as m, V as p, b as D } from "./three-vendor-CAbFcmaK.js";
2
- import { C as L, W as w, c as T, r as z } from "./sdk-runtime-CkKNeQgI.js";
3
- import { E as _ } from "./engine-2d-B8rWZz5y.js";
1
+ import { n as R, as as S, h as E, aM as b, j as x, t as A, E as k, Q as F, p as I, W as y, a as v, T as f, i as P, K as m, V as p, b as D } from "./three-vendor-fDCVai2b.js";
2
+ import { C as L, W as w, c as T, r as z } from "./sdk-runtime-CUsuUcES.js";
3
+ import { E as _ } from "./engine-2d-DVhZzZy6.js";
4
4
  class V {
5
5
  scene;
6
6
  panoramaSphere = null;
@@ -1,6 +1,6 @@
1
- import { n as Js, C as st, t as Zs, V as B, 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, aN as ze, aO as Pt, aP as at, J as vt, aQ as ms, aR as yn, aS as xn, aT as In, aU as Tn, H as wn, aV as En, aW as vn, l as lt, aX as As, aY as gs, aZ as Bn, k as Cs, a_ as Fn, av as Je, as as Ss, D as Kt, ah as bn, aM as ys, q as Dn, v as We, a$ as qe, aA as xs, s as Mn, b0 as Rn, a7 as Pn, b1 as On, b2 as nn, aC as Is, b3 as kn, ad as Ln, b4 as Ne, b5 as mt, p as Hn } from "./three-vendor-CAbFcmaK.js";
2
- import { C as Un, c as zn, r as _n } from "./sdk-runtime-CkKNeQgI.js";
3
- import { E as Qn } from "./engine-2d-B8rWZz5y.js";
1
+ import { n as Js, C as st, t as Zs, V as B, 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, aN as ze, aO as Pt, aP as at, J as vt, aQ as ms, aR as yn, aS as xn, aT as In, aU as Tn, H as wn, aV as En, aW as vn, l as lt, aX as As, aY as gs, aZ as Bn, k as Cs, a_ as Fn, av as Je, as as Ss, D as Kt, ah as bn, aM as ys, q as Dn, v as We, a$ as qe, aA as xs, s as Mn, b0 as Rn, a7 as Pn, b1 as On, b2 as nn, aC as Is, b3 as kn, ad as Ln, b4 as Ne, b5 as mt, p as Hn } from "./three-vendor-fDCVai2b.js";
2
+ import { C as Un, c as zn, r as _n } from "./sdk-runtime-CUsuUcES.js";
3
+ import { E as Qn } from "./engine-2d-DVhZzZy6.js";
4
4
  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 || {});
5
5
  class Nn {
6
6
  listeners = /* @__PURE__ */ new Map();
@@ -1,6 +1,6 @@
1
- import { g as Fb, c as GL, E as AQ, J as qL } from "./engine-2d-B8rWZz5y.js";
2
- import { b6 as Oi, b7 as yQ } from "./three-vendor-CAbFcmaK.js";
3
- import { l as bQ, L as xQ, d as WL, e as TQ, c as gS, a as vQ, f as EQ, r as CQ, h as _S } from "./sdk-runtime-CkKNeQgI.js";
1
+ import { g as Fb, c as GL, E as AQ, J as qL } from "./engine-2d-DVhZzZy6.js";
2
+ import { b6 as Oi, b7 as yQ } from "./three-vendor-fDCVai2b.js";
3
+ import { l as bQ, L as xQ, d as WL, e as TQ, c as gS, a as vQ, f as EQ, r as CQ, h as _S } from "./sdk-runtime-CUsuUcES.js";
4
4
  function l(e) {
5
5
  return e != null;
6
6
  }
@@ -0,0 +1,208 @@
1
+ import { J as I } from "./engine-2d-DVhZzZy6.js";
2
+ import { b8 as w } from "./three-vendor-fDCVai2b.js";
3
+ const _ = "__BIM_ENGINE_SDK_ASSET_BASE__", S = "__BIM_ENGINE_SDK_ASSET_FILE_MAP__", b = "__BIM_ENGINE_SDK_ASSET_FILE_URLS__", g = "__BIM_ENGINE_SDK_ASSET_FILE_SESSION__", M = "https://unpkg.com/iflow-engine-base@3.9.20/dist/", A = "https://__bim_engine_sdk_asset__/", R = ["assets/", "fonts/", "draco/", "basis/", "texture/", "prompt/"];
4
+ function l() {
5
+ return typeof globalThis < "u" ? globalThis : null;
6
+ }
7
+ function u(t) {
8
+ return t.endsWith("/") ? t : `${t}/`;
9
+ }
10
+ function c(t) {
11
+ return String(t).replace(/\\/g, "/").replace(/^\/+/, "").replace(/\/+/g, "/");
12
+ }
13
+ function h(t) {
14
+ return /^(?:[a-z][a-z\d+\-.]*:)?\/\//i.test(t) || /^(?:data|blob):/i.test(t);
15
+ }
16
+ function j(t) {
17
+ return t.startsWith("./") || t.startsWith("../");
18
+ }
19
+ function f(t, e) {
20
+ try {
21
+ return e ? new URL(t, e).toString() : new URL(t).toString();
22
+ } catch {
23
+ return null;
24
+ }
25
+ }
26
+ function y(t) {
27
+ return /\.zip$/i.test(t.name);
28
+ }
29
+ function F() {
30
+ return `${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
31
+ }
32
+ function T(t) {
33
+ return t.startsWith(A);
34
+ }
35
+ function L() {
36
+ const e = l()?.[g];
37
+ return typeof e == "string" && e ? `${A}${e}/` : null;
38
+ }
39
+ function v(t) {
40
+ return `${L() ?? A}${c(t)}`;
41
+ }
42
+ function m() {
43
+ const e = l()?.[S];
44
+ return e instanceof Map ? e : null;
45
+ }
46
+ function z() {
47
+ const e = l()?.[b];
48
+ return Array.isArray(e) ? e : [];
49
+ }
50
+ function U() {
51
+ const t = l();
52
+ t && (z().forEach((e) => URL.revokeObjectURL(e)), delete t[S], delete t[b], delete t[g]);
53
+ }
54
+ function K(t, e) {
55
+ const n = l();
56
+ n && (U(), n[S] = t, n[b] = e, n[g] = F());
57
+ }
58
+ function D(t, e, n) {
59
+ const s = c(e), r = /* @__PURE__ */ new Set([s]), o = s.indexOf("dist/");
60
+ o >= 0 && r.add(s.slice(o + 5));
61
+ const i = s.indexOf("public/");
62
+ i >= 0 && r.add(s.slice(i + 7));
63
+ for (const a of R) {
64
+ const E = s.indexOf(a);
65
+ E >= 0 && r.add(s.slice(E));
66
+ }
67
+ r.forEach((a) => {
68
+ a && (t.set(a, n), t.set(a.toLowerCase(), n));
69
+ });
70
+ }
71
+ function O(t) {
72
+ const e = m();
73
+ if (!e)
74
+ return null;
75
+ const n = c(t);
76
+ return e.get(n) ?? e.get(n.toLowerCase()) ?? null;
77
+ }
78
+ function p(t) {
79
+ const e = m();
80
+ if (!e)
81
+ return !1;
82
+ const n = c(t).replace(/\/?$/, "/").toLowerCase();
83
+ for (const s of e.keys())
84
+ if (s.toLowerCase().startsWith(n))
85
+ return !0;
86
+ return !1;
87
+ }
88
+ function N(t) {
89
+ if (!T(t))
90
+ return null;
91
+ const e = L();
92
+ if (!e || !t.startsWith(e))
93
+ return null;
94
+ const n = t.slice(e.length);
95
+ return O(n);
96
+ }
97
+ w.setURLModifier((t) => N(t) ?? t);
98
+ async function k(t) {
99
+ const e = [];
100
+ for (const n of t) {
101
+ const s = c(n.webkitRelativePath || n.name);
102
+ if (y(n)) {
103
+ const r = await I.loadAsync(n), o = Object.values(r.files);
104
+ for (const i of o)
105
+ i.dir || e.push({
106
+ path: c(i.name),
107
+ blob: await i.async("blob")
108
+ });
109
+ continue;
110
+ }
111
+ e.push({
112
+ path: s,
113
+ blob: n
114
+ });
115
+ }
116
+ return e;
117
+ }
118
+ function B() {
119
+ return typeof document < "u" && document.baseURI ? document.baseURI : typeof location < "u" && location.href ? location.href : null;
120
+ }
121
+ function P(t, e) {
122
+ const n = u(t);
123
+ if (h(n))
124
+ return n;
125
+ const s = d(e) || W() || B();
126
+ return f(n, s || void 0) || n;
127
+ }
128
+ function d(t) {
129
+ if (!t)
130
+ return null;
131
+ try {
132
+ const e = B(), n = f(t, e || void 0) || t, s = new URL(".", n), r = s.pathname.replace(/\\/g, "/");
133
+ return r.endsWith("/chunks/") ? new URL("../", s).toString() : e && /\/src\//.test(r) ? u(e) : s.toString();
134
+ } catch {
135
+ return null;
136
+ }
137
+ }
138
+ function W() {
139
+ if (typeof document > "u")
140
+ return null;
141
+ const t = document.currentScript;
142
+ if (t?.src)
143
+ return d(t.src);
144
+ const e = document.getElementsByTagName("script");
145
+ for (let n = e.length - 1; n >= 0; n -= 1) {
146
+ const s = e[n]?.src;
147
+ if (s && /(?:bim-engine-sdk|iflow-engine-base|dwg-preview|gaussian)\.(?:es|umd)\.js(?:[?#].*)?$/.test(s))
148
+ return d(s);
149
+ }
150
+ return null;
151
+ }
152
+ function V(t) {
153
+ const e = l();
154
+ if (e) {
155
+ if (!t) {
156
+ delete e[_];
157
+ return;
158
+ }
159
+ e[_] = u(t);
160
+ }
161
+ }
162
+ async function x(t) {
163
+ if (!t || t.length === 0) {
164
+ U();
165
+ return;
166
+ }
167
+ const e = Array.from(t), n = await k(e), s = /* @__PURE__ */ new Map(), r = [];
168
+ n.forEach((o) => {
169
+ const i = URL.createObjectURL(o.blob);
170
+ r.push(i), D(s, o.path, i);
171
+ }), K(s, r);
172
+ }
173
+ async function Y(t) {
174
+ await x(t ? [t] : null);
175
+ }
176
+ function $(t) {
177
+ const e = L();
178
+ if (e)
179
+ return e;
180
+ const s = l()?.[_];
181
+ return typeof s == "string" && s.length > 0 ? P(s, t) : u(M);
182
+ }
183
+ function J(t, e) {
184
+ if (h(t))
185
+ return t;
186
+ const n = c(t), s = O(n);
187
+ if (s && !t.endsWith("/"))
188
+ return s;
189
+ if (t.endsWith("/") || p(n)) {
190
+ const o = v(n);
191
+ if (p(n))
192
+ return t.endsWith("/") ? u(o) : o;
193
+ }
194
+ if (j(t)) {
195
+ const o = f(t, d(e) || void 0);
196
+ if (o)
197
+ return o;
198
+ }
199
+ const r = $(e);
200
+ return f(n, r) || n;
201
+ }
202
+ export {
203
+ Y as a,
204
+ V as b,
205
+ $ as g,
206
+ J as r,
207
+ x as s
208
+ };
@@ -1,6 +1,6 @@
1
- import { R as eu, b as Lr, V as Wn, t as tu, b8 as ru } from "./three-vendor-CAbFcmaK.js";
2
- import { J as Tn, E as Yr, c as au, a as nu } from "./engine-2d-B8rWZz5y.js";
3
- import { a as Is } from "./engine-3d-RuQU2JFm.js";
1
+ import { R as eu, b as Lr, V as Wn, t as tu, b9 as ru } from "./three-vendor-fDCVai2b.js";
2
+ import { J as Tn, E as Yr, c as au, a as nu } from "./engine-2d-DVhZzZy6.js";
3
+ import { a as Is } from "./engine-3d-LN_LUozy.js";
4
4
  class Pp {
5
5
  /**
6
6
  * 构造函数
@@ -43925,7 +43925,8 @@ export {
43925
43925
  oo as b5,
43926
43926
  So as b6,
43927
43927
  lB as b7,
43928
- oB as b8,
43928
+ p0 as b8,
43929
+ oB as b9,
43929
43930
  Yh as c,
43930
43931
  dr as d,
43931
43932
  Wh as e,
package/dist/index.d.ts CHANGED
@@ -1142,6 +1142,7 @@ declare class ControlModule {
1142
1142
  private bindMovePad;
1143
1143
  private rotateActiveRoamView;
1144
1144
  private updateMobileLookRotation;
1145
+ private updateMobileVerticalControlsVisibility;
1145
1146
  private ensureMobileRoamControls;
1146
1147
  private removeMobileRoamControls;
1147
1148
  update(): void;
@@ -1415,7 +1416,7 @@ declare class DrawingPin {
1415
1416
  * 还原视点状态(相机 + 剖切 + 测量 + 批注)
1416
1417
  * 还原完成后进入批注流程,用户点击"确定"时通过回调返回最新视点状态
1417
1418
  */
1418
- restore(state: IDrawingPinState, mode?: FabricDrawMode, callback?: (state: IDrawingPinState | null) => void): Promise<void>;
1419
+ restore(state: IDrawingPinState, mode?: FabricDrawMode, callback?: (state: IDrawingPinState | null) => void, showToolbar?: boolean): Promise<void>;
1419
1420
  /**
1420
1421
  * 创建视点(进入批注流程)
1421
1422
  * 1. 启用批注功能
@@ -1604,6 +1605,8 @@ declare interface Engine2dOptions {
1604
1605
  fontFile?: File;
1605
1606
  /** 覆盖 SDK 内置资源根路径,默认使用固定 CDN。 */
1606
1607
  assetBaseUrl?: string;
1608
+ assetFile?: File;
1609
+ assetFiles?: File[];
1607
1610
  /** 鼠标样式:full-crosshair 为全屏十字架,short-crosshair 为短十字架。 */
1608
1611
  cursorStyle?: CadCursorStyle2d;
1609
1612
  /** 加载进度条样式:1 为居中卡片,2 为底部进度条。 */
@@ -1624,6 +1627,8 @@ declare interface Engine720Options {
1624
1627
  containerId: string;
1625
1628
  /** 覆盖 SDK 内置资源根路径,默认使用固定 CDN。 */
1626
1629
  assetBaseUrl?: string;
1630
+ assetFile?: File;
1631
+ assetFiles?: File[];
1627
1632
  /** 初始视野角度(默认 75) */
1628
1633
  fov?: number;
1629
1634
  /** 是否启用缩放(默认 true) */
@@ -1654,6 +1659,8 @@ declare interface EngineGaussianOptions {
1654
1659
  containerId: string;
1655
1660
  /** 覆盖 SDK 内置资源根路径,默认使用固定 CDN。 */
1656
1661
  assetBaseUrl?: string;
1662
+ assetFile?: File;
1663
+ assetFiles?: File[];
1657
1664
  cameraUp?: GaussianVector3;
1658
1665
  initialCameraPosition?: GaussianVector3;
1659
1666
  initialCameraLookAt?: GaussianVector3;
@@ -1674,6 +1681,8 @@ declare interface EngineGaussianOptions {
1674
1681
  export declare interface EngineGISOptions extends GISContainerOptions {
1675
1682
  /** 覆盖 SDK 内置资源根路径,默认使用固定 CDN。 */
1676
1683
  assetBaseUrl?: string;
1684
+ assetFile?: File;
1685
+ assetFiles?: File[];
1677
1686
  provider?: 'cesium';
1678
1687
  accessToken?: string;
1679
1688
  cesiumBaseUrl?: string;
@@ -5048,7 +5057,8 @@ declare class MiniMap {
5048
5057
  private isVisible;
5049
5058
  private readonly defaultMapSize;
5050
5059
  private readonly minMapSize;
5051
- private currentMapSize;
5060
+ private currentMapWidth;
5061
+ private currentMapHeight;
5052
5062
  private isExpanded;
5053
5063
  private readonly levelJumpEyeOffset;
5054
5064
  private currentHalfSize;
@@ -5089,6 +5099,8 @@ declare class MiniMap {
5089
5099
  private readonly onResizeHandleMouseDown;
5090
5100
  private setExpanded;
5091
5101
  private resizeMap;
5102
+ setSize(width: number, height: number): void;
5103
+ private applyMapSize;
5092
5104
  private clampMapSize;
5093
5105
  private resizeOverlayCanvas;
5094
5106
  private createSelectElement;
@@ -5106,6 +5118,7 @@ declare class MiniMap {
5106
5118
  private buildLevelSignature;
5107
5119
  private worldToPixel;
5108
5120
  private pixelToWorld;
5121
+ private getHorizontalHalfSize;
5109
5122
  private isRoamingActive;
5110
5123
  private getThirdPersonControl;
5111
5124
  private getActiveControlPosition;
@@ -6676,6 +6689,18 @@ declare interface SegmentCalibrationOptions {
6676
6689
  */
6677
6690
  export declare function setSdkAssetBaseUrl(baseUrl?: string | null): void;
6678
6691
 
6692
+ /**
6693
+ * 注册单个 SDK 静态资源文件。
6694
+ * 常用于直接传入一个静态资源 zip 包。
6695
+ */
6696
+ export declare function setSdkAssetFile(file?: File | null): Promise<void>;
6697
+
6698
+ /**
6699
+ * 注册 SDK 静态资源文件列表。
6700
+ * 支持直接传解压后的目录文件列表,也支持传入 zip 文件后由 SDK 自动解压建立映射。
6701
+ */
6702
+ export declare function setSdkAssetFiles(files?: File[] | FileList | null): Promise<void>;
6703
+
6679
6704
  /** 寮曟搸璁剧疆绠$悊鍣紝璐熻矗娓叉煋銆佹樉绀哄拰鐜鍙傛暟鐨勭粺涓€绠$悊 */
6680
6705
  declare class Setting {
6681
6706
  /** 寮曟搸瀹炰緥寮曠敤 */