xxxxxxxxxx
var leg;
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw(){
bunker();
image(leg, 300, 500);
image(leg, 600, 500);
image(leg, 900, 500);
leg.updatePixels();
}
function bunker(){
leg = createImage(25, 100);
background(255);
leg.loadPixels();
for (i = 0; i < leg.width; i++) {
for (j = 0; j < leg.height; j++) {
leg.set(i, j, color(18, 68, 14));
}
}
}