tshaddix / paintbricks

An extendable drawing system built for the web.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

paintbricks

An extendable drawing system built for the web.

Install

npm install --save paintbricks

Usage

// import manager and tool
import {Manager, PenTool} from "paintbricks";

// Create a new manager
const manager = new Manager(canvasElem, canvasWidth, canvasHeight);

// create a new pen tool with color and stroke width
const penTool = new PenTool("blue", 5);

// set the current tool as the pen tool
manager.setTool(penTool);

// ... draw :)

About

An extendable drawing system built for the web.

License:MIT License


Languages

Language:TypeScript 92.4%Language:JavaScript 4.7%Language:HTML 2.9%