Skip to content

fauzan-radji/kanvasgl

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published