@leafer/core 1.4.0 → 1.4.2

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/lib/core.cjs CHANGED
@@ -1376,7 +1376,7 @@ function getNameList(name) {
1376
1376
  }
1377
1377
  const D$4 = Debug;
1378
1378
 
1379
- const debug$9 = Debug.get('RunTime');
1379
+ const debug$a = Debug.get('RunTime');
1380
1380
  const Run = {
1381
1381
  currentId: 0,
1382
1382
  currentName: '',
@@ -1385,24 +1385,24 @@ const Run = {
1385
1385
  nameToIdMap: {},
1386
1386
  start(name, microsecond) {
1387
1387
  const id = IncrementId.create(IncrementId.RUNTIME);
1388
- R.currentId = R.idMap[id] = microsecond ? performance.now() : Date.now();
1389
- R.currentName = R.nameMap[id] = name;
1390
- R.nameToIdMap[name] = id;
1388
+ R$1.currentId = R$1.idMap[id] = microsecond ? performance.now() : Date.now();
1389
+ R$1.currentName = R$1.nameMap[id] = name;
1390
+ R$1.nameToIdMap[name] = id;
1391
1391
  return id;
1392
1392
  },
1393
1393
  end(id, microsecond) {
1394
- const time = R.idMap[id], name = R.nameMap[id];
1394
+ const time = R$1.idMap[id], name = R$1.nameMap[id];
1395
1395
  const duration = microsecond ? (performance.now() - time) / 1000 : Date.now() - time;
1396
- R.idMap[id] = R.nameMap[id] = R.nameToIdMap[name] = undefined;
1397
- debug$9.log(name, duration, 'ms');
1396
+ R$1.idMap[id] = R$1.nameMap[id] = R$1.nameToIdMap[name] = undefined;
1397
+ debug$a.log(name, duration, 'ms');
1398
1398
  },
1399
1399
  endOfName(name, microsecond) {
1400
- const id = R.nameToIdMap[name];
1400
+ const id = R$1.nameToIdMap[name];
1401
1401
  if (id !== undefined)
1402
- R.end(id, microsecond);
1402
+ R$1.end(id, microsecond);
1403
1403
  }
1404
1404
  };
1405
- const R = Run;
1405
+ const R$1 = Run;
1406
1406
 
1407
1407
  const check = [];
1408
1408
  const Plugin = {
@@ -1423,18 +1423,18 @@ const Plugin = {
1423
1423
  };
1424
1424
  setTimeout(() => check.forEach(name => Plugin.has(name, true)));
1425
1425
 
1426
- const debug$8 = Debug.get('UICreator');
1426
+ const debug$9 = Debug.get('UICreator');
1427
1427
  const UICreator = {
1428
1428
  list: {},
1429
1429
  register(UI) {
1430
1430
  const { __tag: tag } = UI.prototype;
1431
1431
  if (list$1[tag])
1432
- debug$8.repeat(tag);
1432
+ debug$9.repeat(tag);
1433
1433
  list$1[tag] = UI;
1434
1434
  },
1435
1435
  get(tag, data, x, y, width, height) {
1436
1436
  if (!list$1[tag])
1437
- debug$8.error('not register ' + tag);
1437
+ debug$9.error('not register ' + tag);
1438
1438
  const ui = new list$1[tag](data);
1439
1439
  if (x !== undefined) {
1440
1440
  ui.x = x;
@@ -1450,7 +1450,7 @@ const UICreator = {
1450
1450
  };
1451
1451
  const { list: list$1 } = UICreator;
1452
1452
 
1453
- const debug$7 = Debug.get('EventCreator');
1453
+ const debug$8 = Debug.get('EventCreator');
1454
1454
  const EventCreator = {
1455
1455
  nameList: {},
1456
1456
  register(Event) {
@@ -1458,7 +1458,7 @@ const EventCreator = {
1458
1458
  Object.keys(Event).forEach(key => {
1459
1459
  name = Event[key];
1460
1460
  if (typeof name === 'string')
1461
- nameList[name] && debug$7.repeat(name), nameList[name] = Event;
1461
+ nameList[name] && debug$8.repeat(name), nameList[name] = Event;
1462
1462
  });
1463
1463
  },
1464
1464
  changeName(oldName, newName) {
@@ -1535,10 +1535,10 @@ const DataHelper = {
1535
1535
  Object.keys(merge).forEach(key => {
1536
1536
  var _a, _b;
1537
1537
  value = merge[key];
1538
- if ((value === null || value === undefined ? undefined : value.constructor) === Object && ((_a = t[key]) === null || _a === undefined ? undefined : _a.constructor) === Object)
1538
+ if ((value === null || value === void 0 ? void 0 : value.constructor) === Object && ((_a = t[key]) === null || _a === void 0 ? void 0 : _a.constructor) === Object)
1539
1539
  return assign(t[key], merge[key], exclude && exclude[key]);
1540
1540
  if (exclude && (key in exclude)) {
1541
- if (((_b = exclude[key]) === null || _b === undefined ? undefined : _b.constructor) === Object)
1541
+ if (((_b = exclude[key]) === null || _b === void 0 ? void 0 : _b.constructor) === Object)
1542
1542
  assign(t[key] = {}, merge[key], exclude[key]);
1543
1543
  return;
1544
1544
  }
@@ -1662,7 +1662,7 @@ class LeafData {
1662
1662
  const t = this;
1663
1663
  if (t.blendMode === 'pass-through') {
1664
1664
  const leaf = this.__leaf;
1665
- if ((t.opacity < 1 && (leaf.isBranch || t.__hasMultiPaint)) || leaf.__hasEraser || t.eraser) {
1665
+ if ((t.opacity < 1 && (leaf.isBranch || t.__hasMultiPaint)) || leaf.__hasEraser || t.eraser || t.filter) {
1666
1666
  t.__single = true;
1667
1667
  }
1668
1668
  else if (t.__single) {
@@ -1775,7 +1775,7 @@ class Canvas {
1775
1775
  }
1776
1776
  setTransform(_a, _b, _c, _d, _e, _f) { }
1777
1777
  resetTransform() { }
1778
- getTransform() { return undefined; }
1778
+ getTransform() { return void 0; }
1779
1779
  save() { }
1780
1780
  restore() { }
1781
1781
  transform(a, b, c, d, e, f) {
@@ -1832,12 +1832,12 @@ class Canvas {
1832
1832
  ellipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) { }
1833
1833
  rect(_x, _y, _width, _height) { }
1834
1834
  roundRect(_x, _y, _width, _height, _radius) { }
1835
- createConicGradient(_startAngle, _x, _y) { return undefined; }
1836
- createLinearGradient(_x0, _y0, _x1, _y1) { return undefined; }
1837
- createPattern(_image, _repetition) { return undefined; }
1838
- createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return undefined; }
1835
+ createConicGradient(_startAngle, _x, _y) { return void 0; }
1836
+ createLinearGradient(_x0, _y0, _x1, _y1) { return void 0; }
1837
+ createPattern(_image, _repetition) { return void 0; }
1838
+ createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return void 0; }
1839
1839
  fillText(_text, _x, _y, _maxWidth) { }
1840
- measureText(_text) { return undefined; }
1840
+ measureText(_text) { return void 0; }
1841
1841
  strokeText(_text, _x, _y, _maxWidth) { }
1842
1842
  destroy() {
1843
1843
  this.context = null;
@@ -1845,79 +1845,79 @@ class Canvas {
1845
1845
  }
1846
1846
  __decorate([
1847
1847
  contextAttr('imageSmoothingEnabled')
1848
- ], Canvas.prototype, "smooth", undefined);
1848
+ ], Canvas.prototype, "smooth", void 0);
1849
1849
  __decorate([
1850
1850
  contextAttr('imageSmoothingQuality')
1851
- ], Canvas.prototype, "smoothLevel", undefined);
1851
+ ], Canvas.prototype, "smoothLevel", void 0);
1852
1852
  __decorate([
1853
1853
  contextAttr('globalAlpha')
1854
- ], Canvas.prototype, "opacity", undefined);
1854
+ ], Canvas.prototype, "opacity", void 0);
1855
1855
  __decorate([
1856
1856
  contextAttr()
1857
- ], Canvas.prototype, "fillStyle", undefined);
1857
+ ], Canvas.prototype, "fillStyle", void 0);
1858
1858
  __decorate([
1859
1859
  contextAttr()
1860
- ], Canvas.prototype, "strokeStyle", undefined);
1860
+ ], Canvas.prototype, "strokeStyle", void 0);
1861
1861
  __decorate([
1862
1862
  contextAttr('lineWidth')
1863
- ], Canvas.prototype, "strokeWidth", undefined);
1863
+ ], Canvas.prototype, "strokeWidth", void 0);
1864
1864
  __decorate([
1865
1865
  contextAttr('lineCap')
1866
- ], Canvas.prototype, "strokeCap", undefined);
1866
+ ], Canvas.prototype, "strokeCap", void 0);
1867
1867
  __decorate([
1868
1868
  contextAttr('lineJoin')
1869
- ], Canvas.prototype, "strokeJoin", undefined);
1869
+ ], Canvas.prototype, "strokeJoin", void 0);
1870
1870
  __decorate([
1871
1871
  contextAttr('lineDashOffset')
1872
- ], Canvas.prototype, "dashOffset", undefined);
1872
+ ], Canvas.prototype, "dashOffset", void 0);
1873
1873
  __decorate([
1874
1874
  contextAttr()
1875
- ], Canvas.prototype, "miterLimit", undefined);
1875
+ ], Canvas.prototype, "miterLimit", void 0);
1876
1876
  __decorate([
1877
1877
  contextAttr()
1878
- ], Canvas.prototype, "shadowBlur", undefined);
1878
+ ], Canvas.prototype, "shadowBlur", void 0);
1879
1879
  __decorate([
1880
1880
  contextAttr()
1881
- ], Canvas.prototype, "shadowColor", undefined);
1881
+ ], Canvas.prototype, "shadowColor", void 0);
1882
1882
  __decorate([
1883
1883
  contextAttr()
1884
- ], Canvas.prototype, "shadowOffsetX", undefined);
1884
+ ], Canvas.prototype, "shadowOffsetX", void 0);
1885
1885
  __decorate([
1886
1886
  contextAttr()
1887
- ], Canvas.prototype, "shadowOffsetY", undefined);
1887
+ ], Canvas.prototype, "shadowOffsetY", void 0);
1888
1888
  __decorate([
1889
1889
  contextAttr()
1890
- ], Canvas.prototype, "filter", undefined);
1890
+ ], Canvas.prototype, "filter", void 0);
1891
1891
  __decorate([
1892
1892
  contextAttr()
1893
- ], Canvas.prototype, "font", undefined);
1893
+ ], Canvas.prototype, "font", void 0);
1894
1894
  __decorate([
1895
1895
  contextAttr()
1896
- ], Canvas.prototype, "fontKerning", undefined);
1896
+ ], Canvas.prototype, "fontKerning", void 0);
1897
1897
  __decorate([
1898
1898
  contextAttr()
1899
- ], Canvas.prototype, "fontStretch", undefined);
1899
+ ], Canvas.prototype, "fontStretch", void 0);
1900
1900
  __decorate([
1901
1901
  contextAttr()
1902
- ], Canvas.prototype, "fontVariantCaps", undefined);
1902
+ ], Canvas.prototype, "fontVariantCaps", void 0);
1903
1903
  __decorate([
1904
1904
  contextAttr()
1905
- ], Canvas.prototype, "textAlign", undefined);
1905
+ ], Canvas.prototype, "textAlign", void 0);
1906
1906
  __decorate([
1907
1907
  contextAttr()
1908
- ], Canvas.prototype, "textBaseline", undefined);
1908
+ ], Canvas.prototype, "textBaseline", void 0);
1909
1909
  __decorate([
1910
1910
  contextAttr()
1911
- ], Canvas.prototype, "textRendering", undefined);
1911
+ ], Canvas.prototype, "textRendering", void 0);
1912
1912
  __decorate([
1913
1913
  contextAttr()
1914
- ], Canvas.prototype, "wordSpacing", undefined);
1914
+ ], Canvas.prototype, "wordSpacing", void 0);
1915
1915
  __decorate([
1916
1916
  contextAttr()
1917
- ], Canvas.prototype, "letterSpacing", undefined);
1917
+ ], Canvas.prototype, "letterSpacing", void 0);
1918
1918
  __decorate([
1919
1919
  contextAttr()
1920
- ], Canvas.prototype, "direction", undefined);
1920
+ ], Canvas.prototype, "direction", void 0);
1921
1921
  __decorate([
1922
1922
  contextMethod()
1923
1923
  ], Canvas.prototype, "setTransform", null);
@@ -2614,7 +2614,7 @@ const EllipseHelper = {
2614
2614
  const { M: M$4, m, L: L$5, l, H, h, V, v, C: C$4, c, S, s, Q: Q$3, q, T, t, A, a, Z: Z$4, z, N: N$3, D: D$3, X: X$3, G: G$3, F: F$4, O: O$3, P: P$3, U: U$3 } = PathCommandMap;
2615
2615
  const { rect: rect$1, roundRect: roundRect$2, arcTo: arcTo$3, arc: arc$3, ellipse: ellipse$3, quadraticCurveTo: quadraticCurveTo$1 } = BezierHelper;
2616
2616
  const { ellipticalArc } = EllipseHelper;
2617
- const debug$6 = Debug.get('PathConvert');
2617
+ const debug$7 = Debug.get('PathConvert');
2618
2618
  const setEndPoint$1 = {};
2619
2619
  const PathConvert = {
2620
2620
  current: { dot: 0 },
@@ -2855,7 +2855,7 @@ const PathConvert = {
2855
2855
  i += 6;
2856
2856
  break;
2857
2857
  default:
2858
- debug$6.error(`command: ${command} [index:${i}]`, old);
2858
+ debug$7.error(`command: ${command} [index:${i}]`, old);
2859
2859
  return data;
2860
2860
  }
2861
2861
  lastCommand = command;
@@ -2964,12 +2964,10 @@ const PathCommandDataHelper = {
2964
2964
  },
2965
2965
  arcTo(data, x1, y1, x2, y2, radius, lastX, lastY) {
2966
2966
  if (lastX !== undefined) {
2967
- const maxRadius = tan(getRadianFrom(lastX, lastY, x1, y1, x2, y2) / 2) * (getMinDistanceFrom(lastX, lastY, x1, y1, x2, y2) / 2);
2968
- data.push(U$2, x1, y1, x2, y2, min(radius, abs(maxRadius)));
2969
- }
2970
- else {
2971
- data.push(U$2, x1, y1, x2, y2, radius);
2967
+ const d = getMinDistanceFrom(lastX, lastY, x1, y1, x2, y2);
2968
+ radius = min(radius, min(d / 2, d / 2 * abs(tan(getRadianFrom(lastX, lastY, x1, y1, x2, y2) / 2))));
2972
2969
  }
2970
+ data.push(U$2, x1, y1, x2, y2, radius);
2973
2971
  },
2974
2972
  drawEllipse(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
2975
2973
  BezierHelper.ellipse(null, x, y, radiusX, radiusY, rotation === undefined ? 0 : rotation, startAngle === undefined ? 0 : startAngle, endAngle === undefined ? 360 : endAngle, anticlockwise, null, null, startPoint);
@@ -3080,7 +3078,7 @@ class PathCreator {
3080
3078
  }
3081
3079
 
3082
3080
  const { M: M$2, L: L$3, C: C$2, Q: Q$1, Z: Z$2, N: N$1, D: D$1, X: X$1, G: G$1, F: F$2, O: O$1, P: P$1, U: U$1 } = PathCommandMap;
3083
- const debug$5 = Debug.get('PathDrawer');
3081
+ const debug$6 = Debug.get('PathDrawer');
3084
3082
  const PathDrawer = {
3085
3083
  drawPathByData(drawer, data) {
3086
3084
  if (!data)
@@ -3143,7 +3141,7 @@ const PathDrawer = {
3143
3141
  i += 6;
3144
3142
  break;
3145
3143
  default:
3146
- debug$5.error(`command: ${command} [index:${i}]`, data);
3144
+ debug$6.error(`command: ${command} [index:${i}]`, data);
3147
3145
  return;
3148
3146
  }
3149
3147
  }
@@ -3153,7 +3151,7 @@ const PathDrawer = {
3153
3151
  const { M: M$1, L: L$2, C: C$1, Q, Z: Z$1, N, D, X, G, F: F$1, O, P, U } = PathCommandMap;
3154
3152
  const { toTwoPointBounds, toTwoPointBoundsByQuadraticCurve, arcTo: arcTo$1, arc, ellipse } = BezierHelper;
3155
3153
  const { addPointBounds, copy: copy$4, addPoint, setPoint, addBounds, toBounds: toBounds$1 } = TwoPointBoundsHelper;
3156
- const debug$4 = Debug.get('PathBounds');
3154
+ const debug$5 = Debug.get('PathBounds');
3157
3155
  let radius, radiusX, radiusY;
3158
3156
  const tempPointBounds = {};
3159
3157
  const setPointBounds = {};
@@ -3261,7 +3259,7 @@ const PathBounds = {
3261
3259
  i += 6;
3262
3260
  break;
3263
3261
  default:
3264
- debug$4.error(`command: ${command} [index:${i}]`, data);
3262
+ debug$5.error(`command: ${command} [index:${i}]`, data);
3265
3263
  return;
3266
3264
  }
3267
3265
  }
@@ -3377,7 +3375,7 @@ const FileHelper = {
3377
3375
  const F = FileHelper;
3378
3376
  F.opacityTypes.forEach(type => F.upperCaseTypeMap[type] = type.toUpperCase());
3379
3377
 
3380
- const debug$3 = Debug.get('TaskProcessor');
3378
+ const debug$4 = Debug.get('TaskProcessor');
3381
3379
  class TaskItem {
3382
3380
  constructor(task) {
3383
3381
  this.parallel = true;
@@ -3386,13 +3384,13 @@ class TaskItem {
3386
3384
  this.task = task;
3387
3385
  }
3388
3386
  run() {
3389
- return __awaiter(this, undefined, undefined, function* () {
3387
+ return __awaiter(this, void 0, void 0, function* () {
3390
3388
  try {
3391
3389
  if (this.task && !this.isComplete && this.parent.running)
3392
3390
  yield this.task();
3393
3391
  }
3394
3392
  catch (error) {
3395
- debug$3.error(error);
3393
+ debug$4.error(error);
3396
3394
  }
3397
3395
  });
3398
3396
  }
@@ -3625,18 +3623,58 @@ class TaskProcessor {
3625
3623
  }
3626
3624
  }
3627
3625
 
3628
- const ImageManager = {
3626
+ const debug$3 = Debug.get('Resource');
3627
+ const Resource = {
3628
+ tasker: new TaskProcessor(),
3629
3629
  map: {},
3630
+ get isComplete() { return R.tasker.isComplete; },
3631
+ set(key, value) {
3632
+ if (R.map[key])
3633
+ debug$3.repeat(key);
3634
+ R.map[key] = value;
3635
+ },
3636
+ get(key) {
3637
+ return R.map[key];
3638
+ },
3639
+ remove(key) {
3640
+ const r = R.map[key];
3641
+ if (r) {
3642
+ if (r.destroy)
3643
+ r.destroy();
3644
+ delete R.map[key];
3645
+ }
3646
+ },
3647
+ loadImage(key, format) {
3648
+ return new Promise((resolve, reject) => {
3649
+ const image = this.setImage(key, key, format);
3650
+ image.load(() => resolve(image), (e) => reject(e));
3651
+ });
3652
+ },
3653
+ setImage(key, value, format) {
3654
+ let config;
3655
+ if (typeof value === 'string')
3656
+ config = { url: value };
3657
+ else if (!value.url)
3658
+ config = { url: key, view: value };
3659
+ if (config)
3660
+ format && (config.format = format), value = Creator.image(config);
3661
+ R.set(key, value);
3662
+ return value;
3663
+ },
3664
+ destroy() {
3665
+ R.map = {};
3666
+ }
3667
+ };
3668
+ const R = Resource;
3669
+
3670
+ const ImageManager = {
3671
+ maxRecycled: 100,
3630
3672
  recycledList: [],
3631
- tasker: new TaskProcessor(),
3632
3673
  patternTasker: new TaskProcessor(),
3633
- get isComplete() { return I.tasker.isComplete; },
3634
3674
  get(config) {
3635
- let image = I.map[config.url];
3636
- if (!image) {
3637
- image = Creator.image(config);
3638
- I.map[config.url] = image;
3639
- }
3675
+ let image = Resource.get(config.url);
3676
+ if (!image)
3677
+ Resource.set(config.url, image = Creator.image(config));
3640
3678
  image.use++;
3641
3679
  return image;
3642
3680
  },
@@ -3647,13 +3685,8 @@ const ImageManager = {
3647
3685
  },
3648
3686
  clearRecycled() {
3649
3687
  const list = I.recycledList;
3650
- if (list.length > 100) {
3651
- list.forEach(image => {
3652
- if (!image.use && image.url) {
3653
- delete I.map[image.url];
3654
- image.destroy();
3655
- }
3656
- });
3688
+ if (list.length > I.maxRecycled) {
3689
+ list.forEach(image => (!image.use && image.url) && Resource.remove(image.url));
3657
3690
  list.length = 0;
3658
3691
  }
3659
3692
  },
@@ -3677,7 +3710,6 @@ const ImageManager = {
3677
3710
  return false;
3678
3711
  },
3679
3712
  destroy() {
3680
- I.map = {};
3681
3713
  I.recycledList = [];
3682
3714
  }
3683
3715
  };
@@ -3691,21 +3723,19 @@ class LeaferImage {
3691
3723
  this.use = 0;
3692
3724
  this.waitComplete = [];
3693
3725
  this.innerId = create$1(IMAGE);
3694
- this.config = config || { url: '' };
3695
- this.isSVG = ImageManager.isFormat('svg', config);
3696
- this.hasOpacityPixel = ImageManager.hasOpacityPixel(config);
3726
+ this.config = config || (config = { url: '' });
3727
+ if (config.view) {
3728
+ const { view } = config;
3729
+ this.setView(view.config ? view.view : view);
3730
+ }
3731
+ ImageManager.isFormat('svg', config) && (this.isSVG = true);
3732
+ ImageManager.hasOpacityPixel(config) && (this.hasOpacityPixel = true);
3697
3733
  }
3698
3734
  load(onSuccess, onError) {
3699
3735
  if (!this.loading) {
3700
3736
  this.loading = true;
3701
- ImageManager.tasker.add(() => __awaiter(this, undefined, undefined, function* () {
3702
- return yield Platform.origin.loadImage(this.url).then((img) => {
3703
- this.ready = true;
3704
- this.width = img.naturalWidth || img.width;
3705
- this.height = img.naturalHeight || img.height;
3706
- this.view = img;
3707
- this.onComplete(true);
3708
- }).catch((e) => {
3737
+ Resource.tasker.add(() => __awaiter(this, void 0, void 0, function* () {
3738
+ return yield Platform.origin.loadImage(this.url).then(img => this.setView(img)).catch((e) => {
3709
3739
  this.error = e;
3710
3740
  this.onComplete(false);
3711
3741
  });
@@ -3723,6 +3753,13 @@ class LeaferImage {
3723
3753
  }
3724
3754
  l[index] = l[index + 1] = undefined;
3725
3755
  }
3756
+ setView(img) {
3757
+ this.ready = true;
3758
+ this.width = img.naturalWidth || img.width;
3759
+ this.height = img.naturalHeight || img.height;
3760
+ this.view = img;
3761
+ this.onComplete(true);
3762
+ }
3726
3763
  onComplete(isSuccess) {
3727
3764
  let odd;
3728
3765
  this.waitComplete.forEach((item, index) => {
@@ -3741,6 +3778,9 @@ class LeaferImage {
3741
3778
  this.waitComplete.length = 0;
3742
3779
  this.loading = false;
3743
3780
  }
3781
+ getFull(_filters) {
3782
+ return this.view;
3783
+ }
3744
3784
  getCanvas(width, height, opacity, _filters) {
3745
3785
  width || (width = this.width);
3746
3786
  height || (height = this.height);
@@ -5221,7 +5261,7 @@ const LeafRender = {
5221
5261
  if (this.__.eraser === 'path')
5222
5262
  return this.__renderEraser(canvas, options);
5223
5263
  const tempCanvas = canvas.getSameCanvas(true, true);
5224
- this.__draw(tempCanvas, options);
5264
+ this.__draw(tempCanvas, options, canvas);
5225
5265
  if (this.__worldFlipped) {
5226
5266
  canvas.copyWorldByReset(tempCanvas, this.__nowWorld, null, this.__.__blendMode, true);
5227
5267
  }
@@ -6014,7 +6054,7 @@ class LeafLevelList {
6014
6054
  }
6015
6055
  }
6016
6056
 
6017
- const version = "1.4.0";
6057
+ const version = "1.4.2";
6018
6058
 
6019
6059
  exports.AlignHelper = AlignHelper;
6020
6060
  exports.AroundHelper = AroundHelper;
@@ -6077,6 +6117,7 @@ exports.PropertyEvent = PropertyEvent;
6077
6117
  exports.RectHelper = RectHelper;
6078
6118
  exports.RenderEvent = RenderEvent;
6079
6119
  exports.ResizeEvent = ResizeEvent;
6120
+ exports.Resource = Resource;
6080
6121
  exports.Run = Run;
6081
6122
  exports.StringNumberMap = StringNumberMap;
6082
6123
  exports.TaskItem = TaskItem;