how to make an object stop at the end of your canvas p5js code example Example: how to make an object stop at the end of your canvas p5js y = constrain(y, 0, 570);