Skip to content

Instantly share code, notes, and snippets.

@takawo
Created October 16, 2020 08:16
Show Gist options
  • Select an option

  • Save takawo/b6b87893196a8f7157ad0a9687319431 to your computer and use it in GitHub Desktop.

Select an option

Save takawo/b6b87893196a8f7157ad0a9687319431 to your computer and use it in GitHub Desktop.
let g1, g2;
function setup() {
createCanvas(400, 400);
g1 = createGraphics(width, height);
g2 = createGraphics(width, height);
g3 = createGraphics(width, height);
}
function draw() {
background(220);
g1.noStroke();
g1.fill(255,0,0);
g1.circle(width/2,height/2,100);
g2.noFill();
g2.stroke(0,0,255);
g2.strokeWeight(20);
g2.circle(width/2,height/2,200);
image(g1,0,0);
image(g2,0,0);
g1.filter(THRESHOLD);
g1.save();
g2.filter(THRESHOLD);
g2.save();
noLoop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment