@realsee/dnalogel 3.74.2 → 3.74.4-alpha.0

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.
@@ -0,0 +1,2 @@
1
+ import type { Model } from "@realsee/five";
2
+ export declare function getDistanceFromModel(model: Model, fov: number, aspect: number): number;
@@ -1,4 +1,4 @@
1
- import { SvelteComponent as P, init as Z, safe_not_equal as j, append_styles as A, empty as q, insert as h, transition_in as d, transition_out as _, check_outros as E, detach as g, setContext as y, onMount as B, element as D, attr as c, toggle_class as z, set_style as C, group_outros as N, update_keyed_each as F, outro_and_destroy_block as G, add_render_callback as H, create_in_transition as J, create_component as K, mount_component as L, destroy_component as Q, binding_callbacks as R } from "../../vendor/svelte/internal/index.js";
1
+ import { SvelteComponent as P, init as Z, safe_not_equal as j, append_styles as A, empty as q, insert as g, transition_in as d, transition_out as c, check_outros as E, detach as b, setContext as z, onMount as B, element as D, attr as h, toggle_class as C, set_style as _, group_outros as N, update_keyed_each as F, outro_and_destroy_block as G, add_render_callback as H, create_in_transition as J, create_component as K, mount_component as L, destroy_component as Q, binding_callbacks as R } from "../../vendor/svelte/internal/index.js";
2
2
  import U from "./TagItem.js";
3
3
  import { fade as V } from "../../vendor/svelte/transition/index.js";
4
4
  import { getOrCreatePopoverContainer as W } from "../utils/popoverContainer.js";
@@ -190,25 +190,25 @@ import "./Common/AudioPlayer.js";
190
190
  import "./Common/TagPopover/TagPopoverToolBar.js";
191
191
  import "./Common/TagPopover/ArrowRightIcon.js";
192
192
  import "./Common/TagPopover/ShareIcon.js";
193
- function X(n) {
194
- A(n, "svelte-9ehqs9", ".tag--container.svelte-9ehqs9{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none;transform:translate3d(0, 0, 0);transition:opacity 0.2s linear;overflow:hidden}.tag--container.hide.svelte-9ehqs9{opacity:0 !important;pointer-events:none}.tag--container.hide.svelte-9ehqs9 *{pointer-events:none !important}");
193
+ function X(m) {
194
+ A(m, "svelte-9ehqs9", ".tag--container.svelte-9ehqs9{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none;transform:translate3d(0, 0, 0);transition:opacity 0.2s linear;overflow:hidden}.tag--container.hide.svelte-9ehqs9{opacity:0 !important;pointer-events:none}.tag--container.hide.svelte-9ehqs9 *{pointer-events:none !important}");
195
195
  }
196
- function w(n, t, o) {
197
- const i = n.slice();
196
+ function w(m, t, o) {
197
+ const i = m.slice();
198
198
  return i[12] = t[o], i;
199
199
  }
200
- function T(n) {
201
- let t, o = [], i = /* @__PURE__ */ new Map(), m, p, l, f = (
200
+ function T(m) {
201
+ let t, o = [], i = /* @__PURE__ */ new Map(), p, n, a, s = (
202
202
  /*tags*/
203
- n[0]
203
+ m[0]
204
204
  );
205
205
  const u = (e) => (
206
206
  /*tag*/
207
207
  e[12].id
208
208
  );
209
- for (let e = 0; e < f.length; e += 1) {
210
- let r = w(n, f, e), s = u(r);
211
- i.set(s, o[e] = I(s, r));
209
+ for (let e = 0; e < s.length; e += 1) {
210
+ let r = w(m, s, e), f = u(r);
211
+ i.set(f, o[e] = I(f, r));
212
212
  }
213
213
  return {
214
214
  c() {
@@ -216,65 +216,70 @@ function T(n) {
216
216
  t = D("div");
217
217
  for (let r = 0; r < o.length; r += 1)
218
218
  o[r].c();
219
- c(t, "class", "tag--container svelte-9ehqs9"), c(t, "data-infive", m = !/*state*/
220
- n[4].visible || !/*temporaryState*/
221
- n[5].visible ? "1" : "0"), z(t, "hide", !/*state*/
222
- n[4].visible || !/*temporaryState*/
223
- n[5].visible), C(
219
+ h(t, "class", "tag--container svelte-9ehqs9"), h(t, "data-infive", p = !/*state*/
220
+ m[4].visible || !/*temporaryState*/
221
+ m[5].visible ? "1" : "0"), C(t, "hide", !/*state*/
222
+ m[4].visible || !/*temporaryState*/
223
+ m[5].visible), _(
224
224
  t,
225
225
  "z-index",
226
226
  /*zIndex*/
227
- (e = n[6]) != null ? e : ""
228
- );
227
+ (e = m[6]) != null ? e : ""
228
+ ), _(t, "opacity", !/*state*/
229
+ m[4].visible || !/*temporaryState*/
230
+ m[5].visible ? null : 1);
229
231
  },
230
232
  m(e, r) {
231
- h(e, t, r);
232
- for (let s = 0; s < o.length; s += 1)
233
- o[s] && o[s].m(t, null);
234
- n[10](t), l = !0;
233
+ g(e, t, r);
234
+ for (let f = 0; f < o.length; f += 1)
235
+ o[f] && o[f].m(t, null);
236
+ m[10](t), a = !0;
235
237
  },
236
238
  p(e, r) {
237
- var s;
239
+ var f;
238
240
  r & /*state, temporaryState, tags, mediaStore, rendererMap, contentTypeMap, wrapperElement, popoverContainerEl*/
239
- 447 && (f = /*tags*/
240
- e[0], N(), o = F(o, r, u, 1, e, f, i, t, G, I, null, w), E()), (!l || r & /*state, temporaryState*/
241
- 48 && m !== (m = !/*state*/
241
+ 447 && (s = /*tags*/
242
+ e[0], N(), o = F(o, r, u, 1, e, s, i, t, G, I, null, w), E()), (!a || r & /*state, temporaryState*/
243
+ 48 && p !== (p = !/*state*/
242
244
  e[4].visible || !/*temporaryState*/
243
- e[5].visible ? "1" : "0")) && c(t, "data-infive", m), (!l || r & /*state, temporaryState*/
244
- 48) && z(t, "hide", !/*state*/
245
+ e[5].visible ? "1" : "0")) && h(t, "data-infive", p), (!a || r & /*state, temporaryState*/
246
+ 48) && C(t, "hide", !/*state*/
245
247
  e[4].visible || !/*temporaryState*/
246
248
  e[5].visible), r & /*zIndex*/
247
- 64 && C(
249
+ 64 && _(
248
250
  t,
249
251
  "z-index",
250
252
  /*zIndex*/
251
- (s = e[6]) != null ? s : ""
252
- );
253
+ (f = e[6]) != null ? f : ""
254
+ ), r & /*state, temporaryState*/
255
+ 48 && _(t, "opacity", !/*state*/
256
+ e[4].visible || !/*temporaryState*/
257
+ e[5].visible ? null : 1);
253
258
  },
254
259
  i(e) {
255
- if (!l) {
256
- for (let r = 0; r < f.length; r += 1)
260
+ if (!a) {
261
+ for (let r = 0; r < s.length; r += 1)
257
262
  d(o[r]);
258
- p || H(() => {
259
- p = J(t, V, {}), p.start();
260
- }), l = !0;
263
+ n || H(() => {
264
+ n = J(t, V, {}), n.start();
265
+ }), a = !0;
261
266
  }
262
267
  },
263
268
  o(e) {
264
269
  for (let r = 0; r < o.length; r += 1)
265
- _(o[r]);
266
- l = !1;
270
+ c(o[r]);
271
+ a = !1;
267
272
  },
268
273
  d(e) {
269
- e && g(t);
274
+ e && b(t);
270
275
  for (let r = 0; r < o.length; r += 1)
271
276
  o[r].d();
272
- n[10](null);
277
+ m[10](null);
273
278
  }
274
279
  };
275
280
  }
276
- function I(n, t) {
277
- let o, i, m;
281
+ function I(m, t) {
282
+ let o, i, p;
278
283
  return i = new U({
279
284
  props: {
280
285
  state: (
@@ -311,103 +316,103 @@ function I(n, t) {
311
316
  )
312
317
  }
313
318
  }), {
314
- key: n,
319
+ key: m,
315
320
  first: null,
316
321
  c() {
317
322
  o = q(), K(i.$$.fragment), this.first = o;
318
323
  },
319
- m(p, l) {
320
- h(p, o, l), L(i, p, l), m = !0;
324
+ m(n, a) {
325
+ g(n, o, a), L(i, n, a), p = !0;
321
326
  },
322
- p(p, l) {
323
- t = p;
324
- const f = {};
325
- l & /*state*/
326
- 16 && (f.state = /*state*/
327
- t[4]), l & /*temporaryState*/
328
- 32 && (f.temporaryState = /*temporaryState*/
329
- t[5]), l & /*tags*/
330
- 1 && (f.tag = /*tag*/
331
- t[12]), l & /*mediaStore*/
332
- 2 && (f.mediaStore = /*mediaStore*/
333
- t[1]), l & /*rendererMap*/
334
- 4 && (f.rendererMap = /*rendererMap*/
335
- t[2]), l & /*contentTypeMap*/
336
- 8 && (f.contentTypeMap = /*contentTypeMap*/
337
- t[3]), l & /*wrapperElement*/
338
- 128 && (f.wrapperElement = /*wrapperElement*/
339
- t[7]), l & /*popoverContainerEl*/
340
- 256 && (f.popoverContainer = /*popoverContainerEl*/
341
- t[8]), i.$set(f);
327
+ p(n, a) {
328
+ t = n;
329
+ const s = {};
330
+ a & /*state*/
331
+ 16 && (s.state = /*state*/
332
+ t[4]), a & /*temporaryState*/
333
+ 32 && (s.temporaryState = /*temporaryState*/
334
+ t[5]), a & /*tags*/
335
+ 1 && (s.tag = /*tag*/
336
+ t[12]), a & /*mediaStore*/
337
+ 2 && (s.mediaStore = /*mediaStore*/
338
+ t[1]), a & /*rendererMap*/
339
+ 4 && (s.rendererMap = /*rendererMap*/
340
+ t[2]), a & /*contentTypeMap*/
341
+ 8 && (s.contentTypeMap = /*contentTypeMap*/
342
+ t[3]), a & /*wrapperElement*/
343
+ 128 && (s.wrapperElement = /*wrapperElement*/
344
+ t[7]), a & /*popoverContainerEl*/
345
+ 256 && (s.popoverContainer = /*popoverContainerEl*/
346
+ t[8]), i.$set(s);
342
347
  },
343
- i(p) {
344
- m || (d(i.$$.fragment, p), m = !0);
348
+ i(n) {
349
+ p || (d(i.$$.fragment, n), p = !0);
345
350
  },
346
- o(p) {
347
- _(i.$$.fragment, p), m = !1;
351
+ o(n) {
352
+ c(i.$$.fragment, n), p = !1;
348
353
  },
349
- d(p) {
350
- p && g(o), Q(i, p);
354
+ d(n) {
355
+ n && b(o), Q(i, n);
351
356
  }
352
357
  };
353
358
  }
354
- function Y(n) {
359
+ function Y(m) {
355
360
  let t, o, i = (
356
361
  /*state*/
357
- n[4].enabled && T(n)
362
+ m[4].enabled && T(m)
358
363
  );
359
364
  return {
360
365
  c() {
361
366
  i && i.c(), t = q();
362
367
  },
363
- m(m, p) {
364
- i && i.m(m, p), h(m, t, p), o = !0;
368
+ m(p, n) {
369
+ i && i.m(p, n), g(p, t, n), o = !0;
365
370
  },
366
- p(m, [p]) {
371
+ p(p, [n]) {
367
372
  /*state*/
368
- m[4].enabled ? i ? (i.p(m, p), p & /*state*/
369
- 16 && d(i, 1)) : (i = T(m), i.c(), d(i, 1), i.m(t.parentNode, t)) : i && (N(), _(i, 1, 1, () => {
373
+ p[4].enabled ? i ? (i.p(p, n), n & /*state*/
374
+ 16 && d(i, 1)) : (i = T(p), i.c(), d(i, 1), i.m(t.parentNode, t)) : i && (N(), c(i, 1, 1, () => {
370
375
  i = null;
371
376
  }), E());
372
377
  },
373
- i(m) {
378
+ i(p) {
374
379
  o || (d(i), o = !0);
375
380
  },
376
- o(m) {
377
- _(i), o = !1;
381
+ o(p) {
382
+ c(i), o = !1;
378
383
  },
379
- d(m) {
380
- i && i.d(m), m && g(t);
384
+ d(p) {
385
+ i && i.d(p), p && b(t);
381
386
  }
382
387
  };
383
388
  }
384
- function x(n, t, o) {
385
- let { tags: i = [] } = t, { hooks: m } = t, { mediaStore: p } = t, { rendererMap: l } = t, { contentTypeMap: f } = t, { state: u } = t, { temporaryState: e } = t, { zIndex: r = void 0 } = t, s = null, b = null, v = 2e3;
386
- y("hooks", m), y("mediaStore", p), B(() => {
387
- o(8, b = W(v));
389
+ function x(m, t, o) {
390
+ let { tags: i = [] } = t, { hooks: p } = t, { mediaStore: n } = t, { rendererMap: a } = t, { contentTypeMap: s } = t, { state: u } = t, { temporaryState: e } = t, { zIndex: r = void 0 } = t, f = null, v = null, k = 2e3;
391
+ z("hooks", p), z("mediaStore", n), B(() => {
392
+ o(8, v = W(k));
388
393
  });
389
- function O(a) {
390
- R[a ? "unshift" : "push"](() => {
391
- s = a, o(7, s);
394
+ function O(l) {
395
+ R[l ? "unshift" : "push"](() => {
396
+ f = l, o(7, f);
392
397
  });
393
398
  }
394
- return n.$$set = (a) => {
395
- "tags" in a && o(0, i = a.tags), "hooks" in a && o(9, m = a.hooks), "mediaStore" in a && o(1, p = a.mediaStore), "rendererMap" in a && o(2, l = a.rendererMap), "contentTypeMap" in a && o(3, f = a.contentTypeMap), "state" in a && o(4, u = a.state), "temporaryState" in a && o(5, e = a.temporaryState), "zIndex" in a && o(6, r = a.zIndex);
396
- }, n.$$.update = () => {
397
- var a, k, M, S;
398
- n.$$.dirty & /*tags*/
399
- 1 && i && i.length > 0 && (v = (S = (M = (k = (a = i[0]) == null ? void 0 : a.config) == null ? void 0 : k.popoverConfig) == null ? void 0 : M.zIndex) != null ? S : 2e6);
399
+ return m.$$set = (l) => {
400
+ "tags" in l && o(0, i = l.tags), "hooks" in l && o(9, p = l.hooks), "mediaStore" in l && o(1, n = l.mediaStore), "rendererMap" in l && o(2, a = l.rendererMap), "contentTypeMap" in l && o(3, s = l.contentTypeMap), "state" in l && o(4, u = l.state), "temporaryState" in l && o(5, e = l.temporaryState), "zIndex" in l && o(6, r = l.zIndex);
401
+ }, m.$$.update = () => {
402
+ var l, y, M, S;
403
+ m.$$.dirty & /*tags*/
404
+ 1 && i && i.length > 0 && (k = (S = (M = (y = (l = i[0]) == null ? void 0 : l.config) == null ? void 0 : y.popoverConfig) == null ? void 0 : M.zIndex) != null ? S : 2e6);
400
405
  }, [
401
406
  i,
402
- p,
403
- l,
404
- f,
407
+ n,
408
+ a,
409
+ s,
405
410
  u,
406
411
  e,
407
412
  r,
408
- s,
409
- b,
410
- m,
413
+ f,
414
+ v,
415
+ p,
411
416
  O
412
417
  ];
413
418
  }
@@ -1,11 +1,11 @@
1
1
  var I = Object.defineProperty;
2
2
  var M = (p, h, t) => h in p ? I(p, h, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[h] = t;
3
3
  var c = (p, h, t) => (M(p, typeof h != "symbol" ? h + "" : h, t), t);
4
- import { BaseTag as U } from "./BaseTag.js";
4
+ import { BaseTag as R } from "./BaseTag.js";
5
5
  import * as r from "three";
6
- import { Line as R } from "@realsee/five/line";
6
+ import { Line as U } from "@realsee/five/line";
7
7
  import { anyPositionToVector3 as g } from "../../../shared-utils/positionToVector3.js";
8
- import { transformPosition as P } from "../../../shared-utils/five/transformPosition.js";
8
+ import { transformPosition as D } from "../../../shared-utils/five/transformPosition.js";
9
9
  import "../../../shared-utils/Subscribe.js";
10
10
  import "../../utils/tag/calculateTagConfig.js";
11
11
  import "../../../vendor/object-assign-deep/objectAssignDeep.js";
@@ -88,8 +88,8 @@ import "../../../shared-utils/five/getFloorIndex.js";
88
88
  import "../../../shared-utils/safeObj.js";
89
89
  import "../../utils/Cache.js";
90
90
  import "../../../shared-utils/promise/withResolvers.js";
91
- const _ = new r.Vector2();
92
- class _i extends U {
91
+ const P = new r.Vector2();
92
+ class _i extends R {
93
93
  constructor(t, e) {
94
94
  var o, i, n, s, a;
95
95
  super(t, e);
@@ -133,8 +133,8 @@ class _i extends U {
133
133
  const t = this.config;
134
134
  if (!this.five.renderer || !((n = t == null ? void 0 : t.tagNormalLineConfig) != null && n.enabled) || !this.normalLineLength)
135
135
  return;
136
- const e = this.five.renderer.getSize(_), o = this.five.renderer.getPixelRatio(), i = P(g(this.originPosition), this.plugin.workUtil.transform);
137
- this.tagNormalLine = new R(new r.Vector3().fromArray(this.position), i), this.tagNormalLine.points.visible = !1, this.tagNormalLine.setMaterial({
136
+ const e = this.five.renderer.getSize(P), o = this.five.renderer.getPixelRatio(), i = D(g(this.originPosition), this.plugin.workUtil.transform);
137
+ this.tagNormalLine = new U(new r.Vector3().fromArray(this.position), i), this.tagNormalLine.points.visible = !1, this.tagNormalLine.setMaterial({
138
138
  color: new r.Vector3(1, 1, 1),
139
139
  linewidth: (a = (s = t == null ? void 0 : t.tagNormalLineConfig) == null ? void 0 : s.lineWidth) != null ? a : 1.2,
140
140
  dashed: !1
@@ -179,13 +179,12 @@ class _i extends U {
179
179
  }
180
180
  setPosition(t) {
181
181
  this.originPosition = t, this.position = (() => {
182
- const e = this.plugin.workUtil.transform;
183
- let o = P(g(t), e).toArray();
182
+ let e = g(t).toArray();
184
183
  if (this.normal && this.normalLineLength) {
185
- const i = this.computeNormal();
186
- o = new r.Vector3().fromArray(o).clone().add(i.clone().setLength(this.normalLineLength)).toArray();
184
+ const o = this.computeNormal();
185
+ e = new r.Vector3().fromArray(e).clone().add(o.clone().setLength(this.normalLineLength)).toArray();
187
186
  }
188
- return o;
187
+ return e;
189
188
  })(), this.cache.clear(), this._lastUpdateCache.position = [0, 0, 0], this.updateVisible(), this.updateScreenPosition(), this.updateZIndex(), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
190
189
  }
191
190
  /**
@@ -193,7 +192,7 @@ class _i extends U {
193
192
  * 使用屏幕空间反投影方法,确保任意视角下都保持固定像素距离
194
193
  */
195
194
  updateTagNormalLinePosition(t) {
196
- var L, x, C, N, S, T, D;
195
+ var b, L, x, C, N, S, T;
197
196
  if (!this.screenPosition || !this.tagNormalLine)
198
197
  return;
199
198
  const { force: e = !1 } = t != null ? t : {};
@@ -203,29 +202,32 @@ class _i extends U {
203
202
  }
204
203
  const i = this._lastUpdateCache;
205
204
  if (!(this.visible !== i.visible)) {
206
- const u = Math.abs(this.position[0] - i.position[0]) > 1e-3 || Math.abs(this.position[1] - i.position[1]) > 1e-3 || Math.abs(this.position[2] - i.position[2]) > 1e-3, E = Math.abs(((L = this.screenPosition.leftPx) != null ? L : 0) - i.screenLeft) > 0.5 || Math.abs(((x = this.screenPosition.topPx) != null ? x : 0) - i.screenTop) > 0.5 || Math.abs(((C = this.screenPosition.scale) != null ? C : 1) - i.scale) > 2e-3;
205
+ const u = Math.abs(this.position[0] - i.position[0]) > 1e-3 || Math.abs(this.position[1] - i.position[1]) > 1e-3 || Math.abs(this.position[2] - i.position[2]) > 1e-3, E = Math.abs(((b = this.screenPosition.leftPx) != null ? b : 0) - i.screenLeft) > 0.5 || Math.abs(((L = this.screenPosition.topPx) != null ? L : 0) - i.screenTop) > 0.5 || Math.abs(((x = this.screenPosition.scale) != null ? x : 1) - i.scale) > 2e-3;
207
206
  if (!u && !E)
208
207
  return;
209
208
  }
210
- if (i.position = new r.Vector3().fromArray(this.position).toArray(), i.screenLeft = (N = this.screenPosition.leftPx) != null ? N : 0, i.screenTop = (S = this.screenPosition.topPx) != null ? S : 0, i.scale = (T = this.screenPosition.scale) != null ? T : 1, i.visible = this.visible, !this.five.renderer)
209
+ if (i.position = new r.Vector3().fromArray(this.position).toArray(), i.screenLeft = (C = this.screenPosition.leftPx) != null ? C : 0, i.screenTop = (N = this.screenPosition.topPx) != null ? N : 0, i.scale = (S = this.screenPosition.scale) != null ? S : 1, i.visible = this.visible, !this.five.renderer)
211
210
  return;
212
- const s = this.five.renderer.getSize(_), a = P(g(this.originPosition), this.plugin.workUtil.transform).toArray();
211
+ const s = this.five.renderer.getSize(P), a = D(
212
+ g(this.originPosition),
213
+ this.plugin.workUtil.transform
214
+ ).toArray();
213
215
  this._temp.lineStart.fromArray(a), this._temp.iconPos.fromArray(this.position), this._temp.lineStart.project(this.five.camera), this._temp.iconPos.project(this.five.camera), this._temp.screenDirPixel.set(
214
216
  (this._temp.iconPos.x - this._temp.lineStart.x) * s.x / 2,
215
217
  (this._temp.iconPos.y - this._temp.lineStart.y) * s.y / 2
216
218
  );
217
219
  const d = this._temp.screenDirPixel.length();
218
220
  this._temp.screenDirPixel.normalize();
219
- const m = this.iconPixelGap * ((D = this.screenPosition.scale) != null ? D : 1);
221
+ const m = this.iconPixelGap * ((T = this.screenPosition.scale) != null ? T : 1);
220
222
  this._temp.targetNDC.set(
221
223
  (this._temp.iconPos.x * s.x / 2 - this._temp.screenDirPixel.x * m) / (s.x / 2),
222
224
  (this._temp.iconPos.y * s.y / 2 - this._temp.screenDirPixel.y * m) / (s.y / 2)
223
225
  ), this._temp.raycaster.setFromCamera(this._temp.targetNDC, this.five.camera);
224
226
  const l = this._temp.raycaster.ray;
225
227
  this._temp.lineStart.fromArray(a), this._temp.iconPos.fromArray(this.position), this._temp.lineDir.copy(this._temp.iconPos).sub(this._temp.lineStart).normalize(), this._temp.lineEnd.copy(l.origin).sub(this._temp.lineStart);
226
- const A = l.direction.dot(l.direction), f = l.direction.dot(this._temp.lineDir), y = this._temp.lineDir.dot(this._temp.lineDir), w = l.direction.dot(this._temp.lineEnd), V = this._temp.lineDir.dot(this._temp.lineEnd), v = A * y - f * f;
227
- let b = 0;
228
- Math.abs(v) > 1e-4 && (b = (f * V - y * w) / v), this._temp.lineEnd.copy(l.origin).add(l.direction.multiplyScalar(Math.max(0, b)));
228
+ const A = l.direction.dot(l.direction), f = l.direction.dot(this._temp.lineDir), _ = this._temp.lineDir.dot(this._temp.lineDir), w = l.direction.dot(this._temp.lineEnd), V = this._temp.lineDir.dot(this._temp.lineEnd), y = A * _ - f * f;
229
+ let v = 0;
230
+ Math.abs(y) > 1e-4 && (v = (f * V - _ * w) / y), this._temp.lineEnd.copy(l.origin).add(l.direction.multiplyScalar(Math.max(0, v)));
229
231
  const k = this._temp.lineStart.distanceTo(this._temp.iconPos);
230
232
  if (this._temp.lineStart.distanceTo(this._temp.lineEnd) > k) {
231
233
  const u = Math.max(0, 1 - m / d);
@@ -254,7 +256,7 @@ class _i extends U {
254
256
  return 1;
255
257
  const l = 2 * Math.tan(0.5 * this.five.camera.fov / 180 * Math.PI);
256
258
  return Math.max(Math.min(1 - l * a / 40, 1), 0.7);
257
- })(), m = this.five.renderer.getSize(_);
259
+ })(), m = this.five.renderer.getSize(P);
258
260
  this.screenPosition = {
259
261
  leftPx: (n.x + 1) / 2 * m.x,
260
262
  topPx: (-n.y + 1) / 2 * m.y,
@@ -1,7 +1,7 @@
1
1
  var e = Object.defineProperty;
2
2
  var s = (o, t, i) => t in o ? e(o, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[t] = i;
3
3
  var r = (o, t, i) => (s(o, typeof t != "symbol" ? t + "" : t, i), i);
4
- import { Subscribe as m } from "../shared-utils/Subscribe.js";
4
+ import { Subscribe as l } from "../shared-utils/Subscribe.js";
5
5
  import "../shared-utils/tag.js";
6
6
  import "three";
7
7
  import "../vendor/hammerjs/hammer.js";
@@ -15,7 +15,7 @@ import "../shared-utils/three/blink.js";
15
15
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
16
16
  import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
17
17
  import "../vendor/earcut/src/earcut.js";
18
- import { FiveUtil as l } from "../shared-utils/Utils/FiveUtil.js";
18
+ import { FiveUtil as m } from "../shared-utils/Utils/FiveUtil.js";
19
19
  import { DEFAULT_STATIC_PREFIX as p } from "../shared-utils/url/defaultUrls.js";
20
20
  import "../shared-utils/five/FivePuppet.js";
21
21
  let I = class {
@@ -23,7 +23,7 @@ let I = class {
23
23
  /**
24
24
  * @realsee/dnalogel 版本号
25
25
  */
26
- r(this, "VERSION", "3.74.2");
26
+ r(this, "VERSION", "3.74.4-alpha.0");
27
27
  r(this, "NAME");
28
28
  r(this, "five");
29
29
  r(this, "workUtil");
@@ -31,9 +31,9 @@ let I = class {
31
31
  /**
32
32
  * @description: 插件事件钩子
33
33
  */
34
- r(this, "hooks", new m());
34
+ r(this, "hooks", new l());
35
35
  r(this, "staticPrefix", p);
36
- this.five = t, this.fiveUtil = new l(t), this.workUtil = this.fiveUtil.workUtil, i != null && i.staticPrefix && (this.staticPrefix = i.staticPrefix);
36
+ this.five = t, this.fiveUtil = new m(t), this.workUtil = this.fiveUtil.workUtil, i != null && i.staticPrefix && (this.staticPrefix = i.staticPrefix);
37
37
  }
38
38
  set workCode(t) {
39
39
  this.workUtil.workCode = t, this.onWorkCodeChange();
@@ -101,6 +101,7 @@ import "../../shared-utils/five/transformPosition.js";
101
101
  import "../../shared-utils/five/getFiveModel.js";
102
102
  import "../../shared-utils/nearlyEqual.js";
103
103
  import "../../shared-utils/five/changeMode.js";
104
+ import "../../shared-utils/translateMode/getDistanceFromModel.js";
104
105
  import "../../shared-utils/positionToVector3.js";
105
106
  import "../../shared-utils/five/vector3ToScreen.js";
106
107
  import "../../shared-utils/three/temp.js";
@@ -155,7 +156,7 @@ function Q(l) {
155
156
  const { latitude: h, longitude: t } = l, e = Math.abs(h - Math.PI / 2) < 10 * Math.PI / 180, i = t < 30 * (Math.PI / 180) || t > 330 * (Math.PI / 180);
156
157
  return e && i;
157
158
  }
158
- class mi extends G {
159
+ class pi extends G {
159
160
  constructor(t, e) {
160
161
  var a, d;
161
162
  super(t);
@@ -513,5 +514,5 @@ class mi extends G {
513
514
  }
514
515
  }
515
516
  export {
516
- mi as Controller
517
+ pi as Controller
517
518
  };
@@ -115,11 +115,12 @@ import "../utils/correctFiveState.js";
115
115
  import "../utils/constant.js";
116
116
  import "../../shared-utils/nearlyEqual.js";
117
117
  import "../../shared-utils/five/changeMode.js";
118
+ import "../../shared-utils/translateMode/getDistanceFromModel.js";
118
119
  import "../../shared-utils/changeModelCanvasOpacity.js";
119
120
  import "../../shared-utils/url/replace-static-prefix.js";
120
121
  import "../../shared-utils/url/absoluteUrl.js";
121
- const gr = (o, r) => new t(o, r);
122
+ const vr = (o, r) => new t(o, r);
122
123
  export {
123
- gr as MapviewFloorplanPlugin,
124
- gr as default
124
+ vr as MapviewFloorplanPlugin,
125
+ vr as default
125
126
  };
@@ -99,6 +99,7 @@ import "../../shared-utils/five/transformPosition.js";
99
99
  import "../../shared-utils/five/getFiveModel.js";
100
100
  import "../../shared-utils/nearlyEqual.js";
101
101
  import "../../shared-utils/five/changeMode.js";
102
+ import "../../shared-utils/translateMode/getDistanceFromModel.js";
102
103
  import "../../shared-utils/positionToVector3.js";
103
104
  import "../../shared-utils/five/vector3ToScreen.js";
104
105
  import "../../shared-utils/three/temp.js";
@@ -153,7 +154,7 @@ function z(d) {
153
154
  const { latitude: s, longitude: t } = d, e = Math.abs(s - Math.PI / 2) < 10 * Math.PI / 180, i = t < 30 * (Math.PI / 180) || t > 330 * (Math.PI / 180);
154
155
  return e && i;
155
156
  }
156
- class ti extends T {
157
+ class ei extends T {
157
158
  constructor(t, e) {
158
159
  var a, p, c;
159
160
  super(t);
@@ -487,5 +488,5 @@ class ti extends T {
487
488
  }
488
489
  }
489
490
  export {
490
- ti as Controller
491
+ ei as Controller
491
492
  };
@@ -114,11 +114,12 @@ import "../utils/correctFiveState.js";
114
114
  import "../utils/constant.js";
115
115
  import "../../shared-utils/nearlyEqual.js";
116
116
  import "../../shared-utils/five/changeMode.js";
117
+ import "../../shared-utils/translateMode/getDistanceFromModel.js";
117
118
  import "../../shared-utils/changeModelCanvasOpacity.js";
118
119
  import "../../shared-utils/url/replace-static-prefix.js";
119
120
  import "../../shared-utils/url/absoluteUrl.js";
120
- const gr = (o, r) => new t(o, r);
121
+ const wr = (o, r) => new t(o, r);
121
122
  export {
122
- gr as ModelFloorplanPlugin,
123
- gr as default
123
+ wr as ModelFloorplanPlugin,
124
+ wr as default
124
125
  };
@@ -6,6 +6,7 @@ export interface ShowState {
6
6
  fov?: number;
7
7
  mode: Mode;
8
8
  offset?: THREE.Vector3;
9
+ distance?: number;
9
10
  }
10
11
  /** 判断当前状态是否可以展示户型图 */
11
12
  export declare function checkShowState(five: Five, showState: ShowState): boolean;