DEV Community

jQueryScript
jQueryScript

Posted on

Atrament.js Canvas Library: Smooth Drawing with Pressure Support

Atrament: a JavaScript library for natural canvas drawing and handwriting.

Features:

  • Renders directly to canvas bitmap like physical ink on paper
  • Supports pressure-sensitive stylus input with configurable scaling
  • Includes stroke recording for undo and replay functionality
  • Multiple modes including draw, erase, and fill
  • Lightweight core with optional fill module to reduce bundle size

The programmatic drawing API lets you reconstruct strokes from recorded data, making it straightforward to implement undo/redo functionality without external dependencies.

๐Ÿ‘‰ Blog Post

๐Ÿ‘‰ GitHub Repo

๐Ÿ‘‰ Live Demo

Top comments (0)