An emulated fruit fly, embodied and given infinite sugar.
A whole-brain emulation using the FlyWire connectome: 139,255 neurons driving a simulated fruit fly in a terrarium. Its sweet-sensing neurons receive continuous stimulation. Feeding, head and antennal motion follow neural activity; wing movements and small foot shuffles use supplied patterns. The corner map shows sampled FlyWire positions and connections lighting up as neurons fire.
Inspired by Infinite Pain (2025) by Harris Rosenblum.
npm ci
./serve.sh 7377Open localhost:7377. The first load takes a few seconds.
The browser code is TypeScript, compiled to unbundled JavaScript in dist/.
npm run typecheck checks the source; npm test builds and checks the simulation.
The local server builds once at startup; restart it after editing source files.
Name the fly to begin. Drag to orbit and scroll to zoom. Sugar, pause and recenter controls sit below the fly. About contains the premise, technical summary, credits and further reading; Inspect shows neural activity and simulation statistics.
- FlyWire — connectome data, CC BY-NC 4.0.
- FlyBody, via MuJoCo Menagerie — body model.
- MuJoCo, three.js and cannon-es — physics and rendering.
- Shiu et al., A Drosophila computational brain model reveals sensorimotor processing (2024), and desktop-fly by Denis Shiryaev — LIF implementation references.
- Prop models and artists.