canvas2d-wrapper 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/canvas2d-wrapper.d.ts +182 -0
- package/dist/index.js +166 -63
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +166 -64
- package/dist/index.modern.js.map +1 -1
- package/package.json +12 -11
@@ -0,0 +1,182 @@
|
|
1
|
+
declare module "canvas2d-wrapper" {
|
2
|
+
export type Position2D = {
|
3
|
+
x: number,
|
4
|
+
y: number
|
5
|
+
};
|
6
|
+
|
7
|
+
export type Surface2D = {
|
8
|
+
x: number,
|
9
|
+
y: number,
|
10
|
+
width: number,
|
11
|
+
height: number
|
12
|
+
};
|
13
|
+
|
14
|
+
export type Canvas2DEventCallbackParams = {
|
15
|
+
id: string | null,
|
16
|
+
element: CanvasObject | null,
|
17
|
+
originalEvent: Event,
|
18
|
+
posOnMap: Position2D
|
19
|
+
};
|
20
|
+
|
21
|
+
// React component
|
22
|
+
export type Canvas2DProps = {
|
23
|
+
width: number,
|
24
|
+
height: number,
|
25
|
+
trackMouseMove?: boolean,
|
26
|
+
minZoom?: number,
|
27
|
+
maxZoom?: number,
|
28
|
+
tileSize?: number,
|
29
|
+
onClick: ({ id, element, originalEvent }: Canvas2DEventCallbackParams) => void,
|
30
|
+
onRightClick?: ({ id, element, originalEvent }: Canvas2DEventCallbackParams) => void,
|
31
|
+
onHover?: ({ id, element, originalEvent }?: Canvas2DEventCallbackParams | null, position: Position2D | undefined) => void,
|
32
|
+
onElementMoved?: (element: CanvasObject, x: number, y: number) => void,
|
33
|
+
onWheel?: (e: Event) => void,
|
34
|
+
onFrame: () => CanvasObject[],
|
35
|
+
lockXAxis?: boolean,
|
36
|
+
lockYAxis?: boolean,
|
37
|
+
smoothingQuality?: string,
|
38
|
+
dragObjects?: boolean,
|
39
|
+
deltaLeft?: number,
|
40
|
+
deltaTop?: number,
|
41
|
+
// Additional props
|
42
|
+
id: string,
|
43
|
+
className?: string,
|
44
|
+
};
|
45
|
+
|
46
|
+
export function Canvas2D(props: Canvas2DProps);
|
47
|
+
|
48
|
+
// Shapes
|
49
|
+
export class CanvasObject {
|
50
|
+
constructor(
|
51
|
+
id: string,
|
52
|
+
x: number,
|
53
|
+
y: number,
|
54
|
+
zIndex?: number,
|
55
|
+
draggable?: boolean
|
56
|
+
);
|
57
|
+
|
58
|
+
get constructorName(): string;
|
59
|
+
|
60
|
+
get zIndex(): number;
|
61
|
+
|
62
|
+
set zIndex(zIndex: number);
|
63
|
+
|
64
|
+
id: string;
|
65
|
+
x: number;
|
66
|
+
y: number;
|
67
|
+
draggable: boolean | undefined;
|
68
|
+
}
|
69
|
+
|
70
|
+
export class ColoredCanvasObject extends CanvasObject {
|
71
|
+
constructor(
|
72
|
+
id: string,
|
73
|
+
x: number,
|
74
|
+
y: number,
|
75
|
+
width: number,
|
76
|
+
height: number,
|
77
|
+
fill?: string,
|
78
|
+
stroke?: string,
|
79
|
+
zIndex?: number,
|
80
|
+
draggable?: boolean
|
81
|
+
);
|
82
|
+
|
83
|
+
fill: string | undefined;
|
84
|
+
stroke: string | undefined;
|
85
|
+
}
|
86
|
+
|
87
|
+
export class CanvasImage extends ColoredCanvasObject {
|
88
|
+
constructor({ id, x, y, width, height, src, zIndex, draggable }: {
|
89
|
+
id: string,
|
90
|
+
x: number,
|
91
|
+
y: number,
|
92
|
+
width: number,
|
93
|
+
height: number,
|
94
|
+
src: string,
|
95
|
+
zIndex?: number,
|
96
|
+
draggable?: boolean,
|
97
|
+
});
|
98
|
+
|
99
|
+
crop(sx: number, swidth: number, sheight: number);
|
100
|
+
|
101
|
+
src: string;
|
102
|
+
width: number;
|
103
|
+
height: number;
|
104
|
+
}
|
105
|
+
|
106
|
+
export class Circle extends ColoredCanvasObject {
|
107
|
+
constructor({ id, x, y, radius, fill, stroke, zIndex, draggable }: {
|
108
|
+
id: string,
|
109
|
+
x: number,
|
110
|
+
y: number,
|
111
|
+
radius: number,
|
112
|
+
fill?: string,
|
113
|
+
stroke?: string,
|
114
|
+
zIndex?: number,
|
115
|
+
draggable?: boolean,
|
116
|
+
});
|
117
|
+
|
118
|
+
radius: number;
|
119
|
+
}
|
120
|
+
|
121
|
+
export class LinePath extends ColoredCanvasObject {
|
122
|
+
constructor({ id, points, stroke, zIndex }: {
|
123
|
+
id: string,
|
124
|
+
lineWidth: number,
|
125
|
+
points: Position2D[],
|
126
|
+
stroke: string,
|
127
|
+
zIndex?: number,
|
128
|
+
smoothCorners?: boolean,
|
129
|
+
smoothCornersRadius?: number,
|
130
|
+
});
|
131
|
+
|
132
|
+
points: Position2D[];
|
133
|
+
lineWidth: number;
|
134
|
+
smoothCorners?: boolean;
|
135
|
+
smoothCornersRadius?: number;
|
136
|
+
}
|
137
|
+
|
138
|
+
export class Polygon extends ColoredCanvasObject {
|
139
|
+
constructor({ id, points, width, height, src, zIndex, draggable }: {
|
140
|
+
id: string,
|
141
|
+
points: Position2D[],
|
142
|
+
fill?: string,
|
143
|
+
stroke?: string,
|
144
|
+
zIndex?: number,
|
145
|
+
draggable?: boolean,
|
146
|
+
});
|
147
|
+
|
148
|
+
points: Position2D[];
|
149
|
+
}
|
150
|
+
|
151
|
+
export class Rect extends ColoredCanvasObject {
|
152
|
+
constructor({ id, x, y, width, height, src, zIndex, draggable }: {
|
153
|
+
id: string,
|
154
|
+
x: number,
|
155
|
+
y: number,
|
156
|
+
width: number,
|
157
|
+
height: number,
|
158
|
+
fill?: string,
|
159
|
+
stroke?: string,
|
160
|
+
zIndex?: number,
|
161
|
+
draggable?: boolean,
|
162
|
+
});
|
163
|
+
|
164
|
+
width: number;
|
165
|
+
height: number;
|
166
|
+
}
|
167
|
+
|
168
|
+
// Functions
|
169
|
+
export function preloadImages(images: string[]): void;
|
170
|
+
|
171
|
+
// Hooks
|
172
|
+
export function useGamepad(): { [id: string]: string };
|
173
|
+
export function useKeyboard(): { [id: string]: string };
|
174
|
+
export function useMousePosition(): {
|
175
|
+
x: number | null,
|
176
|
+
y: number | null,
|
177
|
+
};
|
178
|
+
export function useWindowDimensions(): {
|
179
|
+
width: number,
|
180
|
+
height: number,
|
181
|
+
};
|
182
|
+
}
|
package/dist/index.js
CHANGED
@@ -52,7 +52,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
52
52
|
if (null == r) return {};
|
53
53
|
var t = {};
|
54
54
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
55
|
-
if (e.
|
55
|
+
if (-1 !== e.indexOf(n)) continue;
|
56
56
|
t[n] = r[n];
|
57
57
|
}
|
58
58
|
return t;
|
@@ -137,7 +137,11 @@ function collideElement(e, elements, left, top, tileSize, zoom) {
|
|
137
137
|
validElements.push({
|
138
138
|
id: element.id,
|
139
139
|
element: element,
|
140
|
-
originalEvent: e
|
140
|
+
originalEvent: e,
|
141
|
+
posOnMap: {
|
142
|
+
x: element.x,
|
143
|
+
y: element.y
|
144
|
+
}
|
141
145
|
});
|
142
146
|
}
|
143
147
|
break;
|
@@ -146,7 +150,11 @@ function collideElement(e, elements, left, top, tileSize, zoom) {
|
|
146
150
|
validElements.push({
|
147
151
|
id: element.id,
|
148
152
|
element: element,
|
149
|
-
originalEvent: e
|
153
|
+
originalEvent: e,
|
154
|
+
posOnMap: {
|
155
|
+
x: element.x,
|
156
|
+
y: element.y
|
157
|
+
}
|
150
158
|
});
|
151
159
|
}
|
152
160
|
break;
|
@@ -155,7 +163,11 @@ function collideElement(e, elements, left, top, tileSize, zoom) {
|
|
155
163
|
validElements.push({
|
156
164
|
id: element.id,
|
157
165
|
element: element,
|
158
|
-
originalEvent: e
|
166
|
+
originalEvent: e,
|
167
|
+
posOnMap: {
|
168
|
+
x: element.x,
|
169
|
+
y: element.y
|
170
|
+
}
|
159
171
|
});
|
160
172
|
}
|
161
173
|
break;
|
@@ -195,7 +207,11 @@ function elementClick(e, elements, tileSize, state) {
|
|
195
207
|
return {
|
196
208
|
id: null,
|
197
209
|
element: null,
|
198
|
-
originalEvent: e
|
210
|
+
originalEvent: e,
|
211
|
+
posOnMap: {
|
212
|
+
x: Math.floor(left / tileSize / state.zoom),
|
213
|
+
y: Math.floor(top / tileSize / state.zoom)
|
214
|
+
}
|
199
215
|
};
|
200
216
|
}
|
201
217
|
|
@@ -209,7 +225,11 @@ function elementRightClick(e, elements, tileSize, state) {
|
|
209
225
|
return {
|
210
226
|
id: null,
|
211
227
|
element: null,
|
212
|
-
originalEvent: e
|
228
|
+
originalEvent: e,
|
229
|
+
posOnMap: {
|
230
|
+
x: Math.floor(left / tileSize / state.zoom),
|
231
|
+
y: Math.floor(top / tileSize / state.zoom)
|
232
|
+
}
|
213
233
|
};
|
214
234
|
}
|
215
235
|
|
@@ -335,6 +355,39 @@ var CanvasObject = /*#__PURE__*/function () {
|
|
335
355
|
}]);
|
336
356
|
}();
|
337
357
|
|
358
|
+
var CanvasImage = /*#__PURE__*/function (_CanvasObject) {
|
359
|
+
function CanvasImage(_ref) {
|
360
|
+
var _this;
|
361
|
+
var id = _ref.id,
|
362
|
+
x = _ref.x,
|
363
|
+
y = _ref.y,
|
364
|
+
width = _ref.width,
|
365
|
+
height = _ref.height,
|
366
|
+
src = _ref.src,
|
367
|
+
zIndex = _ref.zIndex,
|
368
|
+
draggable = _ref.draggable;
|
369
|
+
_this = _CanvasObject.call(this, id, x, y, zIndex, draggable) || this;
|
370
|
+
_this.width = width;
|
371
|
+
_this.height = height;
|
372
|
+
_this.src = src;
|
373
|
+
return _this;
|
374
|
+
}
|
375
|
+
_inheritsLoose(CanvasImage, _CanvasObject);
|
376
|
+
var _proto = CanvasImage.prototype;
|
377
|
+
_proto.crop = function crop(sx, swidth, sheight) {
|
378
|
+
this.sx = sx;
|
379
|
+
this.sy = sx;
|
380
|
+
this.swidth = swidth;
|
381
|
+
this.sheight = sheight;
|
382
|
+
};
|
383
|
+
return _createClass(CanvasImage, [{
|
384
|
+
key: "constructorName",
|
385
|
+
get: function get() {
|
386
|
+
return 'CanvasImage';
|
387
|
+
}
|
388
|
+
}]);
|
389
|
+
}(CanvasObject);
|
390
|
+
|
338
391
|
var ColoredCanvasObject = /*#__PURE__*/function (_CanvasObject) {
|
339
392
|
function ColoredCanvasObject(id, x, y, fill, stroke, zIndex, draggable) {
|
340
393
|
var _this;
|
@@ -376,83 +429,76 @@ var Circle = /*#__PURE__*/function (_ColoredCanvasObject) {
|
|
376
429
|
}]);
|
377
430
|
}(ColoredCanvasObject);
|
378
431
|
|
379
|
-
var
|
380
|
-
function
|
432
|
+
var LinePath = /*#__PURE__*/function (_ColoredCanvasObject) {
|
433
|
+
function LinePath(_ref) {
|
381
434
|
var _this;
|
382
435
|
var id = _ref.id,
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
height = _ref.height,
|
387
|
-
src = _ref.src,
|
436
|
+
lineWidth = _ref.lineWidth,
|
437
|
+
points = _ref.points,
|
438
|
+
stroke = _ref.stroke,
|
388
439
|
zIndex = _ref.zIndex,
|
389
|
-
|
390
|
-
|
391
|
-
_this
|
392
|
-
_this.
|
393
|
-
_this.
|
440
|
+
smoothCorners = _ref.smoothCorners,
|
441
|
+
smoothCornersRadius = _ref.smoothCornersRadius;
|
442
|
+
_this = _ColoredCanvasObject.call(this, id, points[0].x, points[0].y, 'none', stroke, zIndex, false) || this;
|
443
|
+
_this.points = points;
|
444
|
+
_this.lineWidth = lineWidth;
|
445
|
+
_this.smoothCorners = smoothCorners;
|
446
|
+
_this.smoothCornersRadius = smoothCornersRadius;
|
394
447
|
return _this;
|
395
448
|
}
|
396
|
-
_inheritsLoose(
|
397
|
-
|
398
|
-
_proto.crop = function crop(sx, swidth, sheight) {
|
399
|
-
this.sx = sx;
|
400
|
-
this.sy = sx;
|
401
|
-
this.swidth = swidth;
|
402
|
-
this.sheight = sheight;
|
403
|
-
};
|
404
|
-
return _createClass(CanvasImage, [{
|
449
|
+
_inheritsLoose(LinePath, _ColoredCanvasObject);
|
450
|
+
return _createClass(LinePath, [{
|
405
451
|
key: "constructorName",
|
406
452
|
get: function get() {
|
407
|
-
return '
|
453
|
+
return 'LinePath';
|
408
454
|
}
|
409
455
|
}]);
|
410
|
-
}(
|
456
|
+
}(ColoredCanvasObject);
|
411
457
|
|
412
|
-
var
|
413
|
-
function
|
458
|
+
var Polygon = /*#__PURE__*/function (_ColoredCanvasObject) {
|
459
|
+
function Polygon(_ref) {
|
414
460
|
var _this;
|
415
461
|
var id = _ref.id,
|
416
|
-
|
417
|
-
y = _ref.y,
|
418
|
-
width = _ref.width,
|
419
|
-
height = _ref.height,
|
462
|
+
points = _ref.points,
|
420
463
|
fill = _ref.fill,
|
421
464
|
stroke = _ref.stroke,
|
422
465
|
zIndex = _ref.zIndex,
|
423
466
|
draggable = _ref.draggable;
|
424
|
-
_this = _ColoredCanvasObject.call(this, id, x, y, fill, stroke, zIndex, draggable) || this;
|
425
|
-
_this.
|
426
|
-
_this.height = height;
|
467
|
+
_this = _ColoredCanvasObject.call(this, id, points[0].x, points[0].y, fill, stroke, zIndex, draggable) || this;
|
468
|
+
_this.points = points;
|
427
469
|
return _this;
|
428
470
|
}
|
429
|
-
_inheritsLoose(
|
430
|
-
return _createClass(
|
471
|
+
_inheritsLoose(Polygon, _ColoredCanvasObject);
|
472
|
+
return _createClass(Polygon, [{
|
431
473
|
key: "constructorName",
|
432
474
|
get: function get() {
|
433
|
-
return '
|
475
|
+
return 'Polygon';
|
434
476
|
}
|
435
477
|
}]);
|
436
478
|
}(ColoredCanvasObject);
|
437
479
|
|
438
|
-
var
|
439
|
-
function
|
480
|
+
var Rect = /*#__PURE__*/function (_ColoredCanvasObject) {
|
481
|
+
function Rect(_ref) {
|
440
482
|
var _this;
|
441
483
|
var id = _ref.id,
|
442
|
-
|
484
|
+
x = _ref.x,
|
485
|
+
y = _ref.y,
|
486
|
+
width = _ref.width,
|
487
|
+
height = _ref.height,
|
443
488
|
fill = _ref.fill,
|
444
489
|
stroke = _ref.stroke,
|
445
490
|
zIndex = _ref.zIndex,
|
446
491
|
draggable = _ref.draggable;
|
447
|
-
_this = _ColoredCanvasObject.call(this, id,
|
448
|
-
_this.
|
492
|
+
_this = _ColoredCanvasObject.call(this, id, x, y, fill, stroke, zIndex, draggable) || this;
|
493
|
+
_this.width = width;
|
494
|
+
_this.height = height;
|
449
495
|
return _this;
|
450
496
|
}
|
451
|
-
_inheritsLoose(
|
452
|
-
return _createClass(
|
497
|
+
_inheritsLoose(Rect, _ColoredCanvasObject);
|
498
|
+
return _createClass(Rect, [{
|
453
499
|
key: "constructorName",
|
454
500
|
get: function get() {
|
455
|
-
return '
|
501
|
+
return 'Rect';
|
456
502
|
}
|
457
503
|
}]);
|
458
504
|
}(ColoredCanvasObject);
|
@@ -482,16 +528,55 @@ function renderImage(context, element, left, top, localTileSize) {
|
|
482
528
|
}
|
483
529
|
}
|
484
530
|
|
485
|
-
function
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
531
|
+
function renderLinePath(context, element, left, top, localTileSize) {
|
532
|
+
var defaultLineWidth = context.lineWidth;
|
533
|
+
var points = element.points.map(function (p) {
|
534
|
+
return {
|
535
|
+
x: left + p.x * localTileSize,
|
536
|
+
y: top + p.y * localTileSize
|
537
|
+
};
|
538
|
+
});
|
539
|
+
if (points.length < 2) return;
|
540
|
+
context.beginPath();
|
541
|
+
context.moveTo(points[0].x, points[0].y);
|
542
|
+
if (element.smoothCorners) {
|
543
|
+
for (var i = 1; i < points.length - 1; i++) {
|
544
|
+
var prev = points[i - 1];
|
545
|
+
var curr = points[i];
|
546
|
+
var next = points[i + 1];
|
547
|
+
var dx1 = curr.x - prev.x;
|
548
|
+
var dy1 = curr.y - prev.y;
|
549
|
+
var dx2 = next.x - curr.x;
|
550
|
+
var dy2 = next.y - curr.y;
|
551
|
+
var len1 = Math.hypot(dx1, dy1);
|
552
|
+
var len2 = Math.hypot(dx2, dy2);
|
553
|
+
var offset1X = dx1 / len1 * element.smoothCornersRadius;
|
554
|
+
var offset1Y = dy1 / len1 * element.smoothCornersRadius;
|
555
|
+
var offset2X = dx2 / len2 * element.smoothCornersRadius;
|
556
|
+
var offset2Y = dy2 / len2 * element.smoothCornersRadius;
|
557
|
+
var cornerStart = {
|
558
|
+
x: curr.x - offset1X,
|
559
|
+
y: curr.y - offset1Y
|
560
|
+
};
|
561
|
+
var cornerEnd = {
|
562
|
+
x: curr.x + offset2X,
|
563
|
+
y: curr.y + offset2Y
|
564
|
+
};
|
565
|
+
context.lineTo(cornerStart.x, cornerStart.y);
|
566
|
+
context.quadraticCurveTo(curr.x, curr.y, cornerEnd.x, cornerEnd.y);
|
567
|
+
}
|
568
|
+
context.lineTo(points[points.length - 1].x, points[points.length - 1].y);
|
569
|
+
} else {
|
570
|
+
for (var _i = 1; _i < points.length; _i++) {
|
571
|
+
context.lineTo(points[_i].x, points[_i].y);
|
572
|
+
}
|
491
573
|
}
|
574
|
+
context.lineWidth = element.lineWidth;
|
575
|
+
context.stroke();
|
576
|
+
context.lineWidth = defaultLineWidth;
|
492
577
|
}
|
493
578
|
|
494
|
-
function
|
579
|
+
function renderPolygon(context, element, left, top, localTileSize) {
|
495
580
|
context.beginPath();
|
496
581
|
context.moveTo(left + element.points[0].x * localTileSize, top + element.points[0].y * localTileSize);
|
497
582
|
for (var i = 0; i < element.points.length; i++) {
|
@@ -506,10 +591,21 @@ function renderRect$1(context, element, left, top, localTileSize) {
|
|
506
591
|
}
|
507
592
|
}
|
508
593
|
|
594
|
+
function renderRect(context, element, left, top, localTileSize) {
|
595
|
+
if (element.fill) {
|
596
|
+
context.fillRect(left + element.x * localTileSize, top + element.y * localTileSize, element.width * localTileSize, element.height * localTileSize);
|
597
|
+
}
|
598
|
+
if (element.stroke) {
|
599
|
+
context.strokeRect(left + element.x * localTileSize, top + element.y * localTileSize, element.width * localTileSize, element.height * localTileSize);
|
600
|
+
}
|
601
|
+
}
|
602
|
+
|
509
603
|
var _renderFn;
|
510
|
-
var renderFn = (_renderFn = {}, _renderFn[new Circle({}).constructorName] = renderCircle, _renderFn[new CanvasImage({}).constructorName] = renderImage, _renderFn[new
|
604
|
+
var renderFn = (_renderFn = {}, _renderFn[new Circle({}).constructorName] = renderCircle, _renderFn[new CanvasImage({}).constructorName] = renderImage, _renderFn[new LinePath({
|
605
|
+
points: [{}]
|
606
|
+
}).constructorName] = renderLinePath, _renderFn[new Polygon({
|
511
607
|
points: [{}]
|
512
|
-
}).constructorName] = renderRect
|
608
|
+
}).constructorName] = renderPolygon, _renderFn[new Rect({}).constructorName] = renderRect, _renderFn);
|
513
609
|
function renderCanvas(context, width, height, elements, tileSize, state) {
|
514
610
|
var left = state.left + state.deltaLeft;
|
515
611
|
var top = state.top + state.deltaTop;
|
@@ -658,7 +754,7 @@ function Canvas2D(_ref) {
|
|
658
754
|
return function () {
|
659
755
|
shouldRender = false;
|
660
756
|
};
|
661
|
-
}, [state.context, onFrame]);
|
757
|
+
}, [state.left, state.top, state.deltaLeft, state.deltaTop, state.zoom, state.context, onFrame]);
|
662
758
|
return /*#__PURE__*/React__default.createElement("canvas", _extends({
|
663
759
|
ref: canvasRef,
|
664
760
|
width: width,
|
@@ -698,14 +794,20 @@ function useKeyboard() {
|
|
698
794
|
keyboard = _useState[0],
|
699
795
|
setKeyboard = _useState[1];
|
700
796
|
React.useEffect(function () {
|
701
|
-
|
797
|
+
var keydown = function keydown(e) {
|
702
798
|
keyboard[e.key] = true;
|
703
799
|
setKeyboard(JSON.parse(JSON.stringify(keyboard)));
|
704
|
-
}
|
705
|
-
document.addEventListener('
|
800
|
+
};
|
801
|
+
document.addEventListener('keydown', keydown);
|
802
|
+
var keyup = function keyup(e) {
|
706
803
|
keyboard[e.key] = false;
|
707
804
|
setKeyboard(JSON.parse(JSON.stringify(keyboard)));
|
708
|
-
}
|
805
|
+
};
|
806
|
+
document.addEventListener('keyup', keyup);
|
807
|
+
return function () {
|
808
|
+
document.removeEventListener('keydown', keydown);
|
809
|
+
document.removeEventListener('keyup', keyup);
|
810
|
+
};
|
709
811
|
}, []);
|
710
812
|
return keyboard;
|
711
813
|
}
|
@@ -781,6 +883,7 @@ exports.Canvas2D = Canvas2D;
|
|
781
883
|
exports.CanvasImage = CanvasImage;
|
782
884
|
exports.CanvasObject = CanvasObject;
|
783
885
|
exports.Circle = Circle;
|
886
|
+
exports.LinePath = LinePath;
|
784
887
|
exports.Polygon = Polygon;
|
785
888
|
exports.Rect = Rect;
|
786
889
|
exports.preloadImages = preloadImages;
|