import { Transform, Canvas } from './Map/Canvas.js'; import { Node, Shape, Point, Path, Polygon, Text } from './Map/Shapes.js'; function point(x, y) { this.x = x; this.y = y; }; const canvas = new Canvas('root'); const transform = new Transform(); const shapes = [ new Point(new Node(30, 30)), new Path([ new Node(100, 100), new Node(100, 200), new Node(150, 250), ]), new Polygon([ new Node(200, 100), new Node(200, 200), new Node(300, 200), ]), new Text(new Node(10, 100), 'hello, world!'), ]; canvas.render(transform, shapes);