-
-
Save ejfox/3891073 to your computer and use it in GitHub Desktop.
just another inlet to tributary
This file contains hidden or 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
| {"endpoint":"","display":"svg","public":true,"require":[],"tab":"edit","display_percent":0.7034722222222245,"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} |
This file contains hidden or 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
| // Responsive color tributary example | |
| // Resize code panel to see effect | |
| var sw = tributary.sw * 1.1;//parseInt(d3.select("svg").style("width")) | |
| //make z sin waves extend past the width a little | |
| //sw += .1 * sw | |
| var sh = tributary.sh;//parseInt(d3.select("svg").style("height")) | |
| var svg = d3.select("svg") | |
| .append("svg:g") | |
| var chart = svg.append("g").attr("id", "chart") | |
| var color = d3.scale.linear() | |
| .domain([0, 1300]) | |
| //.interpolate(d3.interpolateRgb) | |
| .interpolate(d3.interpolateHsl) | |
| .range(['#D40067', "#29B0FF"]) | |
| chart.append("rect").attr({ | |
| width: 1300, | |
| height: 1300, | |
| fill: color(sw) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment