@leafer-game/miniapp 2.2.7 → 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.
- package/dist/miniapp.module.js +24 -32
- package/dist/miniapp.module.min.js +1 -1
- package/dist/miniapp.module.min.js.map +1 -1
- package/package.json +12 -12
package/dist/miniapp.module.js
CHANGED
|
@@ -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
|
};
|
|
@@ -4883,6 +4883,13 @@ const LeafHelper = {
|
|
|
4883
4883
|
if (!fromWorld) fromWorld = leaf.__nowWorld;
|
|
4884
4884
|
if (leaf.__worldFlipped || Platform.fullImageShadow) currentCanvas.copyWorldByReset(fromCanvas, fromWorld, leaf.__nowWorld, blendMode, onlyResetTransform); else currentCanvas.copyWorldToInner(fromCanvas, fromWorld, leaf.__layout.renderBounds, blendMode);
|
|
4885
4885
|
},
|
|
4886
|
+
clip(leaf, canvas, options) {
|
|
4887
|
+
if (leaf.__worldOpacity) {
|
|
4888
|
+
canvas.setWorld(leaf.__nowWorld = leaf.__getNowWorld(options));
|
|
4889
|
+
leaf.__drawRenderPath(canvas);
|
|
4890
|
+
canvas.clipUI(leaf);
|
|
4891
|
+
}
|
|
4892
|
+
},
|
|
4886
4893
|
renderComplex(_leaf, _canvas, _options) {},
|
|
4887
4894
|
updateComplex(_leaf) {},
|
|
4888
4895
|
checkComplex(_leaf) {},
|
|
@@ -6258,11 +6265,7 @@ const LeafRender = {
|
|
|
6258
6265
|
}
|
|
6259
6266
|
},
|
|
6260
6267
|
__clip(canvas, options) {
|
|
6261
|
-
|
|
6262
|
-
canvas.setWorld(this.__nowWorld = this.__getNowWorld(options));
|
|
6263
|
-
this.__drawRenderPath(canvas);
|
|
6264
|
-
canvas.clipUI(this);
|
|
6265
|
-
}
|
|
6268
|
+
LeafHelper.clip(this, canvas, options);
|
|
6266
6269
|
},
|
|
6267
6270
|
__updateWorldOpacity() {
|
|
6268
6271
|
this.__worldOpacity = this.__.visible ? this.parent ? this.parent.__worldOpacity * this.__.opacity : this.__.opacity : 0;
|
|
@@ -7043,7 +7046,7 @@ class LeafLevelList {
|
|
|
7043
7046
|
}
|
|
7044
7047
|
}
|
|
7045
7048
|
|
|
7046
|
-
const version = "2.2.
|
|
7049
|
+
const version = "2.2.9";
|
|
7047
7050
|
|
|
7048
7051
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
7049
7052
|
get allowBackgroundColor() {
|
|
@@ -8105,7 +8108,17 @@ Platform.render = function(target, canvas, options) {
|
|
|
8105
8108
|
});
|
|
8106
8109
|
options.topList = new LeafList;
|
|
8107
8110
|
target.__render(canvas, options);
|
|
8108
|
-
if (options.topList.length) options.topList.forEach(item =>
|
|
8111
|
+
if (options.topList.length) options.topList.forEach(item => {
|
|
8112
|
+
const {parent: parent} = item;
|
|
8113
|
+
if (parent && parent.isBranchLeaf && parent.overflow !== "show") {
|
|
8114
|
+
canvas.save();
|
|
8115
|
+
LeafHelper.clip(parent, canvas, topOptions);
|
|
8116
|
+
item.__render(canvas, topOptions);
|
|
8117
|
+
canvas.restore();
|
|
8118
|
+
} else {
|
|
8119
|
+
item.__render(canvas, topOptions);
|
|
8120
|
+
}
|
|
8121
|
+
});
|
|
8109
8122
|
};
|
|
8110
8123
|
|
|
8111
8124
|
function effectType(defaultValue) {
|
|
@@ -15154,6 +15167,7 @@ const HighCurveHelper = {
|
|
|
15154
15167
|
motionDistance = UnitConvert.number(motionDistance, total);
|
|
15155
15168
|
if (offsetX) motionDistance += offsetX;
|
|
15156
15169
|
if (motionDistance > total) motionDistance = motionDistance % total;
|
|
15170
|
+
if (motionDistance < 0) motionDistance = total + motionDistance;
|
|
15157
15171
|
let nowDistance = 0, distance, to = {};
|
|
15158
15172
|
let i = 0, index = 0, x = 0, y = 0, startX = 0, startY = 0, toX, toY, command;
|
|
15159
15173
|
let x1, y1, x2, y2, t;
|
|
@@ -15362,11 +15376,7 @@ ui$1.getMotionPathData = function() {
|
|
|
15362
15376
|
return getMotionPathData(getMotionPath(this));
|
|
15363
15377
|
};
|
|
15364
15378
|
|
|
15365
|
-
ui$1.
|
|
15366
|
-
return this.__layout.boxBounds.height;
|
|
15367
|
-
};
|
|
15368
|
-
|
|
15369
|
-
ui$1.getMotionPoint = function(motionDistance, motionAround, motionVertical, offsetX = 0, offsetY = 0, pathElement) {
|
|
15379
|
+
ui$1.getMotionPoint = function(motionDistance, motionAround, offsetX = 0, offsetY = 0, pathElement) {
|
|
15370
15380
|
if (!pathElement) pathElement = getMotionPath(this);
|
|
15371
15381
|
const data = getMotionPathData(pathElement);
|
|
15372
15382
|
if (!data.total) return {};
|
|
@@ -15379,25 +15389,7 @@ ui$1.getMotionPoint = function(motionDistance, motionAround, motionVertical, off
|
|
|
15379
15389
|
if (point.rotation) PointHelper.rotate(tempPoint, point.rotation, point);
|
|
15380
15390
|
PointHelper.copy(point, tempPoint);
|
|
15381
15391
|
}
|
|
15382
|
-
|
|
15383
|
-
if (isObject(motionVertical)) verticalType = motionVertical.type, verticalOffset = motionVertical.offset; else if (isNumber(motionVertical)) verticalOffset = motionVertical; else verticalType = motionVertical;
|
|
15384
|
-
if (verticalType !== "below" || offsetY) {
|
|
15385
|
-
const {rotation: rotation} = point, height = this.getMotionContentHeight();
|
|
15386
|
-
if (verticalOffset) offsetY += verticalType === "above" ? -verticalOffset : verticalOffset;
|
|
15387
|
-
switch (verticalType) {
|
|
15388
|
-
case "above":
|
|
15389
|
-
toVertical(point, rotation, -height + offsetY);
|
|
15390
|
-
break;
|
|
15391
|
-
|
|
15392
|
-
case "center":
|
|
15393
|
-
toVertical(point, rotation, -height / 2 + offsetY);
|
|
15394
|
-
break;
|
|
15395
|
-
|
|
15396
|
-
case "below":
|
|
15397
|
-
default:
|
|
15398
|
-
toVertical(point, rotation, offsetY);
|
|
15399
|
-
}
|
|
15400
|
-
}
|
|
15392
|
+
if (offsetY) toVertical(point, point.rotation, offsetY);
|
|
15401
15393
|
MatrixHelper.toOuterPoint(pathElement.localTransform, point);
|
|
15402
15394
|
return point;
|
|
15403
15395
|
};
|