Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rotating rect

Public visualization

Viewing a saved revision (read-only)

c4f9cfb1796e40419c47952bf5233a69

Rotating rect

0 stars0🌍 Public
AAbdoulaye DIOP
Last edited May 5, 2021
Created on May 5, 2021
Forked from HTML Starter

A small square rotates around a circular path within an SVG canvas, moving at a constant speed. The rotation is driven by a JavaScript loop that updates the rectangle's transform at regular intervals. The code uses the SVG `createSVGTransform` API and `setTranslate` to reposition the element, with `setTimeout` scheduling 100 incremental steps along the circle. The result is a simple, self-contained animation rendered in SVG, with no external libraries beyond plain JavaScript.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.