17
edits
No edit summary |
No edit summary |
||
Line 172: | Line 172: | ||
=== homework 3 === | === homework 3 === | ||
<source lang = "java"> | |||
PImage[] images = new PImage[12]; | |||
PImage img; | |||
int w=100; | |||
int h; | |||
void setup() { | |||
size(400, 500); | |||
frameRate(10); | |||
background(255); | |||
for (int i = 0 ; i < images.length; i++) | |||
{ | |||
images [i] = loadImage("IMG_0" + (701 + i) + ".JPG"); | |||
img = loadImage("farbe_007.jpg"); | |||
images [i].mask(img); | |||
images [i].resize(100, 100); | |||
println(i); | |||
} | |||
} | |||
void draw() | |||
{ | |||
if(mousePressed){ | |||
int counter = frameCount % 19; | |||
image(images[counter], mouseX - 50, mouseY - 50); | |||
} | |||
} | |||
</source> |
edits