xxxxxxxxxx
f=0
draw=_=>{
f||(createCanvas(W=400,W,WEBGL),R=rotateX,noStroke())
;[-3,3,3].map(i=>pointLight([W],-W*i,i,W))
R(.35-f/9)
for(y=0;y<PI;y+=PI/16){
push(Y=y+(f%PI)/16 )
translate(0,Y*(W/PI)-200,0)
R(PI/2)
scale(1,1,.1)
torus(S=sin(Y)*700,S/7,W)
pop(sphere(S/9,W))
}
box(2000)
f+=PI/64
}
// ----------------------------------------
// Pre-compressed
// ----------------------------------------
// f=0
// draw=_=>{
// f||createCanvas(W=400,W,WEBGL,R=rotateX)
// ;[-3,3,3].map(i=>pointLight([W],-W*i,i,W))
// R(.35-f/9)
// for(y=0;y<PI;y+=PI/16){
// push(Y=y+(f%PI)/16 )
// translate(0,Y*(W/PI)-200,0)
// R(PI/2)
// scale(1,1,.1)
// torus(S=sin(Y)*700,S/7,W)
// pop(sphere(S/9,W))
// }
// box(2000)
// f+=PI/64
// }
// ----------------------------------------
// Minimized
// ----------------------------------------
// f=0,draw=a=>{for(f||createCanvas(W=400,W,WEBGL,R=rotateX),[-3,3,3].map(a=>pointLight([W],-W*a,a,W)),R(.35-f/9),y=0;y<PI;y+=PI/16)push(Y=y+f%PI/16),translate(0,Y*(W/PI)-200,0),R(PI/2),scale(1,1,.1),torus(S=700*sin(Y),S/7,W),pop(sphere(S/9,W));box(2e3),f+=PI/64};//#つぶやきProcessing