D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
emeeks
Full window
Github gist
d3.sketchy bug
A bug with
d3.sketchy
.
<html> <head> <style type="text/css"> body,html{ margin:0; padding:0; } #svg{ width:1000px; height:1000px; margin:30px 0 0 30px; } rect{ fill:none; stroke:#000; } path{ fill:none; stroke:#000; stroke-width:0.3; } </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3.min.js" charset="utf-8" type="text/javascript"></script> <script src="d3.sketchy.js"></script> </head> <body> <svg id="svg" width="1000" height="1000"></svg> <script type="text/javascript"> var svg = d3.select("#svg"); var sketchy = new d3sketchy(); for(var i = 0; i<19; i++){ sketchy.rectFill({ x:25, y:110 * i, width:200, height:100, svg: svg, density:1, angle:i*10, sketch: 0.5 }); } </script> </body> </html>
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3.min.js