@realsee/dnalogel 3.73.3 → 3.73.5

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,41 +1,55 @@
1
- var _ = Object.defineProperty;
2
- var G = (p, l, e) => l in p ? _(p, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[l] = e;
3
- var r = (p, l, e) => (G(p, typeof l != "symbol" ? l + "" : l, e), e);
4
- var d = (p, l, e) => new Promise((t, s) => {
5
- var i = (o) => {
1
+ var G = Object.defineProperty;
2
+ var O = (M, l, e) => l in M ? G(M, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : M[l] = e;
3
+ var a = (M, l, e) => (O(M, typeof l != "symbol" ? l + "" : l, e), e);
4
+ var m = (M, l, e) => new Promise((t, i) => {
5
+ var s = (o) => {
6
6
  try {
7
7
  n(e.next(o));
8
- } catch (a) {
9
- s(a);
8
+ } catch (d) {
9
+ i(d);
10
10
  }
11
- }, h = (o) => {
11
+ }, r = (o) => {
12
12
  try {
13
13
  n(e.throw(o));
14
- } catch (a) {
15
- s(a);
14
+ } catch (d) {
15
+ i(d);
16
16
  }
17
- }, n = (o) => o.done ? t(o.value) : Promise.resolve(o.value).then(i, h);
18
- n((e = e.apply(p, l)).next());
17
+ }, n = (o) => o.done ? t(o.value) : Promise.resolve(o.value).then(s, r);
18
+ n((e = e.apply(M, l)).next());
19
19
  });
20
20
  import * as y from "three";
21
- import { Vector3 as T } from "three";
21
+ import { Vector3 as b } from "three";
22
22
  import { centerPoint as I } from "../../../shared-utils/three/centerPoint.js";
23
- import { loadPicture as E } from "../../../shared-utils/three/loadTexture.js";
24
- import { QuadrangleGeometry as F, QuadrangleMesh as x } from "../../../shared-utils/three/Quadrangle.js";
25
- import { getVideoTexture as j } from "../../../shared-utils/three/loadVideoTexture.js";
26
- import { Image_Play_Icon_With_Text as V, Image_Play_Icon as S } from "../../Assets/Icon.js";
27
- import { getPositionsByObjectFit as M } from "../../../shared-utils/three/getPositionsByObjectFit.js";
28
- import { FragmentTransparencyMaterial as B } from "../../../shared-utils/three/FragmentTransparencyMaterial.js";
23
+ import { loadPicture as H } from "../../../shared-utils/three/loadTexture.js";
24
+ import { QuadrangleGeometry as F, QuadrangleMesh as S } from "../../../shared-utils/three/Quadrangle.js";
25
+ import { getVideoTexture as V } from "../../../shared-utils/three/loadVideoTexture.js";
26
+ import { Image_Play_Icon_With_Text as B, Image_Play_Icon as E } from "../../Assets/Icon.js";
27
+ import { getPositionsByObjectFit as g } from "../../../shared-utils/three/getPositionsByObjectFit.js";
28
+ import { FragmentTransparencyMaterial as j } from "../../../shared-utils/three/FragmentTransparencyMaterial.js";
29
29
  import { getNormal as P } from "../../../shared-utils/three/getNormal.js";
30
- import { CONST as b } from "../../../shared-utils/constants.js";
30
+ import { CONST as T } from "../../../shared-utils/constants.js";
31
31
  import "../../../shared-utils/math/pointsIsRectangle.js";
32
32
  import "../../../shared-utils/device.js";
33
- class H extends y.Mesh {
33
+ class C extends y.Mesh {
34
34
  constructor() {
35
35
  super(...arguments);
36
- r(this, "name", "MediaPlane");
37
- r(this, "src");
38
- r(this, "objectFit");
36
+ a(this, "name", "MediaPlane");
37
+ a(this, "src");
38
+ a(this, "objectFit");
39
+ }
40
+ /** 获取透明度 */
41
+ get opacity() {
42
+ var e, t;
43
+ return (t = (e = this.material) == null ? void 0 : e.opacity) != null ? t : 1;
44
+ }
45
+ /** 设置透明度 (0-1) */
46
+ set opacity(e) {
47
+ this.material && (this.material.opacity = e, this.material.transparent = e < 1, this.material.needsUpdate = !0), this.traverse((t) => {
48
+ if (t.isMesh && t !== this) {
49
+ const i = t;
50
+ i.material && (i.material.opacity = e, i.material.transparent = e < 1, i.material.needsUpdate = !0);
51
+ }
52
+ });
39
53
  }
40
54
  removeFromParent() {
41
55
  const e = this.parent;
@@ -45,86 +59,93 @@ class H extends y.Mesh {
45
59
  this.traverse((e) => {
46
60
  if (e.isMesh) {
47
61
  const t = e;
48
- t.geometry.dispose(), (t.material instanceof Array ? t.material : [t.material]).forEach((i) => {
49
- i.dispose();
62
+ t.geometry.dispose(), (t.material instanceof Array ? t.material : [t.material]).forEach((s) => {
63
+ s.dispose();
50
64
  });
51
65
  }
52
66
  });
53
67
  }
54
68
  }
55
- class z extends H {
56
- constructor(e, t, s) {
57
- var n;
69
+ class J extends C {
70
+ constructor(e, t, i) {
71
+ var o, d;
58
72
  super();
59
- r(this, "name", "PanoTagPluginImagePlane");
60
- r(this, "originRatio");
73
+ a(this, "name", "PanoTagPluginImagePlane");
74
+ a(this, "originRatio");
61
75
  this.src = e;
62
- const i = (n = s == null ? void 0 : s.resolveZFighting) != null ? n : !0;
63
- let h = t;
64
- if (i) {
65
- const o = P(t).multiplyScalar(b.Z_FIGHTING_OFFSET);
66
- h = t.map((a) => a.clone().add(o));
76
+ const s = (o = i == null ? void 0 : i.resolveZFighting) != null ? o : !0, r = (d = i == null ? void 0 : i.opacity) != null ? d : 1;
77
+ let n = t;
78
+ if (s) {
79
+ const h = P(t).multiplyScalar(T.Z_FIGHTING_OFFSET);
80
+ n = t.map((c) => c.clone().add(h));
67
81
  }
68
- E(e).then(({ texture: o, transparent: a }) => {
69
- var g;
70
- const v = new y.MeshBasicMaterial({ map: o, transparent: a, side: y.DoubleSide });
71
- this.originRatio = o.image.width / o.image.height, this.objectFit = (g = s == null ? void 0 : s.objectFit) != null ? g : "contain";
72
- const c = M(this.objectFit, h, o.image.width / o.image.height), u = I(...c), m = c.map((w) => w.clone().sub(u)), f = new F(m);
73
- this.position.copy(u), this.geometry = f, this.material = v;
74
- }).catch((o) => {
75
- console.error(`Imageplane error: ${o == null ? void 0 : o.message}`);
82
+ H(e).then(({ texture: h, transparent: c }) => {
83
+ var x;
84
+ const v = new y.MeshBasicMaterial({
85
+ map: h,
86
+ transparent: c || r < 1,
87
+ opacity: r,
88
+ side: y.DoubleSide
89
+ });
90
+ this.originRatio = h.image.width / h.image.height, this.objectFit = (x = i == null ? void 0 : i.objectFit) != null ? x : "contain";
91
+ const u = g(this.objectFit, n, h.image.width / h.image.height), p = I(...u), f = u.map((_) => _.clone().sub(p)), w = new F(f);
92
+ this.position.copy(p), this.geometry = w, this.material = v;
93
+ }).catch((h) => {
94
+ console.error(`Imageplane error: ${h == null ? void 0 : h.message}`);
76
95
  });
77
96
  }
78
97
  changePointsOrParams(e) {
79
- const { cornerPoints: t, params: s = {} } = e, { objectFit: i = this.objectFit } = s;
80
- let h = t;
81
- const { resolveZFighting: n } = s != null ? s : {};
98
+ const { cornerPoints: t, params: i = {} } = e, { objectFit: s = this.objectFit } = i;
99
+ let r = t;
100
+ const { resolveZFighting: n } = i != null ? i : {};
82
101
  if (n) {
83
- const u = P(t).multiplyScalar(b.Z_FIGHTING_OFFSET);
84
- h = t.map((m) => m.clone().add(u));
102
+ const v = P(t).multiplyScalar(T.Z_FIGHTING_OFFSET);
103
+ r = t.map((u) => u.clone().add(v));
85
104
  }
86
- const o = M(i != null ? i : "contain", h, this.originRatio), a = I(...o), v = o.map((u) => u.clone().sub(a)), c = new F(v);
87
- this.objectFit = i != null ? i : "contain", this.position.copy(a), this.geometry = c;
105
+ const o = g(s != null ? s : "contain", r, this.originRatio), d = I(...o), h = o.map((v) => v.clone().sub(d)), c = new F(h);
106
+ this.objectFit = s != null ? s : "contain", this.position.copy(d), this.geometry = c;
88
107
  }
89
108
  }
90
- class J extends H {
109
+ class K extends C {
91
110
  // eslint-disable-next-line max-params
92
- constructor(e, t, s) {
111
+ constructor(e, t, i) {
93
112
  const {
94
- videoCoverSrc: i,
95
- objectFit: h = "contain",
113
+ videoCoverSrc: s,
114
+ objectFit: r = "contain",
96
115
  playButton: n = "withText",
97
116
  paused: o = !0,
98
- videoTextureMap: a,
99
- ImageTextureMap: v,
100
- domEvents: c
101
- } = s != null ? s : {};
117
+ videoTextureMap: d,
118
+ ImageTextureMap: h,
119
+ domEvents: c,
120
+ opacity: v = 1
121
+ } = i != null ? i : {};
102
122
  super();
103
- r(this, "isVideoPlane", !0);
104
- r(this, "name", "PanoTagPluginImagePlane");
105
- r(this, "videoInstance");
106
- r(this, "onVideoReady");
107
- r(this, "buttonSrc");
108
- r(this, "videoCoverSrc");
109
- r(this, "domEvents");
110
- r(this, "disposers", []);
111
- r(this, "cornerPoints");
112
- r(this, "videoMesh");
113
- r(this, "coverMesh");
114
- r(this, "buttonMesh");
115
- r(this, "videoTextureMap");
116
- r(this, "ImageTextureMap");
117
- this.cornerPoints = t, this.src = e, this.buttonSrc = (() => n === "withText" ? V : n === "withoutText" ? S : typeof n == "string" ? n : S)(), this.videoCoverSrc = i, this.objectFit = h, this.videoTextureMap = a, this.ImageTextureMap = v, this.domEvents = c, this.position.copy(I(...t)), this.videoCoverSrc && o ? this.addCoverMesh().then(() => this.addButtonMesh()) : this.addVideoMesh().then(() => {
123
+ a(this, "isVideoPlane", !0);
124
+ a(this, "name", "PanoTagPluginImagePlane");
125
+ a(this, "videoInstance");
126
+ a(this, "onVideoReady");
127
+ a(this, "buttonSrc");
128
+ a(this, "videoCoverSrc");
129
+ a(this, "domEvents");
130
+ a(this, "disposers", []);
131
+ a(this, "cornerPoints");
132
+ a(this, "videoMesh");
133
+ a(this, "coverMesh");
134
+ a(this, "buttonMesh");
135
+ a(this, "videoTextureMap");
136
+ a(this, "ImageTextureMap");
137
+ a(this, "initialOpacity");
138
+ this.cornerPoints = t, this.src = e, this.initialOpacity = v, this.buttonSrc = (() => n === "withText" ? B : n === "withoutText" ? E : typeof n == "string" ? n : E)(), this.videoCoverSrc = s, this.objectFit = r, this.videoTextureMap = d, this.ImageTextureMap = h, this.domEvents = c, this.position.copy(I(...t)), this.videoCoverSrc && o ? this.addCoverMesh().then(() => this.addButtonMesh()) : this.addVideoMesh().then(() => {
118
139
  o ? this.addButtonMesh() : this.play(!0);
119
140
  }), this.addEventListener("removed", () => {
120
141
  this.remove(...this.children);
121
142
  }), this.addEventListener("dispose", () => {
122
143
  var u;
123
- (u = this.disposers) == null || u.forEach((m) => m == null ? void 0 : m());
144
+ (u = this.disposers) == null || u.forEach((p) => p == null ? void 0 : p());
124
145
  });
125
146
  }
126
147
  play(e = !1) {
127
- return d(this, null, function* () {
148
+ return m(this, null, function* () {
128
149
  this.videoMesh || (yield this.addVideoMesh()), this.showPlayUI(), this.videoInstance.paused && this.videoInstance.play().then(() => this.showPlayUI()).catch((t) => {
129
150
  this.pause(), console.error("play error", t);
130
151
  }), this.videoInstance.muted = e, this.render();
@@ -134,17 +155,17 @@ class J extends H {
134
155
  this.videoInstance && (this.videoInstance.pause(), this.showPauseUI().then(() => this.render()));
135
156
  }
136
157
  initialRenderHooks(e) {
137
- const s = e(() => {
138
- var i;
139
- this.videoMesh && ((i = this.videoInstance) == null ? void 0 : i.paused) === !1 && (this.videoMesh.needsRender = !0);
158
+ const i = e(() => {
159
+ var s;
160
+ this.videoMesh && ((s = this.videoInstance) == null ? void 0 : s.paused) === !1 && (this.videoMesh.needsRender = !0);
140
161
  });
141
- this.disposers.push(() => s);
162
+ this.disposers.push(() => i);
142
163
  }
143
164
  showPlayUI() {
144
165
  this.coverMesh && (this.coverMesh.visible = !1), this.remove(this.buttonMesh), this.videoMesh.visible = !0;
145
166
  }
146
167
  showPauseUI() {
147
- return d(this, null, function* () {
168
+ return m(this, null, function* () {
148
169
  this.coverMesh ? (this.coverMesh.visible = !0, this.videoMesh && (this.videoMesh.visible = !1)) : (yield this.addCoverMesh(), this.coverMesh && (this.videoMesh.visible = !1)), this.addButtonMesh().then(() => this.render());
149
170
  });
150
171
  }
@@ -153,41 +174,51 @@ class J extends H {
153
174
  this.videoMesh && (this.videoMesh.needsRender = !0), this.coverMesh && (this.coverMesh.needsRender = !0), this.buttonMesh && (this.buttonMesh.needsRender = !0), this.videoMesh && ((e = this.videoInstance) == null ? void 0 : e.paused) === !1 && (this.videoMesh.needsRender = !0);
154
175
  }
155
176
  addCoverMesh() {
156
- return d(this, null, function* () {
177
+ return m(this, null, function* () {
157
178
  if (this.children.includes(this.coverMesh))
158
179
  return;
159
- const e = yield (() => d(this, null, function* () {
180
+ const e = yield (() => m(this, null, function* () {
160
181
  if (this.coverMesh)
161
182
  return this.coverMesh;
162
183
  if (!this.videoCoverSrc)
163
184
  return;
164
- const { texture: t, transparent: s } = yield this.getImageTexture(this.videoCoverSrc), i = new y.MeshBasicMaterial({ transparent: !1, map: t, side: y.DoubleSide }), h = M(this.objectFit, this.cornerPoints, t.image.width / t.image.height), n = new x(h, i);
165
- n.position.copy(new T(0, 0, 0)), n.name = "videoCoverMesh";
166
- const o = P(h).multiplyScalar(b.Z_FIGHTING_OFFSET);
185
+ const { texture: t, transparent: i } = yield this.getImageTexture(this.videoCoverSrc), s = new y.MeshBasicMaterial({
186
+ transparent: i || this.initialOpacity < 1,
187
+ opacity: this.initialOpacity,
188
+ map: t,
189
+ side: y.DoubleSide
190
+ }), r = g(this.objectFit, this.cornerPoints, t.image.width / t.image.height), n = new S(r, s);
191
+ n.position.copy(new b(0, 0, 0)), n.name = "videoCoverMesh";
192
+ const o = P(r).multiplyScalar(T.Z_FIGHTING_OFFSET);
167
193
  return n.position.add(o), n;
168
194
  }))();
169
195
  return e && (this.children.includes(this.coverMesh) || (this.add(e), this.coverMesh = e)), e;
170
196
  });
171
197
  }
172
198
  addVideoMesh() {
173
- return d(this, null, function* () {
174
- var s;
199
+ return m(this, null, function* () {
200
+ var i;
175
201
  if (this.children.includes(this.videoMesh))
176
202
  return;
177
- const e = yield (() => d(this, null, function* () {
203
+ const e = yield (() => m(this, null, function* () {
178
204
  if (this.videoMesh)
179
205
  return this.videoMesh;
180
206
  if (!this.src)
181
207
  return;
182
- const i = this.getVideoTexture(this.src), h = new y.MeshBasicMaterial({ transparent: !1, map: i, side: y.DoubleSide }), n = yield new Promise((v) => {
183
- i.metadataLoaded ? v(M(this.objectFit, this.cornerPoints, i.image.videoWidth / i.image.videoHeight)) : i.addEventListener(
208
+ const s = this.getVideoTexture(this.src), r = new y.MeshBasicMaterial({
209
+ transparent: this.initialOpacity < 1,
210
+ opacity: this.initialOpacity,
211
+ map: s,
212
+ side: y.DoubleSide
213
+ }), n = yield new Promise((h) => {
214
+ s.metadataLoaded ? h(g(this.objectFit, this.cornerPoints, s.image.videoWidth / s.image.videoHeight)) : s.addEventListener(
184
215
  "videoLoaded",
185
- () => v(M(this.objectFit, this.cornerPoints, i.image.videoWidth / i.image.videoHeight))
216
+ () => h(g(this.objectFit, this.cornerPoints, s.image.videoWidth / s.image.videoHeight))
186
217
  );
187
- }), o = new x(n, h);
188
- o.name = "videoMesh", o.position.copy(new T(0, 0, 0));
189
- const a = P(n).multiplyScalar(b.Z_FIGHTING_OFFSET);
190
- return o.position.add(a), o;
218
+ }), o = new S(n, r);
219
+ o.name = "videoMesh", o.position.copy(new b(0, 0, 0));
220
+ const d = P(n).multiplyScalar(T.Z_FIGHTING_OFFSET);
221
+ return o.position.add(d), o;
191
222
  }))();
192
223
  if (!e)
193
224
  return;
@@ -195,13 +226,13 @@ class J extends H {
195
226
  e,
196
227
  "click",
197
228
  () => {
198
- var i;
199
- !this.videoInstance.paused && ((i = this.videoInstance) != null && i.muted) ? this.videoInstance.muted = !1 : this.pause();
229
+ var s;
230
+ !this.videoInstance.paused && ((s = this.videoInstance) != null && s.muted) ? this.videoInstance.muted = !1 : this.pause();
200
231
  },
201
232
  { noEmitWhenHide: !0 }
202
233
  );
203
234
  const t = e.material.map.image;
204
- return (s = this.onVideoReady) == null || s.call(this, t), t.addEventListener("playing", () => {
235
+ return (i = this.onVideoReady) == null || i.call(this, t), t.addEventListener("playing", () => {
205
236
  this.coverMesh || this.remove(this.buttonMesh), this.render();
206
237
  }), t.addEventListener("pause", () => {
207
238
  this.videoInstance.paused && (this.showPauseUI(), this.render());
@@ -209,15 +240,15 @@ class J extends H {
209
240
  });
210
241
  }
211
242
  addButtonMesh() {
212
- return d(this, null, function* () {
243
+ return m(this, null, function* () {
213
244
  if (this.children.includes(this.buttonMesh))
214
245
  return;
215
- const e = yield (() => d(this, null, function* () {
216
- var m, f, g, w;
246
+ const e = yield (() => m(this, null, function* () {
247
+ var u, p, f, w;
217
248
  if (this.buttonMesh)
218
249
  return this.buttonMesh;
219
- const t = (f = (m = this.videoMesh) == null ? void 0 : m.geometry.points[0].distanceTo(this.videoMesh.geometry.points[3])) != null ? f : 1 / 0, s = (w = (g = this.coverMesh) == null ? void 0 : g.geometry.points[0].distanceTo(this.coverMesh.geometry.points[3])) != null ? w : 1 / 0, i = this.cornerPoints[0].distanceTo(this.cornerPoints[3]), n = Math.min(t, s, i) / i * 0.3, { texture: o, transparent: a } = yield this.getImageTexture(this.buttonSrc), v = M("contain", this.cornerPoints, o.image.width / o.image.height), c = new x(v, new B(o));
220
- c.position.copy(new T(0, 0, 0)), c.name = "buttonMesh", c.scale.set(n, n, n), c.material.side = y.DoubleSide, this.domEvents.addAutoBindEventListener(
250
+ const t = (p = (u = this.videoMesh) == null ? void 0 : u.geometry.points[0].distanceTo(this.videoMesh.geometry.points[3])) != null ? p : 1 / 0, i = (w = (f = this.coverMesh) == null ? void 0 : f.geometry.points[0].distanceTo(this.coverMesh.geometry.points[3])) != null ? w : 1 / 0, s = this.cornerPoints[0].distanceTo(this.cornerPoints[3]), n = Math.min(t, i, s) / s * 0.3, { texture: o, transparent: d } = yield this.getImageTexture(this.buttonSrc), h = g("contain", this.cornerPoints, o.image.width / o.image.height), c = new S(h, new j(o));
251
+ c.position.copy(new b(0, 0, 0)), c.name = "buttonMesh", c.scale.set(n, n, n), c.material.side = y.DoubleSide, this.domEvents.addAutoBindEventListener(
221
252
  c,
222
253
  "click",
223
254
  () => {
@@ -225,75 +256,75 @@ class J extends H {
225
256
  },
226
257
  { noEmitWhenHide: !0 }
227
258
  );
228
- const u = P(v).multiplyScalar(b.Z_FIGHTING_OFFSET * 2);
229
- return c.position.add(u), c;
259
+ const v = P(h).multiplyScalar(T.Z_FIGHTING_OFFSET * 2);
260
+ return c.position.add(v), c;
230
261
  }))();
231
262
  return this.children.includes(this.buttonMesh) || (this.add(e), this.buttonMesh = e), e;
232
263
  });
233
264
  }
234
265
  getImageTexture(e) {
235
- return d(this, null, function* () {
236
- var s, i;
237
- if ((s = this.ImageTextureMap) != null && s.has(e))
266
+ return m(this, null, function* () {
267
+ var i, s;
268
+ if ((i = this.ImageTextureMap) != null && i.has(e))
238
269
  return this.ImageTextureMap.get(e);
239
- const t = yield E(e);
240
- return (i = this.ImageTextureMap) == null || i.set(e, t), t;
270
+ const t = yield H(e);
271
+ return (s = this.ImageTextureMap) == null || s.set(e, t), t;
241
272
  });
242
273
  }
243
274
  getVideoTexture(e) {
244
- var s, i;
245
- if ((s = this.videoTextureMap) != null && s.has(e))
275
+ var i, s;
276
+ if ((i = this.videoTextureMap) != null && i.has(e))
246
277
  return this.videoTextureMap.get(e);
247
- const t = j(e);
248
- return (i = this.videoTextureMap) == null || i.set(e, t), t;
278
+ const t = V(e);
279
+ return (s = this.videoTextureMap) == null || s.set(e, t), t;
249
280
  }
250
281
  changePointsOrParams(e) {
251
- return d(this, null, function* () {
252
- const { cornerPoints: t, params: s } = e;
253
- t && (this.cornerPoints = t, this.position.copy(I(...t))), s != null && s.objectFit && (this.objectFit = s.objectFit), yield this.updateAllMeshes();
282
+ return m(this, null, function* () {
283
+ const { cornerPoints: t, params: i } = e;
284
+ t && (this.cornerPoints = t, this.position.copy(I(...t))), i != null && i.objectFit && (this.objectFit = i.objectFit), yield this.updateAllMeshes();
254
285
  });
255
286
  }
256
287
  updateAllMeshes() {
257
- return d(this, null, function* () {
288
+ return m(this, null, function* () {
258
289
  this.videoMesh && (yield this.updateVideoMesh()), this.coverMesh && (yield this.updateCoverMesh()), this.buttonMesh && (yield this.updateButtonMesh()), this.render();
259
290
  });
260
291
  }
261
292
  updateVideoMesh() {
262
- return d(this, null, function* () {
293
+ return m(this, null, function* () {
263
294
  if (!this.videoMesh || !this.src)
264
295
  return;
265
296
  const e = this.getVideoTexture(this.src), t = yield new Promise((o) => {
266
- e.metadataLoaded ? o(M(this.objectFit, this.cornerPoints, e.image.videoWidth / e.image.videoHeight)) : e.addEventListener(
297
+ e.metadataLoaded ? o(g(this.objectFit, this.cornerPoints, e.image.videoWidth / e.image.videoHeight)) : e.addEventListener(
267
298
  "videoLoaded",
268
- () => o(M(this.objectFit, this.cornerPoints, e.image.videoWidth / e.image.videoHeight))
299
+ () => o(g(this.objectFit, this.cornerPoints, e.image.videoWidth / e.image.videoHeight))
269
300
  );
270
- }), s = I(...t), i = t.map((o) => o.clone().sub(s)), h = new F(i);
271
- this.videoMesh.geometry.dispose(), this.videoMesh.geometry = h, this.videoMesh.position.copy(new T(0, 0, 0));
272
- const n = P(t).multiplyScalar(b.Z_FIGHTING_OFFSET);
301
+ }), i = I(...t), s = t.map((o) => o.clone().sub(i)), r = new F(s);
302
+ this.videoMesh.geometry.dispose(), this.videoMesh.geometry = r, this.videoMesh.position.copy(new b(0, 0, 0));
303
+ const n = P(t).multiplyScalar(T.Z_FIGHTING_OFFSET);
273
304
  this.videoMesh.position.add(n);
274
305
  });
275
306
  }
276
307
  updateCoverMesh() {
277
- return d(this, null, function* () {
308
+ return m(this, null, function* () {
278
309
  if (!this.coverMesh || !this.videoCoverSrc)
279
310
  return;
280
- const { texture: e } = yield this.getImageTexture(this.videoCoverSrc), t = M(this.objectFit, this.cornerPoints, e.image.width / e.image.height), s = I(...t), i = t.map((n) => n.clone().sub(s)), h = new F(i);
281
- this.coverMesh.geometry.dispose(), this.coverMesh.geometry = h, this.coverMesh.position.copy(new T(0, 0, 0));
311
+ const { texture: e } = yield this.getImageTexture(this.videoCoverSrc), t = g(this.objectFit, this.cornerPoints, e.image.width / e.image.height), i = I(...t), s = t.map((n) => n.clone().sub(i)), r = new F(s);
312
+ this.coverMesh.geometry.dispose(), this.coverMesh.geometry = r, this.coverMesh.position.copy(new b(0, 0, 0));
282
313
  });
283
314
  }
284
315
  updateButtonMesh() {
285
- return d(this, null, function* () {
286
- var m, f, g, w;
316
+ return m(this, null, function* () {
317
+ var u, p, f, w;
287
318
  if (!this.buttonMesh)
288
319
  return;
289
- const { texture: e } = yield this.getImageTexture(this.buttonSrc), t = M("contain", this.cornerPoints, e.image.width / e.image.height), s = I(...t), i = t.map((C) => C.clone().sub(s)), h = new F(i), n = (f = (m = this.videoMesh) == null ? void 0 : m.geometry.points[0].distanceTo(this.videoMesh.geometry.points[3])) != null ? f : 1 / 0, o = (w = (g = this.coverMesh) == null ? void 0 : g.geometry.points[0].distanceTo(this.coverMesh.geometry.points[3])) != null ? w : 1 / 0, a = this.cornerPoints[0].distanceTo(this.cornerPoints[3]), c = Math.min(n, o, a) / a * 0.3;
290
- this.buttonMesh.geometry.dispose(), this.buttonMesh.geometry = h, this.buttonMesh.position.copy(new T(0, 0, 0)), this.buttonMesh.scale.set(c, c, c);
291
- const u = P(t).multiplyScalar(b.Z_FIGHTING_OFFSET * 2);
292
- this.buttonMesh.position.add(u);
320
+ const { texture: e } = yield this.getImageTexture(this.buttonSrc), t = g("contain", this.cornerPoints, e.image.width / e.image.height), i = I(...t), s = t.map((x) => x.clone().sub(i)), r = new F(s), n = (p = (u = this.videoMesh) == null ? void 0 : u.geometry.points[0].distanceTo(this.videoMesh.geometry.points[3])) != null ? p : 1 / 0, o = (w = (f = this.coverMesh) == null ? void 0 : f.geometry.points[0].distanceTo(this.coverMesh.geometry.points[3])) != null ? w : 1 / 0, d = this.cornerPoints[0].distanceTo(this.cornerPoints[3]), c = Math.min(n, o, d) / d * 0.3;
321
+ this.buttonMesh.geometry.dispose(), this.buttonMesh.geometry = r, this.buttonMesh.position.copy(new b(0, 0, 0)), this.buttonMesh.scale.set(c, c, c);
322
+ const v = P(t).multiplyScalar(T.Z_FIGHTING_OFFSET * 2);
323
+ this.buttonMesh.position.add(v);
293
324
  });
294
325
  }
295
326
  }
296
327
  export {
297
- z as ImagePlane,
298
- J as VideoPlane
328
+ J as ImagePlane,
329
+ K as VideoPlane
299
330
  };
@@ -23,7 +23,7 @@ let I = class {
23
23
  /**
24
24
  * @realsee/dnalogel 版本号
25
25
  */
26
- r(this, "VERSION", "3.73.3");
26
+ r(this, "VERSION", "3.73.5");
27
27
  r(this, "NAME");
28
28
  r(this, "five");
29
29
  r(this, "workUtil");