scene.js 479 B

1234567891011121314151617181920212223
  1. import { coordinates } from "./coordinates.js";
  2. class scene {
  3. #canvas;
  4. #context;
  5. #position;
  6. constructor() {
  7. this.#position = new coordinates();
  8. this.#canvas = document.createElement("canvas");
  9. this.#context = this.#canvas.getContext("webgl");
  10. if (!this.#context) {
  11. throw new TypeError("Browser does not support WebGL.");
  12. }
  13. }
  14. get position() {
  15. return this.#position;
  16. }
  17. }
  18. export { scene };