0.1.2 • Published 6 years ago

unitaryjs v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

UnitaryJS

Build Status

logo.png

UnitaryJS is a library for handling canvas with objects.

Demo: Demo

Wiki

wiki

Quick Example

<!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="UTF-8">
    <title>Sample</title>
    <script src="./unitary.js"></script>
    <script>
    const {Point, Triangle} = Unitary;
    const A = new Point(30,30),
        B = new Point(90,90),
        C = new Point(90,40),
        ABC = new Triangle(A, B, C),
        circumcircleABC = ABC.getCircumcircle(),
        incircleABC = ABC.getIncircle(),
        canvas = new Canvas('canvas');

    canvas.add(ABC);
    canvas.add(circumcircleABC);
    canvas.add(incircleABC);
    canvas.draw();
    </script>
  </head>
  <body>
    <canvas id="canvas" width="200" height="200"></canvas>
  </body>
</html>

Getting started

npm install unitaryjs

and require unitaryjs.

const Unitary = require('unitaryjs');
new Unitary.Vector(1, 1);

Browser

download ./dist/unitary.min.js and load it.

<script src="unitary.js"></script>

Classes

  • BezierCurve
  • Circle
  • CircularSector
  • Doughnut
  • Graph
  • Group
  • Image
  • Line
  • Point
  • Polygon
  • Quadrilateral
  • Rect
  • Segment
  • Text
  • Triangle
  • Vector
0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

7 years ago

0.0.8

7 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago