Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (20 sloc) 0.453 kb
/* @pjs preload="m1area1.png"; */
PImage img;
float goal = 3;
float currentAmount = 1;
float percentage;
void setup() {
img = loadImage("m1area1.png");
img.resize(img.width/3, img.height/3);
size(img.width,img.height);
percentage = currentAmount/goal;
frameRate(30);
}
void draw() {
background(240);
image(img, 0, 0);
strokeWeight(1);
stroke(0, 255, 0);
fill(0,255,0,255/4);
rect(-1,-1,img.width*percentage,img.height+1);
}
Jump to Line
Something went wrong with that request. Please try again.