- Swift 56.7%
- TypeScript 30.7%
- Shell 4.9%
- Metal 3.4%
- WGSL 2.1%
- Other 2.2%
The app has been live since 2026-06-24 (iPhone, iPad, Apple TV), but the README still announced it as "heading to the App Store" — so the one place a visitor looks first has been wrong for three weeks, and the store link existed nowhere in this repo. - Link the App Store listing in the Native apps section - Add an App Store badge to the header row Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| .gitea/issue_template | ||
| .github | ||
| apple | ||
| assets | ||
| docs | ||
| macos | ||
| public | ||
| scripts | ||
| seeds | ||
| src | ||
| tests | ||
| .editorconfig | ||
| .gitignore | ||
| .nvmrc | ||
| biome.json | ||
| CHANGELOG.md | ||
| CLA.md | ||
| CONTRIBUTING.md | ||
| index.html | ||
| lefthook.yml | ||
| LICENSE | ||
| LICENSING.md | ||
| package-lock.json | ||
| package.json | ||
| player.html | ||
| playwright.config.ts | ||
| README.md | ||
| SECURITY.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
| vite.element.config.ts | ||
| vitest.config.ts | ||
Physarum
Pure ambient generative art — a stigmergy simulation in WebGPU.
Physarum simulates Physarum polycephalum (slime mold) — thousands of agents follow chemical trails, forming organic, ever-shifting path networks. It runs as a web app, a native macOS app, and native apps for iPhone, iPad, and Apple TV. Watch, tune, record, share.
macOS app requires macOS 14+ (native Metal, universal) · the web app runs in any WebGPU browser
macOS: the release app is Developer ID-signed and Apple-notarised, so it launches straight away — no Gatekeeper detour. Background and the build/signing details:
docs/MACOS-APP.md.
Features
- 3-species stigmergy with a per-pair interaction matrix — each species reads three pheromone channels and steers via a 3-sensor classical Physarum (M1) model.
- 7 curated factory presets — Aurora, Mandala, Mystic, Terminal Haze, Neon Waves, Solar Veil, and Dancing Ink: a hand-tuned starting set spanning luminous rings, kaleidoscopic symmetry, and ink-on-paper.
- Live editor with collapsible sections, per-parameter help tooltips, per-section reset, and a save-as-new flow with auto-baked thumbnails.
- Audio-reactive — microphone or tab-audio capture, free routing from bass/mid/high to any of 10 modulation targets (move, turn, deposit, sensor, rhythm, chaos, exposure, bloom, saturation, contrast), with auto-gain.
- Capture — PNG screenshot, WebM/MP4 video recording, msgpack-
packed
#p=…share links. - Post-processing stack — HDR feedback echo, threshold bloom, ACES tonemap, saturation/contrast/vignette grading.
- Two blend modes — additive (glow) for dark backgrounds, paint (ink) for bright ones.
- Kaleidoscope (1-6 mirror axes) and long-exposure head highlight for two distinct post-fx looks.
- Sim-speed multiplier (1-8×) to evolve patterns faster than real time.
Preset gallery
The curated factory set — seven hand-tuned presets that ship as the starting slots in the native apps (new in v2.1.0). Click any preset for a live, full-window demo (then the ⛶ button for true fullscreen). These 7 are the full built-in set.
![]() Aurora luminous magenta ring ▶ live demo |
![]() Mandala 8-fold star kaleidoscope ▶ live demo |
![]() Mystic violet chase kaleidoscope ▶ live demo |
![]() Terminal Haze phosphor-green kaleidoscope ▶ live demo |
![]() Neon Waves electric neon ribbons ▶ live demo |
![]() Solar Veil molten amber veil ▶ live demo |
![]() Dancing Ink red ink on paper ▶ live demo |
Native apps
Beyond the web app, Physarum ships as native SwiftUI/Metal apps — the same engine, with a full authoring editor, audio-reactivity, and capture on every platform:
- macOS — download the notarised universal app below (macOS 14+).
- iPhone, iPad & Apple TV — on the App Store as Physarum Ambient, free. On Apple TV, Physarum becomes a lean-back ambient display you steer from the couch or mirror live from your phone.
![]() iPhone |
![]() iPad |
Apple TV — ambient mode · ▶ watch a 25 s preview
Embed
Drop the player onto any page with the <physarum-player> custom element:
<script type="module" src="https://jkaindl.codeberg.page/physarum/physarum-player.js"></script>
<!-- a built-in preset -->
<physarum-player preset="builtin:aurora"></physarum-player>
<!-- your own preset: in the app, open Settings -> "Copy embed code" -->
<physarum-player preset="token:..."></physarum-player>
<!-- a cycling playlist -->
<physarum-player playlist="builtin:aurora,builtin:mandala,builtin:mystic" interval="20"></physarum-player>
Attributes: preset, playlist, interval (seconds), controls
(auto/always/none), poster, asset-base, autoplay, loop.
JS API: .play(), .pause(), .next(), .prev(), .load(source).
Events: physarum:ready, physarum:presetchange, physarum:error.
The player is purely visual (no audio reactivity) and falls back to a poster image when WebGPU is unavailable. Or embed via iframe using the hosted route:
<iframe src="https://jkaindl.codeberg.page/physarum/player.html?preset=builtin:aurora"
style="border:0;width:100%;height:400px" allowfullscreen allow="fullscreen"></iframe>
Requirements
- Browser with WebGPU support (Chrome/Edge 113+, Safari 26+, Firefox stable)
- For audio-reactive mode: microphone permission
- Node 22+ for development
Development
npm install
npm run dev
Visit http://localhost:5173.
Build
npm run build
npm run preview
Testing
npm test # unit tests
npm run test:e2e # end-to-end (Playwright)
npm run lint
npm run typecheck
Preset thumbnails
Built-in preset cards ship with pre-rendered thumbnails in
public/preset-thumbs/. After editing a preset's parameters, re-bake:
npm run dev # in one terminal
npm run bake:thumbnails # in another — opens a headed Chromium
Headed mode is required on macOS — Chrome's headless renderer doesn't expose a working WebGPU device, so headless captures end up blank.
Distribution
Web (PWA) — every push to main is built and published to Codeberg
Pages by .forgejo/workflows/deploy.yml:
https://jkaindl.codeberg.page/physarum/
macOS app — the native SwiftUI/Metal app (full authoring editor, audio-reactive, capture/export), Developer ID-signed + notarised, universal (Apple Silicon + Intel):
./scripts/build-macos-app.sh # → dist-macos/Physarum.dmg
See docs/MACOS-APP.md. App icons are generated from
assets/icon.svg via ./scripts/gen-icons.sh.
Contributing
Contributions are welcome — see CONTRIBUTING.md.
Release history is in CHANGELOG.md.
License
Physarum is dual-licensed:
- AGPL-3.0-or-later for open-source use — see
LICENSE. - A commercial license is available for proprietary use that the AGPL
doesn't allow — e.g. embedding the
<physarum-player>component on a closed-source website or in a SaaS — seeLICENSING.mdor emailcode@jkaindl.de.
Contributions are accepted under the Contributor License Agreement.
Support
If Physarum brightens a screen of yours, you can leave a tip on
Liberapay. For commercial use, see
LICENSING.md.








