Day 4: Bring Code To Life
Day 4: Bring Code To Life
VIDEO LESSON
Today's Topics:
Movement and animation
Wrapping
Bouncing
or operator
Updating variables
Using your own drawings!
p5.js official reference
RESOURCES
reference sheet:
template:
note: You may not be able to fully view the sketches above -- open them in a new tab! Double click the sketch title and press "open in new tab." Click </> in the top right corner to view the code!
demo:
REFLECTION QUESTIONS
How can changing a variable over time make something appear to move?
What is the difference between changing an object's position and changing its speed?
What did you choose to animate, and how does it move?