[ Launch: processing basics ] 6797487 by georules
[ Launch: Tributary inlet ] 6666089 by enjalot
-
-
Save georules/6797487 to your computer and use it in GitHub Desktop.
processing basics
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
{"description":"processing basics","endpoint":"","display":"canvas","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"inlet.pde":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/lyC4HBn.png"} |
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
ArrayList i1; | |
ArrayList i2; | |
int rand1; | |
int rand2; | |
void setup() { | |
size(480,480); | |
i1 = new ArrayList(); | |
i1.add("coffee"); | |
i1.add("cat"); | |
i1.add("sling"); | |
i2 = new ArrayList(); | |
i2.add("fires"); | |
i2.add("sits"); | |
i2.add("goes"); | |
} | |
void draw() { | |
background(color(100)); | |
textFont("Times",35) | |
//rand = int(random(0, i1.size())); | |
text(i1.get(rand1),15, 223); | |
strokeWeight(10); | |
line(136, 170, 136, 257); | |
text(i2.get(rand2),180, 223); | |
} | |
void mouseClicked() { | |
rand1 = int(random(0, i1.size())); | |
rand2 = int(random(0, i2.size())); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment