t-dex
Draws an accurate representation of intervals over time. For HTML canvas.
Use with browserify.
It's easy, just pass the function a param object. See the ex.js file for usage.
from the example ex.js
To run this example, do:
npm install -g browserify opa
cd /t-dex
opa -n -e ex.js
var timeline = ; var canvas = document;canvasheight = 60;canvaswidth = 800;canvasstyleborder = '1px solid OrangeRed';documentbody; var ctx = canvas; // DO THISctx// var q = Objectnull;qcanvas = canvas // requiredqstart = 1025; // in seconds, requiredqduration = 12; // in seconds, requiredqintervals = 1/2 1/4 1/8 // at least one required qx = 100 // default 0qy = 20 // default 0qwidth = 600 // default canvas.widthqheight = 20 // default canvas.heightqfillStyle = null // default to transparetqstrokeStyle = 'rgba(20,20,20,.25)' // that is the default