@expofp/floorplan 3.0.1 → 3.0.2
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/browser/CookieConsent-CXdWbmhr.js +7810 -0
- package/dist/browser/Debug-DoJ9mct3.js +51 -0
- package/dist/browser/Demo-BEQponkS.js +65 -0
- package/dist/browser/Free-UAsV9h8C.js +65 -0
- package/dist/browser/Gallery-BgXxqVXz.js +3257 -0
- package/dist/browser/GpsLoader-CgbTy8Hz.js +152 -0
- package/dist/browser/KioskStore-YLbphfOD.js +212 -0
- package/dist/browser/Mapbox-DpLJ3tpl.js +120 -0
- package/dist/browser/SetKioskMode-CN5fJClI.js +49 -0
- package/dist/browser/ShowKiosk-vj5-CuR5.js +25 -0
- package/dist/browser/ThreeComponent-jLYP_yNl.js +1493 -0
- package/dist/browser/TouchHand-BbwYQQhu.js +66 -0
- package/dist/browser/ViewerMenuPanel-4kghKIxV.js +106 -0
- package/dist/browser/add-debug-secret-listener-DM6KcZ0J.js +26 -0
- package/dist/browser/boolean-editor-BrtABJXb.js +206 -0
- package/dist/browser/bundle.json +70 -40
- package/dist/browser/chunk-CG6jx9YN.js +28 -0
- package/dist/browser/classnames-DeFT1CBt.js +39 -0
- package/dist/browser/client-B6hKytWh.js +7601 -0
- package/dist/browser/data-BsqGAaoU.js +27969 -0
- package/dist/browser/debug-overlay-Cb6jZH1M.js +3995 -0
- package/dist/browser/debug-ui-XBqahA1W.js +86 -0
- package/dist/browser/dist-BcuX1Cs2.js +2581 -0
- package/dist/browser/favicon-Caa4UHOv.js +12 -0
- package/dist/browser/fetch-retry.umd-D6o13_3S.js +78 -0
- package/dist/browser/flex-glIwYu7S.js +1045 -0
- package/dist/browser/floorplan.ready-Dkfm7Nqq.js +1310 -0
- package/dist/browser/fuse-CrFUY0W8.js +887 -0
- package/dist/browser/index.js +10628 -12440
- package/dist/browser/jsx-runtime-P5gPgaNY.js +30 -0
- package/dist/browser/lib-BGCrbI0c.js +1859 -0
- package/dist/browser/main-B7nu_ayH.js +289 -0
- package/dist/browser/mobx-BwL1_Ioa.js +23 -0
- package/dist/browser/particles.min-r4ucWEQe.js +133 -0
- package/dist/browser/prop-types-_4KGi_BP.js +57 -0
- package/dist/browser/react-dom-BeKu02fc.js +139 -0
- package/dist/browser/reset-all-settings-CH3gzkuQ.js +17 -0
- package/dist/browser/settings-D1gM4Wtx.js +69 -0
- package/dist/browser/src--OC9EQnB.js +19 -0
- package/dist/browser/store-BpwlrbtP.js +36100 -0
- package/dist/browser/ui-Cy6VKwPB.js +33 -0
- package/dist/esm/components/Map/traffic/useBuildRoute.js +2 -2
- package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
- package/dist/esm/store/RootStore.js +1 -1
- package/package.json +4 -4
- package/dist/browser/Debug-b2YI2Uxo.js +0 -40
- package/dist/browser/Demo-aEKqZbJJ.js +0 -47
- package/dist/browser/Free-BGr4o53R.js +0 -51
- package/dist/browser/Gallery-C9n64fhu.js +0 -71
- package/dist/browser/GpsLoader-ChxBR2EI.js +0 -140
- package/dist/browser/KioskStore-DkCSeq5I.js +0 -225
- package/dist/browser/Mapbox-Cl0Wxz2h.js +0 -118
- package/dist/browser/SetKioskMode-D3EJeF9c.js +0 -249
- package/dist/browser/ShowKiosk-Bs5q-1RZ.js +0 -35
- package/dist/browser/ThreeComponent-CSsqNYDu.js +0 -1595
- package/dist/browser/ViewerMenuPanel-BMmB1p03.js +0 -77
- package/dist/browser/boolean-editor-DpnmndKH.js +0 -157
- package/dist/browser/client-CN_I7kK8.js +0 -10011
- package/dist/browser/data-CIAMSGsv.js +0 -22125
- package/dist/browser/debug-overlay-DjmA0D2r.js +0 -3675
- package/dist/browser/debug-ui-D1QGTN8V.js +0 -67
- package/dist/browser/favicon-BpTKNfwa.js +0 -13
- package/dist/browser/fetch-retry.umd-B8hV1FNr.js +0 -123
- package/dist/browser/flex-09atkOGP.js +0 -400
- package/dist/browser/floorplan.ready-BQetaqdP.js +0 -57653
- package/dist/browser/index-Bw6xZlSd.js +0 -161
- package/dist/browser/index-C71k7nSe.js +0 -3244
- package/dist/browser/index-CWLY6XdC.js +0 -92
- package/dist/browser/index-D9pdVw-U.js +0 -882
- package/dist/browser/index-DPSQIIUy.js +0 -57
- package/dist/browser/index-jp-Zhdyp.js +0 -54
- package/dist/browser/jsx-runtime-CoKhM3tL.js +0 -40
- package/dist/browser/main-DxaHLbma.js +0 -359
- package/dist/browser/particles.min-CsHbc6cO.js +0 -143
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { j as f } from "./jsx-runtime-CoKhM3tL.js";
|
|
2
|
-
import { r as b } from "./index-CWLY6XdC.js";
|
|
3
|
-
import "./index.js";
|
|
4
|
-
(function() {
|
|
5
|
-
try {
|
|
6
|
-
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
7
|
-
e.SENTRY_RELEASE = { id: "3.0.1" };
|
|
8
|
-
var t = new e.Error().stack;
|
|
9
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "5098b3c5-c6ad-4b11-9fd4-dcbebe8d9b21", e._sentryDebugIdIdentifier = "sentry-dbid-5098b3c5-c6ad-4b11-9fd4-dcbebe8d9b21");
|
|
10
|
-
} catch {
|
|
11
|
-
}
|
|
12
|
-
})();
|
|
13
|
-
const l = "dbg123", r = [];
|
|
14
|
-
let d = !1, i = null;
|
|
15
|
-
function g(e) {
|
|
16
|
-
if (r.push(e), !d) {
|
|
17
|
-
let t = function(o) {
|
|
18
|
-
o.ctrlKey || o.metaKey || o.altKey || o.key.length === 1 && (n += o.key.toLowerCase(), n = n.slice(-l.length), n === l && (n = "", r.forEach((s) => s())));
|
|
19
|
-
};
|
|
20
|
-
d = !0;
|
|
21
|
-
let n = "";
|
|
22
|
-
i = t, document.addEventListener("keydown", t);
|
|
23
|
-
}
|
|
24
|
-
return () => {
|
|
25
|
-
const t = r.indexOf(e);
|
|
26
|
-
t !== -1 && r.splice(t, 1), r.length === 0 && i && (document.removeEventListener("keydown", i), i = null, d = !1);
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
let a = !1;
|
|
30
|
-
function y() {
|
|
31
|
-
if (a)
|
|
32
|
-
return;
|
|
33
|
-
a = !0;
|
|
34
|
-
const e = b("Show Debug Button Overlay"), t = async (n) => {
|
|
35
|
-
const {
|
|
36
|
-
DebugUi: o
|
|
37
|
-
} = await import("./debug-ui-D1QGTN8V.js"), {
|
|
38
|
-
createRoot: s
|
|
39
|
-
} = await import("./client-CN_I7kK8.js").then((c) => c.c), u = document.createElement("div");
|
|
40
|
-
document.body.appendChild(u), s(u).render(/* @__PURE__ */ f.jsx(o, { useDebugButtonState: e.useState, open: n }));
|
|
41
|
-
};
|
|
42
|
-
if (e.get())
|
|
43
|
-
t(!1);
|
|
44
|
-
else {
|
|
45
|
-
const n = g(() => {
|
|
46
|
-
n(), e.set(!0), t(!0);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
51
|
-
__proto__: null,
|
|
52
|
-
renderDebugUi: y
|
|
53
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
54
|
-
export {
|
|
55
|
-
g as a,
|
|
56
|
-
h as i
|
|
57
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { k as u } from "./index.js";
|
|
2
|
-
import { r as p } from "./index-Bw6xZlSd.js";
|
|
3
|
-
(function() {
|
|
4
|
-
try {
|
|
5
|
-
var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
6
|
-
t.SENTRY_RELEASE = { id: "3.0.1" };
|
|
7
|
-
var o = new t.Error().stack;
|
|
8
|
-
o && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[o] = "07b1170b-4055-482f-9eec-cdae396360ab", t._sentryDebugIdIdentifier = "sentry-dbid-07b1170b-4055-482f-9eec-cdae396360ab");
|
|
9
|
-
} catch {
|
|
10
|
-
}
|
|
11
|
-
})();
|
|
12
|
-
var i = { exports: {} };
|
|
13
|
-
var f;
|
|
14
|
-
function d() {
|
|
15
|
-
return f || (f = 1, (function(t) {
|
|
16
|
-
(function() {
|
|
17
|
-
var o = {}.hasOwnProperty;
|
|
18
|
-
function n() {
|
|
19
|
-
for (var e = "", r = 0; r < arguments.length; r++) {
|
|
20
|
-
var s = arguments[r];
|
|
21
|
-
s && (e = a(e, c(s)));
|
|
22
|
-
}
|
|
23
|
-
return e;
|
|
24
|
-
}
|
|
25
|
-
function c(e) {
|
|
26
|
-
if (typeof e == "string" || typeof e == "number")
|
|
27
|
-
return e;
|
|
28
|
-
if (typeof e != "object")
|
|
29
|
-
return "";
|
|
30
|
-
if (Array.isArray(e))
|
|
31
|
-
return n.apply(null, e);
|
|
32
|
-
if (e.toString !== Object.prototype.toString && !e.toString.toString().includes("[native code]"))
|
|
33
|
-
return e.toString();
|
|
34
|
-
var r = "";
|
|
35
|
-
for (var s in e)
|
|
36
|
-
o.call(e, s) && e[s] && (r = a(r, s));
|
|
37
|
-
return r;
|
|
38
|
-
}
|
|
39
|
-
function a(e, r) {
|
|
40
|
-
return r ? e ? e + " " + r : e + r : e;
|
|
41
|
-
}
|
|
42
|
-
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
43
|
-
})();
|
|
44
|
-
})(i)), i.exports;
|
|
45
|
-
}
|
|
46
|
-
var l = d();
|
|
47
|
-
const v = /* @__PURE__ */ u(l);
|
|
48
|
-
var b = p();
|
|
49
|
-
const x = /* @__PURE__ */ u(b);
|
|
50
|
-
export {
|
|
51
|
-
x as R,
|
|
52
|
-
b as r,
|
|
53
|
-
v as y
|
|
54
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
try {
|
|
3
|
-
var r = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
r.SENTRY_RELEASE = { id: "3.0.1" };
|
|
5
|
-
var a = new r.Error().stack;
|
|
6
|
-
a && (r._sentryDebugIds = r._sentryDebugIds || {}, r._sentryDebugIds[a] = "6aa5acce-bbae-4352-a6aa-9212ad4bd577", r._sentryDebugIdIdentifier = "sentry-dbid-6aa5acce-bbae-4352-a6aa-9212ad4bd577");
|
|
7
|
-
} catch {
|
|
8
|
-
}
|
|
9
|
-
})();
|
|
10
|
-
var d = { exports: {} }, n = {};
|
|
11
|
-
var o;
|
|
12
|
-
function x() {
|
|
13
|
-
if (o) return n;
|
|
14
|
-
o = 1;
|
|
15
|
-
var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), a = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
16
|
-
function s(f, e, t) {
|
|
17
|
-
var u = null;
|
|
18
|
-
if (t !== void 0 && (u = "" + t), e.key !== void 0 && (u = "" + e.key), "key" in e) {
|
|
19
|
-
t = {};
|
|
20
|
-
for (var i in e)
|
|
21
|
-
i !== "key" && (t[i] = e[i]);
|
|
22
|
-
} else t = e;
|
|
23
|
-
return e = t.ref, {
|
|
24
|
-
$$typeof: r,
|
|
25
|
-
type: f,
|
|
26
|
-
key: u,
|
|
27
|
-
ref: e !== void 0 ? e : null,
|
|
28
|
-
props: t
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
return n.Fragment = a, n.jsx = s, n.jsxs = s, n;
|
|
32
|
-
}
|
|
33
|
-
var l;
|
|
34
|
-
function R() {
|
|
35
|
-
return l || (l = 1, d.exports = x()), d.exports;
|
|
36
|
-
}
|
|
37
|
-
var E = R();
|
|
38
|
-
export {
|
|
39
|
-
E as j
|
|
40
|
-
};
|
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
try {
|
|
3
|
-
var o = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
o.SENTRY_RELEASE = { id: "3.0.1" };
|
|
5
|
-
var t = new o.Error().stack;
|
|
6
|
-
t && (o._sentryDebugIds = o._sentryDebugIds || {}, o._sentryDebugIds[t] = "7bb9c1f4-826f-44b2-80a8-3d0519897683", o._sentryDebugIdIdentifier = "sentry-dbid-7bb9c1f4-826f-44b2-80a8-3d0519897683");
|
|
7
|
-
} catch {
|
|
8
|
-
}
|
|
9
|
-
})();
|
|
10
|
-
class u {
|
|
11
|
-
constructor(t, e, i) {
|
|
12
|
-
this.id = 0, this.name = t, this.fg = e, this.bg = i, this.gradient = null, this.PR = Math.round(window.devicePixelRatio || 1), this.WIDTH = 90 * this.PR, this.HEIGHT = 48 * this.PR, this.TEXT_X = 3 * this.PR, this.TEXT_Y = 2 * this.PR, this.GRAPH_X = 3 * this.PR, this.GRAPH_Y = 15 * this.PR, this.GRAPH_WIDTH = 84 * this.PR, this.GRAPH_HEIGHT = 30 * this.PR, this.canvas = document.createElement("canvas"), this.canvas.width = this.WIDTH, this.canvas.height = this.HEIGHT, this.canvas.style.width = "90px", this.canvas.style.height = "48px", this.canvas.style.position = "absolute", this.canvas.style.cssText = "width:90px;height:48px;background-color: transparent !important;", this.context = this.canvas.getContext("2d"), this.initializeCanvas();
|
|
13
|
-
}
|
|
14
|
-
createGradient() {
|
|
15
|
-
if (!this.context)
|
|
16
|
-
throw new Error("No context");
|
|
17
|
-
const t = this.context.createLinearGradient(
|
|
18
|
-
0,
|
|
19
|
-
this.GRAPH_Y,
|
|
20
|
-
0,
|
|
21
|
-
this.GRAPH_Y + this.GRAPH_HEIGHT
|
|
22
|
-
);
|
|
23
|
-
let e;
|
|
24
|
-
const i = this.fg;
|
|
25
|
-
switch (this.fg.toLowerCase()) {
|
|
26
|
-
case "#0ff":
|
|
27
|
-
e = "#006666";
|
|
28
|
-
break;
|
|
29
|
-
case "#0f0":
|
|
30
|
-
e = "#006600";
|
|
31
|
-
break;
|
|
32
|
-
case "#ff0":
|
|
33
|
-
e = "#666600";
|
|
34
|
-
break;
|
|
35
|
-
case "#e1e1e1":
|
|
36
|
-
e = "#666666";
|
|
37
|
-
break;
|
|
38
|
-
default:
|
|
39
|
-
e = this.bg;
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
return t.addColorStop(0, e), t.addColorStop(1, i), t;
|
|
43
|
-
}
|
|
44
|
-
initializeCanvas() {
|
|
45
|
-
this.context && (this.context.imageSmoothingEnabled = !1, this.context.font = "bold " + 9 * this.PR + "px Helvetica,Arial,sans-serif", this.context.textBaseline = "top", this.gradient = this.createGradient(), this.context.fillStyle = this.bg, this.context.fillRect(0, 0, this.WIDTH, this.HEIGHT), this.context.fillStyle = this.fg, this.context.fillText(this.name, this.TEXT_X, this.TEXT_Y), this.context.fillStyle = this.bg, this.context.globalAlpha = 0.9, this.context.fillRect(this.GRAPH_X, this.GRAPH_Y, this.GRAPH_WIDTH, this.GRAPH_HEIGHT));
|
|
46
|
-
}
|
|
47
|
-
// Update only text portion
|
|
48
|
-
update(t, e, i = 0) {
|
|
49
|
-
if (!this.context || !this.gradient)
|
|
50
|
-
return;
|
|
51
|
-
const s = Math.min(1 / 0, t), h = Math.max(e, t);
|
|
52
|
-
this.context.globalAlpha = 1, this.context.fillStyle = this.bg, this.context.fillRect(0, 0, this.WIDTH, this.GRAPH_Y), this.context.fillStyle = this.fg, this.context.fillText(
|
|
53
|
-
`${t.toFixed(i)} ${this.name} (${s.toFixed(i)}-${parseFloat(h.toFixed(i))})`,
|
|
54
|
-
this.TEXT_X,
|
|
55
|
-
this.TEXT_Y
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
// Update only graph portion
|
|
59
|
-
updateGraph(t, e) {
|
|
60
|
-
if (!this.context || !this.gradient)
|
|
61
|
-
return;
|
|
62
|
-
t === 0 && e === 0 && (e = 1), e = Math.max(e, t, 0.1), t = Math.max(t, 0);
|
|
63
|
-
const i = Math.round(this.GRAPH_X), s = Math.round(this.GRAPH_Y), h = Math.round(this.GRAPH_WIDTH), a = Math.round(this.GRAPH_HEIGHT), n = Math.round(this.PR);
|
|
64
|
-
this.context.drawImage(
|
|
65
|
-
this.canvas,
|
|
66
|
-
i + n,
|
|
67
|
-
s,
|
|
68
|
-
h - n,
|
|
69
|
-
a,
|
|
70
|
-
i,
|
|
71
|
-
s,
|
|
72
|
-
h - n,
|
|
73
|
-
a
|
|
74
|
-
), this.context.fillStyle = this.bg, this.context.fillRect(
|
|
75
|
-
i + h - n,
|
|
76
|
-
s,
|
|
77
|
-
n,
|
|
78
|
-
a
|
|
79
|
-
);
|
|
80
|
-
const r = Math.min(
|
|
81
|
-
a,
|
|
82
|
-
Math.round(t / e * a)
|
|
83
|
-
);
|
|
84
|
-
r > 0 && (this.context.globalAlpha = 0.9, this.context.fillStyle = this.gradient, this.context.fillRect(
|
|
85
|
-
i + h - n,
|
|
86
|
-
s + (a - r),
|
|
87
|
-
n,
|
|
88
|
-
r
|
|
89
|
-
)), this.context.globalAlpha = 1;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
class T extends u {
|
|
93
|
-
constructor(t, e, i) {
|
|
94
|
-
super(t, e, i), this.vsyncValue = 0, this.SMALL_HEIGHT = 9 * this.PR, this.HEIGHT = this.SMALL_HEIGHT, this.WIDTH = 35 * this.PR, this.TEXT_Y = 0 * this.PR, this.canvas.height = this.HEIGHT, this.canvas.width = this.WIDTH, this.canvas.style.height = "9px", this.canvas.style.width = "35px", this.canvas.style.cssText = `
|
|
95
|
-
width: 35px;
|
|
96
|
-
height: 9px;
|
|
97
|
-
position: absolute;
|
|
98
|
-
top: 0;
|
|
99
|
-
left: 0;
|
|
100
|
-
background-color: transparent !important;
|
|
101
|
-
pointer-events: none;
|
|
102
|
-
`, this.initializeCanvas();
|
|
103
|
-
}
|
|
104
|
-
initializeCanvas() {
|
|
105
|
-
this.context && (this.context.imageSmoothingEnabled = !1, this.context.font = "bold " + 9 * this.PR + "px Helvetica,Arial,sans-serif", this.context.textBaseline = "top", this.context.globalAlpha = 1);
|
|
106
|
-
}
|
|
107
|
-
// Override update for VSync-specific display
|
|
108
|
-
update(t, e, i = 0) {
|
|
109
|
-
this.context && (this.vsyncValue = t, this.context.clearRect(0, 0, this.WIDTH, this.HEIGHT), this.context.globalAlpha = 1, this.context.fillStyle = this.bg, this.context.fillText(
|
|
110
|
-
`${t.toFixed(0)}Hz`,
|
|
111
|
-
this.TEXT_X,
|
|
112
|
-
this.TEXT_Y
|
|
113
|
-
));
|
|
114
|
-
}
|
|
115
|
-
// Override updateGraph to do nothing (we don't need a graph for VSync)
|
|
116
|
-
updateGraph(t, e) {
|
|
117
|
-
}
|
|
118
|
-
// Method to set the offset position relative to parent panel
|
|
119
|
-
setOffset(t, e) {
|
|
120
|
-
this.canvas.style.transform = `translate(${t}px, ${e}px)`;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
const f = class c {
|
|
124
|
-
constructor({
|
|
125
|
-
trackGPU: t = !1,
|
|
126
|
-
trackCPT: e = !1,
|
|
127
|
-
trackHz: i = !1,
|
|
128
|
-
trackFPS: s = !0,
|
|
129
|
-
logsPerSecond: h = 4,
|
|
130
|
-
graphsPerSecond: a = 30,
|
|
131
|
-
samplesLog: n = 40,
|
|
132
|
-
samplesGraph: r = 10,
|
|
133
|
-
precision: l = 2,
|
|
134
|
-
minimal: d = !1,
|
|
135
|
-
horizontal: m = !0,
|
|
136
|
-
mode: p = 0
|
|
137
|
-
} = {}) {
|
|
138
|
-
this.gl = null, this.ext = null, this.activeQuery = null, this.gpuQueries = [], this.threeRendererPatched = !1, this.frameTimes = [], this.renderCount = 0, this.totalCpuDuration = 0, this.totalGpuDuration = 0, this.totalGpuDurationCompute = 0, this.fpsPanel = null, this.msPanel = null, this.gpuPanel = null, this.gpuPanelCompute = null, this.vsyncPanel = null, this.averageFps = { logs: [], graph: [] }, this.averageCpu = { logs: [], graph: [] }, this.averageGpu = { logs: [], graph: [] }, this.averageGpuCompute = { logs: [], graph: [] }, this.updateCounter = 0, this.lastMin = {}, this.lastMax = {}, this.lastValue = {}, this.VSYNC_RATES = [
|
|
139
|
-
{ refreshRate: 60, frameTime: 16.67 },
|
|
140
|
-
{ refreshRate: 75, frameTime: 13.33 },
|
|
141
|
-
{ refreshRate: 90, frameTime: 11.11 },
|
|
142
|
-
{ refreshRate: 120, frameTime: 8.33 },
|
|
143
|
-
{ refreshRate: 144, frameTime: 6.94 },
|
|
144
|
-
{ refreshRate: 165, frameTime: 6.06 },
|
|
145
|
-
{ refreshRate: 240, frameTime: 4.17 }
|
|
146
|
-
], this.detectedVSync = null, this.frameTimeHistory = [], this.HISTORY_SIZE = 120, this.VSYNC_THRESHOLD = 0.05, this.lastFrameTime = 0, this.handleClick = (P) => {
|
|
147
|
-
P.preventDefault(), this.showPanel(++this.mode % this.dom.children.length);
|
|
148
|
-
}, this.handleResize = () => {
|
|
149
|
-
this.fpsPanel && this.resizePanel(this.fpsPanel), this.msPanel && this.resizePanel(this.msPanel), this.gpuPanel && this.resizePanel(this.gpuPanel), this.gpuPanelCompute && this.resizePanel(this.gpuPanelCompute);
|
|
150
|
-
}, this.mode = p, this.horizontal = m, this.minimal = d, this.trackGPU = t, this.trackCPT = e, this.trackHz = i, this.trackFPS = s, this.samplesLog = n, this.samplesGraph = r, this.precision = l, this.logsPerSecond = h, this.graphsPerSecond = a;
|
|
151
|
-
const g = performance.now();
|
|
152
|
-
this.prevGraphTime = g, this.dom = document.createElement("div"), this.initializeDOM(), this.beginTime = performance.now(), this.prevTextTime = this.beginTime, this.prevCpuTime = this.beginTime, this._panelId = 0, this.trackFPS && (this.fpsPanel = this.addPanel(new c.Panel("FPS", "#0ff", "#002")), this.msPanel = this.addPanel(new c.Panel("CPU", "#0f0", "#020"))), this.trackHz === !0 && (this.vsyncPanel = new T("", "#f0f", "#202"), this.dom.appendChild(this.vsyncPanel.canvas), this.vsyncPanel.setOffset(56, 35)), this.setupEventListeners();
|
|
153
|
-
}
|
|
154
|
-
initializeDOM() {
|
|
155
|
-
this.dom.style.cssText = `
|
|
156
|
-
position: fixed;
|
|
157
|
-
top: 0;
|
|
158
|
-
left: 0;
|
|
159
|
-
opacity: 0.9;
|
|
160
|
-
z-index: 10000;
|
|
161
|
-
${this.minimal ? "cursor: pointer;" : ""}
|
|
162
|
-
`;
|
|
163
|
-
}
|
|
164
|
-
setupEventListeners() {
|
|
165
|
-
this.minimal ? (this.dom.addEventListener("click", this.handleClick), this.showPanel(this.mode)) : window.addEventListener("resize", this.handleResize);
|
|
166
|
-
}
|
|
167
|
-
async init(t) {
|
|
168
|
-
if (!t) {
|
|
169
|
-
console.error('Stats: The "canvas" parameter is undefined.');
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
if (!this.handleThreeRenderer(t) && !await this.handleWebGPURenderer(t))
|
|
173
|
-
if (this.initializeWebGL(t)) {
|
|
174
|
-
this.trackGPU && this.initializeGPUTracking();
|
|
175
|
-
return;
|
|
176
|
-
} else
|
|
177
|
-
console.error("Stats-gl: Failed to initialize WebGL context");
|
|
178
|
-
}
|
|
179
|
-
handleThreeRenderer(t) {
|
|
180
|
-
return t.isWebGLRenderer && !this.threeRendererPatched ? (this.patchThreeRenderer(t), this.gl = t.getContext(), this.trackGPU && this.initializeGPUTracking(), !0) : !1;
|
|
181
|
-
}
|
|
182
|
-
async handleWebGPURenderer(t) {
|
|
183
|
-
return t.isWebGPURenderer ? ((this.trackGPU || this.trackCPT) && (t.backend.trackTimestamp = !0, t._initialized || await t.init(), t.hasFeature("timestamp-query") && this.initializeWebGPUPanels()), this.info = t.info, this.patchThreeWebGPU(t), !0) : !1;
|
|
184
|
-
}
|
|
185
|
-
initializeWebGPUPanels() {
|
|
186
|
-
this.trackGPU && (this.gpuPanel = this.addPanel(new c.Panel("GPU", "#ff0", "#220"))), this.trackCPT && (this.gpuPanelCompute = this.addPanel(new c.Panel("CPT", "#e1e1e1", "#212121")));
|
|
187
|
-
}
|
|
188
|
-
initializeWebGL(t) {
|
|
189
|
-
if (t instanceof WebGL2RenderingContext)
|
|
190
|
-
this.gl = t;
|
|
191
|
-
else if (t instanceof HTMLCanvasElement || t instanceof OffscreenCanvas) {
|
|
192
|
-
if (this.gl = t.getContext("webgl2"), !this.gl)
|
|
193
|
-
return console.error("Stats: Unable to obtain WebGL2 context."), !1;
|
|
194
|
-
} else
|
|
195
|
-
return console.error(
|
|
196
|
-
"Stats: Invalid input type. Expected WebGL2RenderingContext, HTMLCanvasElement, or OffscreenCanvas."
|
|
197
|
-
), !1;
|
|
198
|
-
return !0;
|
|
199
|
-
}
|
|
200
|
-
initializeGPUTracking() {
|
|
201
|
-
this.gl && (this.ext = this.gl.getExtension("EXT_disjoint_timer_query_webgl2"), this.ext && (this.gpuPanel = this.addPanel(new c.Panel("GPU", "#ff0", "#220"))));
|
|
202
|
-
}
|
|
203
|
-
begin() {
|
|
204
|
-
this.beginProfiling("cpu-started"), !(!this.gl || !this.ext) && (this.activeQuery && this.gl.endQuery(this.ext.TIME_ELAPSED_EXT), this.activeQuery = this.gl.createQuery(), this.activeQuery && this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT, this.activeQuery));
|
|
205
|
-
}
|
|
206
|
-
end() {
|
|
207
|
-
this.renderCount++, this.gl && this.ext && this.activeQuery && (this.gl.endQuery(this.ext.TIME_ELAPSED_EXT), this.gpuQueries.push({ query: this.activeQuery }), this.activeQuery = null), this.endProfiling("cpu-started", "cpu-finished", "cpu-duration");
|
|
208
|
-
}
|
|
209
|
-
update() {
|
|
210
|
-
this.endProfiling("cpu-started", "cpu-finished", "cpu-duration"), this.info ? this.processWebGPUTimestamps() : this.processGpuQueries(), this.updateAverages(), this.resetCounters();
|
|
211
|
-
}
|
|
212
|
-
processWebGPUTimestamps() {
|
|
213
|
-
this.totalGpuDuration = this.info.render.timestamp, this.totalGpuDurationCompute = this.info.compute.timestamp;
|
|
214
|
-
}
|
|
215
|
-
resetCounters() {
|
|
216
|
-
this.renderCount = 0, this.totalCpuDuration = 0, this.beginTime = this.endInternal();
|
|
217
|
-
}
|
|
218
|
-
resizePanel(t) {
|
|
219
|
-
t.canvas.style.position = "absolute", this.minimal ? t.canvas.style.display = "none" : (t.canvas.style.display = "block", this.horizontal ? (t.canvas.style.top = "0px", t.canvas.style.left = t.id * t.WIDTH / t.PR + "px") : (t.canvas.style.left = "0px", t.canvas.style.top = t.id * t.HEIGHT / t.PR + "px"));
|
|
220
|
-
}
|
|
221
|
-
addPanel(t) {
|
|
222
|
-
return t.canvas && (this.dom.appendChild(t.canvas), t.id = this._panelId, this.resizePanel(t), this._panelId++), t;
|
|
223
|
-
}
|
|
224
|
-
showPanel(t) {
|
|
225
|
-
for (let e = 0; e < this.dom.children.length; e++) {
|
|
226
|
-
const i = this.dom.children[e];
|
|
227
|
-
i.style.display = e === t ? "block" : "none";
|
|
228
|
-
}
|
|
229
|
-
this.mode = t;
|
|
230
|
-
}
|
|
231
|
-
processGpuQueries() {
|
|
232
|
-
!this.gl || !this.ext || (this.totalGpuDuration = 0, this.gpuQueries.forEach((t, e) => {
|
|
233
|
-
if (this.gl) {
|
|
234
|
-
const i = this.gl.getQueryParameter(t.query, this.gl.QUERY_RESULT_AVAILABLE), s = this.gl.getParameter(this.ext.GPU_DISJOINT_EXT);
|
|
235
|
-
if (i && !s) {
|
|
236
|
-
const a = this.gl.getQueryParameter(t.query, this.gl.QUERY_RESULT) * 1e-6;
|
|
237
|
-
this.totalGpuDuration += a, this.gl.deleteQuery(t.query), this.gpuQueries.splice(e, 1);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}));
|
|
241
|
-
}
|
|
242
|
-
detectVSync(t) {
|
|
243
|
-
if (this.lastFrameTime === 0) {
|
|
244
|
-
this.lastFrameTime = t;
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
const e = t - this.lastFrameTime;
|
|
248
|
-
if (this.lastFrameTime = t, this.frameTimeHistory.push(e), this.frameTimeHistory.length > this.HISTORY_SIZE && this.frameTimeHistory.shift(), this.frameTimeHistory.length < 60)
|
|
249
|
-
return;
|
|
250
|
-
const i = this.frameTimeHistory.reduce((r, l) => r + l) / this.frameTimeHistory.length, s = this.frameTimeHistory.reduce((r, l) => r + Math.pow(l - i, 2), 0) / this.frameTimeHistory.length;
|
|
251
|
-
if (Math.sqrt(s) > 2) {
|
|
252
|
-
this.detectedVSync = null;
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
let a = null, n = 1 / 0;
|
|
256
|
-
for (const r of this.VSYNC_RATES) {
|
|
257
|
-
const l = Math.abs(i - r.frameTime);
|
|
258
|
-
l < n && (n = l, a = r);
|
|
259
|
-
}
|
|
260
|
-
a && n / a.frameTime <= this.VSYNC_THRESHOLD ? this.detectedVSync = a : this.detectedVSync = null;
|
|
261
|
-
}
|
|
262
|
-
endInternal() {
|
|
263
|
-
var t;
|
|
264
|
-
const e = performance.now();
|
|
265
|
-
for (this.frameTimes.push(e); this.frameTimes.length > 0 && this.frameTimes[0] <= e - 1e3; )
|
|
266
|
-
this.frameTimes.shift();
|
|
267
|
-
const i = Math.round(this.frameTimes.length);
|
|
268
|
-
this.addToAverage(i, this.averageFps);
|
|
269
|
-
const s = e >= this.prevTextTime + 1e3 / this.logsPerSecond, h = e >= this.prevGraphTime + 1e3 / this.graphsPerSecond;
|
|
270
|
-
if (this.updatePanelComponents(this.fpsPanel, this.averageFps, 0, s, h), this.updatePanelComponents(this.msPanel, this.averageCpu, this.precision, s, h), this.gpuPanel && this.updatePanelComponents(this.gpuPanel, this.averageGpu, this.precision, s, h), this.trackCPT && this.gpuPanelCompute && this.updatePanelComponents(this.gpuPanelCompute, this.averageGpuCompute, this.precision, s, h), s && (this.prevTextTime = e), h && (this.prevGraphTime = e), this.vsyncPanel !== null) {
|
|
271
|
-
this.detectVSync(e);
|
|
272
|
-
const a = ((t = this.detectedVSync) == null ? void 0 : t.refreshRate) || 0;
|
|
273
|
-
s && a > 0 && this.vsyncPanel.update(a, a);
|
|
274
|
-
}
|
|
275
|
-
return e;
|
|
276
|
-
}
|
|
277
|
-
updatePanelComponents(t, e, i, s, h) {
|
|
278
|
-
if (!t || e.logs.length === 0)
|
|
279
|
-
return;
|
|
280
|
-
t.name in this.lastMin || (this.lastMin[t.name] = 1 / 0, this.lastMax[t.name] = 0, this.lastValue[t.name] = 0);
|
|
281
|
-
const a = e.logs[e.logs.length - 1];
|
|
282
|
-
this.lastMax[t.name] = Math.max(...e.logs), this.lastMin[t.name] = Math.min(this.lastMin[t.name], a), this.lastValue[t.name] = this.lastValue[t.name] * 0.7 + a * 0.3;
|
|
283
|
-
const n = Math.max(
|
|
284
|
-
Math.max(...e.logs),
|
|
285
|
-
...e.graph.slice(-this.samplesGraph)
|
|
286
|
-
);
|
|
287
|
-
this.updateCounter++, s && t.update(
|
|
288
|
-
this.lastValue[t.name],
|
|
289
|
-
this.lastMax[t.name],
|
|
290
|
-
i
|
|
291
|
-
), h && t.updateGraph(
|
|
292
|
-
a,
|
|
293
|
-
n
|
|
294
|
-
);
|
|
295
|
-
}
|
|
296
|
-
beginProfiling(t) {
|
|
297
|
-
if (window.performance)
|
|
298
|
-
try {
|
|
299
|
-
window.performance.clearMarks(t), window.performance.mark(t);
|
|
300
|
-
} catch (e) {
|
|
301
|
-
console.debug("Stats: Performance marking failed:", e);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
endProfiling(t, e, i) {
|
|
305
|
-
if (!(!window.performance || !e || !t))
|
|
306
|
-
try {
|
|
307
|
-
window.performance.getEntriesByName(t, "mark").length === 0 && this.beginProfiling(t), window.performance.clearMarks(e), window.performance.mark(e), window.performance.clearMeasures(i);
|
|
308
|
-
const h = performance.measure(i, t, e);
|
|
309
|
-
this.totalCpuDuration += h.duration, window.performance.clearMarks(t), window.performance.clearMarks(e), window.performance.clearMeasures(i);
|
|
310
|
-
} catch (s) {
|
|
311
|
-
console.debug("Stats: Performance measurement failed:", s);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
updatePanel(t, e, i = 2) {
|
|
315
|
-
if (!t || e.logs.length === 0)
|
|
316
|
-
return;
|
|
317
|
-
const s = performance.now();
|
|
318
|
-
t.name in this.lastMin || (this.lastMin[t.name] = 1 / 0, this.lastMax[t.name] = 0, this.lastValue[t.name] = 0);
|
|
319
|
-
const h = e.logs[e.logs.length - 1], a = Math.max(...e.logs.slice(-30));
|
|
320
|
-
this.lastMin[t.name] = Math.min(this.lastMin[t.name], h), this.lastMax[t.name] = Math.max(this.lastMax[t.name], h), this.lastValue[t.name] = this.lastValue[t.name] * 0.7 + h * 0.3;
|
|
321
|
-
const n = Math.max(a, ...e.graph.slice(-this.samplesGraph));
|
|
322
|
-
this.updateCounter++, this.updateCounter % (this.logsPerSecond * 2) === 0 && (this.lastMax[t.name] = a, this.lastMin[t.name] = h), t.update && (s >= this.prevCpuTime + 1e3 / this.logsPerSecond && t.update(
|
|
323
|
-
this.lastValue[t.name],
|
|
324
|
-
h,
|
|
325
|
-
this.lastMax[t.name],
|
|
326
|
-
n,
|
|
327
|
-
i
|
|
328
|
-
), s >= this.prevGraphTime + 1e3 / this.graphsPerSecond && (t.updateGraph(
|
|
329
|
-
h,
|
|
330
|
-
n
|
|
331
|
-
), this.prevGraphTime = s));
|
|
332
|
-
}
|
|
333
|
-
updateAverages() {
|
|
334
|
-
this.addToAverage(this.totalCpuDuration, this.averageCpu), this.addToAverage(this.totalGpuDuration, this.averageGpu), this.info && this.totalGpuDurationCompute !== void 0 && this.addToAverage(this.totalGpuDurationCompute, this.averageGpuCompute);
|
|
335
|
-
}
|
|
336
|
-
addToAverage(t, e) {
|
|
337
|
-
e.logs.push(t), e.logs.length > this.samplesLog && (e.logs = e.logs.slice(-this.samplesLog)), e.graph.push(t), e.graph.length > this.samplesGraph && (e.graph = e.graph.slice(-this.samplesGraph));
|
|
338
|
-
}
|
|
339
|
-
get domElement() {
|
|
340
|
-
return this.dom;
|
|
341
|
-
}
|
|
342
|
-
patchThreeWebGPU(t) {
|
|
343
|
-
const e = t.info.reset, i = this;
|
|
344
|
-
t.info.reset = function() {
|
|
345
|
-
i.beginProfiling("cpu-started"), e.call(this);
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
patchThreeRenderer(t) {
|
|
349
|
-
const e = t.render, i = this;
|
|
350
|
-
t.render = function(s, h) {
|
|
351
|
-
i.begin(), e.call(this, s, h), i.end();
|
|
352
|
-
}, this.threeRendererPatched = !0;
|
|
353
|
-
}
|
|
354
|
-
};
|
|
355
|
-
f.Panel = u;
|
|
356
|
-
let x = f;
|
|
357
|
-
export {
|
|
358
|
-
x as default
|
|
359
|
-
};
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { k } from "./index.js";
|
|
2
|
-
(function() {
|
|
3
|
-
try {
|
|
4
|
-
var c = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
5
|
-
c.SENTRY_RELEASE = { id: "3.0.1" };
|
|
6
|
-
var f = new c.Error().stack;
|
|
7
|
-
f && (c._sentryDebugIds = c._sentryDebugIds || {}, c._sentryDebugIds[f] = "55a27cbe-d224-49be-b332-763204cc81f4", c._sentryDebugIdIdentifier = "sentry-dbid-55a27cbe-d224-49be-b332-763204cc81f4");
|
|
8
|
-
} catch {
|
|
9
|
-
}
|
|
10
|
-
})();
|
|
11
|
-
function w(c, f) {
|
|
12
|
-
for (var r = 0; r < f.length; r++) {
|
|
13
|
-
const p = f[r];
|
|
14
|
-
if (typeof p != "string" && !Array.isArray(p)) {
|
|
15
|
-
for (const a in p)
|
|
16
|
-
if (a !== "default" && !(a in c)) {
|
|
17
|
-
const u = Object.getOwnPropertyDescriptor(p, a);
|
|
18
|
-
u && Object.defineProperty(c, a, u.get ? u : {
|
|
19
|
-
enumerable: !0,
|
|
20
|
-
get: () => p[a]
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return Object.freeze(Object.defineProperty(c, Symbol.toStringTag, { value: "Module" }));
|
|
26
|
-
}
|
|
27
|
-
var y = { exports: {} }, v;
|
|
28
|
-
function S() {
|
|
29
|
-
return v || (v = 1, (function(c) {
|
|
30
|
-
var f = (function(r, p) {
|
|
31
|
-
var a, u = {};
|
|
32
|
-
function P(e, t) {
|
|
33
|
-
return e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : e.y > t.y ? 1 : 0;
|
|
34
|
-
}
|
|
35
|
-
return (a = function() {
|
|
36
|
-
var e = this;
|
|
37
|
-
e.defaults = { responsive: null, selector: null, maxParticles: 100, sizeVariations: 3, showParticles: !0, speed: 0.5, color: "#000000", minDistance: 120, connectParticles: !1 }, e.element = null, e.context = null, e.ratio = null, e.breakpoints = [], e.activeBreakpoint = null, e.breakpointSettings = [], e.originalSettings = null, e.storage = [], e.usingPolyfill = !1;
|
|
38
|
-
}).prototype.init = function(e) {
|
|
39
|
-
var t = this;
|
|
40
|
-
return t.options = t._extend(t.defaults, e), t.originalSettings = t.options, t._animate = t._animate.bind(t), t._initializeCanvas(), t._initializeEvents(), t._registerBreakpoints(), t._checkResponsive(), t._initializeStorage(), t._animate(), t;
|
|
41
|
-
}, a.prototype.destroy = function() {
|
|
42
|
-
var e = this;
|
|
43
|
-
e.storage = [], e.element.remove(), r.removeEventListener("resize", e.listener, !1), r.clearTimeout(e._animation), cancelAnimationFrame(e._animation);
|
|
44
|
-
}, a.prototype._initializeCanvas = function() {
|
|
45
|
-
var e, t, n = this;
|
|
46
|
-
if (!n.options.selector) return console.warn("particles.js: No selector specified! Check https://github.com/marcbruederlin/particles.js#options"), !1;
|
|
47
|
-
n.element = n.options.selector.tagName ? n.options.selector : p.querySelector(n.options.selector), n.context = n.element.getContext("2d"), e = r.devicePixelRatio || 1, t = n.context.webkitBackingStorePixelRatio || n.context.mozBackingStorePixelRatio || n.context.msBackingStorePixelRatio || n.context.oBackingStorePixelRatio || n.context.backingStorePixelRatio || 1, n.ratio = e / t, n.element.width = n.element.offsetParent ? n.element.offsetParent.clientWidth * n.ratio : n.element.clientWidth * n.ratio, n.element.offsetParent && n.element.offsetParent.nodeName === "BODY" ? n.element.height = r.innerHeight * n.ratio : n.element.height = n.element.offsetParent ? n.element.offsetParent.clientHeight * n.ratio : n.element.clientHeight * n.ratio, n.element.style.width = "100%", n.element.style.height = "100%", n.context.scale(n.ratio, n.ratio);
|
|
48
|
-
}, a.prototype._initializeEvents = function() {
|
|
49
|
-
var e = this;
|
|
50
|
-
e.listener = (function() {
|
|
51
|
-
e._resize();
|
|
52
|
-
}).bind(this), r.addEventListener("resize", e.listener, !1);
|
|
53
|
-
}, a.prototype._initializeStorage = function() {
|
|
54
|
-
var e = this;
|
|
55
|
-
e.storage = [];
|
|
56
|
-
for (var t = e.options.maxParticles; t--; ) e.storage.push(new u(e.context, e.options));
|
|
57
|
-
}, a.prototype._registerBreakpoints = function() {
|
|
58
|
-
var e, t, n, i = this, o = i.options.responsive || null;
|
|
59
|
-
if (typeof o == "object" && o !== null && o.length) {
|
|
60
|
-
for (e in o) if (n = i.breakpoints.length - 1, t = o[e].breakpoint, o.hasOwnProperty(e)) {
|
|
61
|
-
for (; 0 <= n; ) i.breakpoints[n] && i.breakpoints[n] === t && i.breakpoints.splice(n, 1), n--;
|
|
62
|
-
i.breakpoints.push(t), i.breakpointSettings[t] = o[e].options;
|
|
63
|
-
}
|
|
64
|
-
i.breakpoints.sort(function(s, l) {
|
|
65
|
-
return l - s;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}, a.prototype._checkResponsive = function() {
|
|
69
|
-
var e, t = this, n = !1, i = r.innerWidth;
|
|
70
|
-
if (t.options.responsive && t.options.responsive.length && t.options.responsive !== null) {
|
|
71
|
-
for (e in n = null, t.breakpoints) t.breakpoints.hasOwnProperty(e) && i <= t.breakpoints[e] && (n = t.breakpoints[e]);
|
|
72
|
-
n !== null ? (t.activeBreakpoint = n, t.options = t._extend(t.options, t.breakpointSettings[n])) : t.activeBreakpoint !== null && (n = t.activeBreakpoint = null, t.options = t._extend(t.options, t.originalSettings));
|
|
73
|
-
}
|
|
74
|
-
}, a.prototype._refresh = function() {
|
|
75
|
-
this._initializeStorage(), this._draw();
|
|
76
|
-
}, a.prototype._resize = function() {
|
|
77
|
-
var e = this;
|
|
78
|
-
e.element.width = e.element.offsetParent ? e.element.offsetParent.clientWidth * e.ratio : e.element.clientWidth * e.ratio, e.element.offsetParent && e.element.offsetParent.nodeName === "BODY" ? e.element.height = r.innerHeight * e.ratio : e.element.height = e.element.offsetParent ? e.element.offsetParent.clientHeight * e.ratio : e.element.clientHeight * e.ratio, e.context.scale(e.ratio, e.ratio), clearTimeout(e.windowDelay), e.windowDelay = r.setTimeout(function() {
|
|
79
|
-
e._checkResponsive(), e._refresh();
|
|
80
|
-
}, 50);
|
|
81
|
-
}, a.prototype._animate = function() {
|
|
82
|
-
var e = this;
|
|
83
|
-
e._draw(), e._animation = r.requestAnimFrame(e._animate);
|
|
84
|
-
}, a.prototype.resumeAnimation = function() {
|
|
85
|
-
this._animation || this._animate();
|
|
86
|
-
}, a.prototype.pauseAnimation = function() {
|
|
87
|
-
var e = this;
|
|
88
|
-
e._animation && (e.usingPolyfill ? r.clearTimeout(e._animation) : (r.cancelAnimationFrame || r.webkitCancelAnimationFrame || r.mozCancelAnimationFrame)(e._animation), e._animation = null);
|
|
89
|
-
}, a.prototype._draw = function() {
|
|
90
|
-
var e = this, t = e.element, n = t.offsetParent ? t.offsetParent.clientWidth : t.clientWidth, i = t.offsetParent ? t.offsetParent.clientHeight : t.clientHeight, o = e.options.showParticles, s = e.storage;
|
|
91
|
-
t.offsetParent && t.offsetParent.nodeName === "BODY" && (i = r.innerHeight), e.context.clearRect(0, 0, t.width, t.height), e.context.beginPath();
|
|
92
|
-
for (var l = s.length; l--; ) {
|
|
93
|
-
var m = s[l];
|
|
94
|
-
o && m._draw(), m._updateCoordinates(n, i);
|
|
95
|
-
}
|
|
96
|
-
e.options.connectParticles && (s.sort(P), e._updateEdges());
|
|
97
|
-
}, a.prototype._updateEdges = function() {
|
|
98
|
-
for (var e = this, t = e.options.minDistance, n = Math.sqrt, i = Math.abs, o = e.storage, s = o.length, l = 0; l < s; l++) for (var m = o[l], h = l + 1; h < s; h++) {
|
|
99
|
-
var d, g = o[h], x = m.x - g.x, _ = m.y - g.y;
|
|
100
|
-
if (d = n(x * x + _ * _), i(x) > t) break;
|
|
101
|
-
d <= t && e._drawEdge(m, g, 1.2 - d / t);
|
|
102
|
-
}
|
|
103
|
-
}, a.prototype._drawEdge = function(e, t, n) {
|
|
104
|
-
var i = this, o = i.context.createLinearGradient(e.x, e.y, t.x, t.y), s = this._hex2rgb(e.color), l = this._hex2rgb(t.color);
|
|
105
|
-
o.addColorStop(0, "rgba(" + s.r + "," + s.g + "," + s.b + "," + n + ")"), o.addColorStop(1, "rgba(" + l.r + "," + l.g + "," + l.b + "," + n + ")"), i.context.beginPath(), i.context.strokeStyle = o, i.context.moveTo(e.x, e.y), i.context.lineTo(t.x, t.y), i.context.stroke(), i.context.fill(), i.context.closePath();
|
|
106
|
-
}, a.prototype._extend = function(e, t) {
|
|
107
|
-
return Object.keys(t).forEach(function(n) {
|
|
108
|
-
e[n] = t[n];
|
|
109
|
-
}), e;
|
|
110
|
-
}, a.prototype._hex2rgb = function(e) {
|
|
111
|
-
var t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
112
|
-
return t ? { r: parseInt(t[1], 16), g: parseInt(t[2], 16), b: parseInt(t[3], 16) } : null;
|
|
113
|
-
}, (u = function(e, t) {
|
|
114
|
-
var n = this, i = Math.random, o = t.speed, s = t.color instanceof Array ? t.color[Math.floor(Math.random() * t.color.length)] : t.color;
|
|
115
|
-
n.context = e;
|
|
116
|
-
var l = (n.options = t).selector.tagName ? t.selector : p.querySelector(t.selector);
|
|
117
|
-
n.x = l.offsetParent ? i() * l.offsetParent.clientWidth : i() * l.clientWidth, l.offsetParent && l.offsetParent.nodeName === "BODY" ? n.y = i() * r.innerHeight : n.y = l.offsetParent ? i() * l.offsetParent.clientHeight : i() * l.clientHeight, n.vx = i() * o * 2 - o, n.vy = i() * o * 2 - o, n.radius = i() * i() * t.sizeVariations, n.color = s, n._draw();
|
|
118
|
-
}).prototype._draw = function() {
|
|
119
|
-
var e = this;
|
|
120
|
-
e.context.save(), e.context.translate(e.x, e.y), e.context.moveTo(0, 0), e.context.beginPath(), e.context.arc(0, 0, e.radius, 0, 2 * Math.PI, !1), e.context.fillStyle = e.color, e.context.fill(), e.context.restore();
|
|
121
|
-
}, u.prototype._updateCoordinates = function(e, t) {
|
|
122
|
-
var n = this, i = n.x + this.vx, o = n.y + this.vy, s = n.radius;
|
|
123
|
-
e < i + s ? i = s : i - s < 0 && (i = e - s), t < o + s ? o = s : o - s < 0 && (o = t - s), n.x = i, n.y = o;
|
|
124
|
-
}, r.requestAnimFrame = (function() {
|
|
125
|
-
var e = r.requestAnimationFrame || r.webkitRequestAnimationFrame || r.mozRequestAnimationFrame;
|
|
126
|
-
return e || (this._usingPolyfill = !0, function(t) {
|
|
127
|
-
return r.setTimeout(t, 16.666666666666668);
|
|
128
|
-
});
|
|
129
|
-
})(), new a();
|
|
130
|
-
})(window, document);
|
|
131
|
-
(function() {
|
|
132
|
-
c.exports ? c.exports = f : window.Particles = f;
|
|
133
|
-
})();
|
|
134
|
-
})(y)), y.exports;
|
|
135
|
-
}
|
|
136
|
-
var b = S();
|
|
137
|
-
const z = /* @__PURE__ */ k(b), A = /* @__PURE__ */ w({
|
|
138
|
-
__proto__: null,
|
|
139
|
-
default: z
|
|
140
|
-
}, [b]);
|
|
141
|
-
export {
|
|
142
|
-
A as p
|
|
143
|
-
};
|