leafer-game 2.1.9 → 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
@@ -3366,7 +3366,8 @@ var LeaferUI = function(exports) {
3366
3366
  return;
3367
3367
  }
3368
3368
  }
3369
- }
3369
+ },
3370
+ drawPathByPoints(_drawer, _points, _closed) {}
3370
3371
  };
3371
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;
3372
3373
  const {toTwoPointBounds: toTwoPointBounds, toTwoPointBoundsByQuadraticCurve: toTwoPointBoundsByQuadraticCurve, arcTo: arcTo$1, arc: arc, ellipse: ellipse$1} = BezierHelper;
@@ -6568,7 +6569,7 @@ var LeaferUI = function(exports) {
6568
6569
  this.levelMap = null;
6569
6570
  }
6570
6571
  }
6571
- const version = "2.1.9";
6572
+ const version = "2.1.11";
6572
6573
  const debug$5 = Debug.get("LeaferCanvas");
6573
6574
  class LeaferCanvas extends LeaferCanvasBase {
6574
6575
  set zIndex(zIndex) {
@@ -8225,8 +8226,9 @@ var LeaferUI = function(exports) {
8225
8226
  this.__drawPathByData(canvas, data.__pathForRender);
8226
8227
  }
8227
8228
  __drawPath(canvas) {
8229
+ const data = this.__;
8228
8230
  canvas.beginPath();
8229
- this.__drawPathByData(canvas, this.__.path, true);
8231
+ data.__usePointsMode ? PathDrawer.drawPathByPoints(canvas, data.points, data.closed) : this.__drawPathByData(canvas, data.path, true);
8230
8232
  }
8231
8233
  __drawPathByData(drawer, data, ignoreCornerRadius) {
8232
8234
  data ? PathDrawer.drawPathByData(drawer, data) : this.__drawPathByBox(drawer, ignoreCornerRadius);
@@ -8962,6 +8964,9 @@ var LeaferUI = function(exports) {
8962
8964
  get __tag() {
8963
8965
  return "Polygon";
8964
8966
  }
8967
+ get isPointsMode() {
8968
+ return this.points && !this.pathInputed;
8969
+ }
8965
8970
  __updatePath() {
8966
8971
  const data = this.__;
8967
8972
  const path = data.path = [];
@@ -9022,6 +9027,9 @@ var LeaferUI = function(exports) {
9022
9027
  get __tag() {
9023
9028
  return "Line";
9024
9029
  }
9030
+ get isPointsMode() {
9031
+ return this.points && !this.pathInputed;
9032
+ }
9025
9033
  get toPoint() {
9026
9034
  const {width: width, rotation: rotation} = this.__;
9027
9035
  const to = getPointData();
@@ -11014,8 +11022,7 @@ var LeaferUI = function(exports) {
11014
11022
  destroy() {
11015
11023
  if (this.view) {
11016
11024
  super.destroy();
11017
- this.view = null;
11018
- this.touches = null;
11025
+ this.view = this.touches = null;
11019
11026
  }
11020
11027
  }
11021
11028
  }