mirror of
https://github.com/peterlodri-sec/blackhole.git
synced 2026-11-21 22:59:59 +01:00
Upstream pull mirror of https://github.com/peterlodri-sec/blackhole.git
- HTML 99.5%
- JavaScript 0.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github/workflows | ||
| public | ||
| .gitignore | ||
| README.md | ||
| worker.js | ||
| wrangler.jsonc | ||
Black Hole — real-time GR ray tracer
A single-file WebGL2 black hole visualization deployed as a Cloudflare Worker.
Overview
- Real-time geodesic ray tracing in the Schwarzschild metric
- Relativistic accretion disk: Doppler beaming (intensity and color shift), gravitational redshift, temperature profile T ~ r⁻³/⁴
- Photon ring: GR light-bending creates the characteristic "shadow" — rays with impact parameter < 3√3 rₛ are captured
- Lensed starfield: procedural star background bent by spacetime curvature
- Post-processing: bloom (bright-pass + 2-pass Gaussian blur at ¼ res), chromatic aberration, ACES tone-mapping, vignette, noise dither
- Two camera modes: [H] toggles between distant orbit and event-horizon free-look POV with infall loop and observer-blueshift
- Adaptive quality based on framerate
Physics
Deploy
npx wrangler deploy
Deployment URL: https://c51bd85e.blackhole-7gr.pages.dev
Custom domain (blackhole.vaked.dev)
The Cloudflare Worker route is configured but a CNAME DNS record must be manually added:
- Cloudflare Dashboard →
vaked.dev→ DNS → Records - Add record:
- Type: CNAME
- Name: blackhole
- Target: blackhole-7gr.pages.dev
- Proxy status: Proxied (orange cloud)
- Wait 1–2 minutes for SSL provisioning
Tech
- WebGL2 — no frameworks, one HTML file
- Cloudflare Pages for deployment
- Vanilla JS, zero dependencies
License
MIT