🐢 LOGO graphics playground for Shrimp
| src | ||
| .gitignore | ||
| bun.lock | ||
| index.html | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
🐢 Honu
LOGO-style turtle graphics powered by Shrimp.
Quickstart
bun install
bun dev
This builds the app and serves the dist/ folder with Python's built-in HTTP server.
Building
bun run build
Outputs a bundled browser app to dist/. The dist/ folder contains:
index.html- The main pageapp.js- Bundled JavaScript (Parser + Compiler + ReefVM + CodeMirror)
You can serve the dist/ folder with any static file server, or even open index.html directly in a browser.
LOGO Commands
Movement
forward n- Move forward n pixelsback n- Move backward n pixelsleft n- Turn left n degreesright n- Turn right n degrees
Pen Control
penup- Lift pen (don't draw)pendown- Lower pen (draw)setcolor n- Set pen color (0-15)setwidth n- Set pen widthclearscreen- Clear the canvas
Turtle Control
home- Return to center, heading upsetheading n- Set heading to n degreessetpos x y- Set position to (x, y)position- Get current position
Control Flow
repeat n do: ... end- Repeat commands n times
Misc
print value- Print to consolewait n- Wait n millisecondsstop- Stop execution
Usage
- Write Shrimp/LOGO code in the editor
- Press Run (or Cmd+Enter) to execute
- Watch the turtle draw on the canvas
Example - Draw a square:
repeat 4 do:
forward 100
right 90
end