2018-03-27 17:39:08 +00:00
|
|
|
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);
|
|
|
|
|
2018-03-27 19:20:22 +00:00
|
|
|
// Animation loop IS update loop for now, whatever
|
2018-03-27 17:39:08 +00:00
|
|
|
function update(){
|
2018-03-27 19:20:22 +00:00
|
|
|
|
|
|
|
// Update
|
2018-03-27 17:39:08 +00:00
|
|
|
simulations.update();
|
|
|
|
slideshow.update();
|
|
|
|
pencil.update();
|
2018-03-27 19:20:22 +00:00
|
|
|
Mouse.update();
|
|
|
|
|
|
|
|
// Draw
|
|
|
|
simulations.draw();
|
|
|
|
pencil.draw();
|
|
|
|
|
2018-03-27 17:39:08 +00:00
|
|
|
window.requestAnimationFrame(update);
|
2018-03-27 19:20:22 +00:00
|
|
|
|
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
|
|
|
|
|
|
|
}
|