Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created November 16, 2012 02:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roundrobin/4083425 to your computer and use it in GitHub Desktop.
Save roundrobin/4083425 to your computer and use it in GitHub Desktop.
Another Inlet
{"description":"Another Inlet","endpoint":"","display":"svg","public":true,"require":[],"tab":"edit","display_percent":0.6456165025785278,"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}
var text = 'tributary'
var svg = d3.select('svg')
.attr('width',1000)
.attr('height',1000)
var defs = d3.select('svg').append('defs')
var filter = defs.append('filter')
.attr('id','drop-shadow')
.attr('width',2.1)
.attr('height',2.6)
filter.append('feGaussianBlur')
.attr('result','result8')
.attr('id','SourceAlpha')
.attr('stdDeviation',2.07)
filter.append('feOffset')
.attr('dx', 16.52)
.attr('dy', 8)
.attr('result','ctt0')
filter.append('feFlood')
.attr('flood-color','black')
.attr('result',"cFTx")
filter.append('feComposite')
.attr('operator','in')
.attr('in1',"result8")
.attr('in2','ctt0')
.attr('result','cCH0')
var merge = filter.append('feMerge')
merge.append('feMergeNode').attr('in','cCH0');
merge.append('feMergeNode').attr('in','SourceGraphic')
var basic = svg.append('text')
.text(text)
.attr('font-size',200)
.attr('font-weight','bold')
.attr('y',200)
.attr('fill',"#47C58E")
basic.attr('filter','url(#drop-shadow)')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment