xxxxxxxxxx
let f = 0;
let W = 400;
setup = _ => {
createCanvas(W, W);
}
draw = _ => {
pixelDensity(1); // <- Comment this for the original (SLOW) version
background(0);
stroke(W);
for (i = 0; i < TAU; i += PI / 16) {
line(sin(i + f / 99) * W + 200, 0, cos(i + f / 99) * W + 200 * (sin(f / 33) / 2 + 1), W)
}
let I = get();
filter(BLUR, 1); // <- Comment this for the original (SLOW) version
// filter(BLUR, 2); // <- Uncomment this for the original (SLOW) version
filter(THRESHOLD, 0.4);
tint(W, 99);
image(I, 0, 0);
f++;
}
// ----------------------------------------
// Minimized
// ----------------------------------------
// f=0,draw=e=>{for(f++||createCanvas(W=400,W),background(0),stroke(W),i=0;i<TAU;i+=PI/16)line(sin(i+f/99)*W+200,0,cos(i+f/99)*W+200*(sin(f/33)/2+1),W);i=get(),filter(BLUR,2),filter(THRESHOLD,.4),tint(W,99),image(i,0,0)};//#つぶやきProcessing