···11-/*!
22- * Personal website of Sefa Eyeoglu
33- * Copyright (C) 2018-2022 Sefa Eyeoglu <contact@scrumplex.net>
44- *
55- * This program is free software: you can redistribute it and/or modify
66- * it under the terms of the GNU Affero General Public License as published by
77- * the Free Software Foundation, either version 3 of the License, or
88- * (at your option) any later version.
99- *
1010- * This program is distributed in the hope that it will be useful,
1111- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313- * GNU Affero General Public License for more details.
1414- *
1515- * You should have received a copy of the GNU Affero General Public License
1616- * along with this program. If not, see <https://www.gnu.org/licenses/>.
1717- */
1818-1919-import { tsParticles } from "@tsparticles/engine";
2020-import { loadAngleUpdater } from "@tsparticles/updater-angle";
2121-import { loadBaseMover } from "@tsparticles/move-base";
2222-import { loadCircleShape } from "@tsparticles/shape-circle";
2323-import { loadColorUpdater } from "@tsparticles/updater-color";
2424-import { loadOpacityUpdater } from "@tsparticles/updater-opacity";
2525-import { loadSizeUpdater } from "@tsparticles/updater-size";
2626-2727-import options from "./tsParticles-config.json";
2828-import ready from "./_utils";
2929-3030-const { matches } = matchMedia("(min-width: 768px)");
3131-3232-async function loadParticles() {
3333- await loadAngleUpdater(tsParticles);
3434- await loadBaseMover(tsParticles);
3535- await loadCircleShape(tsParticles);
3636- await loadColorUpdater(tsParticles);
3737- await loadOpacityUpdater(tsParticles);
3838- await loadSizeUpdater(tsParticles);
3939- tsParticles
4040- .load({ id: "particles-js", options })
4141- .then()
4242- .catch((e) => {
4343- console.error("tsparticles failed to load :(");
4444- console.error(e);
4545- });
4646-}
4747-4848-if (matches) {
4949- ready().then(() => {
5050- // tsParticles causes heavy lag while loading, lets delay it, so that all animations are smooth at least
5151- setTimeout(loadParticles, 500);
5252- });
5353-}