xrd / toodle.studio

turtle graphics playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Dependencies

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)

Building

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

About

turtle graphics playground

License:MIT License


Languages

Language:TypeScript 55.3%Language:Janet 23.5%Language:CSS 8.3%Language:C++ 7.8%Language:Shell 3.6%Language:JavaScript 1.3%Language:Nix 0.1%