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
2022-11-22 10:40:56 +01:00

27 lines
541 B
JavaScript

import { Env } from "./Env.js";
import { Cube } from "./Cube.js";
import { Plane } from "./Plane.js";
window.addEventListener("load", () => main());
const main = () => {
const env = new Env();
document.body.appendChild(env.getDomElement());
const plan = new Plane(
window.innerWidth / 50,
10,
THREE.Color.NAMES.white,
THREE.Color.NAMES.black
);
env.addToScene(plan);
const animate = () => {
requestAnimationFrame(animate);
env.render();
};
animate();
};