xxxxxxxxxx
21
(r = 0),
(draw = (a) => {
for (
r ||
(createCanvas((w = 400), w),
($ = createGraphics(w, w, WEBGL)),
$.lights($.noStroke())),
background(0),
y = 0;
y < w;
y+=5
)
$.clear($.push()),
$.rotateZ(r*.5),
// $.rotateY(r),
$.rotateY(sin(r + 5 * y/w)),
$.torus(100, 25, floor(r/5), 3),
$.pop(image($, 0, y + 50, w, 1, 0, y, w, 100));
r += 0.1;
});