iflow-engine-base 3.10.1 → 3.10.2

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, 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-B5AdSZ7m.js";
3
- import { E as z } from "./engine-2d-qCatzA5S.js";
4
- class _ {
1
+ import { n as S, ao as R, h as E, aB as x, j as A, 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-DTqpDaJq.js";
2
+ import { C as T, W as w, r as z } from "./sdk-runtime-D7NH6c4x.js";
3
+ import { E as L, n as _ } from "./engine-2d-BqSrZIgs.js";
4
+ class V {
5
5
  scene;
6
6
  panoramaSphere = null;
7
7
  sphereRadius;
@@ -30,13 +30,13 @@ class _ {
30
30
  // 垂直分段
31
31
  );
32
32
  n.scale(-1, 1, 1);
33
- const i = new A({
33
+ const i = new E({
34
34
  map: null,
35
35
  // 纹理后续加载
36
- side: E,
36
+ side: x,
37
37
  // Render inner surface; geometry is flipped via scale(-1,1,1)
38
38
  transparent: !0
39
- }), o = new x(n, i);
39
+ }), o = new A(n, i);
40
40
  return o.name = "panorama-sphere", o;
41
41
  }
42
42
  /**
@@ -102,7 +102,7 @@ class _ {
102
102
  this.scene.clear();
103
103
  }
104
104
  }
105
- class V {
105
+ class K {
106
106
  camera;
107
107
  minFov;
108
108
  maxFov;
@@ -200,7 +200,7 @@ class V {
200
200
  this.camera = null;
201
201
  }
202
202
  }
203
- class K {
203
+ class H {
204
204
  renderer;
205
205
  container;
206
206
  animationId = null;
@@ -329,7 +329,7 @@ class K {
329
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;
330
330
  }
331
331
  }
332
- class H {
332
+ class O {
333
333
  camera;
334
334
  domElement;
335
335
  cameraModule;
@@ -543,12 +543,12 @@ class H {
543
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;
544
544
  }
545
545
  }
546
- class O {
546
+ class X {
547
547
  controls;
548
548
  domElement;
549
549
  cameraModule;
550
550
  constructor(e, t) {
551
- this.cameraModule = e, this.domElement = t, this.controls = new H(e, t);
551
+ this.cameraModule = e, this.domElement = t, this.controls = new O(e, t);
552
552
  }
553
553
  /**
554
554
  * 初始化控制模块
@@ -624,7 +624,7 @@ class O {
624
624
  this.controls.dispose();
625
625
  }
626
626
  }
627
- class X {
627
+ class Z {
628
628
  cache = /* @__PURE__ */ new Map();
629
629
  loadingPromises = /* @__PURE__ */ new Map();
630
630
  /**
@@ -702,13 +702,13 @@ class X {
702
702
  this.clear();
703
703
  }
704
704
  }
705
- class Z {
705
+ class W {
706
706
  textureCache;
707
707
  currentUrl = null;
708
708
  loadProgress = 0;
709
709
  onProgressCallback;
710
710
  constructor() {
711
- this.textureCache = new X();
711
+ this.textureCache = new Z();
712
712
  }
713
713
  /**
714
714
  * 加载全景图纹理
@@ -889,7 +889,7 @@ class C {
889
889
  }
890
890
  }
891
891
  var d = /* @__PURE__ */ ((a) => (a.ICON = "icon", a.TEXT = "text", a.LINK = "link", a))(d || {});
892
- class W {
892
+ class Y {
893
893
  annotations = /* @__PURE__ */ new Map();
894
894
  container;
895
895
  annotationContainer;
@@ -1165,7 +1165,7 @@ class W {
1165
1165
  return `annotation-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
1166
1166
  }
1167
1167
  }
1168
- class Y {
1168
+ class U {
1169
1169
  listeners = /* @__PURE__ */ new Map();
1170
1170
  /**
1171
1171
  * 订阅事件
@@ -1235,7 +1235,7 @@ class Y {
1235
1235
  }
1236
1236
  }
1237
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 || {});
1238
- class N {
1238
+ class j {
1239
1239
  options;
1240
1240
  // 核心模块(使用 definite assignment assertions)
1241
1241
  sceneModule;
@@ -1249,7 +1249,8 @@ class N {
1249
1249
  worldToScreen;
1250
1250
  // 内部状态
1251
1251
  isInitialized = !1;
1252
- version = z;
1252
+ version = L;
1253
+ interactionMode = "standard";
1253
1254
  constructor(e) {
1254
1255
  this.options = e, this.initialize(e);
1255
1256
  }
@@ -1273,28 +1274,28 @@ class N {
1273
1274
  if (!n)
1274
1275
  throw new Error(`Container with id "${t.containerId}" not found`);
1275
1276
  try {
1276
- this.eventModule = new Y(), this.sceneModule = new _(t.sphereRadius), this.cameraModule = new V(
1277
+ this.eventModule = new U(), this.sceneModule = new V(t.sphereRadius), this.cameraModule = new K(
1277
1278
  n,
1278
1279
  t.fov,
1279
1280
  t.minFov,
1280
1281
  t.maxFov
1281
- ), this.renderModule = new K(n, !0), this.controlModule = new O(
1282
+ ), this.renderModule = new H(n, !0), this.controlModule = new X(
1282
1283
  this.cameraModule,
1283
1284
  this.renderModule.getDomElement()
1284
1285
  );
1285
1286
  const i = this.controlModule.getControls();
1286
1287
  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) => {
1287
1288
  this.eventModule.trigger(r.ViewAngleChanged, { theta: o, phi: s });
1288
- }), this.panoramaLoader = new Z(), this.worldToScreen = new w(
1289
+ }), this.panoramaLoader = new W(), this.worldToScreen = new w(
1289
1290
  this.cameraModule.getCamera(),
1290
1291
  this.renderModule.getRenderer(),
1291
1292
  this.sceneModule.getScene()
1292
- ), this.annotationManager = new W(
1293
+ ), this.annotationManager = new Y(
1293
1294
  n,
1294
1295
  this.cameraModule.getCamera(),
1295
1296
  this.renderModule.getRenderer(),
1296
1297
  t.sphereRadius
1297
- ), this.annotationManager.setOnClickAnnotation((o) => {
1298
+ ), this.setInteractionMode(e.interactionMode), this.annotationManager.setOnClickAnnotation((o) => {
1298
1299
  this.eventModule.trigger(r.AnnotationClick, {
1299
1300
  id: o.id,
1300
1301
  config: o.config,
@@ -1354,7 +1355,7 @@ class N {
1354
1355
  * 通过 viewToken 解析全景资源地址,再复用现有全景加载逻辑。
1355
1356
  */
1356
1357
  async loadPanoramaByViewToken(e) {
1357
- const t = await L(
1358
+ const t = await z(
1358
1359
  this.options,
1359
1360
  e,
1360
1361
  "720"
@@ -1523,6 +1524,12 @@ class N {
1523
1524
  getVersion() {
1524
1525
  return this.version;
1525
1526
  }
1527
+ setInteractionMode(e) {
1528
+ this.interactionMode = _(e);
1529
+ }
1530
+ getInteractionMode() {
1531
+ return this.interactionMode;
1532
+ }
1526
1533
  /**
1527
1534
  * 销毁引擎
1528
1535
  */
@@ -1543,5 +1550,5 @@ class N {
1543
1550
  }
1544
1551
  }
1545
1552
  export {
1546
- N as EngineKernel720
1553
+ j as EngineKernel720
1547
1554
  };