Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created February 8, 2013 06:36
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/4737113 to your computer and use it in GitHub Desktop.
Save roundrobin/4737113 to your computer and use it in GitHub Desktop.
Watercolor filter
{"description":"Watercolor filter","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"test.svg":{"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":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,"thumbnail":"http://i.imgur.com/rAzbR0q.png"}
g.append("rect")
.attr({
width: tributary.sw,
height: tributary.sh,
filter: "url(#filter2987)"
});
Display the source blob
Display the rendered blob
Raw
<defs id="defs4">
<filter
id="filter2987"
inkscape:label="filter2"
width='100%'
height='100%'
filterUnits='objectBoundingBox'
>
<feTurbulence
id="feTurbulence3844"
type="fractalNoise"
baseFrequency="0.016184971098265898"
numOctaves="8"
seed="0" />
<feColorMatrix
id="feColorMatrix3848"
values="1 0 0 -1 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 1 0 "
result="result1" />
<feDisplacementMap
id="feDisplacementMap3850"
in2="result1"
scale="100"
yChannelSelector="A"
xChannelSelector="G" />
<feColorMatrix
id="feColorMatrix3852"
type="luminanceToAlpha" />
</filter>
</defs>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment