Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created August 6, 2012 03:52
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/3269956 to your computer and use it in GitHub Desktop.
Save roundrobin/3269956 to your computer and use it in GitHub Desktop.
just another inlet to tributary
var txt;
tributary.init = function(g) {
var defs = g.append('defs')
var filter = defs.append('filter')
.attr('id','wooble')
filter.append('feTurbulence')
.attr('result','result0')
.attr('id','fe2')
.attr('seed','0')
.attr('numOctaves','3')
.attr('baseFrequency','0.037');
filter.append('feSpecularLighting')
.attr('result','result1')
.attr('specularExponent','24.3')
.attr('surfaceScale','2')
.attr('specularConstant','1')
filter.append('feDistantLight')
.attr('result','result1')
.attr('elevation','45')
.attr('azimuth','225')
filter.append('feSpecularLighting')
.attr('in','result0')
.attr('specularExponent','24.3')
.attr('surfaceScale','3')
.attr('diffuseConstant','1.21')
.attr('result','result2')
filter.append('feDistantLight')
.attr('azimuth','255')
.attr('elavation','42')
filter.append('feDiffuseLighting')
.attr('in2','SourceGraphic')
.attr('mode','multiply')
.attr('surfaceScale','3')
.attr('result','result91')
var filter_elem9 =filter.append('feBlend')
.attr('mode','multiply')
.attr('in','fbSourceGraphic')
.attr('in2','result91')
// <feBlend
// id="feBlend3767"
// in2="SourceGraphic"
// mode="multiply"
// result="result91" />
// <feComposite
// id="feComposite3769"
// in2="result91"
// operator="arithmetic"
// in="result1"
// k2="1"
// k3="1"
// result="result92" />
// <feComposite
// id="feComposite3771"
// in2="SourceAlpha"
// operator="in"
// result="result2" />
// </filter>
};
tributary.run = function(g,t) {
txt.text(t);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment