ランダムウォーク
https://gyazo.com/6a8889ca3dd50cd9ab9882b6118ff93e
code:random.js
setup = () => {
posx = 200, posy = 200
createCanvas(400, 400)
strokeWeight(0)
}
draw = function(){
fill('#ff0')
rect(0,0,400,400)
posx += random(-2,2)
posy += random(-2,2)
fill('blue')
rect(posx,posy,4,4)
}