@neosjs/h5-graffiti

NeosJS H5 Graffiti

Usage no npm install needed!

<script type="module">
  import neosjsH5Graffiti from 'https://cdn.skypack.dev/@neosjs/h5-graffiti';
</script>

README

H5 涂鸦

支持:画笔大小设置、橡皮擦大小设置、画笔颜色设置、撤销操作、打LOGO水印、生成图片、保存图片 等功能。

安装

npm (scoped)

NPM

npm i @neosjs/h5-graffiti -S

YARN

yarn add @neosjs/h5-graffiti

API 接口列表

  • graffiti.init(object: <Object>)
  • graffiti.lineColor(color: <String>)
  • graffiti.lineSize(size: <Number>)
  • graffiti.eraserSize(size: <Number>)
  • graffiti.eraser()
  • graffiti.prev()
  • graffiti.next()
  • graffiti.clear()
  • graffiti.destroy()
  • graffiti.createImage()
  • graffiti.saveImage(fileName: <String>)