crayon-draw
v1.0.1
Published
蜡笔效果 crayon
Downloads
24
Readme
蜡笔效果画线 crayon-style line
inspired by fabric-brush but without any dependences
Quickstart
npm install crayon-draw --save
OR
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/crayon-draw.min.js"></script>
How to use
import CrayonDraw from 'crayon-draw';
const instance = new CrayonDraw('myCanvasId');
// set line color
instance.setColor('#000000');
// set line opacity
instance.setOpacity(1);
// set "dot density" level
instance.setInkAmount(1);
// set line width
instance.setWidth(10);
Online Demo
License
MIT@elvin