Skip to content

Instantly share code, notes, and snippets.

Created March 19, 2015 11:46
Show Gist options
  • Save anonymous/1bef36c7c9c202fb8f8c to your computer and use it in GitHub Desktop.
Save anonymous/1bef36c7c9c202fb8f8c to your computer and use it in GitHub Desktop.
particles.js
<div id="particles-js"></div>
<script src="http://vincentgarreau.com/particles.js/particles.js"></script>
particlesJS('particles-js', {
particles: {
color: '#fff',
color_random: false,
shape: 'circle', // "circle", "edge" or "triangle"
opacity: {
opacity: 1,
anim: {
enable: false,
speed: 1.5,
opacity_min: 0,
sync: false
}
},
size: 2.5,
size_random: true,
nb: 100,
line_linked: {
enable_auto: true,
distance: 140,
color: '#fff',
opacity: 1,
width: 1,
condensed_mode: {
enable: false,
rotateX: 600,
rotateY: 600
}
},
anim: {
enable: true,
speed: 1
}
},
interactivity: {
enable: true,
mouse: {
distance: 250
},
detect_on: 'canvas', // "canvas" or "window"
mode: 'grab', // "grab" of false
line_linked: {
opacity: .5
},
events: {
onclick: {
enable: true,
mode: 'push', // "push" or "remove"
nb: 4
},
onresize: {
enable: true,
mode: 'out', // "out" or "bounce"
density_auto: false,
density_area: 800 // nb_particles = particles.nb * (canvas width * canvas height / 1000) / density_area
}
}
},
/* Retina Display Support */
retina_detect: true
});
html,body{
margin:0;
}
canvas{
display:block;
vertical-align:bottom;
}
#particles-js{
height:100%;
background:#b61924
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment