我试图找出画布上是否有黑色像素
var check = function(player,keyPressed) { //series of ifs to determine what pixel to check. }
如果像素为假,我需要返回true或false,我尝试了getImageData,但我无法弄清楚如何正确使用它.
javascript html5 canvas
canvas ×1
html5 ×1
javascript ×1