Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created August 4, 2012 02:27
Show Gist options
  • Save roundrobin/3253593 to your computer and use it in GitHub Desktop.
Save roundrobin/3253593 to your computer and use it in GitHub Desktop.
just another inlet to tributary
var r = 153
var i = 0;
var draw = false
var element;
var element2;
function randomXToY(minVal,maxVal,floatVal)
{
var randVal = minVal+(Math.random()*(maxVal-minVal));
return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);
}
for(var i = 0; i < 200; i++){
console.log("this","");
g.append("circle")
.attr("r",50)
.attr("cx",i%12)
.attr("cy",i*200)
.attr("class",i*200)
.attr("fill","#ff00ff");
}
keyup = function(){element = undefined;element2 = undefined};
keydown = function(){};
keypress = function(){
console.log('Hello',this,d3.event)
var keyChar = d3.event.keyCode
console.log(keyChar)
if(keyChar == 49){
d3.selectAll("circle")
.transition()
.duration(400)
.attr("r",function(d,i){
return d3.select(this).attr("r")*2;
})
}
d3.select(window).on("keypress", keypress);
d3.select(window).on("keyup", keyup);
d3.select(window).on("keydown", keydown);
var i = 0;
var moousi = function(){
if(i % 10 == 0){
}
i++;
}
d3.select(window).on("mousemove", moousi);
g.append('path')
.attr('d','M100,100')
.attr('stroke-width',11.56)
.attr('stroke','black')
.attr('fill','none')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment