Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. var xPos = 10; // start position
  2.  
  3. var draw = function() {
  4. background(164, 166, 49);
  5.  
  6. // Start ground
  7. stroke(84, 58, 32);
  8. strokeWeight(5);
  9. line(0, 215, 400, 215);// Ground
  10.  
  11. // End ground
  12. stroke(21, 110, 36);
  13. strokeWeight(1);
  14. fill(90, 189, 107);
  15. arc(xPos + 38, 179, 122, 115, 180, 358); // Car body top
  16. line(xPos - 10,179, xPos + 99, 178); // Car bottom
  17.  
  18. //Car windsheild
  19. noStroke();
  20. fill(3, 3, 3);
  21. arc(xPos + 55, 153, 44, 43, 180, 360);
  22. //Car windsheild
  23.  
  24.  
  25. // Start wheels
  26. stroke(227, 218, 218);
  27. strokeWeight(3);
  28. fill(0, 0, 0);
  29. ellipse(xPos, 200, 30, 30); // Left Tire wheel
  30. ellipse(xPos + 75, 200, 30, 30); // Right Tire wheel
  31.  
  32. fill(255, 255, 255);
  33. ellipse(xPos, 200, 10, 10); //Left hubcap
  34. ellipse(xPos + 75, 200, 10, 10); //Left hubcap
  35.  
  36. // End wheels
  37.  
  38. xPos += 1;
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement