Codevember 2026

blog


This November I did Codevember, the challenge of doing one creative coding piece every day of the month. I managed to do one for every day, 30 in total, all of them with three.js. All of them can be seen live here: vibecodevember ‘26. Source code is on GitHub: vibecodevember26.

Day 30 - konstruct

I wanted all the entries to look like a series, so all of them share the same stage: a near-black background, bone-white for everything, and a single ember colour as accent. Lighting, bloom, film grain, vignette, the slow camera drift and the label are also the same for every day. That way each day only has to add its own scene, and some entries are just a few dozen lines.

How it works

Each day is a single file, days/NN.js, calling a go function with a title, a setup function and some options. The setup returns the function that is called on every frame:

import { go, THREE, C, TAU } from '../lib/stage.js'

go('title', ({ scene, camera, renderer }) => {
  const mesh = new THREE.Mesh(
    new THREE.IcosahedronGeometry(1.4, 0),
    new THREE.MeshStandardMaterial({ color: C.ink, metalness: 1, roughness: 0.15 }))
  scene.add(mesh)

  // t: seconds, p: from 0 to 1 over one loop
  return (t, p) => mesh.rotation.set(p * TAU, p * TAU * 2, 0)
}, { loop: 10, eye: [0, 0, 10], bloom: 0.9, fog: 0.045 })

I also wanted a video of each one that loops without any visible cut. For that, everything is animated with p, the phase of the loop from 0 to 1, always using whole cycles (sin(p * TAU * n) and similar), and there’s a seeded random function instead of Math.random, so every run gives exactly the same frames:

let s = 1337
const rnd = () => ((s = (s + 0x6d2b79f5) | 0), (s = Math.imul(s ^ (s >>> 15), s | 1)),
  (s ^= s + Math.imul(s ^ (s >>> 7), s | 61)), ((s ^ (s >>> 14)) >>> 0) / 4294967296)
export const R = (a = 1, b) => (b === undefined ? rnd() * a : a + rnd() * (b - a))

Simulations are the exception, as they carry their state from one frame to the next and can’t go back to the first frame. For those, the recorder renders a bit past the end of the loop and crossfades it into the beginning.

To record, a script opens the page in headless Chrome. In record mode the page doesn’t animate by itself, it exposes a window.__frame(t) function, and the script calls it with the exact time of each frame and pipes the screenshots to ffmpeg. That way even the heavier scenes never drop a frame, it just takes longer to record.

Each day is also built into a single HTML file with three.js, shaders and code inside, so it can be opened from disk with a double click. After esbuild and Terser, the code is compressed with deflate, stored as base64, and the browser decompresses it with DecompressionStream:

const z = deflateRawSync(js, { level: 9, memLevel: 9 }).toString('base64')

return `fetch("data:;base64,${z}")
  .then(r => new Response(r.body.pipeThrough(new DecompressionStream("deflate-raw"))).text())
  .then(s => (0, eval)(s))`

That takes an entry from around 760KB to around 250KB, and unpacking takes about 50ms. I also tried with Roadroller (old habits from js13k 😅) and it goes down to around 175KB, but it takes several seconds to unpack on every page load, so not worth it here.

The entries

Click on any image to see it live. Most of them are interactive, using the mouse to move things around, click or drag. Each day has also a video.

01 - corona

corona

A star breathing: 200k particles on a shell deformed with noise and lit from inside. live / video

02 - aftershock

aftershock

A disc of steel rods heated by shockwaves crossing it, from ember to white. Moving the mouse heats the rods and clicking sends a new shockwave. live / video

03 - filament

filament

3,000 silk fibres braided around a knot that keeps changing shape. You can comb them with the mouse, click to pluck them or hold to unravel them. live / video

04 - event horizon

event horizon

A raymarched black hole with its accretion disk, jets, and a companion star bent into Einstein arcs. The mouse is a tiny star whose light bends around the black hole, dragging pours gas into the disk and clicking throws a star in. live / video

05 - attraction

attraction

A drop of black ferrofluid. When the magnets get close it grows spikes and then goes back to a smooth mirror sphere. You are one of the magnets. live / video

06 - veil

veil

A silk veil simulated on the GPU. You can grab it, and if you pull too hard it tears, the hole burns with an ember border and then closes again. live / video

07 - murmuration

murmuration

32,000 starlings on the GPU flying against an ember sunset. The mouse is a falcon and the flock moves away from it. live / video

08 - cathedral

cathedral

Flying forever down an infinite Menger sponge, with ember lights floating in the haze. Clicking releases a new light and scrolling twists the architecture. live / video

09 - lichtenberg

lichtenberg

Lichtenberg figures: high voltage discharges going through an acrylic block, white hot first, then ember and finally a frosted trace. live / video

10 - phase space

phase space

Four strange attractors (Lorenz, Thomas, Aizawa and Halvorsen) drawn with 410k particles. The equations are blended, so the cloud flows from one attractor to the next one. live / video

11 - meander

meander

Differential growth: a closed line that keeps growing but can’t cross itself, so it ends up folding like coral. live / video

12 - incense

incense

Raymarched smoke rising from an ember. You can move it with the mouse or click to puff a smoke ring. live / video

13 - collision

collision

Two spheres made of around 4,000 cubes crash into each other. The strongest hits heat up the cubes, and then each cube goes back to its place. live / video

14 - kintsugi

kintsugi

An obsidian disc repaired with gold cracks along its seams, breaks into 72 pieces in slow motion and comes back together. live / video

15 - grindstone

grindstone

A steel bar against a grinding wheel, with 65k sparks on the GPU bouncing on a black mirror floor. live / video

16 - medusa

medusa

Three jellyfish with tentacles simulated as ropes. Clicking makes a bioluminescence flash that goes down every tentacle. live / video

17 - relic

relic

A raymarched crystal with an ember heart, with reflection, refraction and a bit of dispersion. Clicking breaks it, only the piece under the mouse, up to ten pieces, and later they fuse back. live / video

18 - mercury

mercury

Drops of mercury rolling on black glass. They merge when they touch, and each drop reflects the others. live / video

19 - precession

precession

Three spinning tops using the real equations of motion of a heavy top. The tip of each one draws its path in ember light. live / video

20 - domino

domino

700 dominoes in a spiral of six arms. They fall from the centre along every arm, and then stand up again. live / video

21 - pendulum

pendulum

A pendulum wave with twenty chrome balls going in and out of sync. If you throw one, they hit each other like a Newton’s cradle. live / video

22 - rain

rain

A foggy window looking at a wet street at night. Each drop is a lens showing the city upside down, and you can wipe the glass with the mouse. live / video

23 - obsidian

obsidian

A black sea at sunset with 28 waves and a glass buoy floating on them. live / video

24 - foundry

foundry

Molten metal poured into a stone mould, using an SPH fluid that cools from white to ember to a dark crust. live / video

25 - jelly

jelly

Jelly cubes falling down some black stairs, squashing and pushing each other. live / video

26 - vortex

vortex

Three smoke rings that keep going through each other until they break apart, with around 260k particles following the flow. live / video

27 - aurora

aurora

A red aurora over a snowy lake at night, with fireflies and the Milky Way reflected on the water. Clicking on the lake throws a stone. live / video

28 - thin ice

thin ice

Black ice on a frozen lake that breaks when you click on it: first radial cracks, then rings, and pieces of ice sliding away. live / video

29 - merger

merger

Two spiral galaxies and a small one colliding, with 590k stars on the GPU, until the cores end up merging. Clicking makes a star go supernova. live / video

30 - konstruct

konstruct

For the last day, a raymarched Apollonian sphere packing (spheres inside every gap between spheres, at every scale) cut into a lace arcade standing in black water, with a moon rising behind it. 3,800 fireflies fly through the holes as boids, and they are also the lights of the scene, with soft shadows on the lace. Clicking fires a new firefly and dragging fires a whole stream. live / video

Wrapping up

All the entries are in the gallery, and the source code, with the build and record scripts, is on GitHub.