Skip to content

Wicklets/croquis.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

croquis.js

this library provides Photoshop-like brush features.

it also provides functions such as stabilization of brush strokes.

install

npm install croquis.js
# or
yarn add 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.

About

HTML5 drawing tool library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.9%
  • JavaScript 0.1%