Skip to content

Instantly share code, notes, and snippets.

@bgoonz
Created July 17, 2022 05:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bgoonz/e8e36c5b93337bd31fcd916c655b90f2 to your computer and use it in GitHub Desktop.
data structures
<div id="tsparticles"></div>
(function () {
tsParticles.load("tsparticles", {
fpsLimit: 12,
particles: {
move: {
enable: true,
outMode: "bounce",
gravity: { enable: true },
speed: 10
},
life: { duration: { sync: true, value: 5 }, count: 1 },
shape: { type: "circle" },
collisions: { enable: true },
size: { value: 10 },
color: { value: ["#f00", "#ff0", "#fff", "#0f0", "#0ff", "#00f", "#f0f"] },
links: { enable: true }
},
interactivity: {
detect_on: "canvas",
events: { onHover: { enable: true, mode: "repulse" } }
}
});
}.call(this));
<script src="https://cdnjs.cloudflare.com/ajax/libs/tsparticles/1.17.12/tsparticles.min.js"></script>
* {
margin: 0;
}
#tsparticles {
background: #000;
height: 100vh;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment