ben5NL

Untitled

May 31st, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. int rectSize;
  2. float draai, c;
  3. void setup() {
  4. size(300, 300);
  5. colorMode(HSB);
  6. rectSize = 60;
  7.  
  8. }
  9.  
  10. void draw() {
  11. rectSize -= 1;
  12. if (rectSize < 0) {
  13. rectSize = 60;
  14. }
  15.  
  16. if (c >= 200) c=0; else c++;
  17. background(c);
  18. fill(122, 255, 255);
  19. translate(150,150);
  20. rotate((draai / 100) * PI);
  21. rect(-rectSize / 2, -rectSize / 2, rectSize, rectSize);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment