GithubHelp home page GithubHelp logo

00mjk / croquis.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from disjukr/croquis.js

0.0 0.0 0.0 1.61 MB

HTML5 drawing tool library

Home Page: https://croquisjs.0xabcdef.com/example/common-brush

JavaScript 0.12% TypeScript 99.88%

croquis.js's Introduction

croquis.js

this library provides Photoshop-like brush features.

it also provides functions such as stabilization of brush strokes.

install

npm install @disjukr/croquis-js
# or
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.

croquis.js's People

Contributors

disjukr avatar dahlia avatar dependabot[bot] avatar saschanaz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.