xxxxxxxxxx
32
let r=10
let a=0
let c=20
let angle = 0
let art
function setup() {
createCanvas(400, 400, WEBGL);
art = createGraphics(400,400);
}
function draw() {
background(220);
push()
let x = r+c*cos(a);
let y = r+c*sin(a);
art.fill(r,a,c);
art.ellipse (x+200,y+200,10,10);
c = c + 0.09
a = a + 0.8
pop()
push()
texture(art)
rotateX(angle),
rotateY(angle),
rotateZ(angle)
box(200)
angle = angle + 0.003
pop()
}