Skip to content

Instantly share code, notes, and snippets.

@Eli-Shmerler
Created August 13, 2019 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Eli-Shmerler/a7d5379005daa51ed867b472669f1941 to your computer and use it in GitHub Desktop.
Save Eli-Shmerler/a7d5379005daa51ed867b472669f1941 to your computer and use it in GitHub Desktop.
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
<script type="text/javascript">
particlesJS("particles-js",
REPLACE THIS LINE WITH THE CODE YOU HAVE DOWNLOADED
);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);;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment