Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have a new texture instance with a copy() method #16

Open
riccardoscalco opened this issue Mar 25, 2015 · 0 comments
Open

Have a new texture instance with a copy() method #16

riccardoscalco opened this issue Mar 25, 2015 · 0 comments

Comments

@riccardoscalco
Copy link
Owner

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());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant