Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Canvas Fiddling

Public visualization

Canvas Fiddling

0 stars0🌍 Public
SStrunck
Last edited Oct 15, 2021
Created on Sep 13, 2021
Forked from HTML Starter

A small animated square glides horizontally across a blank canvas, moving in discrete steps and disappearing from its starting position as it advances. The example demonstrates fundamental Canvas 2D drawing and animation using the HTML5 `getContext('2d')` API, with a rectangular fill drawn via `fillRect` and cleared each frame using `clearRect`. Driven by a `setInterval` timer at 20-millisecond intervals, the square’s position increments by one pixel per frame, creating a simple, linear motion loop without user interaction.

AI-generated description

Learning canvas

Comments

Sign in to join the discussion.

MIT Licensed