js-graphics
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

What is JS-Graphics?

JS-Graphics is a TypeScript/JavaScript library for drawing UI on canvas in an object-oriented manner. It provides a small suite of common graphical objects, structures and styles.

Installation

npm install js-graphics

Features

Graphical Objects

Graphical objects can be instantiated and drawn simply by calling the draw() method on it.

Basic Graphical Objects

  • Label
  • Rectangle
  • Oval
  • Sprite

Nested Graphical Objects

  • Animation
  • LayeredGraphic
  • Button

Structures

Structures define abstract properties about graphical objects.

  • Alignment
  • ButtonFrames
  • CornerAttribute
  • SideAttribute
  • RegistrationPoint
  • Point

Styles

Styles define graphical themes about graphical objects.

  • Color
  • LineStyle

API Reference

Coming soon.

Test

Module is tested with mocha and chai.

Dependencies (1)

Dev Dependencies (14)

Package Sidebar

Install

npm i js-graphics

Weekly Downloads

5

Version

1.2.3

License

ISC

Unpacked Size

95.3 kB

Total Files

58

Last publish

Collaborators

  • zomus