start method

void start(
  1. Scene scene
)

Implementation

void start(Scene scene) {
  canvas =  querySelector("#game") as CanvasElement;
  gl = canvas.getContext("webgl") as WebGL.RenderingContext;
  Util.initGl();

  Texture.loadAll();
  input = Input();

  this.scene = scene;
  scene.init();

  screen = Screen(gl, scene.camera);

  window.requestAnimationFrame(animate);
}