Exercises
- Update
Drawing
so that it resets the turtle position when the user clears the screen with the Reset button. - Our tests have a lot of duplication due to the repeated calls to
triggerRequestAnimationFrame
. Simplify how this is called by creating a wrapper function calledtriggerAnimationSequence
that takes an array of frame times and callstriggerRequestAnimationFrame
for each of those times. - Loading an existing script (for example, on startup) will take a long time to animate all instructions, and so will pasting in code snippets. Add a Skip animation button that can be used to skip all the queued animations.
- Ensure that the Undo button works correctly when animations are in progress.