iflow-engine-base 3.9.205 → 3.9.211

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,7 +1,7 @@
1
- import { n as S, am as R, h as A, aA as x, j as b, s as E, E as F, Q as k, W as I, a as v, T as f, i as P, J as m, V as p, b as D } from "./three-vendor-Dbcwwhki.js";
2
- import { W as w, r as y } from "./sdk-runtime-cY1Wn7o-.js";
3
- import { E as T } from "./engine-2d-DAiE1uAy.js";
4
- class L {
1
+ import { n as S, an as R, h as A, aA as E, j as x, t as b, E as k, Q as F, p as I, W as D, a as v, T as f, i as P, K as m, V as p, b as y } from "./three-vendor-BislQYFI.js";
2
+ import { C as T, W as w, r as L } from "./sdk-runtime-CvEwm_hr.js";
3
+ import { E as z } from "./engine-2d-DfXdo35a.js";
4
+ class _ {
5
5
  scene;
6
6
  panoramaSphere = null;
7
7
  sphereRadius;
@@ -33,10 +33,10 @@ class L {
33
33
  const i = new A({
34
34
  map: null,
35
35
  // 纹理后续加载
36
- side: x,
36
+ side: E,
37
37
  // Render inner surface; geometry is flipped via scale(-1,1,1)
38
38
  transparent: !0
39
- }), o = new b(n, i);
39
+ }), o = new x(n, i);
40
40
  return o.name = "panorama-sphere", o;
41
41
  }
42
42
  /**
@@ -102,7 +102,7 @@ class L {
102
102
  this.scene.clear();
103
103
  }
104
104
  }
105
- class z {
105
+ class V {
106
106
  camera;
107
107
  minFov;
108
108
  maxFov;
@@ -123,7 +123,7 @@ class z {
123
123
  * 创建透视相机
124
124
  */
125
125
  createCamera(e) {
126
- const t = this.container.clientWidth / this.container.clientHeight, n = new E(e, t, 0.1, 2e3);
126
+ const t = this.container.clientWidth / this.container.clientHeight, n = new b(e, t, 0.1, 2e3);
127
127
  return n.position.set(0, 0, 0), n;
128
128
  }
129
129
  /**
@@ -136,7 +136,7 @@ class z {
136
136
  * 更新相机旋转(基于当前姿态)
137
137
  */
138
138
  updateCameraRotation() {
139
- const { theta: e, phi: t } = this.currentPose, n = new F(t, e, 0, "YXZ"), i = new k();
139
+ const { theta: e, phi: t } = this.currentPose, n = new k(t, e, 0, "YXZ"), i = new F();
140
140
  i.setFromEuler(n), this.camera.quaternion.copy(i);
141
141
  }
142
142
  /**
@@ -200,11 +200,12 @@ class z {
200
200
  this.camera = null;
201
201
  }
202
202
  }
203
- class _ {
203
+ class K {
204
204
  renderer;
205
205
  container;
206
206
  animationId = null;
207
207
  isRenderingPaused = !1;
208
+ watermark;
208
209
  // FPS 监控
209
210
  fpsFrameCount = 0;
210
211
  fpsLastTime = performance.now();
@@ -213,13 +214,13 @@ class _ {
213
214
  onBeforeRenderCallback;
214
215
  onAfterRenderCallback;
215
216
  constructor(e, t = !0) {
216
- this.container = e, this.renderer = this.createRenderer(t), this.init();
217
+ this.container = e, this.renderer = this.createRenderer(t), this.watermark = new T(I), this.init();
217
218
  }
218
219
  /**
219
220
  * 创建 WebGL 渲染器
220
221
  */
221
222
  createRenderer(e) {
222
- const t = new I({
223
+ const t = new D({
223
224
  antialias: e,
224
225
  alpha: !0,
225
226
  preserveDrawingBuffer: !1
@@ -247,7 +248,7 @@ class _ {
247
248
  * 渲染场景
248
249
  */
249
250
  render(e, t) {
250
- this.onBeforeRenderCallback && this.onBeforeRenderCallback(), this.renderer.render(e, t), this.onAfterRenderCallback && this.onAfterRenderCallback(), this.updateFps();
251
+ this.onBeforeRenderCallback && this.onBeforeRenderCallback(), this.renderer.render(e, t), this.watermark.render(this.renderer), this.onAfterRenderCallback && this.onAfterRenderCallback(), this.updateFps();
251
252
  }
252
253
  /**
253
254
  * 启动渲染循环
@@ -325,10 +326,10 @@ class _ {
325
326
  * 销毁渲染器
326
327
  */
327
328
  dispose() {
328
- this.pauseRendering(), this.container.contains(this.renderer.domElement) && this.container.removeChild(this.renderer.domElement), this.renderer.dispose(), this.renderer.forceContextLoss(), this.onBeforeRenderCallback = void 0, this.onAfterRenderCallback = void 0;
329
+ 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
330
  }
330
331
  }
331
- class V {
332
+ class H {
332
333
  camera;
333
334
  domElement;
334
335
  cameraModule;
@@ -542,12 +543,12 @@ class V {
542
543
  this.domElement.removeEventListener("mousedown", this._onMouseDown), this.domElement.removeEventListener("mousemove", this._onMouseMove), this.domElement.removeEventListener("mouseup", this._onMouseUp), this.domElement.removeEventListener("mouseleave", this._onMouseUp), this.domElement.removeEventListener("wheel", this._onWheel), this.domElement.removeEventListener("touchstart", this._onTouchStart), this.domElement.removeEventListener("touchmove", this._onTouchMove), this.domElement.removeEventListener("touchend", this._onTouchEnd), this.onViewAngleChange = void 0;
543
544
  }
544
545
  }
545
- class K {
546
+ class O {
546
547
  controls;
547
548
  domElement;
548
549
  cameraModule;
549
550
  constructor(e, t) {
550
- this.cameraModule = e, this.domElement = t, this.controls = new V(e, t);
551
+ this.cameraModule = e, this.domElement = t, this.controls = new H(e, t);
551
552
  }
552
553
  /**
553
554
  * 初始化控制模块
@@ -623,7 +624,7 @@ class K {
623
624
  this.controls.dispose();
624
625
  }
625
626
  }
626
- class O {
627
+ class X {
627
628
  cache = /* @__PURE__ */ new Map();
628
629
  loadingPromises = /* @__PURE__ */ new Map();
629
630
  /**
@@ -701,13 +702,13 @@ class O {
701
702
  this.clear();
702
703
  }
703
704
  }
704
- class H {
705
+ class Z {
705
706
  textureCache;
706
707
  currentUrl = null;
707
708
  loadProgress = 0;
708
709
  onProgressCallback;
709
710
  constructor() {
710
- this.textureCache = new O();
711
+ this.textureCache = new X();
711
712
  }
712
713
  /**
713
714
  * 加载全景图纹理
@@ -888,7 +889,7 @@ class C {
888
889
  }
889
890
  }
890
891
  var d = /* @__PURE__ */ ((a) => (a.ICON = "icon", a.TEXT = "text", a.LINK = "link", a))(d || {});
891
- class X {
892
+ class W {
892
893
  annotations = /* @__PURE__ */ new Map();
893
894
  container;
894
895
  annotationContainer;
@@ -1164,7 +1165,7 @@ class X {
1164
1165
  return `annotation-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
1165
1166
  }
1166
1167
  }
1167
- class Z {
1168
+ class Y {
1168
1169
  listeners = /* @__PURE__ */ new Map();
1169
1170
  /**
1170
1171
  * 订阅事件
@@ -1234,7 +1235,7 @@ class Z {
1234
1235
  }
1235
1236
  }
1236
1237
  var r = /* @__PURE__ */ ((a) => (a.PanoramaLoadStart = "panorama-load-start", a.PanoramaLoadProgress = "panorama-load-progress", a.PanoramaLoaded = "panorama-loaded", a.PanoramaLoadError = "panorama-load-error", a.AnnotationClick = "annotation-click", a.AnnotationHover = "annotation-hover", a.AnnotationAdd = "annotation-add", a.AnnotationRemove = "annotation-remove", a.ViewAngleChanged = "view-angle-changed", a))(r || {});
1237
- class $ {
1238
+ class N {
1238
1239
  options;
1239
1240
  // 核心模块(使用 definite assignment assertions)
1240
1241
  sceneModule;
@@ -1248,7 +1249,7 @@ class $ {
1248
1249
  worldToScreen;
1249
1250
  // 内部状态
1250
1251
  isInitialized = !1;
1251
- version = T;
1252
+ version = z;
1252
1253
  constructor(e) {
1253
1254
  this.options = e, this.initialize(e);
1254
1255
  }
@@ -1272,23 +1273,23 @@ class $ {
1272
1273
  if (!n)
1273
1274
  throw new Error(`Container with id "${t.containerId}" not found`);
1274
1275
  try {
1275
- this.eventModule = new Z(), this.sceneModule = new L(t.sphereRadius), this.cameraModule = new z(
1276
+ this.eventModule = new Y(), this.sceneModule = new _(t.sphereRadius), this.cameraModule = new V(
1276
1277
  n,
1277
1278
  t.fov,
1278
1279
  t.minFov,
1279
1280
  t.maxFov
1280
- ), this.renderModule = new _(n, !0), this.controlModule = new K(
1281
+ ), this.renderModule = new K(n, !0), this.controlModule = new O(
1281
1282
  this.cameraModule,
1282
1283
  this.renderModule.getDomElement()
1283
1284
  );
1284
1285
  const i = this.controlModule.getControls();
1285
1286
  i.enableZoom = t.enableZoom, i.enableRotate = t.enableRotate, i.setRotateSpeed(t.rotateSpeed), i.setZoomSpeed(t.zoomSpeed), i.setEnableDamping(t.enableDamping), i.setDampingFactor(t.dampingFactor), i.setZoomLimits(t.minFov, t.maxFov), i.setOnViewAngleChange((o, s) => {
1286
1287
  this.eventModule.trigger(r.ViewAngleChanged, { theta: o, phi: s });
1287
- }), this.panoramaLoader = new H(), this.worldToScreen = new w(
1288
+ }), this.panoramaLoader = new Z(), this.worldToScreen = new w(
1288
1289
  this.cameraModule.getCamera(),
1289
1290
  this.renderModule.getRenderer(),
1290
1291
  this.sceneModule.getScene()
1291
- ), this.annotationManager = new X(
1292
+ ), this.annotationManager = new W(
1292
1293
  n,
1293
1294
  this.cameraModule.getCamera(),
1294
1295
  this.renderModule.getRenderer(),
@@ -1353,7 +1354,7 @@ class $ {
1353
1354
  * 通过 viewToken 解析全景资源地址,再复用现有全景加载逻辑。
1354
1355
  */
1355
1356
  async loadPanoramaByViewToken(e) {
1356
- const t = await y(
1357
+ const t = await L(
1357
1358
  this.options,
1358
1359
  e,
1359
1360
  "720"
@@ -1426,7 +1427,7 @@ class $ {
1426
1427
  const i = this.renderModule.getRenderer().domElement, o = i.clientWidth, s = i.clientHeight;
1427
1428
  if (o === 0 || s === 0)
1428
1429
  return null;
1429
- const h = new D(
1430
+ const h = new y(
1430
1431
  e / o * 2 - 1,
1431
1432
  -(t / s * 2 - 1)
1432
1433
  ), l = this.cameraModule.getCamera(), c = new p(h.x, h.y, 0.5);
@@ -1542,5 +1543,5 @@ class $ {
1542
1543
  }
1543
1544
  }
1544
1545
  export {
1545
- $ as EngineKernel720
1546
+ N as EngineKernel720
1546
1547
  };