# Luna Mask Editor
Image mask editing.
## Demo
https://luna.liriliri.io/?path=/story/mask-editor
## Install
Add the following script and style to your page.
```html
```
You can also get it on npm.
```bash
npm install luna-mask-editor luna-painter luna-toolbar --save
```
```javascript
import 'luna-toolbar/luna-toolbar.css'
import 'luna-painter/luna-painter.css'
import LunaMaskEditor from 'luna-mask-editor'
```
## Usage
```javascript
const container = document.getElementById('container')
const maskEditor = new LunaMaskEditor(container)
```
## Configuration
* image(string): Image src.
* mask(string): Mask src.
## Api
### getCanvas(): HTMLCanvasElement
Get a canvas with mask drawn.