playing around with particles.js
Created
October 18, 2018 04:16
-
-
Save Tanvir82/cbbdf80fbc85ba5a2451e31cec1ba1f7 to your computer and use it in GitHub Desktop.
particles.js snow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="particles-js"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://github.com/VincentGarreau/particles.js/ | |
particlesJS("particles-js", { | |
"particles": { | |
"number": { | |
"value": 400, | |
"density": { | |
"enable": true, | |
"value_area": 800 | |
} | |
}, | |
"color": { | |
"value": "#ffffff" | |
}, | |
"shape": { | |
"type": "image", | |
"stroke": { | |
"width": 3, | |
"color": "#fff" | |
}, | |
"polygon": { | |
"nb_sides": 5 | |
}, | |
"image": { | |
"src": "http://www.dynamicdigital.us/wp-content/uploads/2013/02/starburst_white_300_drop_2.png", | |
"width": 100, | |
"height": 100 | |
} | |
}, | |
"opacity": { | |
"value": 0.7, | |
"random": false, | |
"anim": { | |
"enable": false, | |
"speed": 1, | |
"opacity_min": 0.1, | |
"sync": false | |
} | |
}, | |
"size": { | |
"value": 5, | |
"random": true, | |
"anim": { | |
"enable": false, | |
"speed": 20, | |
"size_min": 0.1, | |
"sync": false | |
} | |
}, | |
"line_linked": { | |
"enable": false, | |
"distance": 50, | |
"color": "#ffffff", | |
"opacity": 0.6, | |
"width": 1 | |
}, | |
"move": { | |
"enable": true, | |
"speed": 5, | |
"direction": "bottom", | |
"random": true, | |
"straight": false, | |
"out_mode": "out", | |
"bounce": false, | |
"attract": { | |
"enable": true, | |
"rotateX": 300, | |
"rotateY": 1200 | |
} | |
} | |
}, | |
"interactivity": { | |
"detect_on": "canvas", | |
"events": { | |
"onhover": { | |
"enable": true, | |
"mode": "bubble" | |
}, | |
"onclick": { | |
"enable": true, | |
"mode": "repulse" | |
}, | |
"resize": true | |
}, | |
"modes": { | |
"grab": { | |
"distance": 150, | |
"line_linked": { | |
"opacity": 1 | |
} | |
}, | |
"bubble": { | |
"distance": 200, | |
"size": 40, | |
"duration": 2, | |
"opacity": 8, | |
"speed": 3 | |
}, | |
"repulse": { | |
"distance": 200, | |
"duration": 0.2 | |
}, | |
"push": { | |
"particles_nb": 4 | |
}, | |
"remove": { | |
"particles_nb": 2 | |
} | |
} | |
}, | |
"retina_detect": true | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#particles-js { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
background: linear-gradient(to bottom, rgba(117, 114, 113, 0.8) 10%, rgba(40, 49, 77, 0.8) 30%, rgba(29, 35, 71, 0.8) 50%, rgba(19, 25, 28, 0.8) 80%, rgba(15, 14, 14, .8) 100%), url(https://38.media.tumblr.com/tumblr_m00c3czJkM1qbukryo1_500.gif); | |
background-repeat: no-repeat; | |
background-size: cover; | |
background-position: 50% 50%; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment