MCPcopy Create free account
hub / github.com/alignoth/alignoth / bD

Function bD

resources/vega.min.js:21704–21815  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

21702 var _D = 10,
21703 xD = Math.PI * (3 - Math.sqrt(5));
21704 function bD(t) {
21705 var e,
21706 n = 1,
21707 r = 0.001,
21708 i = 1 - Math.pow(r, 1 / 300),
21709 o = 0,
21710 a = 0.6,
21711 s = new Map(),
21712 u = cD(f),
21713 l = YE("tick", "end"),
21714 c = (function () {
21715 let t = 1;
21716 return () => (t = (pD * t + gD) % mD) / mD;
21717 })();
21718 function f() {
21719 (h(), l.call("tick", e), n < r && (u.stop(), l.call("end", e)));
21720 }
21721 function h(r) {
21722 var u,
21723 l,
21724 c = t.length;
21725 void 0 === r && (r = 1);
21726 for (var f = 0; f < r; ++f)
21727 for (
21728 n += (o - n) * i,
21729 s.forEach(function (t) {
21730 t(n);
21731 }),
21732 u = 0;
21733 u < c;
21734 ++u
21735 )
21736 (null == (l = t[u]).fx
21737 ? (l.x += l.vx *= a)
21738 : ((l.x = l.fx), (l.vx = 0)),
21739 null == l.fy ? (l.y += l.vy *= a) : ((l.y = l.fy), (l.vy = 0)));
21740 return e;
21741 }
21742 function d() {
21743 for (var e, n = 0, r = t.length; n < r; ++n) {
21744 if (
21745 (((e = t[n]).index = n),
21746 null != e.fx && (e.x = e.fx),
21747 null != e.fy && (e.y = e.fy),
21748 isNaN(e.x) || isNaN(e.y))
21749 ) {
21750 var i = _D * Math.sqrt(0.5 + n),
21751 o = n * xD;
21752 ((e.x = i * Math.cos(o)), (e.y = i * Math.sin(o)));
21753 }
21754 (isNaN(e.vx) || isNaN(e.vy)) && (e.vx = e.vy = 0);
21755 }
21756 }
21757 function p(e) {
21758 return (e.initialize && e.initialize(t, c), e);
21759 }
21760 return (
21761 null == t && (t = []),

Callers 1

transformFunction · 0.85

Calls 8

cDFunction · 0.85
YEFunction · 0.85
dFunction · 0.70
pFunction · 0.70
deleteMethod · 0.45
setMethod · 0.45
getMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected