Skip to content

Physarum Vein Field

A living transport network on black. Hundreds of thousands of slime-mould agents grow a luminous web of veins; your cursor is food, so the web reaches toward it, and a press plants a glowing node the network connects to with thick trunk veins before slowly letting go.

WebGL20 deps1 file · 43 KB TSXreduced-motion aware

Prominimalneon
Preview

Props

9
0.8
0.93
0.75
Ambient drift
Show sample copy

The source is part of Pro

$27/month or $179 once. See Pro

No runtime dependencies
"use client";

import { useEffect, useRef } from "react";
import type { CSSProperties, ReactNode } from "react";

/**
 * PhysarumVeinField: a full-bleed background that grows a living transport
 * network. A quarter of a million slime-mould agents wander across black,
 * each leaving a trace and steering toward the strongest trace ahead of it,
 * until the traces gather into a luminous web of veins. The cursor is food:
 * the web reaches toward it and reorganises around it. A press plants a
 * glowing food node that the network connects to with thick trunk veins, then
 * slowly lets go.
 *
 * The whole simulation runs on the GPU (WebGL2, no compute shaders). Agents
 * live in a float texture (position, heading). Every step: an update pass
 * senses the trail map at three points ahead of each agent (front, left,
 * right), turns toward the strongest, and steps forward; a deposit pass draws

  // ---------------------------------------------------------------
  // Full source available with a viberdy Pro subscription.
  // https://viberdy.dev/pricing
  // ---------------------------------------------------------------
}
Details

About this background

Slime mould has no brain and still finds the shortest route between two meals. This background copies the trick. Up to a quarter of a million agents (Dense; Full is 65k, and phones are held to Full) live in a float texture on the GPU. Each step, every agent smells the trail map at three points ahead of it, turns toward the strongest, steps forward and leaves a trace of its own; the trail is then blurred and faded, and the traces gather into a web of luminous veins on black. Three food nodes are seeded at load, so a network is already stretched between them when the page appears, and it keeps remodelling slowly by itself. Your cursor is food too: the path it takes is stamped into the field, the web reaches toward it and reorganises around it. A press plants a node that the network connects to with thick trunks, then slowly lets go. Sensor reach sets the scale of the veins, from fine lace to a few heavy trunks; turn speed and trail persistence set how calm or restless the web is. A Repel mode makes the cursor push agents away and erase what they built.

Curator’s note

Built after Sage Jenson's slime-mould work, which proved that a cloud of dumb agents following each other's traces will draw something that looks like anatomy. This version gives the web something to want: the cursor, and anything you press.

Pairs well with

Pro
Pro

Ink Aura Field

backgrounds
Pro