xxxxxxxxxx
36
let x = 0;
let y = 0;
let roY = 0.01;
let xJump = -1;
function setup() {
createCanvas(400, 400, WEBGL);
rect(CENTER);
}
function draw() {
colorMode(HSB);
background(mouseX,mouseY,225,225);
rotateX (frameCount *0.01);
rotateY(roY);
rotateX(frameCount * 0.01);
rotateZ(frameCount * 0.1);
torus(50, 25);
fill(map(mouseX, 0, width, 0, 360),
map(mouseY, 0, height, 0, 255),
90,
map(mouseY, 0, height, 0, 8));
strokeWeight(4);
line(20, 40, 80, 40);
mouseX = mouseX = xJump;
if (mouseX >= width || mouseX<= 0) {
mouseX = frameRate * 0.01; }
}