Back to projects

CONNECTED EXERCISES

Interactive Animation

Two ways to move an element: react to an event or update it over time.

The robot toggles a CSS class when you interact with its arm. The train uses animation frames and elapsed time to calculate movement and checks the track edges before changing direction.

Switching tabs restarts the selected exercise.