diff --git a/TODO.txt b/TODO.txt index 57115d1..2264ed7 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,5 +1,10 @@ TODO: +Add mirror effect to WebGPU + +Reformulate the basis + https://buf.com/films/the-matrix-resurrections + Resurrections Support random glyph order Support annomaly streaks diff --git a/js/webgpu/main.js b/js/webgpu/main.js index edfa107..f452ad7 100644 --- a/js/webgpu/main.js +++ b/js/webgpu/main.js @@ -8,6 +8,7 @@ import makeStripePass from "./stripePass.js"; import makeImagePass from "./imagePass.js"; import makeResurrectionPass from "./resurrectionPass.js"; import makeEndPass from "./endPass.js"; +import { setupCamera } from "../camera.js"; const loadJS = (src) => new Promise((resolve, reject) => { @@ -34,6 +35,10 @@ const effects = { export default async (canvas, config) => { await loadJS("lib/gl-matrix.js"); + if (config.useCamera) { + await setupCamera(); + } + const canvasFormat = navigator.gpu.getPreferredCanvasFormat(); const adapter = await navigator.gpu.requestAdapter(); const device = await adapter.requestDevice();