Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float vit=1;
- int taille =50;
- PVector[] squares;
- void setup() {
- size(600, 600);
- squares = new PVector[] {
- new PVector(0,0),
- new PVector(taille,taille),
- new PVector(width,0),
- new PVector(width+taille, taille)
- };
- }
- void draw() {
- background(0);
- for (PVector s : squares) {
- rect(s.x - width, s.y, taille, taille);
- s.x = (s.x + vit) % (width*2);
- }
- }
Add Comment
Please, Sign In to add comment