PImage img;
float ratio;
void setup() {
fullScreen();
img = loadImage("landscape.jpg");
ratio = float(img.width)/float(img.height);
}
void draw() {
background(0);
float w = wallpaperHomeCount() * width;
float h = w/ratio;
float x = map(wallpaperOffset(), 0, 1, 0, -(wallpaperHomeCount()-1) * width);
image(img, x, 0, w, h);
}
There is no response when you insert the source.
Anyone know why?