Skip to content

Instantly share code, notes, and snippets.

@georules
Created October 2, 2013 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save georules/6797487 to your computer and use it in GitHub Desktop.
Save georules/6797487 to your computer and use it in GitHub Desktop.
processing basics
{"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"}
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