Files
dusk/assets/scenes/cube.js
T
2026-04-30 20:03:44 -05:00

28 lines
514 B
JavaScript

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;