xxxxxxxxxx
32
let angle = 0;
function setup() {
createCanvas(800, 800);
colorMode(HSB, 360, 100, 100, 100);
rectMode(CENTER);
angleMode(DEGREES);
// noFill();
// strokeWeight(40);
}
function draw() {
background(230, 30, 23);
translate (400, 400);
let gradient = drawingContext.createLinearGradient(
width/2-200, height/2-200, width/2+200, height/2+200);
gradient.addColorStop(0, color(310, 100, 100, 100));
gradient.addColorStop(1, color(250, 100, 100, 100));
drawingContext.fillStyle = gradient;
rotate(angle);
rect(0, 0, 400, 400, 50);
angle = angle+1;
}