-
-
Save z3bbster/cdd3ca0bbe0024a77d73 to your computer and use it in GitHub Desktop.
Revisions
-
vitapluvia revised this gist
Oct 27, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ group.append("rect") y: function() { return mY + 5 }, x: 265 }) d3.selectAll(".indicator").selectAll("rect").attr({ y: function() { return mY } }) }) @@ -32,3 +32,4 @@ group.append("rect") var g2 = group.append("g").attr("class", "indicator") g2.append("text") g2.append("rect").attr({x:220,y:50,height:2,width:33}) //g2.append("rect").attr({x:253, y:45,height:12,width:1}) -
vitapluvia revised this gist
Oct 27, 2013 . 1 changed file with 14 additions and 10 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,29 +2,33 @@ var svg = d3.select("svg") var mX = 0; var mY = 0; var group = svg.append("g") group.append("rect") .on("mousemove", function() { mX = d3.mouse(this)[0]; mY = d3.mouse(this)[1]; d3.selectAll("rect").style({ fill: function(d) { //return "#000FFF"; return "hsl("+240+", 50%, "+mY*0.2+"%)" } }) d3.selectAll(".indicator").select("text").text(function() { return "Value: " + Number((mY + 5).toFixed(2)); }) d3.selectAll(".indicator").select("text").attr({ y: function() { return mY + 5 }, x: 265 }) d3.selectAll(".indicator").select("rect").attr({ y: function() { return mY } }) }) .attr({y:50, width:150, height:240, x: function(d) { return 75 } }) var g2 = group.append("g").attr("class", "indicator") g2.append("text") g2.append("rect").attr({x:220,y:50,height:2,width:33}) -
vitapluvia revised this gist
Oct 27, 2013 . 1 changed file with 12 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ var svg = d3.select("svg") var mX = 0; var mY = 0; var group = svg.append("g") .on("mousemove", function() { mX = d3.mouse(this)[0]; mY = d3.mouse(this)[1]; @@ -11,14 +11,20 @@ svg.append("g") return "hsl("+240+", 50%, "+mY*0.2+"%)" } }) d3.selectAll(".indicator").select("text").text(function() { return "Value: " + mY; }).attr({ y: function() { return mY }, x: 240 }) }) group.append("rect") .attr({y:50, width:150, height:240, x: function(d) { //return d3.mouse(this)[0]; return 75 } }) group.append("g").attr("class", "indicator") .append("text") .append("rect") -
vitapluvia revised this gist
Oct 27, 2013 . 2 changed files with 7 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ {"description":"Fader","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":true,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/oDpd05H.gif"} 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 charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,24 @@ var svg = d3.select("svg") var mX = 0; var mY = 0; svg.append("g") .on("mousemove", function() { mX = d3.mouse(this)[0]; mY = d3.mouse(this)[1]; d3.select(this).style({ fill: function(d) { //return "#000FFF"; return "hsl("+240+", 50%, "+mY*0.2+"%)" } }) }) .append("rect") .attr({y:50, width:150, height:240, x: function(d) { //return d3.mouse(this)[0]; return 50 } }) .append("svg:text").text("rrj") .attr({x:50, y:50, width:150, height:240}).style("fill", "#000") -
vitapluvia revised this gist
Oct 27, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ [ <a href="http://tributary.io/inlet/7179273">Launch: Fader</a> ] 7179273 by vitapluvia<br> -
vitapluvia created this gist
Oct 27, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ {"description":"Fader","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/AqCxARM.png"} 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ var svg = d3.select("svg") var mX = 0; var mY = 0; svg.append("rect") .on("mousemove", function() { mX = d3.mouse(this)[0]; mY = d3.mouse(this)[1]; d3.select(this).style({ fill: function(d) { //return "#000FFF"; console.log(d3.mouse); return "hsl("+240+", 50%, "+mY*0.2+"%)" } }) }) .attr({y:50, width:150, height:240, x: function(d) { //return d3.mouse(this)[0]; return 50 } })