Skip to content

Instantly share code, notes, and snippets.

@zedauna
Created July 10, 2021 19:35
Show Gist options
  • Save zedauna/f158154ff1bec2342d39fe51f2bec12c to your computer and use it in GitHub Desktop.
Save zedauna/f158154ff1bec2342d39fe51f2bec12c to your computer and use it in GitHub Desktop.
tsParticles Among Us Impostor Background
<!-- tsParticles container -->
<div id="tsparticles"></div>
<!-- https://github.com/matteobruni/tsparticles -->
<div class="github">
<a class="btn btn-link" href="https://github.com/matteobruni/tsparticles" title="Find more info on GitHub">
<img class="img-fluid" id="gh-mark" src="https://cdn.matteobruni.it/images/particles/GitHub-Mark-120px-plus.png" alt="">
<span id="gh-project">Made with tsParticles</span>
</a>
<div>
<a class="github-button" href="https://github.com/matteobruni/tsparticles" data-icon="octicon-star" data-show-count="true" aria-label="Star matteobruni/tsparticles on GitHub">Star</a>
<a class="github-button" href="https://github.com/matteobruni/tsparticles/fork" data-icon="octicon-repo-forked" data-show-count="true" aria-label="Fork matteobruni/tsparticles on GitHub">Fork</a>
<a class="github-button" href="https://github.com/matteobruni/tsparticles/releases/tag/tsparticles%401.30.0" data-icon="octicon-download" aria-label="Download matteobruni/tsparticles on GitHub">Download</a>
</div>
</div>
<script async="" defer="" src="https://buttons.github.io/buttons.js"></script>
//tsParticles library - https://github.com/matteobruni/tsparticles
//tsParticles library - https://github.com/matteobruni/tsparticles
tsParticles.load("tsparticles", {
fullScreen: {
enable: true
},
fpsLimit: 60,
particles: {
groups: {
z5000: {
number: {
value: 70
},
zIndex: {
value: 5000
}
},
z7500: {
number: {
value: 30
},
zIndex: {
value: 7500
}
},
z2500: {
number: {
value: 50
},
zIndex: {
value: 2500
}
},
z1000: {
number: {
value: 40
},
zIndex: {
value: 1000
}
}
},
number: {
value: 200,
density: {
enable: false,
value_area: 800
}
},
color: {
value: "#fff",
animation: {
enable: false,
speed: 20,
sync: true
}
},
shape: {
type: "circle"
},
opacity: {
value: 1,
random: false,
animation: {
enable: false,
speed: 3,
minimumValue: 0.1,
sync: false
}
},
size: {
value: 3
},
links: {
enable: false,
distance: 100,
color: "#ffffff",
opacity: 0.4,
width: 1
},
move: {
angle: {
value: 10,
offset: 0
},
enable: true,
speed: { min: 3, max: 5 },
direction: "right",
random: false,
straight: false,
outModes: {
default: "out"
},
attract: {
enable: false,
rotateX: 600,
rotateY: 1200
}
},
zIndex: {
value: 500,
opacityRate: 0.5
}
},
interactivity: {
detectsOn: "canvas",
events: {
onHover: {
enable: false,
mode: "repulse"
},
onClick: {
enable: true,
mode: "push"
},
resize: true
},
modes: {
grab: {
distance: 400,
links: {
opacity: 1
}
},
bubble: {
distance: 400,
size: 40,
duration: 2,
opacity: 0.8
},
repulse: {
distance: 200
},
push: {
quantity: 4,
groups: ["z5000", "z7500", "z2500", "z1000"]
},
remove: {
quantity: 2
}
}
},
detectRetina: true,
background: {
color: "#000000",
image: "",
position: "50% 50%",
repeat: "no-repeat",
size: "cover"
}
});
<script src="https://cdn.jsdelivr.net/npm/tsparticles@1.31.0/tsparticles.min.js"></script>
/* ---- reset ---- */
body {
margin: 0;
font: normal 75% Arial, Helvetica, sans-serif;
}
canvas {
display: block;
vertical-align: bottom;
}
/* ---- tsparticles container ---- */
.github {
bottom: 10px;
right: 10px;
position: fixed;
border-radius: 10px;
background: #fff;
padding: 0 12px 6px 12px;
border: 1px solid #000;
}
.github a:hover,
.github a:link,
.github a:visited,
.github a:active {
color: #000;
text-decoration: none;
}
.github img {
height: 30px;
}
.github #gh-project {
font-size: 20px;
padding-left: 5px;
font-weight: bold;
vertical-align: bottom;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment