Created
November 8, 2012 18:55
-
-
Save jnordberg/4040749 to your computer and use it in GitHub Desktop.
Another Inlet
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
{"description":"Another Inlet","endpoint":"","display":"svg","public":true,"require":[],"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} |
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
var set_price = 200; | |
var num_icons = 600; | |
var curve_mod = 1; | |
var price_per_icon = set_price / num_icons; | |
function getPrice(num_selected) { | |
return num_selected * price_per_icon; | |
} | |
// --- | |
var svg = d3.select('svg'); | |
var x = d3.scale.linear(); | |
var y = d3.scale.linear(); | |
var w = tributary.sw * 0.9; | |
var h = tributary.sh * 0.9; | |
var px = (tributary.sw - w) / 2; | |
var py = (tributary.sh - h) / 2; | |
x.range([px, w]); | |
y.rance([py, h]); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment