Skip to content

Instantly share code, notes, and snippets.

@cacharbe
Created April 3, 2016 20:55
Show Gist options
  • Save cacharbe/6946f0fe7f70fab31eb6707c4f9f2daa to your computer and use it in GitHub Desktop.
Save cacharbe/6946f0fe7f70fab31eb6707c4f9f2daa to your computer and use it in GitHub Desktop.
Text in Squares
{"description":"Text in Squares","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"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}
var svg = d3.select("svg")
svg.append("rect")
.attr({
x: tributary.anim(100, 400),
y: tributary.anim(100, 400),
width: 200,
height: 200,
rx: 5,
ry: 5
});
var text = svg.append("text")
.text('Text')
.attr('x', 180)
.attr('y', 203)
.attr('fill', 'white');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment