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

1.0.3 • Public • Published

KanvasGL

A Javascript library to do Computer Graphics on the HTML5 Canvas element.

Installation

npm install kanvasgl

Basic Usage

<!DOCTYPE html>
<html lang="en">
  <head>
    <script type="importmap">
      {
        "imports": {
          "kanvasgl": "./node_modules/kanvasgl/index.js"
        }
      }
    </script>
  </head>

  <body>
    <canvas id="myCanvas"></canvas>

    <script type="module">
      import Kanvas from "kanvasgl";

      const canvas = new Kanvas("myCanvas", 400, 400);
      canvas.circle(canvas.center, 100).fill("#00ffff");
    </script>
  </body>
</html>

Documentation

See the documentation for more information. See the examples for more examples. See the demo for a live demo.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Feel free to contribute to this project. Just open an issue or create a pull request to get started.

/kanvasgl/

    Package Sidebar

    Install

    npm i kanvasgl

    Weekly Downloads

    1

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    278 kB

    Total Files

    32

    Last publish

    Collaborators

    • fauzan-radji