Skip to content

Demonstration of liquid effect on HTML Canvas using Matter.js and SVG Filters (Blur + Contrast)

License

Notifications You must be signed in to change notification settings

n3r4zzurr0/canvas-liquid-effect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

aa74149 · Jul 25, 2022

History

14 Commits
Jul 12, 2022
Jul 10, 2022
Jul 10, 2022
Jul 9, 2022
Jul 9, 2022
Jul 11, 2022
Jul 25, 2022

Repository files navigation

Canvas Liquid Effect

Demonstration of liquid (or gooey) effect on HTML Canvas using Matter.js and SVG Filters (feGaussianBlur and feColorMatrix).

Canvas Liquid Effect


Liquid / Gooey Effect

This effect is obtained by first applying the blur filter and then by increasing the contrast of the alpha channel by applying the color matrix filter. I have created a pen that demonstrates the same.

Example

<svg xmlns="http://www.w3.org/2000/svg">
  <defs>
    <filter id="particles-filter">
      <feGaussianBlur in="SourceGraphic" stdDeviation="5" result="blur" />
      <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 15 -4" result="goo" />
    </filter>
  </defs>
</svg>

License

MIT © Utkarsh Verma

About

Demonstration of liquid effect on HTML Canvas using Matter.js and SVG Filters (Blur + Contrast)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published