summaryrefslogtreecommitdiff
path: root/src/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.js')
-rw-r--r--src/main.js26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/main.js b/src/main.js
index 0474d7a..5c6db59 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,5 +1,23 @@
-import { LayerData, LayerView, LayerController } from './Map/Layer.js';
+import { Transform, Canvas } from './Map/Canvas.js';
+import { Node, Shape, Point, Path, Polygon } from './Map/Shapes.js';
-const view = new LayerView('root');
-const data = new LayerData();
-const con = new LayerController(data, view);
+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),
+ ]),
+];
+
+canvas.render(transform, shapes);