import { CanvasMap, Text } from '@damienvesper/canvas-map';
const canvas = document.querySelector(`canvas`);
const map = new CanvasMap(canvas, 200, 200);
// Add a text to the map.
map.add(new Text({
id: `hello-world-text`,
x: 100,
y: 100,
text: `Hello World`,
fill: `rgba(0, 0, 0, 1)`,
size: 200
}));
// Render elements to the canvas.
map.draw();
-
Notifications
You must be signed in to change notification settings - Fork 0
A canvas mapping library, ported to TypeScript.
License
DamienVesper/CanvasMap
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A canvas mapping library, ported to TypeScript.
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published