This repository has been archived on 2022-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
GeometryDash3D/js/main.js

24 lines
423 B
JavaScript
Raw Normal View History

import { Env } from "./Env.js";
import { Element } from "./Element.js";
2022-11-07 09:10:20 +01:00
window.addEventListener("load", () => main());
const main = () => {
const env = new Env();
2022-11-07 09:59:36 +01:00
document.body.appendChild(env.getDomElement());
2022-11-08 09:43:37 +01:00
const cube = new Element();
env.addToScene(cube);
2022-11-08 09:43:37 +01:00
const animate = () => {
requestAnimationFrame(animate);
cube.rotate();
env.render();
};
2022-11-08 09:43:37 +01:00
animate();
2022-11-07 09:10:20 +01:00
};