Skip to content

Instantly share code, notes, and snippets.

@poezn
Created January 23, 2014 23:50
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 poezn/8589266 to your computer and use it in GitHub Desktop.
Save poezn/8589266 to your computer and use it in GitHub Desktop.
Stack o' money
{"description":"Stack o' money","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}
var num = 50,
h = 20,
w = 50;
var data = d3.range(num);
var scale = d3.scale.ordinal()
.domain(data)
.rangeBands([400, 100]);
var bills = g.selectAll("rect")
.data(data);
bills
.enter().append("rect")
.attr({
"transform": function(d, i) {
var ty = -h,
tx = -w;
return "translate(" + [tx, ty] + ") skewX(20) skewY(20)"
},
"width": 50,
"height": 20
})
.style({
"fill": "#818B73",
"stroke-width": 1,
"stroke": "#464646",
"transform": "skew(36deg,0deg)"
})
;
bills
.transition()
.delay(function(d, i) {
return i * 12
})
.attr({
"transform": function(d, i) {
var ty = scale(i),
tx = w;
return "translate(" + [tx, ty] + ") skewX(20) skewY(0)"
}
})
@Thadvert23
Copy link

Hello guys, this post is very useful for you. But I will not ask this of the youth. whether they want to buy the car of their dreams. They are trying to find it on the internet. I have the best option for you. That you can visit https://www.copilotsearch.com/ to confirm all your doubts. In my opinion, this is the best online app for online car buying and shopping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment