Lesson 4, Topic 2
In Progress

Making animations

John May 20, 2019
Lesson Progress
0% Complete

Pamela shows how to program animations, using the draw() function.

Simple car motion Tutorial

Code

background</code>(151, 244, 247);<br> 
noStroke();</code>
// position of the car<br> var x = 10;</code>
// draw the car body<br> fill(255, 0, 115);
<br> rect(x, 200, 100, 20);<br>
 rect(x + 15, 178, 70, 40);
<code>// draw the wheels<br> 
fill(77, 66, 66);<br> ellipse(x + 25, 221, 24, 24);
<br> ellipse(x + 75, 221, 24, 24);</code>
Social Community Platform We would like to show you notifications for the latest news and updates.
Dismiss
Allow Notifications