xxxxxxxxxx
22
var x = 0;
var y = 0;
function setup() {
createCanvas(window.innerWidth, window.innerHeight);
}
function draw() {
//this trail fading effect is achieved by setting opacity to low value
background(220,0,0,10);
//remove circle stroke
noStroke();
//use mousex and mousey for circle pos
x = mouseX;
y = mouseY;
//draw circle
circle(x,y,50);
}