sketch.js


sketch.js is a tiny (~5k) boilerplate for creating JavaScript based creative coding experiments.
Check out the showcase.

Why use sketch.js?

Sketch.js handles all that tedious but necessary stuff that would normally slow you down - setting up an animation loop, creating and managing a graphics context for Canvas or WebGL, cross browser and device event binding and normalisation for mouse, touch and keyboard events, handling window resizes… You get the idea.
When creating a sketch, you specify a type (the default is Sketch.CANVAS) and what you get back is an augmented instance of aCanvasRenderingContext2DWebGLRenderingContext or Node / HTMLElement. This gives you direct access to all the usual properties and methods of your chosen context, as well as some new and useful ones added by sketch.js
It also provides fast global access to useful math functions and constants and extends random to handle ranges and arrays.
For more information, check out the getting started guide, the API or the full source, as well as the examples in the showcase.
sketch.js sketch.js Reviewed by Bhaumik Patel on 10:26 PM Rating: 5