The frame rate computations I did ensure that no matter the starting width, the circle takes five seconds to shrink. Without knowing about the frame rate, you could have taken a best guess and hard-coded the diameter change. Regardless of your approach, starting at the canvas width and turning off the animation loop were absolutely required. Remember that if you don't call noLoop
your browser is performing unnecessary computation by rendering the same frames over and over again.