• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Interaction Lab
  • Comm Lab

Jade's Document Blog

April 7, 2022

Recitation 6

For my animated poster, I made this words jumping randomly everywhere in different colors. And for homwork, I added some interaction elements. If I click on my mouse and move it, I can erase the words. If I feel it’s too tired to clean all of it–press DELETE and all the words on the screen disappear!

I had struggle on this: I added a delay to my “draw” because I wanted to slow down the speed of the popping words, but then the reaction time for my mouse and keyboard also got longer.

 

 

float r;
float g;
float b;
float x;
float y;
float size;

void setup(){
  size(1024,768);
  background(255);
  

  
  
  
  
}

void draw(){
  delay(90);
  r=random(50,255);
  g=random(50,255);
  b=random(50,255);
  x=random(1024);
  y=random(768);
  size=random(20,50);
  
  fill(r,g,b);
  rectMode(CENTER);
  rect(x,y,size*5,size);
  fill(0);
  textSize(size);
  textAlign(CENTER,CENTER);
  text("IMA SHOW", x,y);
  textSize(random(10,20));
  text("MAY13,18-20PM",y,x);

  
 
  if(mousePressed){
   click(mouseX,mouseY);
  }
  if(keyPressed){
    if(key==DELETE){
      background(255);
    }
  }
}


  
  

void click(float x,float y){
  fill(255);
 
  noStroke();
  ellipse(x,y,300,300);
 
 
}

 

Filed Under: Interaction Lab, Uncategorized

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • Visual Metaphor Proposal
  • Reverse Storyboard
  • Audition: A Memory Soundscape
  • Reading Response
  • Diptych

Recent Comments

  • A WordPress Commenter on Hello world!

Archives

  • November 2022
  • October 2022
  • September 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022

Categories

  • Comm Lab
  • Interaction Lab
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2025 · Brunch Pro Theme on Genesis Framework · WordPress · Log in