Created
November 26, 2013 19:15
-
-
Save gtoast/7664301 to your computer and use it in GitHub Desktop.
Testing out the gist.
This file contains 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
PShape shapeOut; | |
Ellipse[] shapesOut; | |
int numShapesOut = 10; | |
float scaleSpeed = 10; | |
float createSpeed = .05; | |
float fact = 1.0; | |
float centerX; | |
float centerY; | |
float lastEvent = 0; | |
Ellipse e; | |
void setup() { | |
size(800, 600); | |
frameRate(32); | |
smooth(); | |
centerX = width/2; | |
centerY = height/2; | |
} | |
void draw() { | |
background(.03); | |
shapeMode(CENTER); | |
translate(mouseX, mouseY); | |
if (e == null && millis() - lastEvent >= 100) { | |
e = new Ellipse(0, 0, 1, 1); | |
lastEvent = millis(); | |
} | |
if (e != null) { | |
e.draw(color(249, 255, 127)); | |
e.setScale(e.getScale() + scaleSpeed); | |
if (e.getScale() > 800) { | |
e = null; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment