Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 719 Bytes

readme.md

File metadata and controls

27 lines (22 loc) · 719 Bytes

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); }