button
✓ Published1🌍 Public
Four buttons cycle a rectangle’s fill through four SVG textures generated by the textures library: circles, lines, crosses, and a custom banana-shaped path. The example demonstrates how to apply texture definitions to an SVG node via `svg.call(t1)`, then update the rectangle’s fill on button click with `changeColor(t.url())`. A slider, wired through `d3.select("#mySlider").on("change", ...)`, adjusts the line texture’s size, though the slider element itself is not defined in the visible markup. All rendering uses D3 v4 and SVG.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed