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(); };