Skip to content

Hawking Radiation

Particle pairs flash out of the vacuum at a black hole's horizon: one escapes, one falls in, and the hole shrinks. Loops perfectly.

Background, V1 Effects3DSeamless loop, verified285 lines of codev1.0.0

In Science & maths, Space & cosmos, Light, glass & shine

Next: Particle GalaxySurprise me

Hawking Radiation preview
Starting live preview…
00:00:00:00 / 00:00:00:01

Live, running the real source at reduced resolution.

Your current settings go with it. Combine several clips and hand them over together from your sequence.

Effect controls

Presets

64
2
1
7

The preview runs the same code your AI receives. These settings travel with the hand-off.

Info

What it is

A black hole that slowly gives itself away. Pairs of virtual particles flash into being just outside the horizon; in each pair one partner is pulled in and fades (cold magenta), the other escapes along a spiral carrying its energy away (bright cyan), and the hole, which paid for it, shrinks a little. A glowing photon ring, a streaked accretion disc and a halo mark the horizon against a field of stars. Choose the number of pairs, the colours (classic, ice, ember or mono), how many times each pair is born per loop, how much the hole shrinks, the seed and whether the camera sways.

Reuse it in your own idea

  • Space explainer: Cyan and magenta.
  • Cold sci-fi: Ice, many pairs.
  • Dramatic: Ember, slow.

Which part is reusable

src/hawking-radiation.js is the ingredient your AI reuses. demo.js is only the example scene around it, and uses the demo harness only for the demo.

Good to know

  • The hole shrinks and then regrows within the loop; real evaporation is far slower and does not reverse.
  • The disc is a stylised glowing ring, not a ray-traced lensed image.

Technical details

Technical details
Implementation
Three.js 0.185.1 (WebGL) · ES module src/hawking-radiation.js
Exports
  • createBlackHole({ pairs?, palette?, cycles?, shrink?, seed? }) => { group, setProgress(progress), dispose() }
  • createBloomPass(renderer, { width, height, glow?, exposure?, grain? }) => { render(scene, camera, output?), dispose() }
  • PALETTES: { classic, ice, ember, mono }
Dependencies (exact)
  • three@0.185.1 (source) — Renderer, geometry and shader materials.
  • apw-runtime@1.0.0 (demo) — Demo harness.
How it fits a scene

Coordinates: The horizon (radius 2) is centred on the origin; the disc is tilted 16° and reaches to 7.6; stars sit on a sphere of radius 55–65; the camera sits 22 away.

Lighting: Self-lit additive particles, ring and disc; the bloom gives the glow.

Timing: setProgress(progress) places every particle from its pair's phase; frames render in any order.

Output
1080×1080, 30 fps, 16 s · procedural (computed from the frame number) · seamless loop — Each particle pair is born a whole number of times per loop and is a function of its pair's phase, the disc streaks turn whole cycles per loop, the shrinking is a cosine of the loop and the camera sway is a sine of the loop, so the last frame meets the first.
Tested
Rendered 480 frames on 2026-10-05 in Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0 (WebGL 2 via SwiftShader (software)). Same frame twice from fresh pages: identical. Loop: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.
Performance
Up to 1 400 additive instanced spheres, a ring-shaped shader and a bloom: a couple of milliseconds a frame on an integrated Intel GPU. Software WebGL renders in about two seconds a frame.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- hawking-radiation/1.0.0 --out my-video.mp4Needs Node 18+, ffmpeg and Chrome/Chromium. Add --params my-settings.json (from Copy settings) for your own settings.
Version
1.0.0 · sha256:88ce05bf5ac14ebf…
Files
License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder. License details
Provenance
Adapted from the owner's threejs-sketches/physics-forces/hawking-radiation (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original scene: paired particles born at the horizon along a closed-form escape spiral and infall, a streaked accretion disc and a bloom, on an exact loop.
BinMore like this

Bass Pulse

Background3DSeamless loop8 seconds