[ Launch Inlet ]
Gist #4243655 [ Launch Inlet ]
Gist #4243634 [ Launch Inlet ]
Gist #4243615 [ Launch Inlet ]
Gist #4243604 [ Launch Inlet ]
Gist #4243572 [ Launch Inlet ]
Gist #4243065 [ Launch Inlet ]
Gist #4242928 [ Launch Inlet ]
Gist #4197571 [ Launch Inlet ]
Gist #4197568 [ Launch Inlet ]
Gist #4197566 [ Launch Inlet ]
Gist #4197560
-
-
Save roundrobin/4243659 to your computer and use it in GitHub Desktop.
Tributary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"description":"Tributary","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"background.svg":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"tab":"edit","display_percent":0.5073323224331932,"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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//artwork by @baufofthenauf | |
var svg = d3.select("svg"); | |
svg.select('#layer11').selectAll("path") | |
.style({ | |
"stroke-width": 1, | |
fill: "#1F194B" | |
}) | |
svg.select('#layer25').selectAll('path') | |
.attr('transform', function(d,i){ | |
var xforms = this.getAttribute('transform'); | |
var parts = /translate\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(xforms); | |
this.oldValues = parts; | |
var val = Math.random(100)*1111; | |
return 'translate('+(-val)+',0)'; | |
}) | |
.transition() | |
.duration(2000) | |
.attr('transform', function(d,i){ | |
var val = Math.random(100)*1111; | |
var x = parseFloat(this.oldValues[1]); | |
var y = parseFloat(this.oldValues[2]); | |
return 'translate('+(x)+','+y+')'; | |
}) | |
//#F81E2F" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment