🌍 Public
Viewing a saved revision (read-only)
9cce191362cb47cb9d7ea14792a97ead
Untitled
This example demonstrates how D3 custom elements can drive a canvas-based drawing surface. As the mouse moves, the code appends `custom:circle` elements to a `custom:sketch` element, each with a red stroke that transitions to white over two seconds while expanding to a radius of 200. A `d3.timer` continuously clears the canvas and redraws all child elements, translating their attributes into Canvas 2D `arc` and `stroke` commands. The sketch uses a custom namespace prefix registered with `d3.ns.prefix` to create these elements.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.