crowds/slides/js/main.js
2018-03-27 15:20:22 -04:00

32 lines
No EOL
569 B
JavaScript

window.onload = function(){
// Setting up the main stuff
window.simulations = new Simulations();
window.slideshow = new Slideshow();
window.pencil = new Pencil();
// Initializing the Mouse
Mouse.init(document.body);
// Animation loop IS update loop for now, whatever
function update(){
// Update
simulations.update();
slideshow.update();
pencil.update();
Mouse.update();
// Draw
simulations.draw();
pencil.draw();
window.requestAnimationFrame(update);
}
window.requestAnimationFrame(update);
// First slide!
slideshow.goto(0);
}