var Cube = include('entities/cube.js'); function CubeScene() { this.cam = new Entity(); this.cam.add(POSITION); this.cam.add(CAMERA); this.cam.position.x = 3; this.cam.position.y = 3; this.cam.position.z = 3; this.cam.position.lookAt(0, 0, 0); this.cube = new Cube(); } Object.assign(CubeScene, Scene.prototype); CubeScene.prototype.update = function() { this.cube.update(); }; CubeScene.prototype.dispose = function() { this.cam.dispose(); this.cube.dispose(); }; module = CubeScene;