Difference between revisions of "Team:UCopenhagen/Test/Particlejs"

(Fix &&)
(Remove stats)
Line 85: Line 85:
 
   retina_detect: true
 
   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) {
 
    if (window.pJSDom[0].pJS.particles.array) {
 
    count_particles.innerText = window.pJSDom[0].pJS.particles.array.length;
 
    }
 
  }
 
  requestAnimationFrame(update);
 
};
 
requestAnimationFrame(update);
 
  
 
</script>
 
</script>

Revision as of 10:35, 12 August 2018