From d2b18b26324e5ba7055d7bc03a99a59d26c86c86 Mon Sep 17 00:00:00 2001 From: Trenton Zimmer <66042448+trmazi@users.noreply.github.com> Date: Tue, 4 Feb 2025 20:33:45 -0500 Subject: [PATCH] Add new particlesJS background --- index.html | 2 +- public/assets/network.js | 111 +++++++++++++++++++++++++++++ public/data-sources/particles.json | 110 ---------------------------- 3 files changed, 112 insertions(+), 111 deletions(-) create mode 100644 public/assets/network.js delete mode 100644 public/data-sources/particles.json diff --git a/index.html b/index.html index 3d8ed4d..8350beb 100644 --- a/index.html +++ b/index.html @@ -50,7 +50,7 @@
- +
diff --git a/public/assets/network.js b/public/assets/network.js new file mode 100644 index 0000000..deb8182 --- /dev/null +++ b/public/assets/network.js @@ -0,0 +1,111 @@ +particlesJS("particles-js", { + particles: { + number: { + value: 80, + density: { + enable: true, + value_area: 800, + }, + }, + color: { + value: "#fff", + }, + shape: { + type: "circle", + stroke: { + width: 0, + color: "#5c5c5c", + }, + polygon: { + nb_sides: 5, + }, + image: { + src: "", + width: 100, + height: 100, + }, + }, + opacity: { + value: 0.5, + random: false, + anim: { + enable: false, + speed: 1, + opacity_min: 0.1, + sync: false, + }, + }, + size: { + value: 3, + random: true, + anim: { + enable: false, + speed: 20, + size_min: 0.1, + sync: false, + }, + }, + line_linked: { + enable: true, + distance: 150, + color: "#5c5c5c", + opacity: 0.4, + width: 1, + }, + move: { + enable: true, + speed: 3, + direction: "none", + random: false, + straight: false, + out_mode: "out", + bounce: false, + attract: { + enable: false, + rotateX: 600, + rotateY: 1200, + }, + }, + array: [], + }, + interactivity: { + detect_on: "canvas", + events: { + onhover: { + enable: true, + mode: "repulse", + }, + onclick: { + enable: true, + mode: "push", + }, + resize: true, + }, + modes: { + grab: { + distance: 400, + line_linked: { + opacity: 1, + }, + }, + bubble: { + distance: 400, + size: 40, + duration: 2, + opacity: 8, + speed: 3, + }, + repulse: { + distance: 200, + duration: 0.4, + }, + push: { + particles_nb: 4, + }, + remove: { + particles_nb: 2, + }, + }, + }, + retina_detect: true, +}); diff --git a/public/data-sources/particles.json b/public/data-sources/particles.json deleted file mode 100644 index 138ebdd..0000000 --- a/public/data-sources/particles.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "particles": { - "number": { - "value": 14, - "density": { - "enable": true, - "value_area": 800 - } - }, - "color": { - "value": "#4d5022" - }, - "shape": { - "type": "circle", - "stroke": { - "width": 0, - "color": "#000" - }, - "polygon": { - "nb_sides": 6 - }, - "image": { - "src": "img/github.svg", - "width": 100, - "height": 100 - } - }, - "opacity": { - "value": 0.3, - "random": true, - "anim": { - "enable": false, - "speed": 1, - "opacity_min": 0.1, - "sync": false - } - }, - "size": { - "value": 142.0465754938091, - "random": true, - "anim": { - "enable": true, - "speed": 10, - "size_min": 40, - "sync": false - } - }, - "line_linked": { - "enable": false, - "distance": 200, - "color": "#ffffff", - "opacity": 1, - "width": 2 - }, - "move": { - "enable": true, - "speed": 8, - "direction": "none", - "random": false, - "straight": false, - "out_mode": "out", - "bounce": false, - "attract": { - "enable": false, - "rotateX": 600, - "rotateY": 1200 - } - } - }, - "interactivity": { - "detect_on": "canvas", - "events": { - "onhover": { - "enable": false, - "mode": "repulse" - }, - "onclick": { - "enable": false, - "mode": "remove" - }, - "resize": true - }, - "modes": { - "grab": { - "distance": 400, - "line_linked": { - "opacity": 1 - } - }, - "bubble": { - "distance": 400, - "size": 40, - "duration": 2, - "opacity": 8, - "speed": 3 - }, - "repulse": { - "distance": 200, - "duration": 0.4 - }, - "push": { - "particles_nb": 4 - }, - "remove": { - "particles_nb": 2 - } - } - }, - "retina_detect": true -} \ No newline at end of file