Replace the SVG core and backdrop with one shader that traces each pixel through Schwarzschild spacetime. The shadow, the arch of the far side of the disk, the second image and the Einstein ring come from the physics rather than artwork. The disk is a thin disk seen from a low angle, about five times the shadow's radius, with Doppler beaming and a filtered, cloud-like texture. - Sky: a procedural galaxy baked once into a cubemap. Point sources are small, few and brightness-capped so they never rival the orbit markers, which now carry a dark backing disc and outline. - Quality: tiers from high to still, a startup calibration cached per canvas size, an fps cap, and an idle sleep. A locked realistic map draws nothing. - Integration: the canvas follows the galaxy frame through Big Screen, draws in Motion's post-render step, takes the disk clock and capture absorption from the galaxy loop, and falls back to the SVG core without WebGL2. - Radar view: a toolbar toggle switches to a radar look that spreads outward from the hole as a wave, with a sweep on its own clock. The choice is remembered per browser; reduced motion switches at once and holds the sweep. - Tests for the geodesics, quality governor, look spring and layout, plus a standalone preview page (web/blackhole-proto.html) for tuning the look. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
40 lines
2.6 KiB
HTML
40 lines
2.6 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Black hole prototype</title>
|
||
<style>
|
||
html, body { margin: 0; height: 100%; background: #0a0c10; color: #d9dad6; font: 12px/1.4 ui-monospace, monospace; overflow: hidden; }
|
||
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
|
||
canvas:active { cursor: grabbing; }
|
||
#panel { position: fixed; top: 12px; left: 12px; width: 250px; max-height: calc(100% - 24px); overflow: auto; padding: 10px 12px; background: #111418e6; border: 1px solid #2b3138; border-radius: 8px; backdrop-filter: blur(10px); }
|
||
#panel.hidden { display: none; }
|
||
#panel h1 { margin: 0 0 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #e8b57e; }
|
||
#panel label { display: grid; grid-template-columns: 78px 1fr 38px; gap: 6px; align-items: center; margin: 4px 0; }
|
||
#panel input[type=range] { width: 100%; }
|
||
#panel .row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
|
||
#panel button { font: inherit; color: inherit; background: #191d22; border: 1px solid #393e45; border-radius: 5px; padding: 4px 8px; cursor: pointer; }
|
||
#panel pre { margin: 8px 0 0; white-space: pre-wrap; color: #9298a0; }
|
||
.tag { position: fixed; pointer-events: none; font: 500 10px/1 ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: #e8b57e; opacity: 0; white-space: nowrap; }
|
||
.tag::before { content: ""; display: inline-block; width: 22px; height: 1px; background: #e8b57e99; vertical-align: middle; margin-right: 6px; }
|
||
.tag.left { transform: translateX(-100%); }
|
||
.tag.left::before { display: none; }
|
||
.tag.left::after { content: ""; display: inline-block; width: 22px; height: 1px; background: #e8b57e99; vertical-align: middle; margin-left: 6px; }
|
||
.tag.mint { color: #8bcbb3; }
|
||
.tag.mint::before { display: none; }
|
||
#modes { display: flex; gap: 6px; margin: 4px 0 8px; }
|
||
#modes button.on { border-color: #e8b57e; color: #ffe2c9; }
|
||
#fail { position: fixed; inset: 0; display: none; place-items: center; text-align: center; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<canvas id="stage"></canvas>
|
||
<div id="fail">WebGL2 is not available in this browser.</div>
|
||
<div class="tag" id="tagShadow">Shadow · 3√3 M</div>
|
||
<div class="tag" id="tagDisk">Accretion disk · 6–26 M</div>
|
||
<div id="panel"><h1>Black hole</h1><div id="modes"></div></div>
|
||
<script type="module" src="/src/proto/blackhole-proto.ts"></script>
|
||
</body>
|
||
</html>
|