gralobe 1.0.15 → 1.0.17
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/gralobe.js +131 -133
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +3 -3
- package/dist/gralobe.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/gralobe.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as S from "three";
|
|
2
2
|
import { Controls as kr, Vector3 as se, MOUSE as tt, TOUCH as Qe, Quaternion as Yi, Spherical as Zi, Vector2 as de, Ray as Ur, Plane as Fr, MathUtils as zr, Matrix4 as Tn, Object3D as Nr } from "three";
|
|
3
|
-
const Ki = { type: "change" },
|
|
3
|
+
const Ki = { type: "change" }, Pi = { type: "start" }, Sn = { type: "end" }, Mt = new Ur(), Xi = new Fr(), $r = Math.cos(70 * zr.DEG2RAD), Y = new se(), J = 2 * Math.PI, I = {
|
|
4
4
|
NONE: -1,
|
|
5
5
|
ROTATE: 0,
|
|
6
6
|
DOLLY: 1,
|
|
@@ -364,7 +364,7 @@ function jr(a) {
|
|
|
364
364
|
default:
|
|
365
365
|
this.state = I.NONE;
|
|
366
366
|
}
|
|
367
|
-
this.state !== I.NONE && this.dispatchEvent(
|
|
367
|
+
this.state !== I.NONE && this.dispatchEvent(Pi);
|
|
368
368
|
}
|
|
369
369
|
function Yr(a) {
|
|
370
370
|
switch (this.state) {
|
|
@@ -383,7 +383,7 @@ function Yr(a) {
|
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
function Zr(a) {
|
|
386
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !== I.NONE || (a.preventDefault(), this.dispatchEvent(
|
|
386
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== I.NONE || (a.preventDefault(), this.dispatchEvent(Pi), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Sn));
|
|
387
387
|
}
|
|
388
388
|
function Kr(a) {
|
|
389
389
|
this.enabled !== !1 && this._handleKeyDown(a);
|
|
@@ -421,7 +421,7 @@ function Xr(a) {
|
|
|
421
421
|
default:
|
|
422
422
|
this.state = I.NONE;
|
|
423
423
|
}
|
|
424
|
-
this.state !== I.NONE && this.dispatchEvent(
|
|
424
|
+
this.state !== I.NONE && this.dispatchEvent(Pi);
|
|
425
425
|
}
|
|
426
426
|
function Wr(a) {
|
|
427
427
|
switch (this._trackPointer(a), this.state) {
|
|
@@ -473,11 +473,11 @@ var he = {
|
|
|
473
473
|
duration: 0.5,
|
|
474
474
|
overwrite: !1,
|
|
475
475
|
delay: 0
|
|
476
|
-
},
|
|
476
|
+
}, Ci, K, z, fe = 1e8, k = 1 / fe, oi = Math.PI * 2, es = oi / 4, ts = 0, Mn = Math.sqrt, is = Math.cos, ns = Math.sin, Z = function(e) {
|
|
477
477
|
return typeof e == "string";
|
|
478
478
|
}, G = function(e) {
|
|
479
479
|
return typeof e == "function";
|
|
480
|
-
},
|
|
480
|
+
}, Ce = function(e) {
|
|
481
481
|
return typeof e == "number";
|
|
482
482
|
}, Ai = function(e) {
|
|
483
483
|
return typeof e > "u";
|
|
@@ -627,7 +627,7 @@ var he = {
|
|
|
627
627
|
e._zTime = -k;
|
|
628
628
|
}
|
|
629
629
|
}, ye = function(e, t, i, n) {
|
|
630
|
-
return t.parent && Ie(t), t._start = j((
|
|
630
|
+
return t.parent && Ie(t), t._start = j((Ce(i) ? i : i || e !== N ? pe(e, i, t) : e._time) + t._delay), t._end = j(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)), Vn(e, t, "_first", "_last", e._sort ? "_start" : 0), di(t) || (e._recent = t), n || Hn(e, t), e._ts < 0 && Kt(e, e._tTime), e;
|
|
631
631
|
}, jn = function(e, t) {
|
|
632
632
|
return (ce.ScrollTrigger || Di("scrollTrigger", t)) && ce.ScrollTrigger.create(t, e);
|
|
633
633
|
}, Yn = function(e, t, i, n, r) {
|
|
@@ -677,7 +677,7 @@ var he = {
|
|
|
677
677
|
var n = e.labels, r = e._recent || ms, s = e.duration() >= fe ? r.endTime(!1) : e._dur, o, l, c;
|
|
678
678
|
return Z(t) && (isNaN(t) || t in n) ? (l = t.charAt(0), c = t.substr(-1) === "%", o = t.indexOf("="), l === "<" || l === ">" ? (o >= 0 && (t = t.replace(/=/, "")), (l === "<" ? r._start : r.endTime(r._repeat >= 0)) + (parseFloat(t.substr(1)) || 0) * (c ? (o < 0 ? r : i).totalDuration() / 100 : 1)) : o < 0 ? (t in n || (n[t] = s), n[t]) : (l = parseFloat(t.charAt(o - 1) + t.substr(o + 1)), c && i && (l = l / 100 * (W(i) ? i[0] : i).totalDuration()), o > 1 ? a(e, t.substr(0, o - 1), i) + l : s + l)) : t == null ? s : +t;
|
|
679
679
|
}, xt = function(e, t, i) {
|
|
680
|
-
var n =
|
|
680
|
+
var n = Ce(t[1]), r = (n ? 2 : 1) + (e < 2 ? 0 : 1), s = t[r], o, l;
|
|
681
681
|
if (n && (s.duration = t[1]), s.parent = i, e) {
|
|
682
682
|
for (o = s, l = i; l && !("immediateRender" in o); )
|
|
683
683
|
o = l.vars.defaults || {}, l = ee(l.vars.inherit) && l.parent;
|
|
@@ -723,16 +723,16 @@ var he = {
|
|
|
723
723
|
edges: 0.5,
|
|
724
724
|
end: 1
|
|
725
725
|
}[n] || 0 : !o && l && (h = n[0], u = n[1]), function(p, m, f) {
|
|
726
|
-
var d = (f || t).length, g = s[d], _, y, x, v, b,
|
|
726
|
+
var d = (f || t).length, g = s[d], _, y, x, v, b, P, E, C, w;
|
|
727
727
|
if (!g) {
|
|
728
728
|
if (w = t.grid === "auto" ? 0 : (t.grid || [1, fe])[1], !w) {
|
|
729
729
|
for (E = -fe; E < (E = f[w++].getBoundingClientRect().left) && w < d; )
|
|
730
730
|
;
|
|
731
731
|
w < d && w--;
|
|
732
732
|
}
|
|
733
|
-
for (g = s[d] = [], _ = l ? Math.min(w, d) * h - 0.5 : n % w, y = w === fe ? 0 : l ? d * u / w - 0.5 : n / w | 0, E = 0,
|
|
734
|
-
x =
|
|
735
|
-
n === "random" && Kn(g), g.max = E -
|
|
733
|
+
for (g = s[d] = [], _ = l ? Math.min(w, d) * h - 0.5 : n % w, y = w === fe ? 0 : l ? d * u / w - 0.5 : n / w | 0, E = 0, C = fe, P = 0; P < d; P++)
|
|
734
|
+
x = P % w - _, v = y - (P / w | 0), g[P] = b = c ? Math.abs(c === "y" ? v : x) : Mn(x * x + v * v), b > E && (E = b), b < C && (C = b);
|
|
735
|
+
n === "random" && Kn(g), g.max = E - C, g.min = C, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 : c ? c === "y" ? d / w : w : Math.max(w, d / w)) || 0) * (n === "edges" ? -1 : 1), g.b = d < 0 ? r - d : r, g.u = X(t.amount || t.each) || 0, i = i && d < 0 ? sr(i) : i;
|
|
736
736
|
}
|
|
737
737
|
return d = (g[p] - g.min) / g.max || 0, j(g.b + (i ? i(d) : d) * g.v) + g.u;
|
|
738
738
|
};
|
|
@@ -740,16 +740,16 @@ var he = {
|
|
|
740
740
|
var t = Math.pow(10, ((e + "").split(".")[1] || "").length);
|
|
741
741
|
return function(i) {
|
|
742
742
|
var n = j(Math.round(parseFloat(i) / e) * e * t);
|
|
743
|
-
return (n - n % 1) / t + (
|
|
743
|
+
return (n - n % 1) / t + (Ce(i) ? 0 : X(i));
|
|
744
744
|
};
|
|
745
745
|
}, Wn = function(e, t) {
|
|
746
746
|
var i = W(e), n, r;
|
|
747
|
-
return !i && ve(e) && (n = i = e.radius || fe, e.values ? (e = me(e.values), (r = !
|
|
747
|
+
return !i && ve(e) && (n = i = e.radius || fe, e.values ? (e = me(e.values), (r = !Ce(e[0])) && (n *= n)) : e = mi(e.increment)), ke(t, i ? G(e) ? function(s) {
|
|
748
748
|
return r = e(s), Math.abs(r - s) <= n ? r : s;
|
|
749
749
|
} : function(s) {
|
|
750
750
|
for (var o = parseFloat(r ? s.x : s), l = parseFloat(r ? s.y : 0), c = fe, h = 0, u = e.length, p, m; u--; )
|
|
751
751
|
r ? (p = e[u].x - o, m = e[u].y - l, p = p * p + m * m) : p = Math.abs(e[u] - o), p < c && (c = p, h = u);
|
|
752
|
-
return h = !n || c <= n ? e[h] : s, r || h === s ||
|
|
752
|
+
return h = !n || c <= n ? e[h] : s, r || h === s || Ce(s) ? h : h + X(s);
|
|
753
753
|
} : mi(e));
|
|
754
754
|
}, qn = function(e, t, i, n) {
|
|
755
755
|
return ke(W(e) ? !t : i === !0 ? !!(i = 0) : !n, function() {
|
|
@@ -883,7 +883,7 @@ var he = {
|
|
|
883
883
|
}, Qt = function(e, t, i) {
|
|
884
884
|
return e += e < 0 ? 1 : e > 1 ? -1 : 0, (e * 6 < 1 ? t + (i - t) * e * 6 : e < 0.5 ? i : e * 3 < 2 ? t + (i - t) * (2 / 3 - e) * 6 : t) * L + 0.5 | 0;
|
|
885
885
|
}, ir = function(e, t, i) {
|
|
886
|
-
var n = e ?
|
|
886
|
+
var n = e ? Ce(e) ? [e >> 16, e >> 8 & L, e & L] : 0 : gt.black, r, s, o, l, c, h, u, p, m, f;
|
|
887
887
|
if (!n) {
|
|
888
888
|
if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), gt[e])
|
|
889
889
|
n = gt[e];
|
|
@@ -925,16 +925,16 @@ var he = {
|
|
|
925
925
|
for (e in gt)
|
|
926
926
|
a += "|" + e + "\\b";
|
|
927
927
|
return new RegExp(a + ")", "gi");
|
|
928
|
-
})(),
|
|
928
|
+
})(), Ps = /hsl[a]?\(/, rr = function(e) {
|
|
929
929
|
var t = e.join(" "), i;
|
|
930
930
|
if (Oe.lastIndex = 0, Oe.test(t))
|
|
931
|
-
return i =
|
|
932
|
-
},
|
|
931
|
+
return i = Ps.test(t), e[1] = tn(e[1], i), e[0] = tn(e[0], i, nr(e[1])), !0;
|
|
932
|
+
}, Pt, oe = (function() {
|
|
933
933
|
var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, c, h, u, p, m, f = function d(g) {
|
|
934
|
-
var _ = a() - n, y = g === !0, x, v, b,
|
|
935
|
-
if ((_ > e || _ < 0) && (i += _ - t), n += _, b = n - i, x = b - s, (x > 0 || y) && (
|
|
934
|
+
var _ = a() - n, y = g === !0, x, v, b, P;
|
|
935
|
+
if ((_ > e || _ < 0) && (i += _ - t), n += _, b = n - i, x = b - s, (x > 0 || y) && (P = ++u.frame, p = b - u.time * 1e3, u.time = b = b / 1e3, s += x + (x >= r ? 4 : r - x), v = 1), y || (l = c(d)), v)
|
|
936
936
|
for (m = 0; m < o.length; m++)
|
|
937
|
-
o[m](b, p,
|
|
937
|
+
o[m](b, p, P, g);
|
|
938
938
|
};
|
|
939
939
|
return u = {
|
|
940
940
|
time: 0,
|
|
@@ -948,10 +948,10 @@ var he = {
|
|
|
948
948
|
wake: function() {
|
|
949
949
|
kn && (!hi && Ti() && (_e = hi = window, Si = _e.document || {}, ce.gsap = re, (_e.gsapVersions || (_e.gsapVersions = [])).push(re.version), Un(Nt || _e.GreenSockGlobals || !_e.gsap && _e || {}), er.forEach(tr)), h = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), c = h || function(g) {
|
|
950
950
|
return setTimeout(g, s - u.time * 1e3 + 1 | 0);
|
|
951
|
-
},
|
|
951
|
+
}, Pt = 1, f(2));
|
|
952
952
|
},
|
|
953
953
|
sleep: function() {
|
|
954
|
-
(h ? cancelAnimationFrame : clearTimeout)(l),
|
|
954
|
+
(h ? cancelAnimationFrame : clearTimeout)(l), Pt = 0, c = Et;
|
|
955
955
|
},
|
|
956
956
|
lagSmoothing: function(g, _) {
|
|
957
957
|
e = g || 1 / 0, t = Math.min(_ || 33, e);
|
|
@@ -960,8 +960,8 @@ var he = {
|
|
|
960
960
|
r = 1e3 / (g || 240), s = u.time * 1e3 + r;
|
|
961
961
|
},
|
|
962
962
|
add: function(g, _, y) {
|
|
963
|
-
var x = _ ? function(v, b,
|
|
964
|
-
g(v, b,
|
|
963
|
+
var x = _ ? function(v, b, P, E) {
|
|
964
|
+
g(v, b, P, E), u.remove(x);
|
|
965
965
|
} : g;
|
|
966
966
|
return u.remove(g), o[y ? "unshift" : "push"](x), ht(), x;
|
|
967
967
|
},
|
|
@@ -971,8 +971,8 @@ var he = {
|
|
|
971
971
|
_listeners: o
|
|
972
972
|
}, u;
|
|
973
973
|
})(), ht = function() {
|
|
974
|
-
return !
|
|
975
|
-
}, D = {},
|
|
974
|
+
return !Pt && oe.wake();
|
|
975
|
+
}, D = {}, Cs = /^[\d.\-M][\d.\-,\s]/, As = /["']/g, Ts = function(e) {
|
|
976
976
|
for (var t = {}, i = e.substr(1, e.length - 3).split(":"), n = i[0], r = 1, s = i.length, o, l, c; r < s; r++)
|
|
977
977
|
l = i[r], o = r !== s - 1 ? l.lastIndexOf(",") : l.length, c = l.substr(0, o), t[n] = isNaN(c) ? c.replace(As, "").trim() : +c, n = l.substr(o + 1).trim();
|
|
978
978
|
return t;
|
|
@@ -981,7 +981,7 @@ var he = {
|
|
|
981
981
|
return e.substring(t, ~n && n < i ? e.indexOf(")", i + 1) : i);
|
|
982
982
|
}, Ds = function(e) {
|
|
983
983
|
var t = (e + "").split("("), i = D[t[0]];
|
|
984
|
-
return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [Ts(t[1])] : Ss(e).split(",").map(Bn)) : D._CE &&
|
|
984
|
+
return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [Ts(t[1])] : Ss(e).split(",").map(Bn)) : D._CE && Cs.test(e) ? D._CE("", e) : i;
|
|
985
985
|
}, sr = function(e) {
|
|
986
986
|
return function(t) {
|
|
987
987
|
return 1 - e(1 - t);
|
|
@@ -1078,9 +1078,9 @@ te("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", functio
|
|
|
1078
1078
|
});
|
|
1079
1079
|
var lr = function(e, t) {
|
|
1080
1080
|
this.id = ts++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : Nn, this.set = t ? t.getSetter : Fi;
|
|
1081
|
-
},
|
|
1081
|
+
}, Ct = /* @__PURE__ */ (function() {
|
|
1082
1082
|
function a(t) {
|
|
1083
|
-
this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, lt(this, +t.duration, 1, 1), this.data = t.data, z && (this._ctx = z, z.data.push(this)),
|
|
1083
|
+
this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, lt(this, +t.duration, 1, 1), this.data = t.data, z && (this._ctx = z, z.data.push(this)), Pt || oe.wake();
|
|
1084
1084
|
}
|
|
1085
1085
|
var e = a.prototype;
|
|
1086
1086
|
return e.delay = function(i) {
|
|
@@ -1182,7 +1182,7 @@ var lr = function(e, t) {
|
|
|
1182
1182
|
mt(this);
|
|
1183
1183
|
}, a;
|
|
1184
1184
|
})();
|
|
1185
|
-
ue(
|
|
1185
|
+
ue(Ct.prototype, {
|
|
1186
1186
|
_time: 0,
|
|
1187
1187
|
_start: 0,
|
|
1188
1188
|
_end: 0,
|
|
@@ -1226,16 +1226,16 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1226
1226
|
}, t.staggerFromTo = function(n, r, s, o, l, c, h, u) {
|
|
1227
1227
|
return o.startAt = s, yt(o).immediateRender = ee(o.immediateRender), this.staggerTo(n, r, o, l, c, h, u);
|
|
1228
1228
|
}, t.render = function(n, r, s) {
|
|
1229
|
-
var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, c = this._dur, h = n <= 0 ? 0 : j(n), u = this._zTime < 0 != n < 0 && (this._initted || !c), p, m, f, d, g, _, y, x, v, b,
|
|
1229
|
+
var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, c = this._dur, h = n <= 0 ? 0 : j(n), u = this._zTime < 0 != n < 0 && (this._initted || !c), p, m, f, d, g, _, y, x, v, b, P, E;
|
|
1230
1230
|
if (this !== N && h > l && n >= 0 && (h = l), h !== this._tTime || s || u) {
|
|
1231
1231
|
if (o !== this._time && c && (h += this._time - o, n += this._time - o), p = h, v = this._start, x = this._ts, _ = !x, u && (c || (o = this._zTime), (n || !r) && (this._zTime = n)), this._repeat) {
|
|
1232
|
-
if (
|
|
1232
|
+
if (P = this._yoyo, g = c + this._rDelay, this._repeat < -1 && n < 0)
|
|
1233
1233
|
return this.totalTime(g * 100 + n, r, s);
|
|
1234
|
-
if (p = j(h % g), h === l ? (d = this._repeat, p = c) : (b = j(h / g), d = ~~b, d && d === b && (p = c, d--), p > c && (p = c)), b = ot(this._tTime, g), !o && this._tTime && b !== d && this._tTime - b * g - this._dur <= 0 && (b = d),
|
|
1235
|
-
var
|
|
1236
|
-
if (d < b && (
|
|
1234
|
+
if (p = j(h % g), h === l ? (d = this._repeat, p = c) : (b = j(h / g), d = ~~b, d && d === b && (p = c, d--), p > c && (p = c)), b = ot(this._tTime, g), !o && this._tTime && b !== d && this._tTime - b * g - this._dur <= 0 && (b = d), P && d & 1 && (p = c - p, E = 1), d !== b && !this._lock) {
|
|
1235
|
+
var C = P && b & 1, w = C === (P && d & 1);
|
|
1236
|
+
if (d < b && (C = !C), o = C ? 0 : h % c ? c : h, this._lock = 1, this.render(o || (E ? 0 : j(d * g)), r, !c)._lock = 0, this._tTime = h, !r && this.parent && le(this, "onRepeat"), this.vars.repeatRefresh && !E && (this.invalidate()._lock = 1), o && o !== this._time || _ !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
|
|
1237
1237
|
return this;
|
|
1238
|
-
if (c = this._dur, l = this._tDur, w && (this._lock = 2, o =
|
|
1238
|
+
if (c = this._dur, l = this._tDur, w && (this._lock = 2, o = C ? c : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !E && this.invalidate()), this._lock = 0, !this._ts && !_)
|
|
1239
1239
|
return this;
|
|
1240
1240
|
ar(this, E);
|
|
1241
1241
|
}
|
|
@@ -1275,7 +1275,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1275
1275
|
return this;
|
|
1276
1276
|
}, t.add = function(n, r) {
|
|
1277
1277
|
var s = this;
|
|
1278
|
-
if (
|
|
1278
|
+
if (Ce(r) || (r = pe(this, r, n)), !(n instanceof Ct)) {
|
|
1279
1279
|
if (W(n))
|
|
1280
1280
|
return n.forEach(function(o) {
|
|
1281
1281
|
return s.add(o, r);
|
|
@@ -1317,7 +1317,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1317
1317
|
Te !== o[l] && o[l].kill(n, r);
|
|
1318
1318
|
return this;
|
|
1319
1319
|
}, t.getTweensOf = function(n, r) {
|
|
1320
|
-
for (var s = [], o = me(n), l = this._first, c =
|
|
1320
|
+
for (var s = [], o = me(n), l = this._first, c = Ce(r), h; l; )
|
|
1321
1321
|
l instanceof H ? os(l._targets, o) && (c ? (!Te || l._initted && l._ts) && l.globalTime(0) <= r && l.globalTime(l.totalDuration()) > r : !r || l.isActive()) && s.push(l) : (h = l.getTweensOf(o, r)).length && s.push.apply(s, h), l = l._next;
|
|
1322
1322
|
return s;
|
|
1323
1323
|
}, t.tweenTo = function(n, r) {
|
|
@@ -1391,7 +1391,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
1393
|
}, e;
|
|
1394
|
-
})(
|
|
1394
|
+
})(Ct);
|
|
1395
1395
|
ue(q.prototype, {
|
|
1396
1396
|
_lock: 0,
|
|
1397
1397
|
_hasPause: 0,
|
|
@@ -1428,7 +1428,7 @@ var Ms = function(e, t, i, n, r, s, o) {
|
|
|
1428
1428
|
c[o._props[h]] = l;
|
|
1429
1429
|
return o;
|
|
1430
1430
|
}, Te, gi, ki = function a(e, t, i) {
|
|
1431
|
-
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !
|
|
1431
|
+
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !Ci, v = e.timeline, b, P, E, C, w, T, M, A, R, O, B, F, U;
|
|
1432
1432
|
if (v && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ? sr(Ye(u === !0 ? r : u, st.ease)) : 0, u && e._yoyo && !e._repeat && (u = e._yEase, e._yEase = e._ease, e._ease = u), e._from = !v && !!n.runBackwards, !v || p && !n.stagger) {
|
|
1433
1433
|
if (A = g[0] ? He(g[0]).harness : 0, F = A && n[A.prop], b = Bt(n, Mi), d && (d._zTime < 0 && d.progress(1), t < 0 && h && o && !m ? d.render(-1, !0) : d.revert(h && f ? kt : ss), d._lazy = 0), s) {
|
|
1434
1434
|
if (Ie(e._startAt = H.set(g, ue({
|
|
@@ -1463,13 +1463,13 @@ var Ms = function(e, t, i, n, r, s, o) {
|
|
|
1463
1463
|
else if (!t)
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
1466
|
-
for (e._pt = e._ptCache = 0, l = f && ee(l) || l && !f,
|
|
1467
|
-
if (w = g[
|
|
1468
|
-
O[Q] =
|
|
1466
|
+
for (e._pt = e._ptCache = 0, l = f && ee(l) || l && !f, P = 0; P < g.length; P++) {
|
|
1467
|
+
if (w = g[P], M = w._gsap || Oi(g)[P]._gsap, e._ptLookup[P] = O = {}, ci[M.id] && Re.length && $t(), B = y === g ? P : y.indexOf(w), A && (R = new A()).init(w, F || b, e, B, y) !== !1 && (e._pt = C = new ie(e._pt, w, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(Q) {
|
|
1468
|
+
O[Q] = C;
|
|
1469
1469
|
}), R.priority && (T = 1)), !A || F)
|
|
1470
1470
|
for (E in b)
|
|
1471
|
-
ae[E] && (R = hr(E, b, e, B, w, y)) ? R.priority && (T = 1) : O[E] =
|
|
1472
|
-
e._op && e._op[
|
|
1471
|
+
ae[E] && (R = hr(E, b, e, B, w, y)) ? R.priority && (T = 1) : O[E] = C = Li.call(e, w, E, "get", b[E], B, y, 0, n.stringFilter);
|
|
1472
|
+
e._op && e._op[P] && e.kill(w, e._op[P]), x && e._pt && (Te = e, N.killTweensOf(w, O, e.globalTime(t)), U = !e.parent, Te = 0), e._pt && l && (ci[M.id] = 1);
|
|
1473
1473
|
}
|
|
1474
1474
|
T && mr(e), e._onInit && e._onInit(e);
|
|
1475
1475
|
}
|
|
@@ -1525,7 +1525,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1525
1525
|
function e(i, n, r, s) {
|
|
1526
1526
|
var o;
|
|
1527
1527
|
typeof n == "number" && (r.duration = n, n = r, r = null), o = a.call(this, s ? n : yt(n)) || this;
|
|
1528
|
-
var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, x = (W(i) || Rn(i) ?
|
|
1528
|
+
var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, x = (W(i) || Rn(i) ? Ce(i[0]) : "length" in n) ? [i] : me(i), v, b, P, E, C, w, T, M;
|
|
1529
1529
|
if (o._targets = x.length ? Oi(x) : vt("GSAP target " + i + " not found. https://gsap.com", !he.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = m, f || p || Rt(c) || Rt(h)) {
|
|
1530
1530
|
if (n = o.vars, v = o.timeline = new q({
|
|
1531
1531
|
data: "nested",
|
|
@@ -1533,10 +1533,10 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1533
1533
|
targets: y && y.data === "nested" ? y.vars.targets : x
|
|
1534
1534
|
}), v.kill(), v.parent = v._dp = we(o), v._start = 0, p || Rt(c) || Rt(h)) {
|
|
1535
1535
|
if (E = x.length, T = p && Xn(p), ve(p))
|
|
1536
|
-
for (
|
|
1537
|
-
~cr.indexOf(
|
|
1536
|
+
for (C in p)
|
|
1537
|
+
~cr.indexOf(C) && (M || (M = {}), M[C] = p[C]);
|
|
1538
1538
|
for (b = 0; b < E; b++)
|
|
1539
|
-
|
|
1539
|
+
P = Bt(n, ur), P.stagger = 0, _ && (P.yoyoEase = _), M && at(P, M), w = x[b], P.duration = +bt(c, we(o), b, w, x), P.delay = (+bt(h, we(o), b, w, x) || 0) - o._delay, !p && E === 1 && P.delay && (o._delay = h = P.delay, o._start += h, P.delay = 0), v.to(w, P, T ? T(b, w, x) : 0), v._ease = D.none;
|
|
1540
1540
|
v.duration() ? c = h = 0 : o.timeline = 0;
|
|
1541
1541
|
} else if (f) {
|
|
1542
1542
|
yt(ue(v.vars.defaults, {
|
|
@@ -1548,17 +1548,17 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1548
1548
|
return v.to(x, F, ">");
|
|
1549
1549
|
}), v.duration();
|
|
1550
1550
|
else {
|
|
1551
|
-
|
|
1552
|
-
for (
|
|
1553
|
-
|
|
1554
|
-
for (
|
|
1555
|
-
for (R = C
|
|
1551
|
+
P = {};
|
|
1552
|
+
for (C in f)
|
|
1553
|
+
C === "ease" || C === "easeEach" || Ls(C, f[C], P, f.easeEach);
|
|
1554
|
+
for (C in P)
|
|
1555
|
+
for (R = P[C].sort(function(F, U) {
|
|
1556
1556
|
return F.t - U.t;
|
|
1557
1557
|
}), A = 0, b = 0; b < R.length; b++)
|
|
1558
1558
|
O = R[b], B = {
|
|
1559
1559
|
ease: O.e,
|
|
1560
1560
|
duration: (O.t - (b ? R[b - 1].t : 0)) / 100 * c
|
|
1561
|
-
}, B[
|
|
1561
|
+
}, B[C] = O.v, v.to(x, B, A), A += B.duration;
|
|
1562
1562
|
v.duration() < c && v.to({}, {
|
|
1563
1563
|
duration: c - v.duration()
|
|
1564
1564
|
});
|
|
@@ -1567,7 +1567,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1567
1567
|
c || o.duration(c = v.duration());
|
|
1568
1568
|
} else
|
|
1569
1569
|
o.timeline = 0;
|
|
1570
|
-
return m === !0 && !
|
|
1570
|
+
return m === !0 && !Ci && (Te = we(o), N.killTweensOf(x), Te = 0), ye(y, we(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !c && !f && o._start === j(y._time) && ee(u) && us(we(o)) && y.data !== "nested") && (o._tTime = -k, o.render(Math.max(0, -h) || 0)), g && jn(we(o), g), o;
|
|
1571
1571
|
}
|
|
1572
1572
|
var t = e.prototype;
|
|
1573
1573
|
return t.render = function(n, r, s) {
|
|
@@ -1602,7 +1602,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1602
1602
|
}, t.invalidate = function(n) {
|
|
1603
1603
|
return (!n || !this.vars.runBackwards) && (this._startAt = 0), this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0, this._ptLookup = [], this.timeline && this.timeline.invalidate(n), a.prototype.invalidate.call(this, n);
|
|
1604
1604
|
}, t.resetTo = function(n, r, s, o, l) {
|
|
1605
|
-
|
|
1605
|
+
Pt || oe.wake(), this._ts || this.play();
|
|
1606
1606
|
var c = Math.min(this._dur, (this._dp._time - this._start) * this._ts), h;
|
|
1607
1607
|
return this._initted || ki(this, c), h = this._ease(c / this._dur), Os(this, n, r, s, o, h, c, l) ? this.resetTo(n, r, s, o, 1) : (Kt(this, 0), this.parent || Vn(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
|
|
1608
1608
|
}, t.kill = function(n, r) {
|
|
@@ -1647,7 +1647,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1647
1647
|
}, e.killTweensOf = function(n, r, s) {
|
|
1648
1648
|
return N.killTweensOf(n, r, s);
|
|
1649
1649
|
}, e;
|
|
1650
|
-
})(
|
|
1650
|
+
})(Ct);
|
|
1651
1651
|
ue(H.prototype, {
|
|
1652
1652
|
_targets: [],
|
|
1653
1653
|
_lazy: 0,
|
|
@@ -1952,7 +1952,7 @@ var Ze = [], Ft = {}, Bs = [], nn = 0, Gs = 0, ti = function(e) {
|
|
|
1952
1952
|
globals: Fn,
|
|
1953
1953
|
Tween: H,
|
|
1954
1954
|
Timeline: q,
|
|
1955
|
-
Animation:
|
|
1955
|
+
Animation: Ct,
|
|
1956
1956
|
getCache: He,
|
|
1957
1957
|
_removeLinkedListItem: Yt,
|
|
1958
1958
|
reverting: function() {
|
|
@@ -1962,7 +1962,7 @@ var Ze = [], Ft = {}, Bs = [], nn = 0, Gs = 0, ti = function(e) {
|
|
|
1962
1962
|
return e && z && (z.data.push(e), e._ctx = z), z;
|
|
1963
1963
|
},
|
|
1964
1964
|
suppressOverwrites: function(e) {
|
|
1965
|
-
return
|
|
1965
|
+
return Ci = e;
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
1968
|
};
|
|
@@ -2082,8 +2082,8 @@ var rn, Se, nt, Ni, Ge, sn, $i, Ys = function() {
|
|
|
2082
2082
|
if (e in Ae && r) {
|
|
2083
2083
|
if (this.tfm = this.tfm || {}, e !== "transform")
|
|
2084
2084
|
e = xe[e] || e, ~e.indexOf(",") ? e.split(",").forEach(function(o) {
|
|
2085
|
-
return i.tfm[o] =
|
|
2086
|
-
}) : this.tfm[e] = s.x ? s[e] :
|
|
2085
|
+
return i.tfm[o] = Pe(n, o);
|
|
2086
|
+
}) : this.tfm[e] = s.x ? s[e] : Pe(n, e), e === ne && (this.tfm.zOrigin = s.zOrigin);
|
|
2087
2087
|
else
|
|
2088
2088
|
return xe.transform.split(",").forEach(function(o) {
|
|
2089
2089
|
return a.call(i, o, t);
|
|
@@ -2187,7 +2187,7 @@ var rn, Se, nt, Ni, Ge, sn, $i, Ys = function() {
|
|
|
2187
2187
|
} else
|
|
2188
2188
|
(m || s === "%") && !aa[ge(d, "display")] && (o.position = ge(e, "position")), d === e && (o.position = "static"), d.appendChild(Ge), f = Ge[h], d.removeChild(Ge), o.position = "absolute";
|
|
2189
2189
|
return l && m && (g = He(d), g.time = oe.time, g.width = d[h]), V(p ? f * r / u : f && r ? u / f * r : 0);
|
|
2190
|
-
},
|
|
2190
|
+
}, Pe = function(e, t, i, n) {
|
|
2191
2191
|
var r;
|
|
2192
2192
|
return Ni || bi(), t in xe && t !== "transform" && (t = xe[t], ~t.indexOf(",") && (t = t.split(",")[0])), Ae[t] && t !== "transform" ? (r = Tt(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : jt(ge(e, ne)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ge(e, t) || Nn(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? Le(e, t, r, i) + i : r;
|
|
2193
2193
|
}, oa = function(e, t, i, n) {
|
|
@@ -2299,23 +2299,23 @@ var rn, Se, nt, Ni, Ge, sn, $i, Ys = function() {
|
|
|
2299
2299
|
return 1;
|
|
2300
2300
|
}
|
|
2301
2301
|
*/
|
|
2302
|
-
}, At = [1, 0, 0, 1, 0, 0],
|
|
2302
|
+
}, At = [1, 0, 0, 1, 0, 0], Pr = {}, Cr = function(e) {
|
|
2303
2303
|
return e === "matrix(1, 0, 0, 1, 0, 0)" || e === "none" || !e;
|
|
2304
2304
|
}, dn = function(e) {
|
|
2305
2305
|
var t = ge(e, $);
|
|
2306
|
-
return
|
|
2306
|
+
return Cr(t) ? At : t.substr(7).match(On).map(V);
|
|
2307
2307
|
}, Gi = function(e, t) {
|
|
2308
2308
|
var i = e._gsap || He(e), n = e.style, r = dn(e), s, o, l, c;
|
|
2309
2309
|
return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, r = [l.a, l.b, l.c, l.d, l.e, l.f], r.join(",") === "1,0,0,1,0,0" ? At : r) : (r === At && !e.offsetParent && e !== nt && !i.svg && (l = n.display, n.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (c = 1, o = e.nextElementSibling, nt.appendChild(e)), r = dn(e), l ? n.display = l : Ke(e, "display"), c && (o ? s.insertBefore(e, o) : s ? s.appendChild(e) : nt.removeChild(e))), t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r);
|
|
2310
2310
|
}, vi = function(e, t, i, n, r, s) {
|
|
2311
|
-
var o = e._gsap, l = r || Gi(e, !0), c = o.xOrigin || 0, h = o.yOrigin || 0, u = o.xOffset || 0, p = o.yOffset || 0, m = l[0], f = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], x = t.split(" "), v = parseFloat(x[0]) || 0, b = parseFloat(x[1]) || 0,
|
|
2312
|
-
i ? l !== At && (E = m * g - f * d) && (
|
|
2311
|
+
var o = e._gsap, l = r || Gi(e, !0), c = o.xOrigin || 0, h = o.yOrigin || 0, u = o.xOffset || 0, p = o.yOffset || 0, m = l[0], f = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], x = t.split(" "), v = parseFloat(x[0]) || 0, b = parseFloat(x[1]) || 0, P, E, C, w;
|
|
2312
|
+
i ? l !== At && (E = m * g - f * d) && (C = v * (g / E) + b * (-d / E) + (d * y - g * _) / E, w = v * (-f / E) + b * (m / E) - (m * y - f * _) / E, v = C, b = w) : (P = Er(e), v = P.x + (~x[0].indexOf("%") ? v / 100 * P.width : v), b = P.y + (~(x[1] || x[0]).indexOf("%") ? b / 100 * P.height : b)), n || n !== !1 && o.smooth ? (_ = v - c, y = b - h, o.xOffset = u + (_ * m + y * d) - _, o.yOffset = p + (_ * f + y * g) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = v, o.yOrigin = b, o.smooth = !!n, o.origin = t, o.originIsAbsolute = !!i, e.style[ne] = "0px 0px", s && (De(s, o, "xOrigin", c, v), De(s, o, "yOrigin", h, b), De(s, o, "xOffset", u, o.xOffset), De(s, o, "yOffset", p, o.yOffset)), e.setAttribute("data-svg-origin", v + " " + b);
|
|
2313
2313
|
}, Tt = function(e, t) {
|
|
2314
2314
|
var i = e._gsap || new lr(e);
|
|
2315
2315
|
if ("x" in i && !t && !i.uncache)
|
|
2316
2316
|
return i;
|
|
2317
|
-
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x, v, b,
|
|
2318
|
-
return h = u = p = d = g = _ = y = x = v = 0, m = f = 1, i.svg = !!(e.getCTM && wr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[$] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[$] !== "none" ? l[$] : "")), n.scale = n.rotate = n.translate = "none"), E = Gi(e, i.svg), i.svg && (i.uncache ? (Q = e.getBBox(), c = i.xOrigin - Q.x + "px " + (i.yOrigin - Q.y) + "px", U = "") : U = !t && e.getAttribute("data-svg-origin"), vi(e, U || c, !!U || i.originIsAbsolute, i.smooth !== !1, E)), b = i.xOrigin || 0,
|
|
2317
|
+
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x, v, b, P, E, C, w, T, M, A, R, O, B, F, U, Q, ut, dt, pt, Ue, ji, Ee, Fe;
|
|
2318
|
+
return h = u = p = d = g = _ = y = x = v = 0, m = f = 1, i.svg = !!(e.getCTM && wr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[$] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[$] !== "none" ? l[$] : "")), n.scale = n.rotate = n.translate = "none"), E = Gi(e, i.svg), i.svg && (i.uncache ? (Q = e.getBBox(), c = i.xOrigin - Q.x + "px " + (i.yOrigin - Q.y) + "px", U = "") : U = !t && e.getAttribute("data-svg-origin"), vi(e, U || c, !!U || i.originIsAbsolute, i.smooth !== !1, E)), b = i.xOrigin || 0, P = i.yOrigin || 0, E !== At && (M = E[0], A = E[1], R = E[2], O = E[3], h = B = E[4], u = F = E[5], E.length === 6 ? (m = Math.sqrt(M * M + A * A), f = Math.sqrt(O * O + R * R), d = M || A ? We(A, M) * $e : 0, y = R || O ? We(R, O) * $e + d : 0, y && (f *= Math.abs(Math.cos(y * rt))), i.svg && (h -= b - (b * M + P * R), u -= P - (b * A + P * O))) : (Fe = E[6], ji = E[7], dt = E[8], pt = E[9], Ue = E[10], Ee = E[11], h = E[12], u = E[13], p = E[14], C = We(Fe, Ue), g = C * $e, C && (w = Math.cos(-C), T = Math.sin(-C), U = B * w + dt * T, Q = F * w + pt * T, ut = Fe * w + Ue * T, dt = B * -T + dt * w, pt = F * -T + pt * w, Ue = Fe * -T + Ue * w, Ee = ji * -T + Ee * w, B = U, F = Q, Fe = ut), C = We(-R, Ue), _ = C * $e, C && (w = Math.cos(-C), T = Math.sin(-C), U = M * w - dt * T, Q = A * w - pt * T, ut = R * w - Ue * T, Ee = O * T + Ee * w, M = U, A = Q, R = ut), C = We(A, M), d = C * $e, C && (w = Math.cos(C), T = Math.sin(C), U = M * w + A * T, Q = B * w + F * T, A = A * w - M * T, F = F * w - B * T, M = U, B = Q), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, _ = 180 - _), m = V(Math.sqrt(M * M + A * A + R * R)), f = V(Math.sqrt(F * F + Fe * Fe)), C = We(B, F), y = Math.abs(C) > 2e-4 ? C * $e : 0, v = Ee ? 1 / (Ee < 0 ? -Ee : Ee) : 0), i.svg && (U = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Cr(ge(e, $)), U && e.setAttribute("transform", U))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (m *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (f *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = h - ((i.xPercent = h && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-h) ? -50 : 0))) ? e.offsetWidth * i.xPercent / 100 : 0) + s, i.y = u - ((i.yPercent = u && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-u) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + s, i.z = p + s, i.scaleX = V(m), i.scaleY = V(f), i.rotation = V(d) + o, i.rotationX = V(g) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = v + s, (i.zOrigin = parseFloat(c.split(" ")[2]) || !t && i.zOrigin || 0) && (n[ne] = jt(c)), i.xOffset = i.yOffset = 0, i.force3D = he.force3D, i.renderTransform = i.svg ? ua : vr ? Ar : ca, i.uncache = 0, i;
|
|
2319
2319
|
}, jt = function(e) {
|
|
2320
2320
|
return (e = e.split(" "))[0] + " " + e[1];
|
|
2321
2321
|
}, ni = function(e, t, i) {
|
|
@@ -2326,13 +2326,13 @@ var rn, Se, nt, Ni, Ge, sn, $i, Ys = function() {
|
|
|
2326
2326
|
}, ze = "0deg", ft = "0px", Ne = ") ", Ar = function(e, t) {
|
|
2327
2327
|
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, c = i.rotation, h = i.rotationY, u = i.rotationX, p = i.skewX, m = i.skewY, f = i.scaleX, d = i.scaleY, g = i.transformPerspective, _ = i.force3D, y = i.target, x = i.zOrigin, v = "", b = _ === "auto" && e && e !== 1 || _ === !0;
|
|
2328
2328
|
if (x && (u !== ze || h !== ze)) {
|
|
2329
|
-
var
|
|
2330
|
-
|
|
2329
|
+
var P = parseFloat(h) * rt, E = Math.sin(P), C = Math.cos(P), w;
|
|
2330
|
+
P = parseFloat(u) * rt, w = Math.cos(P), s = ni(y, s, E * w * -x), o = ni(y, o, -Math.sin(P) * -x), l = ni(y, l, C * w * -x + x);
|
|
2331
2331
|
}
|
|
2332
2332
|
g !== ft && (v += "perspective(" + g + Ne), (n || r) && (v += "translate(" + n + "%, " + r + "%) "), (b || s !== ft || o !== ft || l !== ft) && (v += l !== ft || b ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + Ne), c !== ze && (v += "rotate(" + c + Ne), h !== ze && (v += "rotateY(" + h + Ne), u !== ze && (v += "rotateX(" + u + Ne), (p !== ze || m !== ze) && (v += "skew(" + p + ", " + m + Ne), (f !== 1 || d !== 1) && (v += "scale(" + f + ", " + d + Ne), y.style[$] = v || "translate(0, 0)";
|
|
2333
2333
|
}, ua = function(e, t) {
|
|
2334
|
-
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, c = i.skewX, h = i.skewY, u = i.scaleX, p = i.scaleY, m = i.target, f = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, x = parseFloat(s), v = parseFloat(o), b,
|
|
2335
|
-
l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, b = Math.cos(l) * u,
|
|
2334
|
+
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, c = i.skewX, h = i.skewY, u = i.scaleX, p = i.scaleY, m = i.target, f = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, x = parseFloat(s), v = parseFloat(o), b, P, E, C, w;
|
|
2335
|
+
l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, b = Math.cos(l) * u, P = Math.sin(l) * u, E = Math.sin(l - c) * -p, C = Math.cos(l - c) * p, c && (h *= rt, w = Math.tan(c - h), w = Math.sqrt(1 + w * w), E *= w, C *= w, h && (w = Math.tan(h), w = Math.sqrt(1 + w * w), b *= w, P *= w)), b = V(b), P = V(P), E = V(E), C = V(C)) : (b = u, C = p, P = E = 0), (x && !~(s + "").indexOf("px") || v && !~(o + "").indexOf("px")) && (x = Le(m, "x", s, "px"), v = Le(m, "y", o, "px")), (f || d || g || _) && (x = V(x + f - (f * b + d * E) + g), v = V(v + d - (f * P + d * C) + _)), (n || r) && (w = m.getBBox(), x = V(x + n / 100 * w.width), v = V(v + r / 100 * w.height)), w = "matrix(" + b + "," + P + "," + E + "," + C + "," + x + "," + v + ")", m.setAttribute("transform", w), y && (m.style[$] = w);
|
|
2336
2336
|
}, da = function(e, t, i, n, r) {
|
|
2337
2337
|
var s = 360, o = Z(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ? $e : 1), c = l - n, h = n + c + "deg", u, p;
|
|
2338
2338
|
return o && (u = r.split("_")[1], u === "short" && (c %= s, c !== c % (s / 2) && (c += c < 0 ? s : -s)), u === "cw" && c < 0 ? c = (c + s * an) % s - ~~(c / s) * s : u === "ccw" && c > 0 && (c = (c - s * an) % s - ~~(c / s) * s)), e._pt = p = new ie(e._pt, t, i, n, c, Xs), p.e = h, p.u = "deg", e._props.push(i), p;
|
|
@@ -2355,7 +2355,7 @@ te("padding,margin,Width,Radius", function(a, e) {
|
|
|
2355
2355
|
var p, m;
|
|
2356
2356
|
if (arguments.length < 4)
|
|
2357
2357
|
return p = s.map(function(f) {
|
|
2358
|
-
return
|
|
2358
|
+
return Pe(o, f, c);
|
|
2359
2359
|
}), m = p.join(" "), m.split(p[0]).length === 5 ? p[0] : m;
|
|
2360
2360
|
p = (h + "").split(" "), m = {}, s.forEach(function(f, d) {
|
|
2361
2361
|
return m[f] = p[d] = p[d] || p[(d - 1) / 2 | 0];
|
|
@@ -2369,25 +2369,25 @@ var Tr = {
|
|
|
2369
2369
|
return e.style && e.nodeType;
|
|
2370
2370
|
},
|
|
2371
2371
|
init: function(e, t, i, n, r) {
|
|
2372
|
-
var s = this._props, o = e.style, l = i.vars.startAt, c, h, u, p, m, f, d, g, _, y, x, v, b,
|
|
2373
|
-
Ni || bi(), this.styles = this.styles || br(e),
|
|
2372
|
+
var s = this._props, o = e.style, l = i.vars.startAt, c, h, u, p, m, f, d, g, _, y, x, v, b, P, E, C;
|
|
2373
|
+
Ni || bi(), this.styles = this.styles || br(e), C = this.styles.props, this.tween = i;
|
|
2374
2374
|
for (d in t)
|
|
2375
2375
|
if (d !== "autoRound" && (h = t[d], !(ae[d] && hr(d, t, i, n, e, r)))) {
|
|
2376
2376
|
if (m = typeof h, f = Ht[d], m === "function" && (h = h.call(i, n, e, r), m = typeof h), m === "string" && ~h.indexOf("random(") && (h = wt(h)), f)
|
|
2377
2377
|
f(this, e, d, h, i) && (E = 1);
|
|
2378
2378
|
else if (d.substr(0, 2) === "--")
|
|
2379
|
-
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Oe.lastIndex = 0, Oe.test(c) || (g = X(c), _ = X(h)), _ ? g !== _ && (c = Le(e, d, c, _) + _) : g && (h += g), this.add(o, "setProperty", c, h, n, r, 0, 0, d), s.push(d),
|
|
2379
|
+
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Oe.lastIndex = 0, Oe.test(c) || (g = X(c), _ = X(h)), _ ? g !== _ && (c = Le(e, d, c, _) + _) : g && (h += g), this.add(o, "setProperty", c, h, n, r, 0, 0, d), s.push(d), C.push(d, 0, o[d]);
|
|
2380
2380
|
else if (m !== "undefined") {
|
|
2381
|
-
if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)), X(c + "") || c === "auto" || (c += he.units[d] || X(
|
|
2382
|
-
if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)), v || (b = e._gsap, b.renderTransform && !t.parseTransform || Tt(e, t.parseTransform),
|
|
2381
|
+
if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)), X(c + "") || c === "auto" || (c += he.units[d] || X(Pe(e, d)) || ""), (c + "").charAt(1) === "=" && (c = Pe(e, d))) : c = Pe(e, d), p = parseFloat(c), y = m === "string" && h.charAt(1) === "=" && h.substr(0, 2), y && (h = h.substr(2)), u = parseFloat(h), d in xe && (d === "autoAlpha" && (p === 1 && Pe(e, "visibility") === "hidden" && u && (p = 0), C.push("visibility", 0, o.visibility), De(this, o, "visibility", p ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = xe[d], ~d.indexOf(",") && (d = d.split(",")[0]))), x = d in Ae, x) {
|
|
2382
|
+
if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)), v || (b = e._gsap, b.renderTransform && !t.parseTransform || Tt(e, t.parseTransform), P = t.smoothOrigin !== !1 && b.smooth, v = this._pt = new ie(this._pt, o, $, 0, 1, b.renderTransform, b, 0, -1), v.dep = 1), d === "scale")
|
|
2383
2383
|
this._pt = new ie(this._pt, b, "scaleY", b.scaleY, (y ? it(b.scaleY, y + u) : u) - b.scaleY || 0, yi), this._pt.u = 0, s.push("scaleY", d), d += "X";
|
|
2384
2384
|
else if (d === "transformOrigin") {
|
|
2385
|
-
|
|
2385
|
+
C.push(ne, 0, o[ne]), h = la(h), b.svg ? vi(e, h, 0, P, 0, this) : (_ = parseFloat(h.split(" ")[2]) || 0, _ !== b.zOrigin && De(this, b, "zOrigin", b.zOrigin, _), De(this, o, d, jt(c), jt(h)));
|
|
2386
2386
|
continue;
|
|
2387
2387
|
} else if (d === "svgOrigin") {
|
|
2388
|
-
vi(e, h, 1,
|
|
2388
|
+
vi(e, h, 1, P, 0, this);
|
|
2389
2389
|
continue;
|
|
2390
|
-
} else if (d in
|
|
2390
|
+
} else if (d in Pr) {
|
|
2391
2391
|
da(this, b, d, p, y ? it(p, y + h) : h);
|
|
2392
2392
|
continue;
|
|
2393
2393
|
} else if (d === "smoothOrigin") {
|
|
@@ -2411,7 +2411,7 @@ var Tr = {
|
|
|
2411
2411
|
Di(d, h);
|
|
2412
2412
|
continue;
|
|
2413
2413
|
}
|
|
2414
|
-
x || (d in o ?
|
|
2414
|
+
x || (d in o ? C.push(d, 0, o[d]) : typeof e[d] == "function" ? C.push(d, 2, e[d]()) : C.push(d, 1, c || e[d])), s.push(d);
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
2417
|
E && mr(this);
|
|
@@ -2423,11 +2423,11 @@ var Tr = {
|
|
|
2423
2423
|
else
|
|
2424
2424
|
t.styles.revert();
|
|
2425
2425
|
},
|
|
2426
|
-
get:
|
|
2426
|
+
get: Pe,
|
|
2427
2427
|
aliases: xe,
|
|
2428
2428
|
getSetter: function(e, t, i) {
|
|
2429
2429
|
var n = xe[t];
|
|
2430
|
-
return n && n.indexOf(",") < 0 && (t = n), t in Ae && t !== ne && (e._gsap.x ||
|
|
2430
|
+
return n && n.indexOf(",") < 0 && (t = n), t in Ae && t !== ne && (e._gsap.x || Pe(e, "x")) ? i && sn === i ? t === "scale" ? ta : ea : (sn = i || {}) && (t === "scale" ? ia : na) : e.style && !Ai(e.style[t]) ? Qs : ~t.indexOf("-") ? Js : Fi(e, t);
|
|
2431
2431
|
},
|
|
2432
2432
|
core: {
|
|
2433
2433
|
_removeProperty: Ke,
|
|
@@ -2441,7 +2441,7 @@ re.core.getStyleSaver = br;
|
|
|
2441
2441
|
Ae[r] = 1;
|
|
2442
2442
|
});
|
|
2443
2443
|
te(e, function(r) {
|
|
2444
|
-
he.units[r] = "deg",
|
|
2444
|
+
he.units[r] = "deg", Pr[r] = 1;
|
|
2445
2445
|
}), xe[n[13]] = a + "," + e, te(i, function(r) {
|
|
2446
2446
|
var s = r.split(":");
|
|
2447
2447
|
xe[s[1]] = n[s[0]];
|
|
@@ -2944,7 +2944,7 @@ class wa extends be {
|
|
|
2944
2944
|
return this.$input.value = this.getValue(), this;
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
|
-
var
|
|
2947
|
+
var Pa = `.lil-gui {
|
|
2948
2948
|
font-family: var(--font-family);
|
|
2949
2949
|
font-size: var(--font-size);
|
|
2950
2950
|
line-height: 1;
|
|
@@ -3366,7 +3366,7 @@ var Ca = `.lil-gui {
|
|
|
3366
3366
|
font-family: "lil-gui";
|
|
3367
3367
|
src: url("data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAALkAAsAAAAABtQAAAKVAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDMgqBBIEbATYCJAMUCwwABCAFhAoHgQQbHAbIDiUFEYVARAAAYQTVWNmz9MxhEgodq49wYRUFKE8GWNiUBxI2LBRaVnc51U83Gmhs0Q7JXWMiz5eteLwrKwuxHO8VFxUX9UpZBs6pa5ABRwHA+t3UxUnH20EvVknRerzQgX6xC/GH6ZUvTcAjAv122dF28OTqCXrPuyaDER30YBA1xnkVutDDo4oCi71Ca7rrV9xS8dZHbPHefsuwIyCpmT7j+MnjAH5X3984UZoFFuJ0yiZ4XEJFxjagEBeqs+e1iyK8Xf/nOuwF+vVK0ur765+vf7txotUi0m3N0m/84RGSrBCNrh8Ee5GjODjF4gnWP+dJrH/Lk9k4oT6d+gr6g/wssA2j64JJGP6cmx554vUZnpZfn6ZfX2bMwPPrlANsB86/DiHjhl0OP+c87+gaJo/gY084s3HoYL/ZkWHTRfBXvvoHnnkHvngKun4KBE/ede7tvq3/vQOxDXB1/fdNz6XbPdcr0Vhpojj9dG+owuSKFsslCi1tgEjirjXdwMiov2EioadxmqTHUCIwo8NgQaeIasAi0fTYSPTbSmwbMOFduyh9wvBrESGY0MtgRjtgQR8Q1bRPohn2UoCRZf9wyYANMXFeJTysqAe0I4mrherOekFdKMrYvJjLvOIUM9SuwYB5DVZUwwVjJJOaUnZCmcEkIZZrKqNvRGRMvmFZsmhP4VMKCSXBhSqUBxgMS7h0cZvEd71AWkEhGWaeMFcNnpqyJkyXgYL7PQ1MoSq0wDAkRtJIijkZSmqYTiSImfLiSWXIZwhRh3Rug2X0kk1Dgj+Iu43u5p98ghopcpSo0Uyc8SnjlYX59WUeaMoDqmVD2TOWD9a4pCRAzf2ECgwGcrHjPOWY9bNxq/OL3I/QjwEAAAA=") format("woff2");
|
|
3368
3368
|
}`;
|
|
3369
|
-
function
|
|
3369
|
+
function Ca(a) {
|
|
3370
3370
|
const e = document.createElement("style");
|
|
3371
3371
|
e.innerHTML = a;
|
|
3372
3372
|
const t = document.querySelector("head link[rel=stylesheet], head style");
|
|
@@ -3422,7 +3422,7 @@ class Vi {
|
|
|
3422
3422
|
this.parent.children.push(this), this.parent.folders.push(this), this.parent.$children.appendChild(this.domElement);
|
|
3423
3423
|
return;
|
|
3424
3424
|
}
|
|
3425
|
-
this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !fn && o && (Pa
|
|
3425
|
+
this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !fn && o && (Ca(Pa), fn = !0), i ? i.appendChild(this.domElement) : t && (this.domElement.classList.add("lil-auto-place", "autoPlace"), document.body.appendChild(this.domElement)), n && this.domElement.style.setProperty("--width", n + "px"), this._closeFolders = s;
|
|
3426
3426
|
}
|
|
3427
3427
|
/**
|
|
3428
3428
|
* Adds a controller to the GUI, inferring controller type using the `typeof` operator.
|
|
@@ -4533,13 +4533,13 @@ var si = 12, yn = 5003, Na = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047,
|
|
|
4533
4533
|
function $a(a, e, t, i, n = Mr(512), r = new Uint8Array(256), s = new Int32Array(yn), o = new Int32Array(yn)) {
|
|
4534
4534
|
let l = s.length, c = Math.max(2, i);
|
|
4535
4535
|
r.fill(0), o.fill(0), s.fill(-1);
|
|
4536
|
-
let h = 0, u = 0, p = c + 1, m = p, f = !1, d = m, g = (1 << d) - 1, _ = 1 << p - 1, y = _ + 1, x = _ + 2, v = 0, b = t[0],
|
|
4537
|
-
for (let w = l; w < 65536; w *= 2) ++
|
|
4538
|
-
|
|
4536
|
+
let h = 0, u = 0, p = c + 1, m = p, f = !1, d = m, g = (1 << d) - 1, _ = 1 << p - 1, y = _ + 1, x = _ + 2, v = 0, b = t[0], P = 0;
|
|
4537
|
+
for (let w = l; w < 65536; w *= 2) ++P;
|
|
4538
|
+
P = 8 - P, n.writeByte(c), C(_);
|
|
4539
4539
|
let E = t.length;
|
|
4540
4540
|
for (let w = 1; w < E; w++)
|
|
4541
4541
|
e: {
|
|
4542
|
-
let T = t[w], M = (T << si) + b, A = T <<
|
|
4542
|
+
let T = t[w], M = (T << si) + b, A = T << P ^ b;
|
|
4543
4543
|
if (s[A] === M) {
|
|
4544
4544
|
b = o[A];
|
|
4545
4545
|
break e;
|
|
@@ -4549,10 +4549,10 @@ function $a(a, e, t, i, n = Mr(512), r = new Uint8Array(256), s = new Int32Array
|
|
|
4549
4549
|
b = o[A];
|
|
4550
4550
|
break e;
|
|
4551
4551
|
}
|
|
4552
|
-
|
|
4552
|
+
C(b), b = T, x < 1 << si ? (o[A] = x++, s[A] = M) : (s.fill(-1), x = _ + 2, f = !0, C(_));
|
|
4553
4553
|
}
|
|
4554
|
-
return
|
|
4555
|
-
function
|
|
4554
|
+
return C(b), C(y), n.writeByte(0), n.bytesView();
|
|
4555
|
+
function C(w) {
|
|
4556
4556
|
for (h &= Na[u], u > 0 ? h |= w << u : h = w, u += d; u >= 8; ) r[v++] = h & 255, v >= 254 && (n.writeByte(v), n.writeBytesView(r, 0, v), v = 0), h >>= 8, u -= 8;
|
|
4557
4557
|
if ((x > g || f) && (f ? (d = m, g = (1 << d) - 1, f = !1) : (++d, g = d === si ? 1 << d : (1 << d) - 1)), w == y) {
|
|
4558
4558
|
for (; u > 0; ) r[v++] = h & 255, v >= 254 && (n.writeByte(v), n.writeBytesView(r, 0, v), v = 0), h >>= 8, u -= 8;
|
|
@@ -4631,15 +4631,15 @@ function Va(a, e, t = {}) {
|
|
|
4631
4631
|
for (x = ++f[0]; x > 1 && (v = x >> 1, !(u[y = f[v]].err <= b)); x = v) f[x] = y;
|
|
4632
4632
|
f[x] = g;
|
|
4633
4633
|
}
|
|
4634
|
-
var
|
|
4635
|
-
for (g = 0; g <
|
|
4634
|
+
var P = d - e;
|
|
4635
|
+
for (g = 0; g < P; ) {
|
|
4636
4636
|
for (var E; ; ) {
|
|
4637
|
-
var
|
|
4638
|
-
if (E = u[
|
|
4639
|
-
E.mtm == m ?
|
|
4640
|
-
var b = u[
|
|
4637
|
+
var C = f[1];
|
|
4638
|
+
if (E = u[C], E.tm >= E.mtm && u[E.nn].mtm <= E.tm) break;
|
|
4639
|
+
E.mtm == m ? C = f[1] = f[f[0]--] : (xn(u, C), E.tm = g);
|
|
4640
|
+
var b = u[C].err;
|
|
4641
4641
|
for (x = 1; (v = x + x) <= f[0] && (v < f[0] && u[f[v]].err > u[f[v + 1]].err && v++, !(b <= u[y = f[v]].err)); x = v) f[x] = y;
|
|
4642
|
-
f[x] =
|
|
4642
|
+
f[x] = C;
|
|
4643
4643
|
}
|
|
4644
4644
|
var w = u[E.nn], T = E.cnt, M = w.cnt, _ = 1 / (T + M);
|
|
4645
4645
|
h && (E.ac = _ * (T * E.ac + M * w.ac)), E.rc = _ * (T * E.rc + M * w.rc), E.gc = _ * (T * E.gc + M * w.gc), E.bc = _ * (T * E.bc + M * w.bc), E.cnt += w.cnt, E.mtm = ++g, u[w.bk].fw = w.fw, u[w.fw].bk = w.bk, w.mtm = m;
|
|
@@ -4728,8 +4728,8 @@ function Ka(a = {}) {
|
|
|
4728
4728
|
if (!_) throw new Error("First frame must include a { palette } option");
|
|
4729
4729
|
Wa(i, u, p, _, x), bn(i, _), y >= 0 && qa(i, y);
|
|
4730
4730
|
}
|
|
4731
|
-
let
|
|
4732
|
-
Xa(i, v,
|
|
4731
|
+
let P = Math.round(g / 10);
|
|
4732
|
+
Xa(i, v, P, f, d);
|
|
4733
4733
|
let E = !!_ && !b;
|
|
4734
4734
|
Qa(i, u, p, E ? _ : null), E && bn(i, _), Ja(i, h, u, p, x, r, s, o);
|
|
4735
4735
|
} };
|
|
@@ -4836,9 +4836,9 @@ class eo {
|
|
|
4836
4836
|
e.fillStyle = "rgba(0, 10, 20, 0.9)", e.strokeStyle = "rgba(100, 170, 255, 0.5)", e.lineWidth = 2, e.beginPath(), e.roundRect ? e.roundRect(m, f, h, u, d) : e.rect(m, f, h, u), e.fill(), e.stroke(), e.fillStyle = "#44aaff", e.font = "bold 18px Arial, sans-serif", e.fillText(r.textContent || "", m + 16, f + 28);
|
|
4837
4837
|
const g = m + 16, _ = f + 40, y = h - 32, x = 20, v = s.style.background || "";
|
|
4838
4838
|
let b = [];
|
|
4839
|
-
const
|
|
4840
|
-
if (
|
|
4841
|
-
b =
|
|
4839
|
+
const P = v.match(/rgba?\([^)]+\)/g);
|
|
4840
|
+
if (P && P.length >= 2)
|
|
4841
|
+
b = P;
|
|
4842
4842
|
else {
|
|
4843
4843
|
const E = v.match(/#[0-9a-fA-F]{3,8}/g);
|
|
4844
4844
|
E && E.length >= 2 && (b = E);
|
|
@@ -4851,8 +4851,8 @@ class eo {
|
|
|
4851
4851
|
E.addColorStop(0, "#cc6600"), E.addColorStop(0.5, "#ffaa44"), E.addColorStop(1, "#ffeecc"), e.fillStyle = E, e.beginPath(), e.roundRect ? e.roundRect(g, _, y, x, 4) : e.rect(g, _, y, x), e.fill(), console.log("Legend gradient style:", v);
|
|
4852
4852
|
}
|
|
4853
4853
|
if (e.fillStyle = "#cccccc", e.font = "14px Arial, sans-serif", o && e.fillText(o.textContent || "", g, f + 78), l) {
|
|
4854
|
-
const E = l.textContent || "",
|
|
4855
|
-
e.fillText(E, g + y -
|
|
4854
|
+
const E = l.textContent || "", C = e.measureText(E).width;
|
|
4855
|
+
e.fillText(E, g + y - C, f + 78);
|
|
4856
4856
|
}
|
|
4857
4857
|
c && c.textContent && (e.fillStyle = "#888888", e.font = "italic 12px Arial, sans-serif", e.fillText(c.textContent, g, f + 95));
|
|
4858
4858
|
} catch (n) {
|
|
@@ -5016,7 +5016,7 @@ class to extends Nr {
|
|
|
5016
5016
|
return super.copy(e, t), this.element = e.element.cloneNode(!0), this.center = e.center, this;
|
|
5017
5017
|
}
|
|
5018
5018
|
}
|
|
5019
|
-
const qe = new se(), vn = new Tn(), En = new Tn(), wn = new se(),
|
|
5019
|
+
const qe = new se(), vn = new Tn(), En = new Tn(), wn = new se(), Pn = new se();
|
|
5020
5020
|
class io {
|
|
5021
5021
|
/**
|
|
5022
5022
|
* Constructs a new CSS2D renderer.
|
|
@@ -5062,7 +5062,7 @@ class io {
|
|
|
5062
5062
|
h(f.children[_], d, g);
|
|
5063
5063
|
}
|
|
5064
5064
|
function u(f, d) {
|
|
5065
|
-
return wn.setFromMatrixPosition(f.matrixWorld),
|
|
5065
|
+
return wn.setFromMatrixPosition(f.matrixWorld), Pn.setFromMatrixPosition(d.matrixWorld), wn.distanceToSquared(Pn);
|
|
5066
5066
|
}
|
|
5067
5067
|
function p(f) {
|
|
5068
5068
|
const d = [];
|
|
@@ -5416,27 +5416,25 @@ class ho {
|
|
|
5416
5416
|
this.labelGroup.add(o), this.labels.push(l), this.updateLabelPosition(o, l, this.currentMorph);
|
|
5417
5417
|
});
|
|
5418
5418
|
}
|
|
5419
|
-
|
|
5419
|
+
localPos = new S.Vector3();
|
|
5420
|
+
worldPos = new S.Vector3();
|
|
5420
5421
|
cameraDirection = new S.Vector3();
|
|
5422
|
+
labelNormal = new S.Vector3();
|
|
5421
5423
|
updateLabelPosition(e, t, i) {
|
|
5422
|
-
const { lat: n, lon: r, element: s } = t, o = n
|
|
5423
|
-
if (this.
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
), this.camera &&
|
|
5429
|
-
this.cameraDirection.copy(this.camera.position).normalize();
|
|
5430
|
-
const
|
|
5431
|
-
s.style.opacity =
|
|
5424
|
+
const { lat: n, lon: r, element: s } = t, o = (r + 180) / 360, l = (n + 90) / 180, c = (o - 0.5) * 2 * Math.PI, h = (l - 0.5) * Math.PI, u = this.sphereRadius + 0.3, p = u * Math.cos(h) * Math.sin(c), m = u * Math.sin(h), f = u * Math.cos(h) * Math.cos(c), d = 2 * Math.PI * this.sphereRadius, g = Math.PI * this.sphereRadius, _ = (o - 0.5) * d, y = (l - 0.5) * g, x = 0.3, v = i * i * (3 - 2 * i);
|
|
5425
|
+
if (this.localPos.set(
|
|
5426
|
+
_ + v * (p - _),
|
|
5427
|
+
y + v * (m - y),
|
|
5428
|
+
x + v * (f - x)
|
|
5429
|
+
), this.globe)
|
|
5430
|
+
if (this.worldPos.copy(this.localPos), this.worldPos.applyMatrix4(this.globe.matrixWorld), e.position.copy(this.worldPos), this.camera && v > 0.5) {
|
|
5431
|
+
this.cameraDirection.copy(this.camera.position).normalize(), this.labelNormal.set(p, m, f).normalize(), this.labelNormal.applyMatrix4(this.globe.matrixWorld).normalize();
|
|
5432
|
+
const b = this.labelNormal.dot(this.cameraDirection);
|
|
5433
|
+
s.style.opacity = b > 0.15 ? "" : "0";
|
|
5432
5434
|
} else
|
|
5433
5435
|
s.style.opacity = "";
|
|
5434
5436
|
else
|
|
5435
|
-
e.position.
|
|
5436
|
-
h * i + _ * (1 - i),
|
|
5437
|
-
u * i + y * (1 - i),
|
|
5438
|
-
p * i + x * (1 - i)
|
|
5439
|
-
), s.style.opacity = "";
|
|
5437
|
+
e.position.copy(this.localPos), s.style.opacity = "";
|
|
5440
5438
|
}
|
|
5441
5439
|
/**
|
|
5442
5440
|
* Get the label group to add to scene
|
|
@@ -6189,7 +6187,7 @@ void main() {
|
|
|
6189
6187
|
|
|
6190
6188
|
gl_FragColor = vec4(1.0, 1.0, 1.0, alpha * vOpacity * 0.9);
|
|
6191
6189
|
}
|
|
6192
|
-
`,
|
|
6190
|
+
`, Cn = {
|
|
6193
6191
|
satellite: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_atmos_2048.jpg",
|
|
6194
6192
|
natural: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_day_4096.jpg",
|
|
6195
6193
|
dark: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
@@ -6267,7 +6265,7 @@ class xo {
|
|
|
6267
6265
|
}
|
|
6268
6266
|
async createGlobe() {
|
|
6269
6267
|
const e = await this.textureLoader.loadAsync(
|
|
6270
|
-
|
|
6268
|
+
Cn[this.config.texture]
|
|
6271
6269
|
);
|
|
6272
6270
|
e.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), e.minFilter = S.LinearMipmapLinearFilter, e.magFilter = S.LinearFilter;
|
|
6273
6271
|
const t = document.createElement("canvas");
|
|
@@ -6466,7 +6464,7 @@ class xo {
|
|
|
6466
6464
|
this.countryLabels?.setStyle(e);
|
|
6467
6465
|
}
|
|
6468
6466
|
async setTexture(e) {
|
|
6469
|
-
const t =
|
|
6467
|
+
const t = Cn[e];
|
|
6470
6468
|
if (!(!t || !this.material))
|
|
6471
6469
|
try {
|
|
6472
6470
|
const i = await this.textureLoader.loadAsync(t);
|