estoy haciendo un curso de java script y tengo que hacer una lluvia que haga que aparezca una gota en la posición "x" y que en la posición "y"baje constantemente y regrese al llegar al borde.
Esto es lo que llevo de código:
var yPositions = [0];
draw = function() {
background(204, 247, 255);
for (var i = 0; i < xPositions.length; i++) {
noStroke();
fill(0, 200, 255);
ellipse(xPositions[i], yPositions[i], 10, 10);
yPositions[i] += 5;
}
};