Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int rectSize;
- float draai, c;
- void setup() {
- size(300, 300);
- colorMode(HSB);
- rectSize = 60;
- }
- void draw() {
- rectSize -= 1;
- if (rectSize < 0) {
- rectSize = 60;
- }
- if (c >= 200) c=0; else c++;
- background(c);
- fill(122, 255, 255);
- translate(150,150);
- rotate((draai / 100) * PI);
- rect(-rectSize / 2, -rectSize / 2, rectSize, rectSize);
- }
Advertisement
Add Comment
Please, Sign In to add comment