Skip to content

Instantly share code, notes, and snippets.

@RobinL
Created July 14, 2013 18:29
Show Gist options
  • Save RobinL/5995218 to your computer and use it in GitHub Desktop.
Save RobinL/5995218 to your computer and use it in GitHub Desktop.
Animation
{"description":"Animation","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":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01}
svg = d3.select("svg");
svg.append("rect")
.attr({
x:10,
y:10,
height:10,
width: 10})
setInterval(function() {
svg.select("rect").attr("x", i+10);
i++
}, 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment