leafer-game 2.1.10 → 2.1.11

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/dist/web.js CHANGED
@@ -1223,7 +1223,6 @@ var LeaferUI = function(exports) {
1223
1223
  },
1224
1224
  copyAndSpread(t, bounds, spread, isShrink, side) {
1225
1225
  const {x: x, y: y, width: width, height: height} = bounds;
1226
- if (!spread) spread = 0;
1227
1226
  if (isArray(spread)) {
1228
1227
  const four = fourNumber$1(spread);
1229
1228
  isShrink ? B.set(t, x + four[3], y + four[0], width - four[1] - four[3], height - four[2] - four[0]) : B.set(t, x - four[3], y - four[0], width + four[1] + four[3], height + four[2] + four[0]);
@@ -3367,7 +3366,8 @@ var LeaferUI = function(exports) {
3367
3366
  return;
3368
3367
  }
3369
3368
  }
3370
- }
3369
+ },
3370
+ drawPathByPoints(_drawer, _points, _closed) {}
3371
3371
  };
3372
3372
  const {M: M$2, L: L$3, C: C$1, Q: Q, Z: Z$2, N: N, D: D$1, X: X, G: G, F: F$1, O: O, P: P, U: U} = PathCommandMap;
3373
3373
  const {toTwoPointBounds: toTwoPointBounds, toTwoPointBoundsByQuadraticCurve: toTwoPointBoundsByQuadraticCurve, arcTo: arcTo$1, arc: arc, ellipse: ellipse$1} = BezierHelper;
@@ -6569,7 +6569,7 @@ var LeaferUI = function(exports) {
6569
6569
  this.levelMap = null;
6570
6570
  }
6571
6571
  }
6572
- const version = "2.1.10";
6572
+ const version = "2.1.11";
6573
6573
  const debug$5 = Debug.get("LeaferCanvas");
6574
6574
  class LeaferCanvas extends LeaferCanvasBase {
6575
6575
  set zIndex(zIndex) {
@@ -8226,8 +8226,9 @@ var LeaferUI = function(exports) {
8226
8226
  this.__drawPathByData(canvas, data.__pathForRender);
8227
8227
  }
8228
8228
  __drawPath(canvas) {
8229
+ const data = this.__;
8229
8230
  canvas.beginPath();
8230
- this.__drawPathByData(canvas, this.__.path, true);
8231
+ data.__usePointsMode ? PathDrawer.drawPathByPoints(canvas, data.points, data.closed) : this.__drawPathByData(canvas, data.path, true);
8231
8232
  }
8232
8233
  __drawPathByData(drawer, data, ignoreCornerRadius) {
8233
8234
  data ? PathDrawer.drawPathByData(drawer, data) : this.__drawPathByBox(drawer, ignoreCornerRadius);
@@ -8963,6 +8964,9 @@ var LeaferUI = function(exports) {
8963
8964
  get __tag() {
8964
8965
  return "Polygon";
8965
8966
  }
8967
+ get isPointsMode() {
8968
+ return this.points && !this.pathInputed;
8969
+ }
8966
8970
  __updatePath() {
8967
8971
  const data = this.__;
8968
8972
  const path = data.path = [];
@@ -9023,6 +9027,9 @@ var LeaferUI = function(exports) {
9023
9027
  get __tag() {
9024
9028
  return "Line";
9025
9029
  }
9030
+ get isPointsMode() {
9031
+ return this.points && !this.pathInputed;
9032
+ }
9026
9033
  get toPoint() {
9027
9034
  const {width: width, rotation: rotation} = this.__;
9028
9035
  const to = getPointData();
@@ -11015,8 +11022,7 @@ var LeaferUI = function(exports) {
11015
11022
  destroy() {
11016
11023
  if (this.view) {
11017
11024
  super.destroy();
11018
- this.view = null;
11019
- this.touches = null;
11025
+ this.view = this.touches = null;
11020
11026
  }
11021
11027
  }
11022
11028
  }