@realsee/dnalogel 3.41.0 → 3.41.1

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,30 +1,30 @@
1
1
  import * as r from "three";
2
2
  import { Vector3 as ot } from "three";
3
- import { polylineNormals as at } from "../../vendor/polyline-normals/index.js";
4
- import { lineIsIntersecting as lt, findIntersectingOfLines as ut } from "../../shared-utils/math/intersecting.js";
3
+ import { polylineNormals as lt } from "../../vendor/polyline-normals/index.js";
4
+ import { lineIsIntersecting as ut, findIntersectingOfLines as ft } from "../../shared-utils/math/intersecting.js";
5
5
  import "../../vendor/polyline-miter-util/index.js";
6
6
  import "../../vendor/gl-vec2/add.js";
7
7
  import "../../vendor/gl-vec2/set.js";
8
8
  import "../../vendor/gl-vec2/normalize.js";
9
9
  import "../../vendor/gl-vec2/subtract.js";
10
10
  import "../../vendor/gl-vec2/dot.js";
11
- const ft = 2, ht = 3, mt = 3, pt = 2;
12
- function Lt(i) {
13
- const O = i.width, N = i.unitLength, b = O / 2, F = i.path;
14
- if (F.length === 0)
11
+ const ht = 2, mt = 3, pt = 3, dt = 2;
12
+ function Vt(i) {
13
+ const O = i.width, N = i.unitLength, b = O / 2, G = i.path;
14
+ if (G.length === 0)
15
15
  return { geometry: new r.BufferGeometry(), maxV: 0, curvePath: null, curvePoints: null };
16
- const P = new r.CurvePath();
17
- F.forEach((t) => {
18
- const n = dt(t);
19
- n && P.add(n);
16
+ const A = new r.CurvePath();
17
+ G.forEach((t) => {
18
+ const n = xt(t);
19
+ n && A.add(n);
20
20
  });
21
- const q = Math.ceil(P.getLength() * 100);
22
- P.arcLengthDivisions = q;
23
- const I = P.getPoints(q), d = I.length;
21
+ const q = Math.ceil(A.getLength() * 100);
22
+ A.arcLengthDivisions = q;
23
+ const P = A.getPoints(q), d = P.length;
24
24
  if (d <= 2)
25
25
  return { geometry: new r.BufferGeometry(), maxV: 0, curvePath: null, curvePoints: null };
26
- const st = at(I.map((t) => [t.x, t.z])), ct = (d - 1) * ft * ht, j = 2 * d, it = j * mt, rt = j * pt, y = new Uint32Array(ct), e = new Float32Array(it), T = new Float32Array(rt), J = P.getLength();
27
- let R = 0, K = 0, Q = {};
26
+ const st = lt(P.map((t) => [t.x, t.z])), ct = (d - 1) * ht * mt, j = 2 * d, it = j * pt, rt = j * dt, v = new Uint32Array(ct), e = new Float32Array(it), T = new Float32Array(rt), J = A.getLength();
27
+ let I = 0, K = 0, Q = {};
28
28
  const k = i.path[0].points.map((t) => new r.Vector3().fromArray(t)), W = i.path[0].panoIndexList ? [...i.path[0].panoIndexList] : void 0, tt = (() => {
29
29
  const t = [];
30
30
  for (let s = 0; s < k.length; s++) {
@@ -32,45 +32,45 @@ function Lt(i) {
32
32
  if (s === 0)
33
33
  t.push(0);
34
34
  else {
35
- const f = k[s - 1];
36
- t.push(u.distanceTo(f) + t[s - 1]);
35
+ const h = k[s - 1];
36
+ t.push(u.distanceTo(h) + t[s - 1]);
37
37
  }
38
38
  }
39
39
  const n = t.at(-1), p = [];
40
40
  for (let s = 0; s < t.length; s++) {
41
- const u = t[s], f = s === 0 ? 0 : t[s - 1], E = s === t.length - 1 ? n : t[s + 1], a = u - Math.min(0.3, (u - f) / 2), l = u + Math.min(0.3, (E - u) / 2);
41
+ const u = t[s], h = s === 0 ? 0 : t[s - 1], y = s === t.length - 1 ? n : t[s + 1], a = u - Math.min(0.3, (u - h) / 2), l = u + Math.min(0.3, (y - u) / 2);
42
42
  p.push([J * (a / n), J * (l / n)]);
43
43
  }
44
44
  return p;
45
45
  })();
46
- let G = [];
46
+ let S = [];
47
47
  for (let t = 0; t < d; t++) {
48
- const [n, p] = st[t][0], s = I[t], { x: u, y: f, z: E } = s, a = new ot(u + n * b, f + 0.05, E + p * b);
48
+ const [n, p] = st[t][0], s = P[t], { x: u, y: h, z: y } = s, a = new ot(u + n * b, h + 0.05, y + p * b);
49
49
  e[t * 6 + 0] = a.x, e[t * 6 + 1] = a.y, e[t * 6 + 2] = a.z;
50
- const l = new ot(u - n * b, f + 0.05, E - p * b);
51
- e[t * 6 + 3] = l.x, e[t * 6 + 4] = l.y, e[t * 6 + 5] = l.z, R += t > 0 ? I[t - 1].clone().sub(I[t]).length() : 0;
52
- const w = R / N;
53
- K = w, T[t * 4 + 0] = 0, T[t * 4 + 1] = w, T[t * 4 + 2] = 1, T[t * 4 + 3] = w;
50
+ const l = new ot(u - n * b, h + 0.05, y - p * b);
51
+ e[t * 6 + 3] = l.x, e[t * 6 + 4] = l.y, e[t * 6 + 5] = l.z, I += t > 0 ? P[t - 1].clone().sub(P[t]).length() : 0;
52
+ const R = I / N;
53
+ K = R, T[t * 4 + 0] = 0, T[t * 4 + 1] = R, T[t * 4 + 2] = 1, T[t * 4 + 3] = R;
54
54
  const _ = new r.Vector3().lerpVectors(a, l, 0.5);
55
- if (i.skipPositions && i.skipPositions.some((L) => L.distanceTo(_) < 0.26))
55
+ if (i.skipPositions && i.skipPositions.some((C) => C.distanceTo(_) < 0.26))
56
56
  continue;
57
- const h = k[0];
58
- if (i.useAutoDepthTest && h && W) {
59
- const C = W[0], [L, g] = tt[0];
60
- if (R > L && R < g && G.push({
61
- distance: h.distanceTo(_),
57
+ const L = k[0];
58
+ if (i.useAutoDepthTest && L && W) {
59
+ const f = W[0], [C, M] = tt[0];
60
+ if (I > C && I < M && S.push({
61
+ distance: L.distanceTo(_),
62
62
  index: t
63
- }), R >= g || t === d - 1) {
64
- const U = Math.min(...G.map((M) => M.distance)), c = G.find((M) => M.distance === U);
65
- if (G = [], k.shift(), W.shift(), tt.shift(), c)
66
- Q[C] = c.index;
63
+ }), I >= M || t === d - 1) {
64
+ const E = Math.min(...S.map((c) => c.distance)), D = S.find((c) => c.distance === E);
65
+ if (S = [], k.shift(), W.shift(), tt.shift(), D)
66
+ Q[f] = D.index;
67
67
  else {
68
- console.error(`can not find the min distance ${C}`);
68
+ console.error(`can not find the min distance ${f}`);
69
69
  continue;
70
70
  }
71
71
  }
72
72
  }
73
- t !== d - 1 && (y[t * 6 + 0] = t * 2 + 0, y[t * 6 + 1] = t * 2 + 2, y[t * 6 + 2] = t * 2 + 1, y[t * 6 + 3] = t * 2 + 2, y[t * 6 + 4] = t * 2 + 3, y[t * 6 + 5] = t * 2 + 1);
73
+ t !== d - 1 && (v[t * 6 + 0] = t * 2 + 0, v[t * 6 + 1] = t * 2 + 2, v[t * 6 + 2] = t * 2 + 1, v[t * 6 + 3] = t * 2 + 2, v[t * 6 + 4] = t * 2 + 3, v[t * 6 + 5] = t * 2 + 1);
74
74
  }
75
75
  const x = [];
76
76
  let H;
@@ -87,43 +87,43 @@ function Lt(i) {
87
87
  }, u = {
88
88
  x: e[n * 6 + 0],
89
89
  y: e[n * 6 + 2]
90
- }, f = {
90
+ }, h = {
91
91
  x: e[n * 6 + 3],
92
92
  y: e[n * 6 + 5]
93
- }, E = lt([p, s], [u, f]);
94
- if (E && x.push(t), !E && x.length) {
93
+ }, y = ut([p, s], [u, h]);
94
+ if (y && x.push(t), !y && x.length) {
95
95
  x.push(t);
96
- const a = new r.Vector2(p.x, p.y).distanceTo(new r.Vector2(u.x, u.y)), l = new r.Vector2(s.x, s.y).distanceTo(new r.Vector2(f.x, f.y)), w = [], _ = [], h = Math.max(0, x[0] - N * 200), C = x[0];
97
- for (let c = h; c < C; c++)
98
- a < l ? w.push({ x: e[c * 6 + 0], y: e[c * 6 + 2] }) : w.push({ x: e[c * 6 + 3], y: e[c * 6 + 5] });
99
- const L = x.at(-1), g = x.at(-1) + N * 200;
100
- for (let c = L; c < g; c++)
96
+ const a = new r.Vector2(p.x, p.y).distanceTo(new r.Vector2(u.x, u.y)), l = new r.Vector2(s.x, s.y).distanceTo(new r.Vector2(h.x, h.y)), R = 200, _ = [], L = [], f = Math.max(0, x[0] - N * R), C = x[0];
97
+ for (let c = f; c < C; c++)
101
98
  a < l ? _.push({ x: e[c * 6 + 0], y: e[c * 6 + 2] }) : _.push({ x: e[c * 6 + 3], y: e[c * 6 + 5] });
102
- const U = ut(w, _);
103
- if (U) {
99
+ const M = x.at(-1), E = x.at(-1) + N * R;
100
+ for (let c = M; c < E; c++)
101
+ a < l ? L.push({ x: e[c * 6 + 0], y: e[c * 6 + 2] }) : L.push({ x: e[c * 6 + 3], y: e[c * 6 + 5] });
102
+ const D = ft(_, L);
103
+ if (D) {
104
104
  const {
105
105
  line1RelativeIndex: c,
106
- line2RelativeIndex: M,
106
+ line2RelativeIndex: at,
107
107
  x: et,
108
108
  y: nt
109
- } = U, A = h + c, v = L + M + 2;
110
- for (let o = A; o < v; o++)
109
+ } = D, w = f + c, g = M + at + 2;
110
+ for (let o = w; o < g; o++)
111
111
  a < l ? (e[o * 6 + 0] = et, e[o * 6 + 2] = nt) : (e[o * 6 + 3] = et, e[o * 6 + 5] = nt), H = o;
112
112
  let V, Y, X, z, m;
113
- a < l ? (V = e[h * 6 + 1], Y = e[A * 6 + 1], X = e[v * 6 + 1], z = e[g * 6 + 1], m = (Y + X) / 2) : (V = e[h * 6 + 4], Y = e[A * 6 + 4], X = e[v * 6 + 4], z = e[g * 6 + 4], m = (Y + X) / 2);
114
- for (let o = h; o < A; o++) {
115
- const $ = A - h, D = (o - h) / $;
116
- a < l ? e[o * 6 + 1] = V + (m - V) * D : e[o * 6 + 4] = V + (m - V) * D;
113
+ a < l ? (V = e[f * 6 + 1], Y = e[w * 6 + 1], X = e[g * 6 + 1], z = e[E * 6 + 1], m = (Y + X) / 2) : (V = e[f * 6 + 4], Y = e[w * 6 + 4], X = e[g * 6 + 4], z = e[E * 6 + 4], m = (Y + X) / 2);
114
+ for (let o = f; o < w; o++) {
115
+ const $ = w - f, F = (o - f) / $;
116
+ a < l ? e[o * 6 + 1] = V + (m - V) * F : e[o * 6 + 4] = V + (m - V) * F;
117
117
  }
118
- for (let o = A; o < v; o++)
118
+ for (let o = w; o < g; o++)
119
119
  a < l ? e[o * 6 + 1] = m : e[o * 6 + 4] = m;
120
- for (let o = v; o < g; o++) {
121
- const $ = g - v, D = (o - v + 1) / $;
122
- a < l ? e[o * 6 + 1] = m + (z - m) * D : e[o * 6 + 4] = m + (z - m) * D;
120
+ for (let o = g; o < E; o++) {
121
+ const $ = E - g, F = (o - g + 1) / $;
122
+ a < l ? e[o * 6 + 1] = m + (z - m) * F : e[o * 6 + 4] = m + (z - m) * F;
123
123
  }
124
124
  Z.push({
125
- start: A,
126
- end: v
125
+ start: w,
126
+ end: g
127
127
  });
128
128
  }
129
129
  x.length = 0;
@@ -134,18 +134,18 @@ function Lt(i) {
134
134
  for (let n = 0; n < d - 1; n++)
135
135
  n >= t.start && n <= t.end ? (B[n * 2 + 0] = 1, B[n * 2 + 1] = 1) : B[n] !== 1 && (B[n * 2 + 0] = 0, B[n * 2 + 1] = 0);
136
136
  });
137
- const S = new r.BufferGeometry();
138
- return S.setAttribute("position", new r.BufferAttribute(e, 3)), S.setAttribute("uv", new r.BufferAttribute(T, 2)), S.setIndex(new r.BufferAttribute(y, 1)), { geometry: S, maxV: K, animationWillError: Z, curvePath: P, curvePoints: I, panoMap: Q, totalLength: R };
137
+ const U = new r.BufferGeometry();
138
+ return U.setAttribute("position", new r.BufferAttribute(e, 3)), U.setAttribute("uv", new r.BufferAttribute(T, 2)), U.setIndex(new r.BufferAttribute(v, 1)), { geometry: U, maxV: K, animationWillError: Z, curvePath: A, curvePoints: P, panoMap: Q, totalLength: I };
139
139
  }
140
- function dt(i) {
141
- if (xt(i)) {
142
- const O = [i.closed, i.curve_type, i.tension], N = i.points.map((F) => new r.Vector3().fromArray(F));
140
+ function xt(i) {
141
+ if (gt(i)) {
142
+ const O = [i.closed, i.curve_type, i.tension], N = i.points.map((G) => new r.Vector3().fromArray(G));
143
143
  return new r.CatmullRomCurve3(N, ...O);
144
144
  }
145
145
  }
146
- function xt(i) {
146
+ function gt(i) {
147
147
  return i.type === "CatmullRomCurve3";
148
148
  }
149
149
  export {
150
- Lt as createLineGeometry
150
+ Vt as createLineGeometry
151
151
  };
@@ -15,7 +15,7 @@ let x = class {
15
15
  /**
16
16
  * @realsee/dnalogel 版本号
17
17
  */
18
- o(this, "VERSION", "3.41.0");
18
+ o(this, "VERSION", "3.41.1");
19
19
  o(this, "NAME");
20
20
  o(this, "five");
21
21
  o(this, "workUtil");
package/libs/index.js CHANGED
@@ -267,6 +267,7 @@ import "./vendor/gl-vec2/subtract.js";
267
267
  import "./vendor/gl-vec2/dot.js";
268
268
  import "./shared-utils/math/intersecting.js";
269
269
  import "./shared-utils/five/mode.js";
270
+ import "./shared-utils/three/blink.js";
270
271
  import "./PanoTagPlugin/utils/addDebugPoints.js";
271
272
  import "./PanoTagPlugin/utils/tag/tagCheck.js";
272
273
  import "./PanoTagPlugin/utils/debounce.js";
@@ -362,7 +363,6 @@ import "./PanoTagPlugin/Components/Tag/CustomTag.js";
362
363
  import "./PanoTagPlugin/Components/Common/TagPoint.js";
363
364
  import "./shared-utils/three/GLTFLoader.js";
364
365
  import "@realsee/five/gltf-loader";
365
- import "./shared-utils/three/blink.js";
366
366
  import "./PanoTagPlugin/utils/DebugUtil.js";
367
367
  import "./CruisePlugin/utils/sleep.js";
368
368
  import "./GuideLinePlugin/Components/Tag.js";
@@ -1,10 +1,6 @@
1
- function r(n, o) {
2
- console.warn(`⛔ ==> [${n}]: ${o}`);
3
- }
4
- function c(n, o) {
5
- console.warn(`🚫 ==> [${n}]: ${o}`);
1
+ function n(o, r) {
2
+ console.warn(`🚫 ==> [${o}]: ${r}`);
6
3
  }
7
4
  export {
8
- c as logError,
9
- r as logWarning
5
+ n as logError
10
6
  };
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.41.0",
3
+ "%c %c@realsee/dnalogel %cv3.41.1",
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",
@@ -1,5 +1,5 @@
1
1
  import anime from 'animejs';
2
- import type * as THREE from 'three';
2
+ import * as THREE from 'three';
3
3
  interface BlinkAnimeOptions extends anime.AnimeParams {
4
4
  updateRender?: () => any;
5
5
  /**
@@ -1,99 +1,106 @@
1
- var R = Object.defineProperty;
1
+ var o = Object.defineProperty;
2
2
  var T = Object.getOwnPropertySymbols;
3
3
  var L = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
4
- var H = (a, t, r) => t in a ? R(a, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[t] = r, E = (a, t) => {
5
- for (var r in t || (t = {}))
6
- L.call(t, r) && H(a, r, t[r]);
4
+ var H = (l, r, a) => r in l ? o(l, r, { enumerable: !0, configurable: !0, writable: !0, value: a }) : l[r] = a, M = (l, r) => {
5
+ for (var a in r || (r = {}))
6
+ L.call(r, a) && H(l, a, r[a]);
7
7
  if (T)
8
- for (var r of T(t))
9
- x.call(t, r) && H(a, r, t[r]);
10
- return a;
8
+ for (var a of T(r))
9
+ x.call(r, a) && H(l, a, r[a]);
10
+ return l;
11
11
  };
12
12
  import D from "animejs";
13
- import { toArray as g } from "../util.js";
14
- const s = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
15
- function k(a) {
16
- g(a).forEach((r) => {
17
- var l, i;
18
- s.has(r) || (r instanceof HTMLElement ? s.set(r, {
19
- opacity: r.style.opacity === "" ? void 0 : r.style.opacity,
13
+ import * as d from "three";
14
+ import { toArray as h } from "../util.js";
15
+ const f = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
16
+ function k(l) {
17
+ h(l).forEach((a) => {
18
+ var e, y, t;
19
+ f.has(a) || (a instanceof HTMLElement ? f.set(a, {
20
+ opacity: a.style.opacity === "" ? void 0 : a.style.opacity,
20
21
  visible: {
21
- display: r.style.display,
22
- visibility: r.style.visibility
22
+ display: a.style.display,
23
+ visibility: a.style.visibility
23
24
  }
24
- }) : r.isObject3D && s.set(r, {
25
- opacity: (l = r.material) == null ? void 0 : l.opacity,
26
- transparent: (i = r.material) == null ? void 0 : i.transparent,
27
- visible: r.visible
28
- }));
25
+ }) : a.isObject3D && (a.material ? a.material instanceof d.ShaderMaterial ? f.set(a, {
26
+ opacity: (e = a.material.uniforms.opacity) == null ? void 0 : e.value,
27
+ transparent: a.material.transparent,
28
+ visible: a.visible
29
+ }) : f.set(a, {
30
+ opacity: (y = a.material) == null ? void 0 : y.opacity,
31
+ transparent: (t = a.material) == null ? void 0 : t.transparent,
32
+ visible: a.visible
33
+ }) : f.set(a, {
34
+ visible: a.visible
35
+ })));
29
36
  });
30
37
  }
31
- function S(a) {
32
- g(a).forEach((r) => {
33
- const l = s.get(r);
34
- l && (r instanceof HTMLElement && (r.style.opacity = l.opacity === void 0 ? "" : l.opacity, r.style.display = l.visible.display, r.style.visibility = l.visible.visibility), r.isObject3D && (r.visible = l.visible, r.material && (r.material.opacity = l.opacity, r.material.transparent = l.transparent)), s.delete(r));
38
+ function R(l) {
39
+ h(l).forEach((a) => {
40
+ const e = f.get(a);
41
+ e && (a instanceof HTMLElement && (a.style.opacity = e.opacity === void 0 ? "" : e.opacity, a.style.display = e.visible.display, a.style.visibility = e.visible.visibility), a.isObject3D && (a.visible = e.visible, a.material && (a.material instanceof d.ShaderMaterial ? (a.material.uniforms.opacity && (a.material.uniforms.opacity.value = e.opacity), a.material.transparent = e.transparent) : (a.material.opacity = e.opacity, a.material.transparent = e.transparent))), f.delete(a));
35
42
  });
36
43
  }
37
- function w(a, t) {
38
- var p;
39
- const r = (p = t == null ? void 0 : t.traverseTHREEObject) != null ? p : !0;
40
- let l = g(a);
41
- const i = [];
42
- l.forEach((y) => {
43
- y instanceof HTMLElement ? i.push(y) : y.isObject3D && (r ? (i.push(y), y.traverse((c) => {
44
- c && i.push(c);
45
- })) : i.push(y));
46
- }), l = [...new Set(i)], k(l);
47
- const e = D(E({
48
- targets: l,
44
+ function m(l, r) {
45
+ var E;
46
+ const a = (E = r == null ? void 0 : r.traverseTHREEObject) != null ? E : !0;
47
+ let e = h(l);
48
+ const y = [];
49
+ e.forEach((i) => {
50
+ i instanceof HTMLElement ? y.push(i) : i.isObject3D && (a ? (y.push(i), i.traverse((c) => {
51
+ c && y.push(c);
52
+ })) : y.push(i));
53
+ }), e = [...new Set(y)], k(e);
54
+ const t = D(M({
55
+ targets: e,
49
56
  duration: 300,
50
57
  easing: "linear",
51
58
  direction: "alternate",
52
59
  loop: 4,
53
60
  autoplay: !1,
54
- update: (y) => {
61
+ update: (i) => {
55
62
  var c;
56
- y.animatables.forEach((d) => {
57
- var M;
58
- const u = d.target;
59
- if (!s.has(u))
63
+ i.animatables.forEach((p) => {
64
+ var S;
65
+ const s = p.target;
66
+ if (!f.has(s))
60
67
  return;
61
- const h = Number((M = s.get(u).opacity) != null ? M : 1) * (100 - y.progress) / 100;
62
- u instanceof HTMLElement ? u.style.opacity = String(h) : u.material && (u.material.opacity = h, u.material.transparent = !0);
63
- }), (c = t == null ? void 0 : t.updateRender) == null || c.call(t);
68
+ const g = Number((S = f.get(s).opacity) != null ? S : 1) * (100 - i.progress) / 100;
69
+ s instanceof HTMLElement ? s.style.opacity = String(g) : s.material && (s.material instanceof d.ShaderMaterial ? (s.material.uniforms.opacity && (s.material.uniforms.opacity.value = g), s.material.transparent = !0) : (s.material.opacity = g, s.material.transparent = !0));
70
+ }), (c = r == null ? void 0 : r.updateRender) == null || c.call(r);
64
71
  }
65
- }, t));
66
- e.preComplete = () => {
67
- e != null && e.completed || (e == null || e.pause(), S(l), setTimeout(() => {
68
- var y;
69
- return (y = t == null ? void 0 : t.updateRender) == null ? void 0 : y.call(t);
72
+ }, r));
73
+ t.preComplete = () => {
74
+ t != null && t.completed || (t == null || t.pause(), R(e), setTimeout(() => {
75
+ var i;
76
+ return (i = r == null ? void 0 : r.updateRender) == null ? void 0 : i.call(r);
70
77
  }));
71
78
  };
72
- const f = v.get(a);
73
- return f == null || f.pause(), f == null || f.seek(0), v.set(a, e), e.play(), e.finished.then(() => {
74
- var y;
75
- S(l), setTimeout(() => {
76
- v.get(a) === e && v.delete(a);
77
- }, 1e3), (y = t == null ? void 0 : t.updateRender) == null || y.call(t);
78
- }), e;
79
+ const u = v.get(l);
80
+ return u == null || u.pause(), u == null || u.seek(0), v.set(l, t), t.play(), t.finished.then(() => {
81
+ var i;
82
+ R(e), setTimeout(() => {
83
+ v.get(l) === t && v.delete(l);
84
+ }, 1e3), (i = r == null ? void 0 : r.updateRender) == null || i.call(r);
85
+ }), t;
79
86
  }
80
- function z(a, t) {
81
- return w(a, E({
82
- update: (r) => {
83
- var l;
84
- r.animatables.forEach((i) => {
85
- var c, d;
86
- const e = i.target;
87
- if (!s.has(e))
87
+ function z(l, r) {
88
+ return m(l, M({
89
+ update: (a) => {
90
+ var e;
91
+ a.animatables.forEach((y) => {
92
+ var c, p;
93
+ const t = y.target;
94
+ if (!f.has(t))
88
95
  return;
89
- const f = s.get(e), y = ((d = (c = f == null ? void 0 : f.opacity) != null ? c : t == null ? void 0 : t.maxOpacity) != null ? d : 1) * (r.progress / 100);
90
- e instanceof HTMLElement ? (e.style.opacity = String(y), e.style.visibility = "visible") : e.isObject3D && (g(a).includes(e) && (e.visible = !0), e.material && (e.material.opacity = y, e.material.transparent = !0));
91
- }), (l = t == null ? void 0 : t.updateRender) == null || l.call(t);
96
+ const u = f.get(t), i = ((p = (c = u == null ? void 0 : u.opacity) != null ? c : r == null ? void 0 : r.maxOpacity) != null ? p : 1) * (a.progress / 100);
97
+ t instanceof HTMLElement ? (t.style.opacity = String(i), t.style.visibility = "visible") : t.isObject3D && (h(l).includes(t) && (t.visible = !0), t.material && (t.material instanceof d.ShaderMaterial ? (t.material.uniforms.opacity && (t.material.uniforms.opacity.value = i), t.material.transparent = !0) : (t.material.opacity = i, t.material.transparent = !0)));
98
+ }), (e = r == null ? void 0 : r.updateRender) == null || e.call(r);
92
99
  }
93
- }, t));
100
+ }, r));
94
101
  }
95
102
  export {
96
103
  v as animeMap,
97
- w as blink,
104
+ m as blink,
98
105
  z as reblink
99
106
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.41.0",
3
+ "version": "3.41.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",