Skip to content

Binary Stars

Two stars in orbit, a stream of plasma pulled between them and spiralling into a glowing disc. Loops perfectly.

3D object, V2 Objects3DSeamless loop, verified329 lines of codev1.0.0

In Space & cosmos

Next: Blue MarbleSurprise me

Binary Stars 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

1
1
1
4

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

Info

What it is

Two stars locked in orbit about their common centre: a large, cool, boiling orange giant and a small, hot blue companion wearing a spinning accretion disc, with a bright stream of plasma pulled across the gap and spiralling into the disc, against a field of distant stars. The surfaces churn with granulation and spots, the coronas flare, the disc swirls. Choose the star colours (classic, twin, ember or jade), how many orbits a loop holds, how much plasma flows, the disc and the seed.

Reuse it in your own idea

  • Astronomy explainer: Orange giant and blue dwarf.
  • Sci-fi title: Red and amber, fast.
  • Calm backdrop: Green and cyan.

Which part is reusable

src/binary-stars.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 orbit is a circle with a fixed mass ratio: no eccentricity, no tides, no real Roche lobe.
  • The plasma is a particle stream along a curve, not a fluid simulation.

Technical details

Technical details
Implementation
Three.js 0.185.1 (WebGL) · ES module src/binary-stars.js
Exports
  • createBinaryStars({ palette?, orbits?, stream?, disc?, seed? }) => { group, setProgress(progress), dispose() }
  • createBloomPass(renderer, { width, height, glow?, exposure?, grain? }) => { render(scene, camera, output?), dispose() }
  • PALETTES: { classic, twin, ember, jade }
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 centre of mass is the origin; the giant (radius 1.15) orbits at 1.5 and the companion (0.62) at 3.1 in the xz plane; the camera looks down at about 22°.

Lighting: Self-lit shaders; the bloom gives the coronas and the glare.

Timing: setProgress(progress) places the stars, the plasma and the swirl; frames render in any order.

Output
1080×1080, 30 fps, 16 s · procedural (computed from the frame number) · seamless loop — The pair goes a whole number of times round its orbit per loop, the plasma particles flow a whole number of times along the stream, the surface noise and the disc's spiral turn in whole turns, so the last frame meets the first.
Tested
Rendered 480 frames on 2026-10-06 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 |Δ| 1 of 255.
Performance
Two lit spheres, two glow shells, a disc, 900 plasma points and a bloom with an anti-aliased target. A few milliseconds a frame on an integrated Intel GPU. Software WebGL renders in a second or two a frame.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- binary-stars/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:dda611d6d9047247…
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/space-cosmic/binary-stars (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original scene: granulated star shaders, an additive accretion disc, a Bezier plasma stream and whole-turn motion for an exact loop.
BinMore like this

Campfire

Background3DSeamless loop12 seconds