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

23 lines
423 B
JavaScript

import { Env } from "./Env.js";
import { Element } from "./Element.js";
window.addEventListener("load", () => main());
const main = () => {
const env = new Env();
document.body.appendChild(env.getDomElement());
const cube = new Element();
env.addToScene(cube);
const animate = () => {
requestAnimationFrame(animate);
cube.rotate();
env.render();
};
animate();
};