Skip to content

Sample applications ​

The demos take one feature at a time. These are small but whole applications, which is where the parts have to work together — and where the difference between "the library supports it" and "you can ship it" shows up.

Each one runs the library from source on its own page, with the complete source underneath. None of them is more than a few hundred lines, because the toolbar is usually the longest part.

What to look at ​

The thing worth reading the source for
SketchpadA stroke is an ordinary path shape, so almost nothing in the application is about drawing.
Graph paperMoving one vertex rewrites every segment touching it, and stays one entry in the history.
Pixel editorA whole drag is one undo, without deferring a single write.
TangramThe pieces snap home inside the same commit that moved them.
AmidakujiSixty frames a second of animation, and not one of them touches the document.
Photo collagePictures are saved beside the shapes, never written over them.

All six are plain TypeScript modules — no framework, no build step of their own. The same code would run inside React, Vue or nothing at all.

Released under the MIT License.