🌍 Public
Viewing a saved revision (read-only)
c53fea3270b549fba8672298c1d36d17
Play around with d3.js
This example uses D3 v5 and React to build an animated, SVG-based face with eyes that shift horizontally in a looping transition. The code leverages D3 selections, SVG attribute binding via `attr`, and chained `transition().duration()` calls to alternate the eye group’s transform between two positions. The face is centered using a translated `<g>` element, with fixed constants for eye spacing, radius, and brow dimensions. Rendering relies purely on SVG shapes—circles and rectangles—without external data, focusing on animation timing and nested group transformations.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.