textures
textures copied to clipboard
Have a new texture instance with a copy() method
At the moment a new texture cannot be created from another one. The following direction has been suggest on issue #7.
var svg = d3.select("#example").append("svg");
var t1 = textures.lines().thicker();
var t2 = t1.copy().fill("red") // This creates a new texture instance
// t1 and t2 would have separate defs in the SVG
svg.call(t1);
svg.call(t2);
svg.append("circle").style("fill", t1.url());
svg.append("circle").style("fill", t2.url());