Wave 2
✓ Published0🌍 Public
An animated sine wave travels across the canvas, its phase advancing with each frame to create a smooth, continuous motion. The wave’s amplitude, frequency, and speed are fixed, and a static horizontal center line is drawn for reference. The animation relies on the Canvas `path` and `lineTo` API, with `requestAnimationFrame` driving the update loop. The code uses a simple sine function to map x-coordinates to y-positions, and the drawing is rendered in a teal stroke against a white background.
AI-generated descriptionMIT Licensed