Last active
November 20, 2015 00:39
-
-
Save curran/e351c7f0290ff7247791 to your computer and use it in GitHub Desktop.
fresh block
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> | |
<script src="http://riccardoscalco.github.io/textures/textures.min.js"></script> | |
<style> | |
body{ | |
margin:0; | |
padding:0; | |
} | |
</style> | |
</head> | |
<body> | |
<svg width=960 height=500 style="background:lightblue"> | |
<rect class="shape" width=200 height=200 x=100 y=100 style="fill:white"> | |
</rect> | |
<circle class="shape" cx=100 cy=100 r=177 style="fill:white"> | |
</circle> | |
</svg> | |
<script> | |
var t = textures.lines().thicker(); | |
d3.select("svg").call(t); | |
d3.select(".shape").style("fill", t.url()); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment