A Javascript library to do Computer Graphics on the HTML5 Canvas element.
npm install kanvasgl
<!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>
See the documentation for more information. See the examples for more examples. See the demo for a live demo.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to contribute to this project. Just open an issue or create a pull request to get started.