xxxxxxxxxx
22
// draw a sphere with radius 200
function setup() {
createCanvas(400, 400, WEBGL);
}
var value = 100
var valuee = 150
function draw() {
background(0);
rotateX(frameCount * 0.008);
rotateY(frameCount * 0.008);
fill(value);
sphere(valuee);
torus(valuee+20, 5, 10, 10);
}
function mouseMoved() {
value = color(random(50,255),random(50,255),random(50,255));
}
function mousePressed() {
valuee = random(10,200)
}