xxxxxxxxxx
58
let p;
let moves = [];
let s = 40;
function setup() {
createCanvas(1920, 1080);
p = createVector(width/2/s, height/2/s);
background(255);
noStroke();
// moves.push(createVector(-1, 0));
// moves.push(createVector(1, 0));
// moves.push(createVector(0, -1));
// moves.push(createVector(0, 1));
// fill(255, 0, 0);
// rect(p.x * s, p.y * s, s, s);
frameRate(2);
}
function draw() {
// fill(0);
// rect(p.x * s, p.y * s, s, s);
// p.add(random(moves));
// fill(255, 0, 0);
// rect(p.x * s, p.y * s, s, s);
fill(0);
const r = random(100, 400);
const a = random(TAU);
circle(width/2 + r * cos(a), height/2 + r * sin(a), random(50, 200));
}
function mouseReleased() {
fullscreen(!fullscreen());
}
function keyReleased() {
background(255);
// p = createVector(width/2/s, height/2/s);
// fill(255, 0, 0);
// rect(p.x * s, p.y * s, s, s);
}