Antoine BERNIER (abernier)
✓ Published0🌍 Public
Aabernier
Last edited Jul 18, 2012
Created on Jul 18, 2012
A canvas-based animation shows a red dot traveling along a circular path, with its position driven by a duration-controlled easing function that produces a bouncing effect. The code uses the HTML5 Canvas API (`getContext('2d')`, `clearRect`, `arc`, `fill`) for rendering, and relies on `requestAnimationFrame` (with a Paul Irish shim) for smooth frame updates. Play and stop buttons, plus a range slider, let the user set the animation duration from 100 to 10,000 milliseconds. The animation logic separates easing from drawing, applying a bounce ease to the normalized time position before calculating the dot's coordinates via trigonometric functions.
AI-generated description