This work will split into two parts: drawing lines and rotating the turtle. Each of these requires similar but different animation logic.
Animating with requestAnimationFrame
Drawing lines
The Git tag for this section is request-animation-frame.
In order to use the AnimatedLine component, we'll first need to implement the animation logic that helps us divide drawCommands up into previously drawn commands, the current animating command, and future commands to animate.
We'll use the useEffect hook in combination with requestAnimationFrame to move the turtle.
To begin, we need to first change how we determine the position of the turtle. In the existing implementation, the final turtle position is passed into the Drawing...