Skip to main content
100%

fresh block

✓ Published0🌍 Public
CCurran Kelleher
Last edited Nov 20, 2015
Created on Sep 9, 2015

This example demonstrates how to apply a line texture pattern to SVG shapes using the Texture.js library. It shows a blue-bordered rectangle and circle filled with diagonal line textures, overlaid on a light blue background. The code loads D3.js and Texture.js via CDN, then creates a line texture with `.thicker()` and applies it to both shapes by setting their fill style to the texture’s URL. The rendering is static SVG, with shapes positioned explicitly and styled with white fill before the texture replaces the fill.

AI-generated description

hello markdown

Similar vizzes