Modernize project

This commit is contained in:
2025-11-06 16:32:41 +01:00
parent d28d7896de
commit 501949828d
13 changed files with 55 additions and 30 deletions

View File

@@ -1,10 +1,10 @@
/// <reference types="../node_modules/@webgpu/types" />
/// <reference path="types.d.ts" />
import { Color, Mesh, Node, PerspectiveCamera, PointLight, Quaternion, Scene, Submesh, Vector3 } from "../src/data/index";
import { Renderer, degToRad } from "../src/oktaeder";
import "./style.css";
new EventSource("/esbuild").addEventListener("change", () => location.reload());
import uvmapUrl from "./uvmap.png";
const canvas = document.createElement("canvas");
window.addEventListener("resize", onResize);
@@ -66,7 +66,7 @@ const submesh: Submesh = { start: 0, length: 24 };
const mesh = new Mesh({ vertexBuffer, indexBuffer, submeshes: [submesh] });
const imageBitmap = await loadImageBitmap("/uvmap.png");
const imageBitmap = await loadImageBitmap(uvmapUrl);
const texture = renderer.createTexture({
format: "srgb",