Off-topic but has potential:
In an issue thread, fellow @pmario brings up http://fabricjs.com - a “powerful and simple Javascript HTML5 canvas library”. They have this demo for drawing (note the code below it!), but they demo loads of other cool stuff too. As we discuss in the issue thread, it’s probably possible to extract and “tiddlify” desired parts of it, but that it would take some serious effort and skill.
I just mention this because nuggets like this risk being missed when they’re only on github.