@applemusic-like-lyrics/core 0.2.0-alpha.2 → 0.2.0-alpha.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.
- package/dist/amll-core.js +150 -158
- package/dist/amll-core.js.map +1 -1
- package/dist/lyric-player/{bottom-line.d.ts → dom/bottom-line.d.ts} +3 -3
- package/dist/lyric-player/dom/index.d.ts +263 -0
- package/dist/lyric-player/{interlude-dots.d.ts → dom/interlude-dots.d.ts} +2 -6
- package/dist/lyric-player/{lyric-line.d.ts → dom/lyric-line.d.ts} +2 -2
- package/dist/lyric-player/index.d.ts +5 -259
- package/dist/lyric-player/layouter.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/amll-core.js
CHANGED
|
@@ -560,9 +560,9 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
560
560
|
* @returns `out` or `null` if the matrix is not invertable
|
|
561
561
|
*/
|
|
562
562
|
static invert(t, e) {
|
|
563
|
-
const s = e[0], i = e[1], n = e[2], r = e[3], a = e[4], c = e[5], h = e[6], o = e[7], l = e[8], m = e[9], g = e[10], u = e[11], M = e[12], p = e[13], T = e[14], x = e[15], L = s * c - i * a,
|
|
564
|
-
let
|
|
565
|
-
return
|
|
563
|
+
const s = e[0], i = e[1], n = e[2], r = e[3], a = e[4], c = e[5], h = e[6], o = e[7], l = e[8], m = e[9], g = e[10], u = e[11], M = e[12], p = e[13], T = e[14], x = e[15], L = s * c - i * a, E = s * h - n * a, b = s * o - r * a, w = i * h - n * c, S = i * o - r * c, _ = n * o - r * h, v = l * p - m * M, z = l * T - g * M, P = l * x - u * M, A = m * T - g * p, R = m * x - u * p, C = g * x - u * T;
|
|
564
|
+
let F = L * C - E * R + b * A + w * P - S * z + _ * v;
|
|
565
|
+
return F ? (F = 1 / F, t[0] = (c * C - h * R + o * A) * F, t[1] = (n * R - i * C - r * A) * F, t[2] = (p * _ - T * S + x * w) * F, t[3] = (g * S - m * _ - u * w) * F, t[4] = (h * P - a * C - o * z) * F, t[5] = (s * C - n * P + r * z) * F, t[6] = (T * b - M * _ - x * E) * F, t[7] = (l * _ - g * b + u * E) * F, t[8] = (a * R - c * P + o * v) * F, t[9] = (i * P - s * R - r * v) * F, t[10] = (M * S - p * b + x * L) * F, t[11] = (m * b - l * S - u * L) * F, t[12] = (c * z - a * A - h * v) * F, t[13] = (s * A - i * z + n * v) * F, t[14] = (p * E - M * w - T * L) * F, t[15] = (l * w - m * E + g * L) * F, t) : null;
|
|
566
566
|
}
|
|
567
567
|
/**
|
|
568
568
|
* Calculates the adjugate of a {@link Mat4}
|
|
@@ -573,8 +573,8 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
573
573
|
* @returns `out`
|
|
574
574
|
*/
|
|
575
575
|
static adjoint(t, e) {
|
|
576
|
-
const s = e[0], i = e[1], n = e[2], r = e[3], a = e[4], c = e[5], h = e[6], o = e[7], l = e[8], m = e[9], g = e[10], u = e[11], M = e[12], p = e[13], T = e[14], x = e[15], L = s * c - i * a,
|
|
577
|
-
return t[0] = c * C - h *
|
|
576
|
+
const s = e[0], i = e[1], n = e[2], r = e[3], a = e[4], c = e[5], h = e[6], o = e[7], l = e[8], m = e[9], g = e[10], u = e[11], M = e[12], p = e[13], T = e[14], x = e[15], L = s * c - i * a, E = s * h - n * a, b = s * o - r * a, w = i * h - n * c, S = i * o - r * c, _ = n * o - r * h, v = l * p - m * M, z = l * T - g * M, P = l * x - u * M, A = m * T - g * p, R = m * x - u * p, C = g * x - u * T;
|
|
577
|
+
return t[0] = c * C - h * R + o * A, t[1] = n * R - i * C - r * A, t[2] = p * _ - T * S + x * w, t[3] = g * S - m * _ - u * w, t[4] = h * P - a * C - o * z, t[5] = s * C - n * P + r * z, t[6] = T * b - M * _ - x * E, t[7] = l * _ - g * b + u * E, t[8] = a * R - c * P + o * v, t[9] = i * P - s * R - r * v, t[10] = M * S - p * b + x * L, t[11] = m * b - l * S - u * L, t[12] = c * z - a * A - h * v, t[13] = s * A - i * z + n * v, t[14] = p * E - M * w - T * L, t[15] = l * w - m * E + g * L, t;
|
|
578
578
|
}
|
|
579
579
|
/**
|
|
580
580
|
* Calculates the determinant of a {@link Mat4}
|
|
@@ -584,8 +584,8 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
584
584
|
* @returns determinant of a
|
|
585
585
|
*/
|
|
586
586
|
static determinant(t) {
|
|
587
|
-
const e = t[0], s = t[1], i = t[2], n = t[3], r = t[4], a = t[5], c = t[6], h = t[7], o = t[8], l = t[9], m = t[10], g = t[11], u = t[12], M = t[13], p = t[14], T = t[15], x = e * a - s * r, L = e * c - i * r,
|
|
588
|
-
return h *
|
|
587
|
+
const e = t[0], s = t[1], i = t[2], n = t[3], r = t[4], a = t[5], c = t[6], h = t[7], o = t[8], l = t[9], m = t[10], g = t[11], u = t[12], M = t[13], p = t[14], T = t[15], x = e * a - s * r, L = e * c - i * r, E = s * c - i * a, b = o * M - l * u, w = o * p - m * u, S = l * p - m * M, _ = e * S - s * w + i * b, v = r * S - a * w + c * b, z = o * E - l * L + m * x, P = u * E - M * L + p * x;
|
|
588
|
+
return h * _ - n * v + T * z - g * P;
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
591
|
* Multiplies two {@link Mat4}s
|
|
@@ -598,8 +598,8 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
598
598
|
*/
|
|
599
599
|
static multiply(t, e, s) {
|
|
600
600
|
const i = e[0], n = e[1], r = e[2], a = e[3], c = e[4], h = e[5], o = e[6], l = e[7], m = e[8], g = e[9], u = e[10], M = e[11], p = e[12], T = e[13], x = e[14], L = e[15];
|
|
601
|
-
let
|
|
602
|
-
return t[0] =
|
|
601
|
+
let E = s[0], b = s[1], w = s[2], S = s[3];
|
|
602
|
+
return t[0] = E * i + b * c + w * m + S * p, t[1] = E * n + b * h + w * g + S * T, t[2] = E * r + b * o + w * u + S * x, t[3] = E * a + b * l + w * M + S * L, E = s[4], b = s[5], w = s[6], S = s[7], t[4] = E * i + b * c + w * m + S * p, t[5] = E * n + b * h + w * g + S * T, t[6] = E * r + b * o + w * u + S * x, t[7] = E * a + b * l + w * M + S * L, E = s[8], b = s[9], w = s[10], S = s[11], t[8] = E * i + b * c + w * m + S * p, t[9] = E * n + b * h + w * g + S * T, t[10] = E * r + b * o + w * u + S * x, t[11] = E * a + b * l + w * M + S * L, E = s[12], b = s[13], w = s[14], S = s[15], t[12] = E * i + b * c + w * m + S * p, t[13] = E * n + b * h + w * g + S * T, t[14] = E * r + b * o + w * u + S * x, t[15] = E * a + b * l + w * M + S * L, t;
|
|
603
603
|
}
|
|
604
604
|
/**
|
|
605
605
|
* Alias for {@link Mat4.multiply}
|
|
@@ -655,8 +655,8 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
655
655
|
if (c < O)
|
|
656
656
|
return null;
|
|
657
657
|
c = 1 / c, n *= c, r *= c, a *= c;
|
|
658
|
-
const h = Math.sin(s), o = Math.cos(s), l = 1 - o, m = e[0], g = e[1], u = e[2], M = e[3], p = e[4], T = e[5], x = e[6], L = e[7],
|
|
659
|
-
return t[0] = m *
|
|
658
|
+
const h = Math.sin(s), o = Math.cos(s), l = 1 - o, m = e[0], g = e[1], u = e[2], M = e[3], p = e[4], T = e[5], x = e[6], L = e[7], E = e[8], b = e[9], w = e[10], S = e[11], _ = n * n * l + o, v = r * n * l + a * h, z = a * n * l - r * h, P = n * r * l - a * h, A = r * r * l + o, R = a * r * l + n * h, C = n * a * l + r * h, F = r * a * l - n * h, W = a * a * l + o;
|
|
659
|
+
return t[0] = m * _ + p * v + E * z, t[1] = g * _ + T * v + b * z, t[2] = u * _ + x * v + w * z, t[3] = M * _ + L * v + S * z, t[4] = m * P + p * A + E * R, t[5] = g * P + T * A + b * R, t[6] = u * P + x * A + w * R, t[7] = M * P + L * A + S * R, t[8] = m * C + p * F + E * W, t[9] = g * C + T * F + b * W, t[10] = u * C + x * F + w * W, t[11] = M * C + L * F + S * W, e !== t && (t[12] = e[12], t[13] = e[13], t[14] = e[14], t[15] = e[15]), t;
|
|
660
660
|
}
|
|
661
661
|
/**
|
|
662
662
|
* Rotates a matrix by the given angle around the X axis
|
|
@@ -838,9 +838,9 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
838
838
|
* @returns `out` or `null` if the matrix is not invertable
|
|
839
839
|
*/
|
|
840
840
|
static normalFromMat4(t, e) {
|
|
841
|
-
const s = e[0], i = e[1], n = e[2], r = e[3], a = e[4], c = e[5], h = e[6], o = e[7], l = e[8], m = e[9], g = e[10], u = e[11], M = e[12], p = e[13], T = e[14], x = e[15], L = s * c - i * a,
|
|
842
|
-
let
|
|
843
|
-
return
|
|
841
|
+
const s = e[0], i = e[1], n = e[2], r = e[3], a = e[4], c = e[5], h = e[6], o = e[7], l = e[8], m = e[9], g = e[10], u = e[11], M = e[12], p = e[13], T = e[14], x = e[15], L = s * c - i * a, E = s * h - n * a, b = s * o - r * a, w = i * h - n * c, S = i * o - r * c, _ = n * o - r * h, v = l * p - m * M, z = l * T - g * M, P = l * x - u * M, A = m * T - g * p, R = m * x - u * p, C = g * x - u * T;
|
|
842
|
+
let F = L * C - E * R + b * A + w * P - S * z + _ * v;
|
|
843
|
+
return F ? (F = 1 / F, t[0] = (c * C - h * R + o * A) * F, t[1] = (h * P - a * C - o * z) * F, t[2] = (a * R - c * P + o * v) * F, t[3] = 0, t[4] = (n * R - i * C - r * A) * F, t[5] = (s * C - n * P + r * z) * F, t[6] = (i * P - s * R - r * v) * F, t[7] = 0, t[8] = (p * _ - T * S + x * w) * F, t[9] = (T * b - M * _ - x * E) * F, t[10] = (M * S - p * b + x * L) * F, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, t) : null;
|
|
844
844
|
}
|
|
845
845
|
/**
|
|
846
846
|
* Calculates a {@link Mat4} normal matrix (transpose inverse) from a {@link Mat4}
|
|
@@ -919,9 +919,9 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
919
919
|
e[0] = i[12], e[1] = i[13], e[2] = i[14];
|
|
920
920
|
const n = i[0], r = i[1], a = i[2], c = i[4], h = i[5], o = i[6], l = i[8], m = i[9], g = i[10];
|
|
921
921
|
s[0] = Math.sqrt(n * n + r * r + a * a), s[1] = Math.sqrt(c * c + h * h + o * o), s[2] = Math.sqrt(l * l + m * m + g * g);
|
|
922
|
-
const u = 1 / s[0], M = 1 / s[1], p = 1 / s[2], T = n * u, x = r * M, L = a * p,
|
|
922
|
+
const u = 1 / s[0], M = 1 / s[1], p = 1 / s[2], T = n * u, x = r * M, L = a * p, E = c * u, b = h * M, w = o * p, S = l * u, _ = m * M, v = g * p, z = T + b + v;
|
|
923
923
|
let P = 0;
|
|
924
|
-
return
|
|
924
|
+
return z > 0 ? (P = Math.sqrt(z + 1) * 2, t[3] = 0.25 * P, t[0] = (w - _) / P, t[1] = (S - L) / P, t[2] = (x - E) / P) : T > b && T > v ? (P = Math.sqrt(1 + T - b - v) * 2, t[3] = (w - _) / P, t[0] = 0.25 * P, t[1] = (x + E) / P, t[2] = (S + L) / P) : b > v ? (P = Math.sqrt(1 + b - T - v) * 2, t[3] = (S - L) / P, t[0] = (x + E) / P, t[1] = 0.25 * P, t[2] = (w + _) / P) : (P = Math.sqrt(1 + v - T - b) * 2, t[3] = (x - E) / P, t[0] = (S + L) / P, t[1] = (w + _) / P, t[2] = 0.25 * P), t;
|
|
925
925
|
}
|
|
926
926
|
/**
|
|
927
927
|
* Creates a matrix from a quaternion rotation, vector translation and vector scale
|
|
@@ -942,8 +942,8 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
942
942
|
* @returns `out`
|
|
943
943
|
*/
|
|
944
944
|
static fromRotationTranslationScale(t, e, s, i) {
|
|
945
|
-
const n = e[0], r = e[1], a = e[2], c = e[3], h = n + n, o = r + r, l = a + a, m = n * h, g = n * o, u = n * l, M = r * o, p = r * l, T = a * l, x = c * h, L = c * o,
|
|
946
|
-
return t[0] = (1 - (M + T)) *
|
|
945
|
+
const n = e[0], r = e[1], a = e[2], c = e[3], h = n + n, o = r + r, l = a + a, m = n * h, g = n * o, u = n * l, M = r * o, p = r * l, T = a * l, x = c * h, L = c * o, E = c * l, b = i[0], w = i[1], S = i[2];
|
|
946
|
+
return t[0] = (1 - (M + T)) * b, t[1] = (g + E) * b, t[2] = (u - L) * b, t[3] = 0, t[4] = (g - E) * w, t[5] = (1 - (m + T)) * w, t[6] = (p + x) * w, t[7] = 0, t[8] = (u + L) * S, t[9] = (p - x) * S, t[10] = (1 - (m + M)) * S, t[11] = 0, t[12] = s[0], t[13] = s[1], t[14] = s[2], t[15] = 1, t;
|
|
947
947
|
}
|
|
948
948
|
/**
|
|
949
949
|
* Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin
|
|
@@ -967,8 +967,8 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
967
967
|
* @returns `out`
|
|
968
968
|
*/
|
|
969
969
|
static fromRotationTranslationScaleOrigin(t, e, s, i, n) {
|
|
970
|
-
const r = e[0], a = e[1], c = e[2], h = e[3], o = r + r, l = a + a, m = c + c, g = r * o, u = r * l, M = r * m, p = a * l, T = a * m, x = c * m, L = h * o,
|
|
971
|
-
return t[0] =
|
|
970
|
+
const r = e[0], a = e[1], c = e[2], h = e[3], o = r + r, l = a + a, m = c + c, g = r * o, u = r * l, M = r * m, p = a * l, T = a * m, x = c * m, L = h * o, E = h * l, b = h * m, w = i[0], S = i[1], _ = i[2], v = n[0], z = n[1], P = n[2], A = (1 - (p + x)) * w, R = (u + b) * w, C = (M - E) * w, F = (u - b) * S, W = (1 - (g + x)) * S, at = (T + L) * S, ct = (M + E) * _, Ct = (T - L) * _, Bt = (1 - (g + p)) * _;
|
|
971
|
+
return t[0] = A, t[1] = R, t[2] = C, t[3] = 0, t[4] = F, t[5] = W, t[6] = at, t[7] = 0, t[8] = ct, t[9] = Ct, t[10] = Bt, t[11] = 0, t[12] = s[0] + v - (A * v + F * z + ct * P), t[13] = s[1] + z - (R * v + W * z + Ct * P), t[14] = s[2] + P - (C * v + at * z + Bt * P), t[15] = 1, t;
|
|
972
972
|
}
|
|
973
973
|
/**
|
|
974
974
|
* Calculates a 4x4 matrix from the given quaternion
|
|
@@ -1174,10 +1174,10 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
1174
1174
|
return q.identity(t);
|
|
1175
1175
|
let u = n - l, M = r - m, p = a - g, T = 1 / Math.sqrt(u * u + M * M + p * p);
|
|
1176
1176
|
u *= T, M *= T, p *= T;
|
|
1177
|
-
let x = h * p - o * M, L = o * u - c * p,
|
|
1178
|
-
T = Math.sqrt(x * x + L * L +
|
|
1179
|
-
let
|
|
1180
|
-
return T = Math.sqrt(
|
|
1177
|
+
let x = h * p - o * M, L = o * u - c * p, E = c * M - h * u;
|
|
1178
|
+
T = Math.sqrt(x * x + L * L + E * E), T ? (T = 1 / T, x *= T, L *= T, E *= T) : (x = 0, L = 0, E = 0);
|
|
1179
|
+
let b = M * E - p * L, w = p * x - u * E, S = u * L - M * x;
|
|
1180
|
+
return T = Math.sqrt(b * b + w * w + S * S), T ? (T = 1 / T, b *= T, w *= T, S *= T) : (b = 0, w = 0, S = 0), t[0] = x, t[1] = b, t[2] = u, t[3] = 0, t[4] = L, t[5] = w, t[6] = M, t[7] = 0, t[8] = E, t[9] = S, t[10] = p, t[11] = 0, t[12] = -(x * n + L * r + E * a), t[13] = -(b * n + w * r + S * a), t[14] = -(u * n + M * r + p * a), t[15] = 1, t;
|
|
1181
1181
|
}
|
|
1182
1182
|
/**
|
|
1183
1183
|
* Generates a matrix that makes something look at something else.
|
|
@@ -1282,8 +1282,8 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
1282
1282
|
* @returns True if the matrices are equal, false otherwise.
|
|
1283
1283
|
*/
|
|
1284
1284
|
static equals(t, e) {
|
|
1285
|
-
const s = t[0], i = t[1], n = t[2], r = t[3], a = t[4], c = t[5], h = t[6], o = t[7], l = t[8], m = t[9], g = t[10], u = t[11], M = t[12], p = t[13], T = t[14], x = t[15], L = e[0],
|
|
1286
|
-
return Math.abs(s - L) <= O * Math.max(1, Math.abs(s), Math.abs(L)) && Math.abs(i -
|
|
1285
|
+
const s = t[0], i = t[1], n = t[2], r = t[3], a = t[4], c = t[5], h = t[6], o = t[7], l = t[8], m = t[9], g = t[10], u = t[11], M = t[12], p = t[13], T = t[14], x = t[15], L = e[0], E = e[1], b = e[2], w = e[3], S = e[4], _ = e[5], v = e[6], z = e[7], P = e[8], A = e[9], R = e[10], C = e[11], F = e[12], W = e[13], at = e[14], ct = e[15];
|
|
1286
|
+
return Math.abs(s - L) <= O * Math.max(1, Math.abs(s), Math.abs(L)) && Math.abs(i - E) <= O * Math.max(1, Math.abs(i), Math.abs(E)) && Math.abs(n - b) <= O * Math.max(1, Math.abs(n), Math.abs(b)) && Math.abs(r - w) <= O * Math.max(1, Math.abs(r), Math.abs(w)) && Math.abs(a - S) <= O * Math.max(1, Math.abs(a), Math.abs(S)) && Math.abs(c - _) <= O * Math.max(1, Math.abs(c), Math.abs(_)) && Math.abs(h - v) <= O * Math.max(1, Math.abs(h), Math.abs(v)) && Math.abs(o - z) <= O * Math.max(1, Math.abs(o), Math.abs(z)) && Math.abs(l - P) <= O * Math.max(1, Math.abs(l), Math.abs(P)) && Math.abs(m - A) <= O * Math.max(1, Math.abs(m), Math.abs(A)) && Math.abs(g - R) <= O * Math.max(1, Math.abs(g), Math.abs(R)) && Math.abs(u - C) <= O * Math.max(1, Math.abs(u), Math.abs(C)) && Math.abs(M - F) <= O * Math.max(1, Math.abs(M), Math.abs(F)) && Math.abs(p - W) <= O * Math.max(1, Math.abs(p), Math.abs(W)) && Math.abs(T - at) <= O * Math.max(1, Math.abs(T), Math.abs(at)) && Math.abs(x - ct) <= O * Math.max(1, Math.abs(x), Math.abs(ct));
|
|
1287
1287
|
}
|
|
1288
1288
|
/**
|
|
1289
1289
|
* Returns a string representation of a {@link Mat4}
|
|
@@ -1300,14 +1300,14 @@ const O = 1e-6, Ot = new Float32Array([
|
|
|
1300
1300
|
* The number of bytes in a {@link Mat4}.
|
|
1301
1301
|
*/
|
|
1302
1302
|
f(q, "BYTE_LENGTH", 16 * Float32Array.BYTES_PER_ELEMENT);
|
|
1303
|
-
let
|
|
1303
|
+
let I = q;
|
|
1304
1304
|
const V = new Float32Array(3);
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1305
|
+
I.prototype.mul = I.prototype.multiply;
|
|
1306
|
+
I.sub = I.subtract;
|
|
1307
|
+
I.mul = I.multiply;
|
|
1308
|
+
I.frustum = I.frustumNO;
|
|
1309
|
+
I.perspective = I.perspectiveNO;
|
|
1310
|
+
I.ortho = I.orthoNO;
|
|
1311
1311
|
const U = class U extends Float32Array {
|
|
1312
1312
|
/**
|
|
1313
1313
|
* Create a {@link Vec3}.
|
|
@@ -3804,38 +3804,38 @@ const $ = class $ extends Float32Array {
|
|
|
3804
3804
|
* The number of bytes in a {@link Vec2}.
|
|
3805
3805
|
*/
|
|
3806
3806
|
f($, "BYTE_LENGTH", 2 * Float32Array.BYTES_PER_ELEMENT);
|
|
3807
|
-
let
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3807
|
+
let k = $;
|
|
3808
|
+
k.prototype.sub = k.prototype.subtract;
|
|
3809
|
+
k.prototype.mul = k.prototype.multiply;
|
|
3810
|
+
k.prototype.div = k.prototype.divide;
|
|
3811
|
+
k.prototype.dist = k.prototype.distance;
|
|
3812
|
+
k.prototype.sqrDist = k.prototype.squaredDistance;
|
|
3813
|
+
k.sub = k.subtract;
|
|
3814
|
+
k.mul = k.multiply;
|
|
3815
|
+
k.div = k.divide;
|
|
3816
|
+
k.dist = k.distance;
|
|
3817
|
+
k.sqrDist = k.squaredDistance;
|
|
3818
|
+
k.sqrLen = k.squaredLength;
|
|
3819
|
+
k.mag = k.magnitude;
|
|
3820
|
+
k.length = k.magnitude;
|
|
3821
|
+
k.len = k.magnitude;
|
|
3822
3822
|
function be(d, t, e) {
|
|
3823
3823
|
const s = d.data, i = d.width, n = d.height;
|
|
3824
3824
|
let r, a, c, h, o, l, m, g, u, M, p, T, x;
|
|
3825
|
-
const L = i - 1,
|
|
3825
|
+
const L = i - 1, E = n - 1, b = t + 1, w = t + b, S = t + 1, _ = t + S, v = 1 / (w * _), z = [], P = [], A = [], R = [], C = [], F = [];
|
|
3826
3826
|
for (; e-- > 0; ) {
|
|
3827
3827
|
for (x = T = 0, l = 0; l < n; l++) {
|
|
3828
|
-
for (r = s[x] *
|
|
3828
|
+
for (r = s[x] * b, a = s[x + 1] * b, c = s[x + 2] * b, h = s[x + 3] * b, m = 1; m <= t; m++)
|
|
3829
3829
|
g = x + ((m > L ? L : m) << 2), r += s[g++], a += s[g++], c += s[g++], h += s[g];
|
|
3830
3830
|
for (o = 0; o < i; o++)
|
|
3831
|
-
|
|
3831
|
+
z[T] = r, P[T] = a, A[T] = c, R[T] = h, l === 0 && (C[o] = Math.min(o + b, L) << 2, F[o] = Math.max(o - t, 0) << 2), u = x + C[o], M = x + F[o], r += s[u++] - s[M++], a += s[u++] - s[M++], c += s[u++] - s[M++], h += s[u] - s[M], T++;
|
|
3832
3832
|
x += i << 2;
|
|
3833
3833
|
}
|
|
3834
3834
|
for (o = 0; o < i; o++) {
|
|
3835
|
-
for (p = o, r =
|
|
3836
|
-
p += m >
|
|
3835
|
+
for (p = o, r = z[p] * S, a = P[p] * S, c = A[p] * S, h = R[p] * S, m = 1; m <= t; m++)
|
|
3836
|
+
p += m > E ? 0 : i, r += z[p], a += P[p], c += A[p], h += R[p];
|
|
3837
3837
|
for (T = o << 2, l = 0; l < n; l++)
|
|
3838
|
-
s[T] = r * v + 0.5 | 0, s[T + 1] = a * v + 0.5 | 0, s[T + 2] = c * v + 0.5 | 0, s[T + 3] = h * v + 0.5 | 0, o === 0 && (C[l] = Math.min(l + S,
|
|
3838
|
+
s[T] = r * v + 0.5 | 0, s[T + 1] = a * v + 0.5 | 0, s[T + 2] = c * v + 0.5 | 0, s[T + 3] = h * v + 0.5 | 0, o === 0 && (C[l] = Math.min(l + S, E) * i, F[l] = Math.max(l - t, 0) * i), u = o + C[l], M = o + F[l], r += z[u] - z[M], a += P[u] - P[M], c += A[u] - A[M], h += R[u] - R[M], T += i << 2;
|
|
3839
3839
|
}
|
|
3840
3840
|
}
|
|
3841
3841
|
}
|
|
@@ -4247,9 +4247,9 @@ class te {
|
|
|
4247
4247
|
class ze {
|
|
4248
4248
|
constructor() {
|
|
4249
4249
|
f(this, "color", B.fromValues(1, 1, 1));
|
|
4250
|
-
f(this, "location",
|
|
4251
|
-
f(this, "uTangent",
|
|
4252
|
-
f(this, "vTangent",
|
|
4250
|
+
f(this, "location", k.fromValues(0, 0));
|
|
4251
|
+
f(this, "uTangent", k.fromValues(0, 0));
|
|
4252
|
+
f(this, "vTangent", k.fromValues(0, 0));
|
|
4253
4253
|
f(this, "_uRot", 0);
|
|
4254
4254
|
f(this, "_vRot", 0);
|
|
4255
4255
|
f(this, "_uScale", 1);
|
|
@@ -4287,25 +4287,25 @@ class ze {
|
|
|
4287
4287
|
this.vTangent[0] = -Math.sin(this._vRot) * this._vScale, this.vTangent[1] = Math.cos(this._vRot) * this._vScale;
|
|
4288
4288
|
}
|
|
4289
4289
|
}
|
|
4290
|
-
const rt =
|
|
4291
|
-
function _e(d, t, e, s, i =
|
|
4292
|
-
G[0] = d ** 3, G[1] = d ** 2, G[2] = d, G[3] = 1, gt.copy(G), Q[0] = t ** 3, Q[1] = t ** 2, Q[2] = t, Q[3] = 1, K.copy(e).transpose(),
|
|
4290
|
+
const rt = I.fromValues(2, -2, 1, 1, -3, 3, -2, -1, 0, 0, 1, 0, 1, 0, 0, 0), dt = I.clone(rt).transpose(), G = D.create(), gt = D.create(), Q = D.create(), K = I.create(), tt = I.create();
|
|
4291
|
+
function _e(d, t, e, s, i = k.create()) {
|
|
4292
|
+
G[0] = d ** 3, G[1] = d ** 2, G[2] = d, G[3] = 1, gt.copy(G), Q[0] = t ** 3, Q[1] = t ** 2, Q[2] = t, Q[3] = 1, K.copy(e).transpose(), I.mul(K, K, rt), I.mul(K, dt, K), D.transformMat4(G, G, K);
|
|
4293
4293
|
const n = Q.dot(G);
|
|
4294
|
-
tt.copy(s).transpose(),
|
|
4294
|
+
tt.copy(s).transpose(), I.mul(tt, tt, rt), I.mul(tt, dt, tt), D.transformMat4(gt, gt, tt);
|
|
4295
4295
|
const r = Q.dot(gt);
|
|
4296
4296
|
return i.x = n, i.y = r, i;
|
|
4297
4297
|
}
|
|
4298
|
-
function Vt(d, t, e, s, i, n =
|
|
4298
|
+
function Vt(d, t, e, s, i, n = I.create()) {
|
|
4299
4299
|
const r = (h) => h.location[i], a = (h) => h.uTangent[i], c = (h) => h.vTangent[i];
|
|
4300
4300
|
return n[0] = r(d), n[1] = r(t), n[2] = c(d), n[3] = c(t), n[4] = r(e), n[5] = r(s), n[6] = c(e), n[7] = c(s), n[8] = a(d), n[9] = a(t), n[10] = 0, n[11] = 0, n[12] = a(e), n[13] = a(s), n[14] = 0, n[15] = 0, n;
|
|
4301
4301
|
}
|
|
4302
|
-
function vt(d, t, e, s, i, n =
|
|
4302
|
+
function vt(d, t, e, s, i, n = I.create()) {
|
|
4303
4303
|
const r = (a) => a.color[i];
|
|
4304
4304
|
return n.fill(0), n[0] = r(d), n[1] = r(t), n[4] = r(e), n[5] = r(s), n;
|
|
4305
4305
|
}
|
|
4306
|
-
const Y = D.create(), ut = D.create(), yt = D.create(), j = D.create(), et =
|
|
4306
|
+
const Y = D.create(), ut = D.create(), yt = D.create(), j = D.create(), et = I.create(), st = I.create(), it = I.create(), Mt = B.create();
|
|
4307
4307
|
function Fe(d, t, e, s, i) {
|
|
4308
|
-
return Y[0] = d ** 3, Y[1] = d ** 2, Y[2] = d, Y[3] = 1, ut.copy(Y), yt.copy(Y), j[0] = t ** 3, j[1] = t ** 2, j[2] = t, j[3] = 1, et.copy(e).transpose(),
|
|
4308
|
+
return Y[0] = d ** 3, Y[1] = d ** 2, Y[2] = d, Y[3] = 1, ut.copy(Y), yt.copy(Y), j[0] = t ** 3, j[1] = t ** 2, j[2] = t, j[3] = 1, et.copy(e).transpose(), I.mul(et, et, rt), I.mul(et, dt, et), D.transformMat4(Y, Y, et), Mt.r = j.dot(Y), st.copy(s).transpose(), I.mul(st, st, rt), I.mul(st, dt, st), D.transformMat4(ut, ut, st), Mt.g = j.dot(ut), it.copy(i).transpose(), I.mul(it, it, rt), I.mul(it, dt, it), D.transformMat4(yt, yt, it), Mt.b = j.dot(yt), Mt;
|
|
4309
4309
|
}
|
|
4310
4310
|
class De {
|
|
4311
4311
|
constructor(t, e) {
|
|
@@ -4338,12 +4338,12 @@ class Ie extends te {
|
|
|
4338
4338
|
*/
|
|
4339
4339
|
f(this, "_subDivisions", 10);
|
|
4340
4340
|
f(this, "_controlPoints", new De(3, 3));
|
|
4341
|
-
f(this, "uMX",
|
|
4342
|
-
f(this, "uMY",
|
|
4343
|
-
f(this, "uMR",
|
|
4344
|
-
f(this, "uMG",
|
|
4345
|
-
f(this, "uMB",
|
|
4346
|
-
f(this, "tmpV2",
|
|
4341
|
+
f(this, "uMX", I.create());
|
|
4342
|
+
f(this, "uMY", I.create());
|
|
4343
|
+
f(this, "uMR", I.create());
|
|
4344
|
+
f(this, "uMG", I.create());
|
|
4345
|
+
f(this, "uMB", I.create());
|
|
4346
|
+
f(this, "tmpV2", k.create());
|
|
4347
4347
|
this.resizeControlPoints(3, 3), Object.seal(this);
|
|
4348
4348
|
}
|
|
4349
4349
|
setWireFrame(e) {
|
|
@@ -4398,22 +4398,22 @@ class Ie extends te {
|
|
|
4398
4398
|
const a = this._controlPoints.get(n, r), c = this._controlPoints.get(n, r + 1), h = this._controlPoints.get(n + 1, r), o = this._controlPoints.get(n + 1, r + 1), l = Vt(a, c, h, o, "x", this.uMX), m = Vt(a, c, h, o, "y", this.uMY), g = vt(a, c, h, o, "r", this.uMR), u = vt(a, c, h, o, "g", this.uMG), M = vt(a, c, h, o, "b", this.uMB), p = n / (this._controlPoints.width - 1), T = r / (this._controlPoints.height - 1);
|
|
4399
4399
|
for (let x = 0; x < this._subDivisions; x++)
|
|
4400
4400
|
for (let L = 0; L < this._subDivisions; L++) {
|
|
4401
|
-
const
|
|
4401
|
+
const E = r * this._subDivisions + x, b = n * this._subDivisions + L, [w, S] = _e(
|
|
4402
4402
|
x / e,
|
|
4403
4403
|
L / e,
|
|
4404
4404
|
l,
|
|
4405
4405
|
m,
|
|
4406
4406
|
this.tmpV2
|
|
4407
4407
|
);
|
|
4408
|
-
this.setVertexPos(
|
|
4409
|
-
const [
|
|
4408
|
+
this.setVertexPos(E, b, w, S), this.setVertexUV(E, b, p + L / i, 1 - T - x / s);
|
|
4409
|
+
const [_, v, z] = Fe(
|
|
4410
4410
|
x / e,
|
|
4411
4411
|
L / e,
|
|
4412
4412
|
g,
|
|
4413
4413
|
u,
|
|
4414
4414
|
M
|
|
4415
4415
|
);
|
|
4416
|
-
this.setVertexColor(
|
|
4416
|
+
this.setVertexColor(E, b, _, v, z);
|
|
4417
4417
|
}
|
|
4418
4418
|
}
|
|
4419
4419
|
this.update();
|
|
@@ -4465,8 +4465,8 @@ class Ns extends Jt {
|
|
|
4465
4465
|
32,
|
|
4466
4466
|
32
|
|
4467
4467
|
));
|
|
4468
|
-
f(this, "targetSize",
|
|
4469
|
-
f(this, "currentSize",
|
|
4468
|
+
f(this, "targetSize", k.fromValues(0, 0));
|
|
4469
|
+
f(this, "currentSize", k.fromValues(0, 0));
|
|
4470
4470
|
f(this, "fullScreenMesh");
|
|
4471
4471
|
f(this, "drawFrameBuffer");
|
|
4472
4472
|
f(this, "drawFrameBufferTexture");
|
|
@@ -4714,7 +4714,20 @@ class ee {
|
|
|
4714
4714
|
this.renderer.dispose(), this.element.remove();
|
|
4715
4715
|
}
|
|
4716
4716
|
}
|
|
4717
|
-
const
|
|
4717
|
+
const ke = "_lyricLine_kocao_6", Re = "_lyricBgLine_kocao_31", Ce = "_active_kocao_40", Be = "_lyricDuetLine_kocao_47", Oe = "_lyricMainLine_kocao_52", Ne = "_emphasizeWrapper_kocao_62", qe = "_emphasize_kocao_62", Ue = "_lyricSubLine_kocao_84", Ve = "_disableSpring_kocao_91", We = "_interludeDots_kocao_96", He = "_duet_kocao_115", $e = "_tmpDisableTransition_kocao_127", N = {
|
|
4718
|
+
lyricLine: ke,
|
|
4719
|
+
lyricBgLine: Re,
|
|
4720
|
+
active: Ce,
|
|
4721
|
+
lyricDuetLine: Be,
|
|
4722
|
+
lyricMainLine: Oe,
|
|
4723
|
+
emphasizeWrapper: Ne,
|
|
4724
|
+
emphasize: qe,
|
|
4725
|
+
lyricSubLine: Ue,
|
|
4726
|
+
disableSpring: Ve,
|
|
4727
|
+
interludeDots: We,
|
|
4728
|
+
duet: He,
|
|
4729
|
+
tmpDisableTransition: $e
|
|
4730
|
+
}, se = -1, Lt = 0, Et = 1, St = 2, Dt = 3, It = 4, At = 5, kt = 6, ie = 7, ne = 8, Ht = typeof self == "object" ? self : globalThis, Ye = (d, t) => {
|
|
4718
4731
|
const e = (i, n) => (d.set(n, i), i), s = (i) => {
|
|
4719
4732
|
if (d.has(i))
|
|
4720
4733
|
return d.get(i);
|
|
@@ -4765,11 +4778,11 @@ const se = -1, Lt = 0, Et = 1, St = 2, Dt = 3, It = 4, At = 5, kt = 6, ie = 7, n
|
|
|
4765
4778
|
return e(new Ht[n](r), i);
|
|
4766
4779
|
};
|
|
4767
4780
|
return s;
|
|
4768
|
-
}, $t = (d) =>
|
|
4781
|
+
}, $t = (d) => Ye(/* @__PURE__ */ new Map(), d)(0), nt = "", { toString: Xe } = {}, { keys: Ge } = Object, ot = (d) => {
|
|
4769
4782
|
const t = typeof d;
|
|
4770
4783
|
if (t !== "object" || !d)
|
|
4771
4784
|
return [Lt, t];
|
|
4772
|
-
const e =
|
|
4785
|
+
const e = Xe.call(d).slice(8, -1);
|
|
4773
4786
|
switch (e) {
|
|
4774
4787
|
case "Array":
|
|
4775
4788
|
return [Et, nt];
|
|
@@ -4785,7 +4798,7 @@ const se = -1, Lt = 0, Et = 1, St = 2, Dt = 3, It = 4, At = 5, kt = 6, ie = 7, n
|
|
|
4785
4798
|
return [kt, nt];
|
|
4786
4799
|
}
|
|
4787
4800
|
return e.includes("Array") ? [Et, e] : e.includes("Error") ? [ie, e] : [St, e];
|
|
4788
|
-
}, Tt = ([d, t]) => d === Lt && (t === "function" || t === "symbol"),
|
|
4801
|
+
}, Tt = ([d, t]) => d === Lt && (t === "function" || t === "symbol"), je = (d, t, e, s) => {
|
|
4789
4802
|
const i = (r, a) => {
|
|
4790
4803
|
const c = s.push(r) - 1;
|
|
4791
4804
|
return e.set(a, c), c;
|
|
@@ -4832,7 +4845,7 @@ const se = -1, Lt = 0, Et = 1, St = 2, Dt = 3, It = 4, At = 5, kt = 6, ie = 7, n
|
|
|
4832
4845
|
if (t && "toJSON" in r)
|
|
4833
4846
|
return n(r.toJSON());
|
|
4834
4847
|
const o = [], l = i([a, o], r);
|
|
4835
|
-
for (const m of
|
|
4848
|
+
for (const m of Ge(r))
|
|
4836
4849
|
(d || !Tt(ot(r[m]))) && o.push([n(m), n(r[m])]);
|
|
4837
4850
|
return l;
|
|
4838
4851
|
}
|
|
@@ -4861,24 +4874,11 @@ const se = -1, Lt = 0, Et = 1, St = 2, Dt = 3, It = 4, At = 5, kt = 6, ie = 7, n
|
|
|
4861
4874
|
return n;
|
|
4862
4875
|
}, Yt = (d, { json: t, lossy: e } = {}) => {
|
|
4863
4876
|
const s = [];
|
|
4864
|
-
return
|
|
4865
|
-
},
|
|
4877
|
+
return je(!(t || e), !!t, /* @__PURE__ */ new Map(), s)(d), s;
|
|
4878
|
+
}, Ze = typeof structuredClone == "function" ? (
|
|
4866
4879
|
/* c8 ignore start */
|
|
4867
4880
|
(d, t) => t && ("json" in t || "lossy" in t) ? $t(Yt(d, t)) : structuredClone(d)
|
|
4868
|
-
) : (d, t) => $t(Yt(d, t))
|
|
4869
|
-
lyricLine: Ne,
|
|
4870
|
-
lyricBgLine: qe,
|
|
4871
|
-
active: Ue,
|
|
4872
|
-
lyricDuetLine: Ve,
|
|
4873
|
-
lyricMainLine: We,
|
|
4874
|
-
emphasizeWrapper: He,
|
|
4875
|
-
emphasize: $e,
|
|
4876
|
-
lyricSubLine: Ye,
|
|
4877
|
-
disableSpring: Xe,
|
|
4878
|
-
interludeDots: Ge,
|
|
4879
|
-
duet: je,
|
|
4880
|
-
tmpDisableTransition: Ze
|
|
4881
|
-
};
|
|
4881
|
+
) : (d, t) => $t(Yt(d, t));
|
|
4882
4882
|
function Xt(d, t = 1) {
|
|
4883
4883
|
let e = 0, s = t;
|
|
4884
4884
|
return (...n) => {
|
|
@@ -5012,28 +5012,26 @@ class ts {
|
|
|
5012
5012
|
}
|
|
5013
5013
|
function es(d) {
|
|
5014
5014
|
const e = 2.5949095;
|
|
5015
|
-
return d < 0.5 ?
|
|
5015
|
+
return d < 0.5 ? (2 * d) ** 2 * ((e + 1) * 2 * d - e) / 2 : ((2 * d - 2) ** 2 * ((e + 1) * (d * 2 - 2) + e) + 2) / 2;
|
|
5016
5016
|
}
|
|
5017
5017
|
function ss(d) {
|
|
5018
5018
|
return d === 1 ? 1 : 1 - 2 ** (-10 * d);
|
|
5019
5019
|
}
|
|
5020
5020
|
const Z = (d, t, e) => Math.max(d, Math.min(t, e));
|
|
5021
5021
|
class is {
|
|
5022
|
-
constructor(
|
|
5022
|
+
constructor() {
|
|
5023
5023
|
f(this, "element", document.createElement("div"));
|
|
5024
5024
|
f(this, "dot0", document.createElement("span"));
|
|
5025
5025
|
f(this, "dot1", document.createElement("span"));
|
|
5026
5026
|
f(this, "dot2", document.createElement("span"));
|
|
5027
5027
|
f(this, "left", 0);
|
|
5028
5028
|
f(this, "top", 0);
|
|
5029
|
-
f(this, "scale", 1);
|
|
5030
5029
|
f(this, "playing", !0);
|
|
5031
5030
|
f(this, "lastStyle", "");
|
|
5032
5031
|
f(this, "currentInterlude");
|
|
5033
5032
|
f(this, "currentTime", 0);
|
|
5034
|
-
f(this, "interludeTime", 0);
|
|
5035
5033
|
f(this, "targetBreatheDuration", 1500);
|
|
5036
|
-
this.
|
|
5034
|
+
this.element.className = N.interludeDots, this.element.appendChild(this.dot0), this.element.appendChild(this.dot1), this.element.appendChild(this.dot2);
|
|
5037
5035
|
}
|
|
5038
5036
|
getElement() {
|
|
5039
5037
|
return this.element;
|
|
@@ -5601,17 +5599,17 @@ class zs extends EventTarget {
|
|
|
5601
5599
|
const l = Number.isFinite(a) ? a : 0, m = ws(Rt);
|
|
5602
5600
|
return c = s.flatMap((g, u, M) => {
|
|
5603
5601
|
const p = r + a / 2.5 / M.length * u, T = [], x = new Array(bt).fill(0).map((w, S) => {
|
|
5604
|
-
const
|
|
5602
|
+
const _ = (S + 1) / bt, v = m(_), z = m(_) * o, P = gs(ps(), 1 + v * 0.1 * h), A = -v * 0.03 * h * (M.length / 2 - u), R = -v * 0.025 * h;
|
|
5605
5603
|
return {
|
|
5606
|
-
offset:
|
|
5604
|
+
offset: _,
|
|
5607
5605
|
transform: `${us(
|
|
5608
5606
|
P,
|
|
5609
5607
|
4
|
|
5610
|
-
)} translate(${
|
|
5608
|
+
)} translate(${A}em, ${R}em)`,
|
|
5611
5609
|
textShadow: `0 0 ${Math.min(
|
|
5612
5610
|
0.3,
|
|
5613
5611
|
o * 0.3
|
|
5614
|
-
)}em rgba(255, 255, 255, ${
|
|
5612
|
+
)}em rgba(255, 255, 255, ${z})`
|
|
5615
5613
|
};
|
|
5616
5614
|
}), L = g.animate(x, {
|
|
5617
5615
|
duration: l,
|
|
@@ -5619,31 +5617,29 @@ class zs extends EventTarget {
|
|
|
5619
5617
|
id: `emphasize-word-${g.innerText}-${u}`,
|
|
5620
5618
|
iterations: 1,
|
|
5621
5619
|
composite: "replace",
|
|
5622
|
-
easing: "linear",
|
|
5623
5620
|
fill: "both"
|
|
5624
5621
|
});
|
|
5625
5622
|
L.onfinish = () => {
|
|
5626
5623
|
L.pause();
|
|
5627
5624
|
}, L.pause(), T.push(L);
|
|
5628
|
-
const
|
|
5629
|
-
const
|
|
5630
|
-
let v = Math.sin(
|
|
5625
|
+
const E = new Array(bt).fill(0).map((w, S) => {
|
|
5626
|
+
const _ = (S + 1) / bt;
|
|
5627
|
+
let v = Math.sin(_ * Math.PI);
|
|
5631
5628
|
return this.lyricLine.isBG && (v *= 2), {
|
|
5632
|
-
offset:
|
|
5629
|
+
offset: _,
|
|
5633
5630
|
transform: `translateY(${-v * 0.05}em)`
|
|
5634
5631
|
};
|
|
5635
|
-
}),
|
|
5632
|
+
}), b = g.animate(E, {
|
|
5636
5633
|
duration: l * 1.4,
|
|
5637
5634
|
delay: Number.isFinite(p) ? p - 400 : 0,
|
|
5638
5635
|
id: "emphasize-word-float",
|
|
5639
5636
|
iterations: 1,
|
|
5640
5637
|
composite: "add",
|
|
5641
|
-
easing: "linear",
|
|
5642
5638
|
fill: "both"
|
|
5643
5639
|
});
|
|
5644
|
-
return
|
|
5645
|
-
|
|
5646
|
-
},
|
|
5640
|
+
return b.onfinish = () => {
|
|
5641
|
+
b.pause();
|
|
5642
|
+
}, b.pause(), T.push(b), T;
|
|
5647
5643
|
}), c;
|
|
5648
5644
|
}
|
|
5649
5645
|
get totalDuration() {
|
|
@@ -5702,59 +5698,55 @@ class zs extends EventTarget {
|
|
|
5702
5698
|
r / (s.width + s.padding * 2)
|
|
5703
5699
|
), h = `${c * 100}% 100%`;
|
|
5704
5700
|
this.lyricPlayer.supportMaskImage ? (n.style.maskImage = a, n.style.maskRepeat = "no-repeat", n.style.maskOrigin = "left", n.style.maskSize = h) : (n.style.webkitMaskImage = a, n.style.webkitMaskRepeat = "no-repeat", n.style.webkitMaskOrigin = "left", n.style.webkitMaskSize = h);
|
|
5705
|
-
const o = this.splittedWords.slice(0, i).reduce((
|
|
5701
|
+
const o = this.splittedWords.slice(0, i).reduce((E, b) => E + b.width, 0) + (this.splittedWords[0] ? r : 0), l = -(s.width + s.padding * 2 + r), m = (E) => Math.max(l, Math.min(0, E));
|
|
5706
5702
|
let g = -o - s.width - s.padding - r, u = 0;
|
|
5707
5703
|
const M = [];
|
|
5708
5704
|
let p = g, T = 0;
|
|
5709
5705
|
const x = () => {
|
|
5710
|
-
const
|
|
5706
|
+
const E = g - p, b = Math.max(0, Math.min(1, u)), w = b - T, S = Math.abs(w / E);
|
|
5711
5707
|
if (g > l && p < l) {
|
|
5712
|
-
const
|
|
5713
|
-
offset: T +
|
|
5714
|
-
maskPosition:
|
|
5715
|
-
easing: b
|
|
5708
|
+
const z = Math.abs(p - l) * S, P = `${m(p)}px 0`, A = {
|
|
5709
|
+
offset: T + z,
|
|
5710
|
+
maskPosition: P
|
|
5716
5711
|
};
|
|
5717
|
-
M.push(
|
|
5712
|
+
M.push(A);
|
|
5718
5713
|
}
|
|
5719
5714
|
if (g > 0 && p < 0) {
|
|
5720
|
-
const
|
|
5721
|
-
offset: T +
|
|
5722
|
-
maskPosition:
|
|
5723
|
-
easing: b
|
|
5715
|
+
const z = Math.abs(p) * S, P = `${m(g)}px 0`, A = {
|
|
5716
|
+
offset: T + z,
|
|
5717
|
+
maskPosition: P
|
|
5724
5718
|
};
|
|
5725
|
-
M.push(
|
|
5719
|
+
M.push(A);
|
|
5726
5720
|
}
|
|
5727
|
-
const
|
|
5728
|
-
offset:
|
|
5729
|
-
maskPosition:
|
|
5730
|
-
easing: b
|
|
5721
|
+
const _ = `${m(g)}px 0`, v = {
|
|
5722
|
+
offset: b,
|
|
5723
|
+
maskPosition: _
|
|
5731
5724
|
};
|
|
5732
|
-
M.push(
|
|
5725
|
+
M.push(v), p = g, T = b;
|
|
5733
5726
|
};
|
|
5734
5727
|
x();
|
|
5735
5728
|
let L = 0;
|
|
5736
|
-
this.splittedWords.forEach((
|
|
5729
|
+
this.splittedWords.forEach((E, b) => {
|
|
5737
5730
|
{
|
|
5738
|
-
const w =
|
|
5731
|
+
const w = E.startTime - this.lyricLine.startTime, S = w - L;
|
|
5739
5732
|
u += S / e, S > 0 && x(), L = w;
|
|
5740
5733
|
}
|
|
5741
5734
|
{
|
|
5742
|
-
const w =
|
|
5743
|
-
u += w / e, g +=
|
|
5735
|
+
const w = E.endTime - E.startTime;
|
|
5736
|
+
u += w / e, g += E.width, b === 0 && (g += r * 1.5), b === this.splittedWords.length - 1 && (g += r * 0.5), w > 0 && x(), L += w;
|
|
5744
5737
|
}
|
|
5745
5738
|
});
|
|
5746
|
-
for (const
|
|
5747
|
-
|
|
5739
|
+
for (const E of s.maskAnimations)
|
|
5740
|
+
E.cancel();
|
|
5748
5741
|
try {
|
|
5749
|
-
const
|
|
5742
|
+
const E = n.animate(M, {
|
|
5750
5743
|
duration: e || 1,
|
|
5751
5744
|
id: `fade-word-${s.word}-${i}`,
|
|
5752
|
-
fill: "both"
|
|
5753
|
-
easing: "cubic-bezier(1,1,.66,.99)"
|
|
5745
|
+
fill: "both"
|
|
5754
5746
|
});
|
|
5755
|
-
|
|
5756
|
-
} catch (
|
|
5757
|
-
console.warn("应用渐变动画发生错误", M, e,
|
|
5747
|
+
E.pause(), s.maskAnimations = [E];
|
|
5748
|
+
} catch (E) {
|
|
5749
|
+
console.warn("应用渐变动画发生错误", M, e, E);
|
|
5758
5750
|
}
|
|
5759
5751
|
}
|
|
5760
5752
|
});
|
|
@@ -5950,7 +5942,7 @@ class qs extends EventTarget {
|
|
|
5950
5942
|
f(this, "onPageHide", () => {
|
|
5951
5943
|
this.isPageVisible = !1;
|
|
5952
5944
|
});
|
|
5953
|
-
this.interludeDots = new is(
|
|
5945
|
+
this.interludeDots = new is(), this.bottomLine = new ts(this), this.element.classList.add("amll-lyric-player", "dom"), this.disableSpring && this.element.classList.add(N.disableSpring), this.rebuildStyle(), this.resizeObserver.observe(this.element), this.element.appendChild(this.interludeDots.getElement()), this.element.appendChild(this.bottomLine.getElement()), this.interludeDots.setTransform(0, 200), window.addEventListener("pageshow", this.onPageShow), window.addEventListener("pagehide", this.onPageHide);
|
|
5954
5946
|
let e = 0, s = "none", i = 0, n = 0, r = 0, a = Symbol("amll-scroll"), c = 0, h = 0;
|
|
5955
5947
|
this.element.addEventListener("touchstart", (o) => {
|
|
5956
5948
|
this.beginScrollHandler() && (o.preventDefault(), e = this.scrollOffset, i = o.touches[0].screenY, c = i, n = Date.now(), r = 0);
|
|
@@ -6146,7 +6138,7 @@ class qs extends EventTarget {
|
|
|
6146
6138
|
for (const i of e)
|
|
6147
6139
|
for (const n of i.words)
|
|
6148
6140
|
n.word = n.word.replace(/\s+/g, " ");
|
|
6149
|
-
this.lastCurrentTime = s, this.currentTime = s, this.lyricLines = e, this.processedLines =
|
|
6141
|
+
this.lastCurrentTime = s, this.currentTime = s, this.lyricLines = e, this.processedLines = Ze(e), this.isNonDynamic = !0, this.isNonDuet = !0;
|
|
6150
6142
|
for (const i of this.processedLines)
|
|
6151
6143
|
if (i.words.length > 1) {
|
|
6152
6144
|
this.isNonDynamic = !1;
|
|
@@ -6234,27 +6226,27 @@ class qs extends EventTarget {
|
|
|
6234
6226
|
const o = Math.max(...this.bufferedLines);
|
|
6235
6227
|
let l = 0, m = 0.05, g = !1;
|
|
6236
6228
|
this.lyricLinesEl.forEach((M, p) => {
|
|
6237
|
-
var v,
|
|
6229
|
+
var v, z, P;
|
|
6238
6230
|
const T = this.bufferedLines.has(p), x = T || p >= this.scrollToIndex && p < o, L = M.getLine();
|
|
6239
|
-
let
|
|
6240
|
-
L.isDuet && (
|
|
6241
|
-
let
|
|
6242
|
-
this.hidePassedLines ? p < (i ? i[2] + 1 : this.scrollToIndex) ? (
|
|
6231
|
+
let E = 24;
|
|
6232
|
+
L.isDuet && (E = this.size[0] - (((v = this.lyricLinesSize.get(M)) == null ? void 0 : v[0]) ?? 0)), !g && a >= 4e3 && (p === this.scrollToIndex && (i == null ? void 0 : i[2]) === -2 || p === this.scrollToIndex + 1) && (g = !0, this.interludeDots.setTransform(24, n + 10), i && this.interludeDots.setInterlude([i[0], i[1]]), n += this.interludeDotsSize[1] + 40);
|
|
6233
|
+
let b, w;
|
|
6234
|
+
this.hidePassedLines ? p < (i ? i[2] + 1 : this.scrollToIndex) ? (b = 0, w = 0) : T ? (b = 0.85, w = 0.4) : (b = this.isNonDynamic ? 0.2 : 1, w = 0.2) : T ? (b = 0.85, w = 0.4) : (b = this.isNonDynamic ? 0.2 : 1, w = 0.2);
|
|
6243
6235
|
let S = 0;
|
|
6244
6236
|
this.enableBlur && (x ? S = 0 : (S = 1, p < this.scrollToIndex ? S += Math.abs(this.scrollToIndex - p) + 1 : S += Math.abs(
|
|
6245
6237
|
p - Math.max(this.scrollToIndex, o)
|
|
6246
6238
|
))), this.invokedByScrollEvent && (S = 0);
|
|
6247
|
-
const
|
|
6239
|
+
const _ = this.enableScale ? 97 : 100;
|
|
6248
6240
|
M.setTransform(
|
|
6249
|
-
b,
|
|
6250
|
-
n,
|
|
6251
|
-
x ? 100 : L.isBG ? 75 : z,
|
|
6252
6241
|
E,
|
|
6242
|
+
n,
|
|
6243
|
+
x ? 100 : L.isBG ? 75 : _,
|
|
6244
|
+
b,
|
|
6253
6245
|
w,
|
|
6254
6246
|
window.innerWidth <= 1024 ? S * 0.8 : S,
|
|
6255
6247
|
e,
|
|
6256
6248
|
l
|
|
6257
|
-
), L.isBG && x ? n += ((
|
|
6249
|
+
), L.isBG && x ? n += ((z = this.lyricLinesSize.get(M)) == null ? void 0 : z[1]) ?? 0 : L.isBG || (n += ((P = this.lyricLinesSize.get(M)) == null ? void 0 : P[1]) ?? 0), n >= 0 && !this.isSeeking && (L.isBG || (l += m), p >= this.scrollToIndex && (m /= 1.05));
|
|
6258
6250
|
}), this.scrollBoundary[1] = n + this.scrollOffset - this.size[1] / 2, this.bottomLine.setTransform(24, n, e, l);
|
|
6259
6251
|
}
|
|
6260
6252
|
/**
|