crowds/slides/js/main.js

30 lines
518 B
JavaScript
Raw Normal View History

2018-03-27 17:39:08 +00:00
window.onload = function(){
// Setting up the main stuff
window.slideshow = new Slideshow();
window.pencil = new Pencil();
// Initializing the Mouse
Mouse.init(document.body);
// Animation loop IS update loop for now, whatever
2018-03-27 17:39:08 +00:00
function update(){
// Update
2018-03-27 17:39:08 +00:00
slideshow.update();
pencil.update();
Mouse.update();
// Draw
2018-03-28 17:12:05 +00:00
slideshow.draw();
pencil.draw();
2018-03-27 17:39:08 +00:00
window.requestAnimationFrame(update);
2018-03-27 17:39:08 +00:00
}
window.requestAnimationFrame(update);
// First slide!
2018-03-28 14:57:19 +00:00
slideshow.gotoChapter("Networks");
2018-03-27 17:39:08 +00:00
}