Skip to content

lonelydatum/masking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use

Install masking module

npm install masking -D

Copy this HTML-

```html
```

Copy this JS


var Mask = require('./Mask.js');
var maskFX = document.getElementById("maskFX")
var canvas = maskFX.querySelector("canvas");
var image = maskFX.querySelector("img");

image.onload = function(){ var mask = new Mask(canvas, image); mask.circle({x:130, y:130, r:100}, 22); // 2nd paramter is feather // mask.rect({x:60, y:130, w:220, h:300}, 10); }

About

feather masking effect for canvas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published