@realsee/dnalogel 3.79.1 → 3.79.3

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.
@@ -6,6 +6,7 @@ export declare class FragmentTransparencyMaterial extends THREE.ShaderMaterial {
6
6
  };
7
7
  };
8
8
  transparent: boolean;
9
+ depthWrite: boolean;
9
10
  blending: THREE.Blending;
10
11
  blendSrc: THREE.BlendingDstFactor;
11
12
  blendDst: THREE.BlendingDstFactor;
@@ -4,7 +4,6 @@ import { BaseTag } from './BaseTag';
4
4
  import type { PartialObjectDeep } from '../../../typings/typings';
5
5
  import type { Vector3 } from 'three';
6
6
  import { Rectangle } from '../../../Sculpt/Objects/Rectangle';
7
- export type PlaneTagInterface<C extends TagContentType = TagContentType> = TagInstance<C, 'Plane'>;
8
7
  export declare class PlaneTag<C extends TagContentType = TagContentType> extends BaseTag<C, 'Plane'> {
9
8
  rectanglePlane?: Rectangle;
10
9
  private _floorIndex?;
@@ -28,8 +27,15 @@ export declare class PlaneTag<C extends TagContentType = TagContentType> extends
28
27
  private initialSculpt;
29
28
  editorEnable(): void;
30
29
  editorDisable(position?: Vector3[]): void;
30
+ private getRectangleHelper;
31
+ /**
32
+ * 标签因为 visiblePanoIndex 等可见性规则被隐藏时,同时隐藏编辑辅助元素。
33
+ * 当标签重新可见且仍处于编辑态时,再恢复辅助元素显示。
34
+ */
35
+ private syncEditorAuxiliaryVisibility;
31
36
  private renderVideoPlane;
32
37
  private renderImagePlane;
33
38
  private renderEmptyPlane;
34
39
  computeNormal(): Vector3;
35
40
  }
41
+ export type PlaneTagInterface<C extends TagContentType = TagContentType> = TagInstance<C, 'Plane'>;
@@ -1,46 +1,46 @@
1
- var k = Object.defineProperty, j = Object.defineProperties;
2
- var R = Object.getOwnPropertyDescriptors;
1
+ var j = Object.defineProperty, V = Object.defineProperties;
2
+ var k = Object.getOwnPropertyDescriptors;
3
3
  var F = Object.getOwnPropertySymbols;
4
- var V = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
5
- var I = (c, d, t) => d in c ? k(c, d, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[d] = t, b = (c, d) => {
4
+ var M = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
5
+ var b = (c, d, t) => d in c ? j(c, d, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[d] = t, I = (c, d) => {
6
6
  for (var t in d || (d = {}))
7
- V.call(d, t) && I(c, t, d[t]);
7
+ M.call(d, t) && b(c, t, d[t]);
8
8
  if (F)
9
9
  for (var t of F(d))
10
- w.call(d, t) && I(c, t, d[t]);
10
+ w.call(d, t) && b(c, t, d[t]);
11
11
  return c;
12
- }, S = (c, d) => j(c, R(d));
13
- var y = (c, d, t) => (I(c, typeof d != "symbol" ? d + "" : d, t), t);
12
+ }, S = (c, d) => V(c, k(d));
13
+ var v = (c, d, t) => (b(c, typeof d != "symbol" ? d + "" : d, t), t);
14
14
  var C = (c, d, t) => new Promise((e, i) => {
15
15
  var o = (r) => {
16
16
  try {
17
- m(t.next(r));
18
- } catch (n) {
19
- i(n);
17
+ p(t.next(r));
18
+ } catch (a) {
19
+ i(a);
20
20
  }
21
21
  }, l = (r) => {
22
22
  try {
23
- m(t.throw(r));
24
- } catch (n) {
25
- i(n);
23
+ p(t.throw(r));
24
+ } catch (a) {
25
+ i(a);
26
26
  }
27
- }, m = (r) => r.done ? e(r.value) : Promise.resolve(r.value).then(o, l);
28
- m((t = t.apply(c, d)).next());
27
+ }, p = (r) => r.done ? e(r.value) : Promise.resolve(r.value).then(o, l);
28
+ p((t = t.apply(c, d)).next());
29
29
  });
30
- import { CONST as M } from "../../../shared-utils/constants.js";
31
- import { CSS3DObjectPlus as _ } from "../../../shared-utils/CSS3DRender/CSS3DObject.js";
32
- import { anyPositionToVector3 as T, arrayPositionToVector3 as P } from "../../../shared-utils/positionToVector3.js";
33
- import * as E from "three";
34
- import { planeNormal as O } from "../../utils/planeNormal.js";
35
- import { centerPoint as G } from "../../../shared-utils/three/centerPoint.js";
36
- import { VideoPlane as L, ImagePlane as A } from "../../utils/model/mediaPlane.js";
37
- import N from "../../Components/Tag/index.js";
38
- import { BaseTag as B } from "./BaseTag.js";
30
+ import { CONST as _ } from "../../../shared-utils/constants.js";
31
+ import { CSS3DObjectPlus as O } from "../../../shared-utils/CSS3DRender/CSS3DObject.js";
32
+ import { anyPositionToVector3 as E, arrayPositionToVector3 as P } from "../../../shared-utils/positionToVector3.js";
33
+ import * as x from "three";
34
+ import { planeNormal as A } from "../../utils/planeNormal.js";
35
+ import { centerPoint as H } from "../../../shared-utils/three/centerPoint.js";
36
+ import { VideoPlane as G, ImagePlane as L } from "../../utils/model/mediaPlane.js";
37
+ import B from "../../Components/Tag/index.js";
38
+ import { BaseTag as N } from "./BaseTag.js";
39
39
  import "../../../shared-utils/tag.js";
40
40
  import "../../../vendor/hammerjs/hammer.js";
41
41
  import "../../../shared-utils/three/PointSelector/index.js";
42
42
  import "../../../shared-utils/three/CSS3DRenderer/index.js";
43
- import { initialCSS3DRender as H } from "../../../shared-utils/CSS3DRender/index.js";
43
+ import { initialCSS3DRender as $ } from "../../../shared-utils/CSS3DRender/index.js";
44
44
  import "@realsee/five/line";
45
45
  import "../../../shared-utils/three/core/Five_LineMaterial2.js";
46
46
  import "../../../shared-utils/three/core/Sphere.js";
@@ -48,11 +48,11 @@ import "../../../shared-utils/three/blink.js";
48
48
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
49
49
  import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
50
50
  import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
51
- import { waitFiveModelLoaded as x } from "../../../shared-utils/five/fiveModelLoad.js";
51
+ import { waitFiveModelLoaded as T } from "../../../shared-utils/five/fiveModelLoad.js";
52
52
  import "../../../vendor/earcut/src/earcut.js";
53
- import { uuid as $ } from "../../../shared-utils/uuid.js";
53
+ import { uuid as U } from "../../../shared-utils/uuid.js";
54
54
  import "../../../shared-utils/five/FivePuppet.js";
55
- import { Sculpt as U } from "../../../Sculpt/index.js";
55
+ import { Sculpt as R } from "../../../Sculpt/index.js";
56
56
  import { Rectangle as W } from "../../../Sculpt/Objects/Rectangle/index.js";
57
57
  import { getFloorMesh as q } from "../../../shared-utils/five/getFloorMesh.js";
58
58
  import "../../../shared-utils/even.js";
@@ -301,12 +301,12 @@ import "../../../Sculpt/Objects/Line/index.js";
301
301
  import "../../../Sculpt/Editors/RectangleMeshEditor.js";
302
302
  import "../../../Sculpt/utils/sortPositionsByCameraPosition.js";
303
303
  const Z = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map();
304
- class Yr extends B {
304
+ class Yr extends N {
305
305
  constructor(t, e) {
306
306
  super(t, e);
307
- y(this, "_floorIndex");
308
- y(this, "_floorIndexDirty", !0);
309
- y(this, "_opacity");
307
+ v(this, "_floorIndex");
308
+ v(this, "_floorIndexDirty", !0);
309
+ v(this, "_opacity");
310
310
  this.state.unfolded = !0, this.loadModel();
311
311
  }
312
312
  /** 获取透明度 */
@@ -327,73 +327,73 @@ class Yr extends B {
327
327
  this._floorIndexDirty = !0;
328
328
  }
329
329
  applyVisible() {
330
- var e, i, o, l, m, r;
331
- this.computeRenderType() === "Mesh" ? (this.initialSculpt(), ((i = (e = this.data.mediaData) == null ? void 0 : e[0]) == null ? void 0 : i.type) === "Video" ? this.renderVideoPlane() : ((l = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : l.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane()) : ((m = this.tag3DContentSvelte) == null || m.svelteApp.$set({ tag: this, state: this.plugin.state, temporaryState: this.plugin.temporaryState }), (r = this.tag3DContentSvelte) != null && r.css3DInstance && (this.tag3DContentSvelte.css3DInstance.visible = this.visible, this.five.needsRender = !0));
330
+ var e, i, o, l, p, r;
331
+ this.computeRenderType() === "Mesh" ? (this.initialSculpt(), ((i = (e = this.data.mediaData) == null ? void 0 : e[0]) == null ? void 0 : i.type) === "Video" ? this.renderVideoPlane() : ((l = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : l.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane()) : ((p = this.tag3DContentSvelte) == null || p.svelteApp.$set({ tag: this, state: this.plugin.state, temporaryState: this.plugin.temporaryState }), (r = this.tag3DContentSvelte) != null && r.css3DInstance && (this.tag3DContentSvelte.css3DInstance.visible = this.visible, this.five.needsRender = !0)), this.syncEditorAuxiliaryVisibility();
332
332
  }
333
333
  set(t, e = !0) {
334
- super.set(t, e), x(this.five).then(() => {
334
+ super.set(t, e), T(this.five).then(() => {
335
335
  this.tag3DContentSvelte && (t.data ? this.tag3DContentSvelte.svelteApp.$set({ tag: this, state: this.plugin.state, temporaryState: this.plugin.temporaryState }) : t.position && this.loadModel());
336
336
  });
337
337
  }
338
338
  setData(...t) {
339
- var i, o, l, m, r;
340
- super.setData(...t), this.computeRenderType() === "Mesh" ? (((o = (i = this.data.mediaData) == null ? void 0 : i[0]) == null ? void 0 : o.type) === "Video" ? this.renderVideoPlane() : ((m = (l = this.data.mediaData) == null ? void 0 : l[0]) == null ? void 0 : m.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane(), this.mediaPlane && (this.mediaPlane.opacity = this.opacity)) : (r = this.tag3DContentSvelte) == null || r.svelteApp.$set({ tag: this });
339
+ var i, o, l, p, r;
340
+ super.setData(...t), this.computeRenderType() === "Mesh" ? (((o = (i = this.data.mediaData) == null ? void 0 : i[0]) == null ? void 0 : o.type) === "Video" ? this.renderVideoPlane() : ((p = (l = this.data.mediaData) == null ? void 0 : l[0]) == null ? void 0 : p.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane(), this.mediaPlane && (this.mediaPlane.opacity = this.opacity)) : (r = this.tag3DContentSvelte) == null || r.svelteApp.$set({ tag: this });
341
341
  }
342
342
  /** 计算楼层索引 */
343
343
  computeFloorIndex() {
344
- var m, r;
344
+ var p, r;
345
345
  const t = /* @__PURE__ */ new Map();
346
- ((r = (m = this.five.works.getWork(this.workUtil.workCode)) == null ? void 0 : m.observers) != null ? r : []).forEach((n) => {
346
+ ((r = (p = this.five.works.getWork(this.workUtil.workCode)) == null ? void 0 : p.observers) != null ? r : []).forEach((a) => {
347
347
  var h;
348
- const s = (h = n.floorIndex) != null ? h : 0;
349
- if (!t.has(s)) {
350
- const u = q(this.five, s);
351
- u.isEmpty() || t.set(s, u);
348
+ const m = (h = a.floorIndex) != null ? h : 0;
349
+ if (!t.has(m)) {
350
+ const u = q(this.five, m);
351
+ u.isEmpty() || t.set(m, u);
352
352
  }
353
353
  });
354
- const i = G(...this.position.map(T)), o = [], l = [];
355
- if (t.forEach((n, s) => {
356
- l.push({ floorIndex: s, box: n }), n.containsPoint(i) && o.push({ floorIndex: s, box: n });
354
+ const i = H(...this.position.map(E)), o = [], l = [];
355
+ if (t.forEach((a, m) => {
356
+ l.push({ floorIndex: m, box: a }), a.containsPoint(i) && o.push({ floorIndex: m, box: a });
357
357
  }), o.length === 1)
358
358
  return o[0].floorIndex;
359
359
  if (o.length > 1) {
360
- let n = 1 / 0, s = o[0].floorIndex;
360
+ let a = 1 / 0, m = o[0].floorIndex;
361
361
  return o.forEach(({ floorIndex: h, box: u }) => {
362
- const p = new E.Vector3();
363
- u.getCenter(p);
364
- const a = i.distanceTo(p);
365
- a < n && (n = a, s = h);
366
- }), s;
362
+ const s = new x.Vector3();
363
+ u.getCenter(s);
364
+ const n = i.distanceTo(s);
365
+ n < a && (a = n, m = h);
366
+ }), m;
367
367
  }
368
368
  if (l.length > 0) {
369
- let n = 1 / 0, s = l[0].floorIndex;
369
+ let a = 1 / 0, m = l[0].floorIndex;
370
370
  return l.forEach(({ floorIndex: h, box: u }) => {
371
- const p = new E.Vector3();
372
- u.getCenter(p);
373
- const a = i.distanceTo(p);
374
- a < n && (n = a, s = h);
375
- }), s;
371
+ const s = new x.Vector3();
372
+ u.getCenter(s);
373
+ const n = i.distanceTo(s);
374
+ n < a && (a = n, m = h);
375
+ }), m;
376
376
  }
377
377
  }
378
378
  loadModel() {
379
379
  return C(this, null, function* () {
380
- var e, i, o, l, m, r;
381
- if (yield x(this.five), this.computeRenderType() === "Mesh")
380
+ var e, i, o, l, p, r;
381
+ if (yield T(this.five), this.computeRenderType() === "Mesh")
382
382
  this.initialSculpt(), ((i = (e = this.data.mediaData) == null ? void 0 : e[0]) == null ? void 0 : i.type) === "Video" ? this.renderVideoPlane() : ((l = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : l.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane();
383
383
  else {
384
- H(this.five);
385
- const n = this.position.map(T);
386
- (r = (m = this.tag3DContentSvelte) == null ? void 0 : m.dispose) == null || r.call(m);
387
- const s = document.createElement("div");
388
- s.classList.add("tag-media-container");
389
- const h = b({ mode: "front", cornerPoints: n, container: s }, this.config.tag3DConfig), u = this.computeRenderType() === "BehindDom" || h.mode === "behind" ? "behind" : "front", p = new _(S(b({}, h), { mode: u })), a = this.computeNormal();
390
- p.position.add(a.clone().setLength(M.Z_FIGHTING_OFFSET)), this.plugin.group.add(p);
391
- let v;
392
- p.mode === "behind" && this.config.clickable !== !1 && (v = this.addObjectClickHandler(this, p, (g) => {
384
+ $(this.five);
385
+ const a = this.position.map(E);
386
+ (r = (p = this.tag3DContentSvelte) == null ? void 0 : p.dispose) == null || r.call(p);
387
+ const m = document.createElement("div");
388
+ m.classList.add("tag-media-container");
389
+ const h = I({ mode: "front", cornerPoints: a, container: m }, this.config.tag3DConfig), u = this.computeRenderType() === "BehindDom" || h.mode === "behind" ? "behind" : "front", s = new O(S(I({}, h), { mode: u })), n = this.computeNormal();
390
+ s.position.add(n.clone().setLength(_.Z_FIGHTING_OFFSET)), this.plugin.group.add(s);
391
+ let y;
392
+ s.mode === "behind" && this.config.clickable !== !1 && (y = this.addObjectClickHandler(this, s, (g) => {
393
393
  this.plugin.hooks.emit("click", { event: g, target: "TagContent", tag: this });
394
394
  }));
395
- const f = new N({
396
- target: s,
395
+ const f = new B({
396
+ target: m,
397
397
  props: {
398
398
  tag: this,
399
399
  hooks: this.plugin.hooks,
@@ -406,13 +406,13 @@ class Yr extends B {
406
406
  this.tag3DContentSvelte = {
407
407
  svelteApp: f,
408
408
  domContainer: {
409
- css3DObject: p
409
+ css3DObject: s
410
410
  },
411
- css3DInstance: p,
412
- initialNormal: a,
413
- currentNormal: a,
411
+ css3DInstance: s,
412
+ initialNormal: n,
413
+ currentNormal: n,
414
414
  dispose: () => {
415
- f.$destroy(), p.dispose(), v == null || v();
415
+ f.$destroy(), s.dispose(), y == null || y();
416
416
  }
417
417
  }, this.five.needsRender = !0;
418
418
  }
@@ -421,11 +421,11 @@ class Yr extends B {
421
421
  initialSculpt() {
422
422
  if (this.rectanglePlane)
423
423
  return;
424
- const t = new U(this.five, void 0, {
424
+ const t = new R(this.five, void 0, {
425
425
  magnifier: null
426
426
  });
427
427
  t.clear(), t.group.removeFromParent();
428
- const e = $(), i = new W(
428
+ const e = U(), i = new W(
429
429
  {
430
430
  id: e,
431
431
  type: "Rectangle",
@@ -446,7 +446,7 @@ class Yr extends B {
446
446
  }), i.editor.disable();
447
447
  }
448
448
  editorEnable() {
449
- this.rectanglePlane || this.initialSculpt(), this.rectanglePlane.visible = !0, this.rectanglePlane.editor.enable();
449
+ this.rectanglePlane || this.initialSculpt(), this.rectanglePlane.visible = !0, this.rectanglePlane.editor.enable(), this.syncEditorAuxiliaryVisibility();
450
450
  }
451
451
  editorDisable(t) {
452
452
  var i;
@@ -456,21 +456,41 @@ class Yr extends B {
456
456
  points: e
457
457
  }), this.rectanglePlane.editor.disable();
458
458
  }
459
+ getRectangleHelper() {
460
+ var e, i;
461
+ const t = (e = this.rectanglePlane) == null ? void 0 : e.rectangleMesh;
462
+ if (t)
463
+ return (i = R.modules.object3DHelper.getObject3DHelper(t)) == null ? void 0 : i.helper;
464
+ }
465
+ /**
466
+ * 标签因为 visiblePanoIndex 等可见性规则被隐藏时,同时隐藏编辑辅助元素。
467
+ * 当标签重新可见且仍处于编辑态时,再恢复辅助元素显示。
468
+ */
469
+ syncEditorAuxiliaryVisibility() {
470
+ if (!this.rectanglePlane)
471
+ return;
472
+ const t = this.getRectangleHelper(), e = !!this.rectanglePlane.editor.parent;
473
+ if (!this.currentVisible || !e) {
474
+ this.rectanglePlane.visible = !1, t == null || t.hide(), this.five.needsRender = !0;
475
+ return;
476
+ }
477
+ this.rectanglePlane.visible = !0, t == null || t.show(), this.five.needsRender = !0;
478
+ }
459
479
  renderVideoPlane() {
460
- var s, h, u;
480
+ var m, h, u;
461
481
  const t = this.data.mediaData[0];
462
482
  if (!t)
463
483
  return;
464
484
  const { url: e } = t;
465
485
  if (!e)
466
486
  return;
467
- const i = (s = this.data.objectFit) != null ? s : "contain", o = this.currentVisible, l = (() => !!(this.mediaPlane && !o))(), m = (() => !!(!this.mediaPlane && o))(), r = (() => !!(this.mediaPlane && (this.mediaPlane.src !== e || this.mediaPlane.objectFit !== i)))();
487
+ const i = (m = this.data.objectFit) != null ? m : "contain", o = this.currentVisible, l = (() => !!(this.mediaPlane && !o))(), p = (() => !!(!this.mediaPlane && o))(), r = (() => !!(this.mediaPlane && (this.mediaPlane.src !== e || this.mediaPlane.objectFit !== i)))();
468
488
  (l || r) && this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0);
469
- const n = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== i))();
470
- if (m || r) {
471
- let p = this.position.map(P);
472
- this.rectanglePlane && (p = this.rectanglePlane.data.points.map(P));
473
- const a = new L(e, p, {
489
+ const a = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== i))();
490
+ if (p || r) {
491
+ let s = this.position.map(P);
492
+ this.rectanglePlane && (s = this.rectanglePlane.data.points.map(P));
493
+ const n = new G(e, s, {
474
494
  videoCoverSrc: t.videoCoverUrl,
475
495
  playButton: this.data.playIcon,
476
496
  paused: !((h = this.data.autoplayConfig) != null && h.autoplayVideo),
@@ -480,29 +500,29 @@ class Yr extends B {
480
500
  domEvents: this.plugin.domEvents,
481
501
  opacity: this.opacity
482
502
  });
483
- this.plugin.domEvents.addAutoBindEventListener(a, "click", (f) => {
503
+ this.plugin.domEvents.addAutoBindEventListener(n, "click", (f) => {
484
504
  var g, D;
485
- !((g = a.videoInstance) != null && g.paused) && ((D = a.videoInstance) == null ? void 0 : D.muted) === !1 && this.plugin.hooks.emit("playStateChange", {
505
+ !((g = n.videoInstance) != null && g.paused) && ((D = n.videoInstance) == null ? void 0 : D.muted) === !1 && this.plugin.hooks.emit("playStateChange", {
486
506
  event: f,
487
507
  state: "playing",
488
508
  tag: this,
489
- mediaInstance: a.videoInstance
509
+ mediaInstance: n.videoInstance
490
510
  });
491
- }), a.onVideoReady = (f) => {
511
+ }), n.onVideoReady = (f) => {
492
512
  f.addEventListener("play", (g) => {
493
- this.plugin.mediaStore.set({ currentMediaElement: a.videoInstance }), this.plugin.hooks.emit("playStateChange", { event: g, state: "playing", tag: this, mediaInstance: a.videoInstance });
513
+ this.plugin.mediaStore.set({ currentMediaElement: n.videoInstance }), this.plugin.hooks.emit("playStateChange", { event: g, state: "playing", tag: this, mediaInstance: n.videoInstance });
494
514
  }), f.addEventListener("pause", (g) => {
495
- this.plugin.hooks.emit("playStateChange", { event: g, state: "paused", tag: this, mediaInstance: a.videoInstance });
515
+ this.plugin.hooks.emit("playStateChange", { event: g, state: "paused", tag: this, mediaInstance: n.videoInstance });
496
516
  }), f.addEventListener("ended", (g) => {
497
- this.plugin.hooks.emit("playStateChange", { event: g, state: "paused", tag: this, mediaInstance: a.videoInstance });
517
+ this.plugin.hooks.emit("playStateChange", { event: g, state: "paused", tag: this, mediaInstance: n.videoInstance });
498
518
  });
499
519
  };
500
- const v = (f) => (this.five.on("renderFrame", f), () => this.five.off("renderFrame", f));
501
- a.initialRenderHooks(v), this.mediaPlane = a, this.play = () => a.play(), this.pause = () => a.pause(), this.plugin.imagePlaneGroup.add(this.mediaPlane);
520
+ const y = (f) => (this.five.on("renderFrame", f), () => this.five.off("renderFrame", f));
521
+ n.initialRenderHooks(y), this.mediaPlane = n, this.play = () => n.play(), this.pause = () => n.pause(), this.plugin.imagePlaneGroup.add(this.mediaPlane);
502
522
  }
503
- if (n) {
504
- const p = this.rectanglePlane.data.points.map(P);
505
- (u = this.mediaPlane) == null || u.changePointsOrParams({ cornerPoints: p, params: { objectFit: i } });
523
+ if (a) {
524
+ const s = this.rectanglePlane.data.points.map(P);
525
+ (u = this.mediaPlane) == null || u.changePointsOrParams({ cornerPoints: s, params: { objectFit: i } });
506
526
  }
507
527
  this.five.needsRender = !0;
508
528
  }
@@ -515,17 +535,17 @@ class Yr extends B {
515
535
  if (!i)
516
536
  return;
517
537
  let o = this.position.map(P);
518
- const l = this.currentVisible, m = (() => !!(this.mediaPlane && !l))(), r = (() => !!(!this.mediaPlane && l))(), n = (() => !!(this.mediaPlane && this.mediaPlane.src !== i))(), s = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== e))();
519
- if ((m || n) && this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0), (r || n) && (this.rectanglePlane && (o = this.rectanglePlane.data.points.map(P)), this.mediaPlane = new A(i, o, { objectFit: this.data.objectFit, opacity: this.opacity }), this.getConfig().clickable !== !1 && this.plugin.domEvents.addAutoBindEventListener(
538
+ const l = this.currentVisible, p = (() => !!(this.mediaPlane && !l))(), r = (() => !!(!this.mediaPlane && l))(), a = (() => !!(this.mediaPlane && this.mediaPlane.src !== i))(), m = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== e))();
539
+ if ((p || a) && this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0), (r || a) && (this.rectanglePlane && (o = this.rectanglePlane.data.points.map(P)), this.mediaPlane = new L(i, o, { objectFit: this.data.objectFit, opacity: this.opacity }), this.getConfig().clickable !== !1 && this.plugin.domEvents.addAutoBindEventListener(
520
540
  this.mediaPlane,
521
541
  "click",
522
- (p) => {
523
- this.plugin.hooks.emit("click", { tag: this, target: "TagContent", event: p.origDomEvent });
542
+ (s) => {
543
+ this.plugin.hooks.emit("click", { tag: this, target: "TagContent", event: s.origDomEvent });
524
544
  },
525
545
  { noEmitWhenHide: !0 }
526
- ), this.plugin.imagePlaneGroup.add(this.mediaPlane)), s) {
527
- const p = this.rectanglePlane.data.points.map(P);
528
- (u = this.mediaPlane) == null || u.changePointsOrParams({ cornerPoints: p, params: { objectFit: e } });
546
+ ), this.plugin.imagePlaneGroup.add(this.mediaPlane)), m) {
547
+ const s = this.rectanglePlane.data.points.map(P);
548
+ (u = this.mediaPlane) == null || u.changePointsOrParams({ cornerPoints: s, params: { objectFit: e } });
529
549
  }
530
550
  this.five.needsRender = !0;
531
551
  }
@@ -533,7 +553,7 @@ class Yr extends B {
533
553
  this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0);
534
554
  }
535
555
  computeNormal() {
536
- return O(this.position);
556
+ return A(this.position);
537
557
  }
538
558
  }
539
559
  export {
@@ -23,7 +23,7 @@ let I = class {
23
23
  /**
24
24
  * @realsee/dnalogel 版本号
25
25
  */
26
- r(this, "VERSION", "3.79.1");
26
+ r(this, "VERSION", "3.79.3");
27
27
  r(this, "NAME");
28
28
  r(this, "five");
29
29
  r(this, "workUtil");
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.79.1",
3
+ "%c %c@realsee/dnalogel %cv3.79.3",
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",
@@ -6,6 +6,7 @@ export declare class FragmentTransparencyMaterial extends THREE.ShaderMaterial {
6
6
  };
7
7
  };
8
8
  transparent: boolean;
9
+ depthWrite: boolean;
9
10
  blending: THREE.Blending;
10
11
  blendSrc: THREE.BlendingDstFactor;
11
12
  blendDst: THREE.BlendingDstFactor;
@@ -1,11 +1,12 @@
1
1
  var i = Object.defineProperty;
2
- var o = (n, a, e) => a in n ? i(n, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[a] = e;
3
- var r = (n, a, e) => (o(n, typeof a != "symbol" ? a + "" : a, e), e);
2
+ var o = (n, e, a) => e in n ? i(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a;
3
+ var r = (n, e, a) => (o(n, typeof e != "symbol" ? e + "" : e, a), a);
4
4
  import * as t from "three";
5
5
  class s extends t.ShaderMaterial {
6
- constructor(e) {
6
+ constructor(a) {
7
7
  super();
8
- r(this, "transparent", !1);
8
+ r(this, "transparent", !0);
9
+ r(this, "depthWrite", !1);
9
10
  r(this, "blending", t.CustomBlending);
10
11
  r(this, "blendSrc", t.SrcAlphaFactor);
11
12
  r(this, "blendDst", t.OneMinusSrcAlphaFactor);
@@ -37,7 +38,7 @@ class s extends t.ShaderMaterial {
37
38
  `
38
39
  );
39
40
  this.uniforms = {
40
- map: { value: e }
41
+ map: { value: a }
41
42
  };
42
43
  }
43
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.79.1",
3
+ "version": "3.79.3",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",