Skip to main content
100%

Wave 2

✓ Published0🌍 Public
KKareena
Last edited Jul 17, 2025
Created on Jul 17, 2025

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 description
MIT Licensed

Similar vizzes