xxxxxxxxxx
37
/*
This project is the first in the p5.js introduction to JavaScript series
It introduces:
- Variables (user created and p5js native)
- functions (native to p5js)
- p5js documentation
- colours in p5
- randomness
*/
let myCanvas = 300;
let posX = myCanvas/2;
let posY = myCanvas/2;
function setup() {
createCanvas(myCanvas, myCanvas);
background(42);
}
function draw() {
noStroke();
fill(255,255,255,255);
circle(posX,posY,10);
posX = posX + random(-5,5);
// Make the circle also move randomly on the y axis
// Make the circle not leave a trace
// Make the circle leave a faint trace
// Make the trail or trace dissapear with time
// Play with the drawing
}