Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. PFont myFont;
  2. String [] names ={"so", "much", "depends", "upon", "a", "red", "wheel",
  3. "barrow", "glazed", "with", "rain", "water", "beside", "the", "white", "chickens"};
  4. String textHolder = "M+I";
  5.  
  6.  
  7. void setup() {
  8. size(960,540);
  9. myFont = createFont("Helvetica", 50);
  10. textFont(myFont);
  11. println (names.length);
  12. background(255);
  13. textAlign(LEFT);
  14. }
  15.  
  16. void draw() {
  17. }
  18.  
  19. void mousePressed(){
  20. fill(random(255),random(255),random(255));
  21. textSize(random(9,105));
  22. textHolder=names[int(random(names.length))];
  23. text(textHolder,mouseX, mouseY);
  24. }
  25.  
  26. void mouseMoved(){
  27. noStroke();
  28. fill(0,random(140,255),random(180,255));
  29. ellipse (random(0,1000),random(0,1000),10,10);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement