[ Launch: SVG Path Element ] 4955683 by dwskau
[ Launch: Bootstrap Trib ] 4711978 by roundrobin
[ Launch: Tributary inlet ] 4711690 by roundrobin
-
-
Save dwskau/4955683 to your computer and use it in GitHub Desktop.
SVG Path Element
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
{"description":"SVG Path Element","endpoint":"","display":"svg","public":true,"require":[{"name":"Helpers","url":"https://raw.github.com/roundrobin/svg-path-generator/master/svg-path-generator.js"}],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01} |
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
var svg = d3.select("svg"); | |
//Uses the svg-path-generator class | |
//https://github.com/roundrobin/svg-path-generator | |
var path = new Path(svg) | |
path.add(['m',200,100]); | |
path.add(['l',136,100]); | |
path.add(['L',452,93]); | |
path.add(['l',262,174]); | |
path.add(['a',40,67,67,0,1,274,20]); | |
path.add(['a',6,7,0,0,1,-380,60]); | |
path.add(['a',14,-5,0,0,1,-83,-67]); | |
path.add(['C',1230,36,54,100,50,267]); | |
path.render(); | |
path.showPoints() | |
console.log(path.el().node().pathSegList) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment