Skip to content

Commit f95c105

Browse files
authored
Update 3-animation.md
1 parent 6e37e49 commit f95c105

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: 3-animation.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,21 @@ rect(mouseX, 300, 50, 100);
6060

6161
<br/>
6262

63-
## Challenge 3:
63+
## Challenge 4:
6464

6565
Can you guess what the p5js variable for the current Y coordinate of the user's mouse is? Try it!
6666

6767
**Your challenge:** Make one of your shapes move exactly to wherever your mouse cursor is, using both of the provided mouse coordinate variables!
6868

6969
<br/>
7070

71-
## Challenge 4:
71+
## Challenge 5:
7272

7373
Time for some more experimentation! What would happen if you used the user's mouse coordinates as the value for something else -- the width or height of the shape? The color of the shape? Something else? Try it!
7474

7575
<br/>
7676

77-
## Challenge 5:
77+
## Challenge 6:
7878

7979
For these next challenges, we'll use a new Glitch project template:
8080

@@ -94,29 +94,29 @@ Then ***discuss*** your ideas -- and last but not least, then open the live page
9494

9595
<br/>
9696

97-
## Challenge 6:
97+
## Challenge 7:
9898

9999
First, ***discuss:*** which part of the code controls the speed of the animation?
100100

101101
Then ***change*** one tiny part of the code to make the animation ***slower***, and then change it again to make it ***faster***.
102102

103103
<br/>
104104

105-
## Challenge 7:
105+
## Challenge 8:
106106

107107
Change the code a little bit so the square will move ***vertically***, from the top of the screen down to the bottom.
108108

109109
> **Hint:** You may want to review what those four numbers in the `rect()` function each stand for. Which of those four numbers is replaced by a variable in our example code?
110110
111111
<br/>
112112

113-
## Challenge 8:
113+
## Challenge 9:
114114

115115
Change the code a little bit more to make the square move ***diagonally***, from the top-left corner of the canvas across to the bottom-right corner.
116116

117117
<br/>
118118

119-
## Challenge 9:
119+
## Challenge 10:
120120

121121
Create **two** (or more) different shapes of different colors that all move around the screen!
122122

0 commit comments

Comments
 (0)