0.1.0 • Published 10 years ago
sierpinski v0.1.0
sierpinski -- cause triangles!
var sierpinski = require('sierpinski')
, canvas = document.getElementById("canvas")
;
canvas.width = window.innerWidth
canvas.height = window.innerHeight
sierpinski(canvas, 4)
sierpinski (canvas, depth[, rotation, color])
Draws a sierpinski triangle in the given canvas element with the requested depth. Optionally can add rotation and color.
0.1.0
10 years ago