import * as Scene from 'view/scene' let scene: Scene.State = Scene.init() function loop(timestamp: number) { Scene.update(scene, timestamp) Scene.view(scene) window.requestAnimationFrame(loop) } window.requestAnimationFrame(loop) window.onresize = () => Scene.resize( scene, { width: window.innerWidth, height: window.innerHeight } )