mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-18 06:09:30 -07:00
Add camera setup to WebGPU project
This commit is contained in:
5
TODO.txt
5
TODO.txt
@@ -1,5 +1,10 @@
|
|||||||
TODO:
|
TODO:
|
||||||
|
|
||||||
|
Add mirror effect to WebGPU
|
||||||
|
|
||||||
|
Reformulate the basis
|
||||||
|
https://buf.com/films/the-matrix-resurrections
|
||||||
|
|
||||||
Resurrections
|
Resurrections
|
||||||
Support random glyph order
|
Support random glyph order
|
||||||
Support annomaly streaks
|
Support annomaly streaks
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import makeStripePass from "./stripePass.js";
|
|||||||
import makeImagePass from "./imagePass.js";
|
import makeImagePass from "./imagePass.js";
|
||||||
import makeResurrectionPass from "./resurrectionPass.js";
|
import makeResurrectionPass from "./resurrectionPass.js";
|
||||||
import makeEndPass from "./endPass.js";
|
import makeEndPass from "./endPass.js";
|
||||||
|
import { setupCamera } from "../camera.js";
|
||||||
|
|
||||||
const loadJS = (src) =>
|
const loadJS = (src) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
@@ -34,6 +35,10 @@ const effects = {
|
|||||||
export default async (canvas, config) => {
|
export default async (canvas, config) => {
|
||||||
await loadJS("lib/gl-matrix.js");
|
await loadJS("lib/gl-matrix.js");
|
||||||
|
|
||||||
|
if (config.useCamera) {
|
||||||
|
await setupCamera();
|
||||||
|
}
|
||||||
|
|
||||||
const canvasFormat = navigator.gpu.getPreferredCanvasFormat();
|
const canvasFormat = navigator.gpu.getPreferredCanvasFormat();
|
||||||
const adapter = await navigator.gpu.requestAdapter();
|
const adapter = await navigator.gpu.requestAdapter();
|
||||||
const device = await adapter.requestDevice();
|
const device = await adapter.requestDevice();
|
||||||
|
|||||||
Reference in New Issue
Block a user