@realsee/dnalogel 3.8.9 → 3.8.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.
@@ -79,10 +79,10 @@ class ci extends ne {
79
79
  d(this, "domEvents", new pe(this.five));
80
80
  d(this, "_workCode");
81
81
  d(this, "getObserverPosition", (e) => {
82
- var o, t;
82
+ var o, t, r;
83
83
  const i = (o = this.work) == null ? void 0 : o.observers[e];
84
84
  if (i)
85
- return O(i.position, (t = this.work) == null ? void 0 : t.options.transform);
85
+ return O(i.position, (r = (t = this.work) == null ? void 0 : t.options) == null ? void 0 : r.transform);
86
86
  });
87
87
  d(this, "loadVideoFirstFrame", () => {
88
88
  fe && this.hooks.emit("loadVideoFirstFrame");
@@ -125,9 +125,9 @@ class ci extends ne {
125
125
  * @description: 获取标签配置
126
126
  */
127
127
  getTagConfig(e, i) {
128
- var r, f, c;
129
- const o = this.calculateTagConfig(e, i), t = (r = i == null ? void 0 : i.fiveMode) != null ? r : this.five.getCurrentState().mode, n = (f = o.configWithFiveMode) == null ? void 0 : f[t];
130
- return (c = n != null ? n : o) != null ? c : {};
128
+ var n, f, c;
129
+ const o = this.calculateTagConfig(e, i), t = (n = i == null ? void 0 : i.fiveMode) != null ? n : this.five.getCurrentState().mode, r = (f = o.configWithFiveMode) == null ? void 0 : f[t];
130
+ return (c = r != null ? r : o) != null ? c : {};
131
131
  }
132
132
  /**
133
133
  * @description 获取标签当前状态
@@ -196,16 +196,16 @@ class ci extends ne {
196
196
  if (t.angle !== void 0)
197
197
  return t.angle;
198
198
  {
199
- const n = this.getObserverPosition(o);
200
- if (n === void 0)
201
- throw new Error(`getAngle(): observerPosition is ${n}`);
202
- const r = (() => e.stickType === "3DPoint" ? C(e.normal) : E(e.position))();
203
- if (!r)
199
+ const r = this.getObserverPosition(o);
200
+ if (r === void 0)
201
+ throw new Error(`getAngle(): observerPosition is ${r}`);
202
+ const n = (() => e.stickType === "3DPoint" ? C(e.normal) : E(e.position))();
203
+ if (!n)
204
204
  return;
205
205
  const f = $(e);
206
206
  if (!f)
207
207
  return;
208
- const c = new te.Vector3().copy(n).sub(f), g = r.angleTo(c) * 180 / Math.PI;
208
+ const c = new te.Vector3().copy(r).sub(f), g = n.angleTo(c) * 180 / Math.PI;
209
209
  return t.angle = g, t.angle;
210
210
  }
211
211
  }
@@ -213,20 +213,20 @@ class ci extends ne {
213
213
  * @description: 获取距离
214
214
  */
215
215
  getDistance(e, i) {
216
- const o = M(M({}, this.five.getCurrentState()), i), { panoIndex: t, mode: n } = o, r = A(n) ? this.getPanoIndexCache({ panoIndex: t, id: e.id }) : void 0;
217
- if ((r == null ? void 0 : r.distance) !== void 0)
218
- return r.distance;
216
+ const o = M(M({}, this.five.getCurrentState()), i), { panoIndex: t, mode: r } = o, n = A(r) ? this.getPanoIndexCache({ panoIndex: t, id: e.id }) : void 0;
217
+ if ((n == null ? void 0 : n.distance) !== void 0)
218
+ return n.distance;
219
219
  const f = $(e);
220
220
  if (!f)
221
221
  return -1;
222
- if (A(n)) {
222
+ if (A(r)) {
223
223
  const c = this.getObserverPosition(t);
224
224
  if (c === void 0)
225
225
  return -1;
226
226
  const g = c.distanceTo(f);
227
- return r && (r.distance = g), g;
227
+ return n && (n.distance = g), g;
228
228
  }
229
- if (J(n))
229
+ if (J(r))
230
230
  return this.five.camera.position.distanceTo(f);
231
231
  }
232
232
  getPositions(e) {
@@ -241,14 +241,14 @@ class ci extends ne {
241
241
  if (!i || !this.domEvents)
242
242
  return () => {
243
243
  };
244
- const t = () => !(!this.getCurrentVisibleState(e) || e.loading), n = (r) => {
244
+ const t = () => !(!this.getCurrentVisibleState(e) || e.loading), r = (n) => {
245
245
  if (!t())
246
246
  return !1;
247
- o(r.origDomEvent);
247
+ o(n.origDomEvent);
248
248
  };
249
- return this.domEvents.addEventListener(i, "click", n), () => {
250
- var r;
251
- (r = this.domEvents) == null || r.removeEventListener(i, "click", n);
249
+ return this.domEvents.addEventListener(i, "click", r), () => {
250
+ var n;
251
+ (n = this.domEvents) == null || n.removeEventListener(i, "click", r);
252
252
  };
253
253
  }
254
254
  getTagNormal(e) {
@@ -283,11 +283,11 @@ class ci extends ne {
283
283
  });
284
284
  }
285
285
  getTransformedPostion(e) {
286
- var o;
286
+ var o, t;
287
287
  if (!e)
288
288
  return;
289
- const i = (o = this.work) == null ? void 0 : o.options.transform;
290
- return Array.isArray(e) && e.length === 4 ? e.map(C).map((t) => O(t, i)) : O(C(e), i);
289
+ const i = (t = (o = this.work) == null ? void 0 : o.options) == null ? void 0 : t.transform;
290
+ return Array.isArray(e) && e.length === 4 ? e.map(C).map((r) => O(r, i)) : O(C(e), i);
291
291
  }
292
292
  /**
293
293
  * @description 检查是否已经销毁
@@ -310,10 +310,10 @@ class ci extends ne {
310
310
  if ((W = e == null ? void 0 : e.config) != null && W._isMerged)
311
311
  return e.config;
312
312
  }
313
- const t = {}, n = {}, r = {};
313
+ const t = {}, r = {}, n = {};
314
314
  this.config.contentTypeConfig && Object.entries(this.config.contentTypeConfig).forEach(([u, p]) => {
315
315
  var _, x;
316
- const l = u, D = l.split("-"), L = u.startsWith("["), T = L ? D[0].slice(1, -1) : void 0, h = L ? D.slice(1) : D, v = T ? ["PanoramaLike", "ModelLike"].includes(T) ? (_ = n[T]) != null ? _ : n[T] = {} : (x = r[T]) != null ? x : r[T] = {} : t;
316
+ const l = u, D = l.split("-"), L = u.startsWith("["), T = L ? D[0].slice(1, -1) : void 0, h = L ? D.slice(1) : D, v = T ? ["PanoramaLike", "ModelLike"].includes(T) ? (_ = r[T]) != null ? _ : r[T] = {} : (x = n[T]) != null ? x : n[T] = {} : t;
317
317
  if (!v[l]) {
318
318
  if (h.length === 0 && (v[l] = p), h.length === 1) {
319
319
  const [m] = h;
@@ -333,11 +333,11 @@ class ci extends ne {
333
333
  }
334
334
  });
335
335
  const f = (V = (F = e.initialConfig) != null ? F : e.config) != null ? V : {}, c = y({}, ie, this.config.globalConfig, ...Object.values(t)), g = y({}, c, f), k = {}, X = Object.values(ae.Mode);
336
- U(n).forEach(([u, p]) => {
336
+ U(r).forEach(([u, p]) => {
337
337
  X.forEach((l) => {
338
338
  (u === "PanoramaLike" && A(l) || u === "ModelLike" && J(l)) && (k[l] = y({}, c, ...Object.values(p), f, { _isMerged: !0 }));
339
339
  });
340
- }), U(r).forEach(([u, p]) => {
340
+ }), U(n).forEach(([u, p]) => {
341
341
  k[u] = y({}, c, ...Object.values(p), f, { _isMerged: !0 });
342
342
  });
343
343
  const b = N(M({}, g), { configWithFiveMode: k });
@@ -14,7 +14,7 @@ let b = class {
14
14
  /**
15
15
  * @realsee/dnalogel 版本号
16
16
  */
17
- i(this, "VERSION", "3.8.9");
17
+ i(this, "VERSION", "3.8.10");
18
18
  i(this, "five");
19
19
  /**
20
20
  * 插件事件钩子
@@ -1,5 +1,5 @@
1
- import { transformPosition as c } from "./transformPosition.js";
2
- function a(t, f) {
1
+ import { transformPosition as u } from "./transformPosition.js";
2
+ function d(t, f) {
3
3
  if (!t)
4
4
  return 0;
5
5
  const s = t.observers;
@@ -7,9 +7,9 @@ function a(t, f) {
7
7
  return console.error("getFloorIndex: invalid arguments: ", { point: f, observer: s }), 0;
8
8
  const e = [];
9
9
  s.forEach((r) => {
10
- var n, l;
10
+ var n, l, c;
11
11
  const o = (l = (n = r.floorIndex) != null ? n : r.floor_index) != null ? l : 0;
12
- e[o] || (e[o] = []), e[o].push(c(r.position, t.options.transform).y);
12
+ e[o] || (e[o] = []), e[o].push(u(r.position, (c = t.options) == null ? void 0 : c.transform).y);
13
13
  });
14
14
  const i = e.map((r) => r.reduce((o, n) => o + n, 0) / r.length);
15
15
  for (let r = i.length - 1; r > 0; r--)
@@ -18,5 +18,5 @@ function a(t, f) {
18
18
  return 0;
19
19
  }
20
20
  export {
21
- a as getFloorIndex
21
+ d as getFloorIndex
22
22
  };
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.8.9",
3
+ "%c %c@realsee/dnalogel %cv3.8.10",
4
4
  [
5
5
  "background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
6
6
  "background-repeat: no-repeat",
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "repository": "https://github.com/realsee-developer/dnalogel.git",
8
8
  "description": "如视 VR 看房插件合集",
9
9
  "private": false,
10
- "version": "3.8.9",
10
+ "version": "3.8.10",
11
11
  "license": "SEE LICENSE IN TERMS.txt",
12
12
  "scripts": {
13
13
  "clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",