Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Forked from anonymous/inlet.js
Created January 18, 2013 18:46
Show Gist options
  • Save roundrobin/4567179 to your computer and use it in GitHub Desktop.
Save roundrobin/4567179 to your computer and use it in GitHub Desktop.
Circle bounce
{"description":"Circle bounce","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}},"tab":"edit","display_percent":0.7,"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,"hidepanel":false,"fullscreen":false,"thumbnail":"http://i.imgur.com/XHqXBkR.png"}
var svg = d3.select('svg')
var circle = svg.append('ellipse')
.attr('ry',98)
.attr('rx',100)
.attr('cx',100)
.attr('cy',400)
circle.transition()
.ease('elastic',5,7)
.duration(600)
.attr('cx',500)
.attr('rx',50)
.each('end',function(d){
d3.select(this).transition()
.ease('elastic',6,7)
.duration(300)
.attr('rx',100)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment