This coding template is a lot harder than the block code we were using before. I had trouble figuring out the order of how to write the code. I basically gave up and drew a house with no windows, doors, or anything, just a square and a triangle. It took me literally an hour to get the roof (triangle) to align with the house (square). I also tried to color them in. At first I was trying to make the roof blue and the house red, but when I put my code in for red under the rectangle it filled everything in, and then when I thought that by writing the code for filling in the triangle blue right underneath the triangle code, it filled the square blue and the roof red, which was completely the opposite of what I was going for.
https://editor.p5js.org/IM-Jx/present/cp6UvZP10
top of page
Search
Recent Posts
See AllI will create a basic pong game using the p5 code editor. I will use mouse interactivity to control a rectangle along the x axis at a point touching the bottom of the canvas. Then, I will use the alre
This was simple code using mouse and arrow interactivity. By pressing the button in the center of the canvas, the background will change color. https://editor.p5js.org/IM-Jx/sketches/w8PdsVce_
bottom of page