WebGPU-based black hole raytracer with gravitational lensing
Rust WASM + WebGPU compute shaders + Next.js
Geodesic raytracing around Schwarzschild black hole
Gravitational lensing of Milky Way background
Accretion disk visualization
Elliptical planet orbit with Keplerian dynamics
Interactive camera controls
Leapfrog integration in geometric units (r_s = 2) 2000 integration steps per ray Schwarzschild metric: u'' = -u(1 - 1.5u²) Event horizon at r = 2M 2M
# build wasm files first
cd wasm &∓& wasm-pack build --target web --out-dir ../public/wasm --release
just src dev
# or for production
just src proddVisit http://localhost:3000/blackhole
Left-click drag: orbit camera Scroll: zoomm
GitHub Actions auto-deploys to GitHub Pages on push to main Enable Pages in repo settings: Settings > Pages > Source: GitHub Actionsctionss