[ Launch Inlet ]
Gist #2958196 No Previous Gist
-
-
Save boydgreenfield/4102694 to your computer and use it in GitHub Desktop.
Another Inlet
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":"Another Inlet","endpoint":"","display":"svg","public":true,"require":[],"tab":"edit","display_percent":0.7,"play":true,"loop":true,"restart":true,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":600,"height":300,"hide":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
var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; | |
var circlesize = 6; | |
var circlecontrol = 9; | |
var circlefill = "#14297C"; | |
var circleopacity = 1.0; | |
var circlestroke = "#FFFFFF"; | |
var circlestrokewidth = 1.0; | |
var circley = 10; | |
var circlex = 10; | |
var yoffset = 250; | |
var xoffset = 250; | |
var svg = d3.select("svg"); | |
var circle = svg.selectAll("dots") | |
.data(data) | |
.enter() | |
.append("svg:circle") | |
.attr("cx", function(d, i) { | |
return Math.cos(i/12 * 2 * Math.PI)*circlesize*circlecontrol + xoffset; | |
}) | |
.attr("cy", function(d, i) { | |
return Math.sin(i/12 * 2 * Math.PI)*circlesize*circlecontrol + yoffset; | |
}) | |
.attr("r", circlesize) | |
.style("fill", circlefill) | |
.style("opacity", function(d, i) { | |
return (i/12 * 0.7 + 0.3); | |
}) | |
.style("stroke", circlestroke) | |
.style("stroke-width", circlestrokewidth); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment