mirror of
https://github.com/BioArchLinux/hugo-theme-archbio.git
synced 2025-03-10 12:02:42 +00:00
10 lines
2 KiB
JavaScript
10 lines
2 KiB
JavaScript
/* -----------------------------------------------
|
|
/* Author : Vincent Garreau - vincentgarreau.com
|
|
/* MIT license: http://opensource.org/licenses/MIT
|
|
/* Demo / Generator : vincentgarreau.com/particles.js
|
|
/* GitHub : github.com/VincentGarreau/particles.js
|
|
/* How to use? : Check the GitHub README
|
|
/* v2.0.0
|
|
/* ----------------------------------------------- */
|
|
particlesJS("particles-js", {"particles":{"number":{"value":160,"density":{"enable":true,"value_area":800}},"color":{"value":"#75a6ff"},"shape":{"type":"polygon","stroke":{"width":0,"color":"#000000"},"polygon":{"nb_sides":5},"image":{"src":"","width":0,"height":0}},"opacity":{"value":1,"random":true,"anim":{"enable":true,"speed":1,"opacity_min":0,"sync":false}},"size":{"value":2.7,"random":true,"anim":{"enable":true,"speed":1,"size_min":0,"sync":false}},"line_linked":{"enable":false,"distance":150,"color":"#ffffff","opacity":0.4,"width":1},"move":{"enable":true,"speed":1,"direction":"none","random":true,"straight":false,"out_mode":"bounce","bounce":false,"attract":{"enable":true,"rotateX":600,"rotateY":600}}},"interactivity":{"detect_on":"canvas","events":{"onhover":{"enable":true,"mode":"bubble"},"onclick":{"enable":true,"mode":"push"},"resize":true},"modes":{"grab":{"distance":176.19962578555666,"line_linked":{"opacity":0.43367346938775503}},"bubble":{"distance":250,"size":0,"duration":2,"opacity":0,"speed":3},"repulse":{"distance":400,"duration":0.4},"push":{"particles_nb":4},"remove":{"particles_nb":2}}},"retina_detect":true});var count_particles, stats, update; stats = new Stats; stats.setMode(0); stats.domElement.style.position = 'absolute'; stats.domElement.style.left = '0px'; stats.domElement.style.top = '0px'; document.body.appendChild(stats.domElement); count_particles = document.querySelector('.js-count-particles'); update = function() { stats.begin(); stats.end(); if (window.pJSDom[0].pJS.particles && window.pJSDom[0].pJS.particles.array) { count_particles.innerText = window.pJSDom[0].pJS.particles.array.length; } requestAnimationFrame(update); }; requestAnimationFrame(update);;
|
|
|