Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
my favourite modules.

mostly in the realm of creative coding and graphics programming

lots of these are my own :)

tooling (browserify dev server) (like wzrd but with incremental watching & LiveReload) (more fully-featured dev server)

mouse/touch events (useful for delta) (same idea, but for unified mouse/touch) (ideal for drag events) (get relative offset of mouse event)

key events

svg (creates SVG node) (parses SVG into commands) (make all path commands absolute) (normalize to curves) (get 2D points)

2D / paths (triangulates 2D/3D points) (smooth a polyline) (approximate curve into discrete 2D points) (approximate curve into discrete 2D points) (quick orientation check for polygons) (like canvas arc() but with 2D points) (for computing polyline normals / extrusion) (draws a simplicial complex)

math (N-dimensional vector utils) (grab-bag of easing equations) (random float between range) (random integer between range) (linear inteprolation) (normalized range between two values) (n-degree bezier interpolation) (linear interpolation on parallel arrays/vectors)
gl-vec2, gl-mat4, etc (from gl-matrix) (interpolates two matrices as per W3C spec) (quaternion spherical interpolation)


color (convert [r,g,b,a] to CSS string) (convert CSS string to [r,g,b,a]) (useful for grayscale)

image processing (gets color palette from RGBA image) (similar to gaussian blur)


canvas (tiny util to create a webgl context) (same API, but for 2D context)

dom / CSS (styling elements) (<select> abstraction) (make a 4x4 matrix using W3C transforms spec) (get a vendor prefix for a specific style name) (lots of DOM modules)


animation (TweenMax) (grab-bag of easing equations) (small tween engine) (generic keyframe utility) (Bluebird Promise wrapper for TweenMax)

misc utils (create an array with given range) (a good Promise implementation) (a good ES6 transpiler) (small XHR abstraction) (loads a JSON with XHR)

unit testing (for tests involving Images) (especially for GL tests involving images) (useful for testing GLSL output)

sound / web audio


the modules and ecosystem (glsl- or gl- prefixes) (a CLI tool to generate SDFs from images)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.