Skip to content

Instantly share code, notes, and snippets.

@DeBraid
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeBraid/d44e115611ef2c3284c8 to your computer and use it in GitHub Desktop.
Save DeBraid/d44e115611ef2c3284c8 to your computer and use it in GitHub Desktop.
droplet
{"description":"droplet","endpoint":"","display":"svg","public":true,"require":[{"name":"superformula","url":"http://d3js.org/d3.superformula.v0.min.js"}],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"style.css":{"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":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"ajax-caching":true,"thumbnail":"http://i.imgur.com/rtFNPTT.png"}
//superformula by @d3visualization http://bl.ocks.org/mbostock/1020902
var size = 200;
var svg = d3.select("svg");
var shape = d3.superformula()
.type("drop")
.size(size * 10)
.segments(12);
var path = svg.append("path")
.attr("class", "shape")
.attr("transform", "translate(" +
[tributary.sw/2, tributary.sh/2] + ")")
.attr("d", shape)
.style({
fill: "none",
stroke: "#ffffff",
"stroke-width":2
})
svg {
background-color:#0E0E0E;
}
.time_controls {
display:none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment