xxxxxxxxxx
/**
* circle in stripe
*
* @author aadebdeb
* @date 2017/06/18
*/
var BORDER_WIDTH = 10;
var ELLIPSE_SIZE = 350;
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
blendMode(BLEND);
background(255);
noStroke();
fill(0);
var offset = -((frameCount % 30) / 30) * BORDER_WIDTH * 2;
for (var h = offset; h < height; h += BORDER_WIDTH * 2) {
rect(0, h, width, BORDER_WIDTH);
}
blendMode(DIFFERENCE);
fill(255);
for (var h = offset; h < height; h += BORDER_WIDTH * 2) {
ellipse(width / 2, height / 2, h, h);
}
// ellipse(width / 2, height / 2, ELLIPSE_SIZE, ELLIPSE_SIZE);
}