leafer-game 2.2.8 → 2.2.9

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.
@@ -2992,7 +2992,7 @@ const PathCommandNodeHelper = {
2992
2992
  toCommand(_nodes) {
2993
2993
  return [];
2994
2994
  },
2995
- toNode(_data) {
2995
+ toNode(_data, _filterSamePoint) {
2996
2996
  return [];
2997
2997
  }
2998
2998
  };
@@ -7046,7 +7046,7 @@ class LeafLevelList {
7046
7046
  }
7047
7047
  }
7048
7048
 
7049
- const version = "2.2.8";
7049
+ const version = "2.2.9";
7050
7050
 
7051
7051
  const debug$5 = Debug.get("LeaferCanvas");
7052
7052
 
@@ -15416,6 +15416,7 @@ const HighCurveHelper = {
15416
15416
  motionDistance = UnitConvert.number(motionDistance, total);
15417
15417
  if (offsetX) motionDistance += offsetX;
15418
15418
  if (motionDistance > total) motionDistance = motionDistance % total;
15419
+ if (motionDistance < 0) motionDistance = total + motionDistance;
15419
15420
  let nowDistance = 0, distance, to = {};
15420
15421
  let i = 0, index = 0, x = 0, y = 0, startX = 0, startY = 0, toX, toY, command;
15421
15422
  let x1, y1, x2, y2, t;
@@ -15624,11 +15625,7 @@ ui$1.getMotionPathData = function() {
15624
15625
  return getMotionPathData(getMotionPath(this));
15625
15626
  };
15626
15627
 
15627
- ui$1.getMotionContentHeight = function() {
15628
- return this.__layout.boxBounds.height;
15629
- };
15630
-
15631
- ui$1.getMotionPoint = function(motionDistance, motionAround, motionVertical, offsetX = 0, offsetY = 0, pathElement) {
15628
+ ui$1.getMotionPoint = function(motionDistance, motionAround, offsetX = 0, offsetY = 0, pathElement) {
15632
15629
  if (!pathElement) pathElement = getMotionPath(this);
15633
15630
  const data = getMotionPathData(pathElement);
15634
15631
  if (!data.total) return {};
@@ -15641,25 +15638,7 @@ ui$1.getMotionPoint = function(motionDistance, motionAround, motionVertical, off
15641
15638
  if (point.rotation) PointHelper.rotate(tempPoint, point.rotation, point);
15642
15639
  PointHelper.copy(point, tempPoint);
15643
15640
  }
15644
- let verticalType, verticalOffset;
15645
- if (isObject(motionVertical)) verticalType = motionVertical.type, verticalOffset = motionVertical.offset; else if (isNumber(motionVertical)) verticalOffset = motionVertical; else verticalType = motionVertical;
15646
- if (verticalType !== "below" || offsetY) {
15647
- const {rotation: rotation} = point, height = this.getMotionContentHeight();
15648
- if (verticalOffset) offsetY += verticalType === "above" ? -verticalOffset : verticalOffset;
15649
- switch (verticalType) {
15650
- case "above":
15651
- toVertical(point, rotation, -height + offsetY);
15652
- break;
15653
-
15654
- case "center":
15655
- toVertical(point, rotation, -height / 2 + offsetY);
15656
- break;
15657
-
15658
- case "below":
15659
- default:
15660
- toVertical(point, rotation, offsetY);
15661
- }
15662
- }
15641
+ if (offsetY) toVertical(point, point.rotation, offsetY);
15663
15642
  MatrixHelper.toOuterPoint(pathElement.localTransform, point);
15664
15643
  return point;
15665
15644
  };