Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var xPos = 10; // start position
- var draw = function() {
- background(164, 166, 49);
- // Start ground
- stroke(84, 58, 32);
- strokeWeight(5);
- line(0, 215, 400, 215);// Ground
- // End ground
- stroke(21, 110, 36);
- strokeWeight(1);
- fill(90, 189, 107);
- arc(xPos + 38, 179, 122, 115, 180, 358); // Car body top
- line(xPos - 10,179, xPos + 99, 178); // Car bottom
- //Car windsheild
- noStroke();
- fill(3, 3, 3);
- arc(xPos + 55, 153, 44, 43, 180, 360);
- //Car windsheild
- // Start wheels
- stroke(227, 218, 218);
- strokeWeight(3);
- fill(0, 0, 0);
- ellipse(xPos, 200, 30, 30); // Left Tire wheel
- ellipse(xPos + 75, 200, 30, 30); // Right Tire wheel
- fill(255, 255, 255);
- ellipse(xPos, 200, 10, 10); //Left hubcap
- ellipse(xPos + 75, 200, 10, 10); //Left hubcap
- // End wheels
- xPos += 1;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement