ÖzÜ Oyun Atölyesi

< İmajlar Rastgele sayılar >


Örnek: Dürbün

Kod

void setup() {
  size(460, 290);
  istanbul = loadImage("istanbul.jpg");
}

PImage istanbul;

void draw() {
  image(istanbul, 0, 0);
  fill(100, 150, 200);
  noStroke();
  rect(0, 0, mouseX - 30, height);
  rect(mouseX + 30, 0, width, height);
  rect(0, 0, width, mouseY - 30);
  rect(0, mouseY + 30, width, height);  
}