Skip to content

DamienVesper/CanvasMap

Repository files navigation

@damienvesper/canvas-map

A canvas mapping library, ported to TypeScript.


Usage

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();

About

A canvas mapping library, ported to TypeScript.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages