Created
November 17, 2016 15:44
-
-
Save MalteVoelkner/5600869c07c91fa14baf9350495fe6f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setup() { | |
| //Canvas-Settings | |
| createCanvas(390, 390); | |
| background(0); | |
| //Variablen setzen | |
| rect_x = 10 | |
| rect_y = 10 | |
| rect_w = 10; | |
| rect_h = 10; | |
| } | |
| function draw() { | |
| rect(rect_x, rect_y, rect_w, rect_h); | |
| rect_x = rect_x + 15; | |
| if (rect_x >= 380) { | |
| rect_y = rect_y + 20; | |
| rect_x = 10; | |
| } | |
| if (rect_y >= 390) { | |
| saveCanvas('out','png'); | |
| noLoop(); | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you give the gist the file extension ".pde" it will also be syntax highlighted.