A terminal donut animation and ASCII art CLI written in Go, built with Charm's Bubble Tea and Lip Gloss TUI libraries.
For the best animation experience, use a GPU-accelerated terminal emulator such as Alacritty, Kitty, or similar. While not required, these terminals can provide smoother and more vibrant visuals for the donut animation.
- Real-time optimized 3D simulation based on sloane's rotating donut
- Colorful, animated terminal output for modern terminal emulators
- 🚀 Emoji render mode
- Hardwired 60FPS ASCII rendering on most computers
- 300μs allocation free core loop (Apple Silicon M1)
git clone https://github.com/erik-adelbert/donut.git
cd donutmake runBuild the executable:
make build
./bin/donutgo install github.com/erik-adelbert/donut/cmd/donut@latestmake test
make benchgo run ./cmd/donut/main.goBuild a binary:
mkdir -p bin
go build -o bin/donut ./cmd/donut/main.go
./bin/donutcmd/donut/— CLI entry point (mainpackage)donut/— Core simulation and rendering logic
- The model rotate and project a donut onto the screen. This work is a careful port of sloane's 2006 IOCCC entry, donut.c
- Adjust the palette in
donut/palette.goto change the donut appearance. - Change the simulation parameters as needed.
MIT. See LICENSE.
Erik Adelbert
Note: I don't need to vibe my code. This project is crafted.
