Turtle doodles!
I wrote this app for Chapter Ten of Janet for Mortals, as a demonstration of how to embed the Janet Programming Language into a WebAssembly app.
It began life as a heavily-simplified fork of Bauble, which is -- in my opinion -- a much more interesting graphics playground. But Toodle.Studio is stateful, and Bauble.Studio is stateless, so the Janet interop bits are a bit more interesting here.
emscripten
redo
yarn
- Janet 1.26.0
You should use the same version of Janet as the one that is vendored in the janet/
directory. You might be able to get by with a newer version, but you will run the risk of undefined behavior if there's a material difference between the image format or the image load dictionary.
Afterwards, install JavaScript dependencies with:
$ yarn
$ (cd ui && yarn)
Dev build:
$ redo
Prod build:
$ BUILD_MODE=prod redo
Lint the JS with:
(cd ui/; yarn eslint .)
After building, you can serve a local copy like this:
$ node_modules/.bin/alive-server public