Skip to content

Instantly share code, notes, and snippets.

@hughsk
hughsk / ctx.js
Created February 16, 2014 22:39 — forked from NHQ/ctx.js
// the base module
module.exports = function(canvas){
if('string' == typeof canvas) canvas = dcoument.getElementById(canvas)
touchdown.start(canvas)
var ctx = window.ctx = canvas.getContext('2d')
var pen = basic(ctx)
ctx.translate(0.5, 0.5)
ctx.lineWidth = 10
ctx.globalCompositeOperation = 'destination-over';