2.1.4 • Published 5 years ago

html-canvas-lib v2.1.4

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
5 years ago

html-canvas-lib

Overview

html-canvas-lib is a JavaScript library that contains classes to work with HTML Canvas. It includes a wrapper class to work with canvas drawing methods, canvas objects, object controls and a canvas handler.

Installation

npm i -D html-canvas-lib

Usage

Commands

npm run test runs ESLint check for ./src directory

npm run eslint-fix runs ESLint check with --fix for ./src directory

npm run docs outputs JsDoc documentation to ./docs directory

Import

Don't forget to require module:

const CanvasLib = require('html-canvas-lib');
const Canvas = CanvasLib.Canvas;
const Handler = CanvasLib.Handler;
const objects = CanvasLib.objects;
const controls = CanvasLib.controls;
const utils = CanvasLib.utils;

Use library's classes and functions like this:

let handler = new Handler('my-canvas', 640, 480);
document.getElementById('dest').appendChild(handler.container);
handler.add(utils.createLabel('Hello, World!'));
handler.renderAll();

Documentation

Just run npm run docs to generate it to ./docs.

2.1.4

5 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.3.0

6 years ago

1.2.15

6 years ago

1.2.14

6 years ago

1.2.13

6 years ago

1.2.12

6 years ago

1.2.11

6 years ago

1.2.10

6 years ago

1.2.9

6 years ago

1.2.8

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.0.0

6 years ago