项目作者: disjukr

项目描述 :
HTML5 drawing tool library
高级语言: TypeScript
项目地址: git://github.com/disjukr/croquis.js.git
创建时间: 2013-07-13T15:56:11Z
项目社区:https://github.com/disjukr/croquis.js

开源协议:

下载


croquis.js

this library provides Photoshop-like brush features.

it also provides functions such as stabilization of brush strokes.

install

  1. npm install @disjukr/croquis-js
  2. # or
  3. yarn add @disjukr/croquis-js

stroke protocol

brush-related functions in croquis.js are working on the stroke protocol.

stroke protocol consists of the down method and the move and up methods of the drawing context.

down method means that the stylus pen has started drawing a stroke. it returns the drawing context containing the move and up methods.

move means that the stylus pen draws a stroke, and up means that the stroke ends.

stroke protocol makes it easy to add features such as stabilization without having to modify the drawing code very much.

look at the simple brush example and the pulled string stabilizer example.
you can see that the code is not different except for the part injecting the settings and the part drawing the guide.

license

croquis.js is dual-licensed under Apache 2.0 and MIT terms.