Skip to content

Instantly share code, notes, and snippets.

View Swolebrain's full-sized avatar

Victor Moreno Swolebrain

View GitHub Profile
function greenLines(){
var imgdata = ctx.getImageData(0,0,600,600);
for (var i =0; i < imgdata.data.length; i+=40){ //move forward 40 spots because each
//pixel is 4 array spots and we wanna move 10 pixels
imgdata.data[i] = 0;
imgdata.data[i+1]=255;
imgdata.data[i+2]=0;
imgdata.data[i+3] = 255;
}