Skip to content

Instantly share code, notes, and snippets.

@enjalot
Created October 12, 2013 21:01
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 enjalot/6954884 to your computer and use it in GitHub Desktop.
Save enjalot/6954884 to your computer and use it in GitHub Desktop.
Tributary inlet
{"description":"Tributary inlet","endpoint":"","display":"svg","public":true,"require":[],"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":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/rJlUK6O.png"}
var svg = d3.select("svg");
var cx = 25;
var cy = 27
console.log("cx:", cx);
var group = svg.append("g")
.classed("face", true)
.attr("transform", "translate(17,24)rotate(" + [17, cx, cy] + ")translate(115, 0)")
group.append("circle")
.attr({
cx: cx,
cy: cy,
r: 35,
stroke: "#FF7070",
"stroke-width": 5
})
.style({
fill: "#8FDAE4"
})
cx += 100
group.append("rect")
.attr({
x: 50,
y: 50,
width: 500,
height: 250,
stroke: "#70BAFF",
"stroke-width": 28,
"fill-opacity": 0.26,
"stroke-opacity": 0.328
});
console.log("cx:", cx);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment