andrewcmyers / constrain

Responsive, animated figures in JavaScript/HTML canvases
https://andrewcmyers.github.io/constrain
MIT License
128 stars 2 forks source link
animated-figures constraints embedded-figures html javascript web-pages

Constrain - a JS (ES6) library for animated, interactive web figures, based on declarative constraint solving

Triangle image

Demos

Pythagoras thumbnail Interactive Pythagorean Theorem

Triangles thumbnail Interactively computing centers of a triangle

Trees thumbnail Animated trees

Loyd thumbnail Loyd 15-puzzle

Spiral thumbnail Using constraints to compute the Golden Ratio (Drag the diamond!)

Dragon thumbnail Dragon curve

TeX thumbnail TeX-style text formatting

Cornell University course notes using Constrain for embedded figures: CS 2112, CS 4120/lexer generation, CS 4120/bottom-up parsing

Simple template page for using Constrain

Requirements