
Bass Pulse
Background3DSeamless loop8 seconds
A white beam enters a glass prism and fans out into a rainbow, the prism turning slowly so the spectrum swings. Loops perfectly.
In Science & maths, Light, glass & shine
Next: Bass PulseSurprise me
Your current settings go with it. Combine several clips and hand them over together from your sequence.
Presets
How strongly the glass spreads the colours.
How far the prism turns to and fro.
The preview runs the same code your AI receives. These settings travel with the hand-off.
A beam of white light climbs out of the dark, enters a glass prism, is bent and spread into every colour from violet to red and falls across a wall. The optics are traced for real: forty wavelengths are refracted with Snell's law through glass whose index falls with wavelength, carried across the prism and refracted out again, so the spectrum has the true order and spread; as the prism turns the fan swings and, at the extreme, the violet (the most bent) is caught inside by total internal reflection and thrown out of the base as a violet beam. Dust turns in the beam. Choose the glass (crown, flint or diamond), how strongly it spreads the colours, how far the prism turns, the beam width, the haze and dust, whether there is a wall and the glow.
src/prism-dispersion.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.
src/prism-dispersion.jscreatePrism({ glass?, dispersion?, rotation?, beam?, haze?, wall?, glow?, aspect? }) => { scene, camera, material, setSize(width, height), update(time, loopSeconds), dispose() }traceSpectrum({ centre?, radius?, angle?, glass?, dispersion?, source?, beamAngle?, wallX? }) => { vertices, entry, reflected, rays }wavelengthToRGB(nm) => [r, g, b]createBloomPass(renderer, { width, height, glow?, exposure?, grain? }) => { render(scene, camera, output?), dispose() }GLASSES: { crown, flint, diamond }three@0.185.1 (source) — Renderer, the full-screen shader and the bloom targets.apw-runtime@1.0.0 (demo) — Demo harness.Coordinates: Screen space, y from -1 to 1: the prism (an equilateral triangle of circumradius 0.4) centred just above the middle, the beam entering from the lower left, the wall on the right at x = 0.86 (times the aspect when wider).
Lighting: Self-lit: the beam, the spectrum and the glints of the glass add light; the bloom softens them.
Timing: update(time, loopSeconds) traces the rays for that moment, so frames render in any order.
npm install
npm run render -- prism-dispersion/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.sha256:a02c5cdf36fd71a4…
Background3DSeamless loop8 seconds

Background3DSeamless loop12 seconds

Background3DSeamless loop10 seconds

Background3DSeamless loop14 seconds

Background3DSeamless loop10 seconds

Background3DSeamless loop12 seconds

Background3DSeamless loop12 seconds

Background3DSeamless loop16 seconds