Created
February 23, 2015 05:08
-
-
Save Swolebrain/835ce55b7fdae34b1767 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
ctx.putImageData(imgdata, 0, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment