Initial commit: WebGPU portfolio — generative-art site with DOM overlay

This commit is contained in:
2026-07-26 19:06:17 +02:00
commit 7172894ebb
30 changed files with 3916 additions and 0 deletions

14
src/ui/input.ts Normal file
View File

@@ -0,0 +1,14 @@
// Window-level pointer position capture. Discrete clicks and hover are
// handled by the DOM overlay elements directly; this class only feeds the
// continuous pointer position that the background shader consumes.
export class Input {
x = 0
y = 0
constructor() {
window.addEventListener('pointermove', (e) => {
this.x = e.clientX
this.y = e.clientY
})
}
}