Atrament

screenshot of Atrament

A small JS library for beautiful drawing and handwriting on the HTML Canvas.

Overview

Atrament is a compact JavaScript library designed to bring a natural and comfortable drawing experience to the HTML canvas. With its smooth rendering and ease of use, this library aims to replicate the feel of traditional ink on paper. Whether you're doodling or crafting intricate designs, Atrament caters to both casual users and developers looking for versatile drawing tools. As it evolves, version 4 and beyond focuses on supporting evergreen browsers, making it more accessible to a wider audience.

This library uniquely does not store stroke paths, opting instead to draw directly onto the canvas bitmap, enhancing performance and responsiveness. Ideal for various applications, Atrament is customizable and offers a range of features that promise to elevate digital drawing experiences.

Features

  • Draw/Fill/Erase Modes: Easily switch between different drawing styles to suit your needs, whether you're filling areas, drawing lines, or erasing mistakes.
  • Adjustable Adaptive Smoothing: Tweak the smoothing level to make drawings appear smoother or enhance responsiveness, allowing for a more tailored drawing experience.
  • Events Tracking: Implement functionality to replay or undo actions using tracked drawing events, ensuring seamless interaction and precision.
  • Customizable Line Thickness and Color: Modify the thickness and color of your strokes for creative freedom, adapting to various styles and preferences.
  • Pressure Sensitivity Options: For devices supporting pressure input, emulate natural ink discharge, enhancing the drawing experience further.
  • Secondary Mouse Button Drawing: Utilize the right mouse button for quick adjustments like erasing, improving accessibility and fluidity in drawing.
  • Lightweight Design: Version 5.0.0 brings a significant reduction in bundle size for applications not using the fill mode, improving loading times and performance.
eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

rollup
Rollup

RollupJS is a popular and efficient JavaScript module bundler that takes the code from multiple modules and packages them into a single optimized file, minimizing the overall size of the application and improving its performance.