mozilla

Walking man: https://editor.p5js.org/cs105/sketches/j5Tmti_O4

Screen Shot 2022-10-16 at 9.37.24 PM.png

Screen Shot 2022-10-16 at 9.37.32 PM.png

Screen Shot 2022-10-16 at 9.37.05 PM.png

10/21 ICM

loadImage(filename)

createImg()—>html tag: can not modify at the pixel level, (html don’t have pixel, can not access pixel element)

createImage(w, h)

Console: can return

Preload before setup, can callback in setup

If load in the setup, the problem will be that the code will start running but the picture have not start finish loading

Function loadImage (filepath, callback){

callback(image);

Return p5.Image

}

For every pixel, there are 4 pixel

Pixels = [255, 0, 0, 0;