Get started with chainvas CDN
MIT licensed
Chainvas is a lightweight library for managing and visualizing state transitions as a chain of events.
Tags:- chaining
- method
- prototype
- JavaScript
- Chainvas
- canvas
Stable version
Copied!
How to start using chainvas CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with chainvas CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/chainvas/2.1/chainvas.min.js"></script>
</head>
<body>
<canvas id="canvas" width="400" height="400"></canvas>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
const chainvas = new Chainvas(ctx);
chainvas.clear();
const circle = new Chainvas.Circle(100, 100, 50);
chainvas.fillCircle(circle);
const rectangle = new Chainvas.Rectangle(150, 50, 100, 100);
chainvas.fillRectangle(rectangle);
chainvas.render();
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!