leafer-game 2.2.7 → 2.2.8
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 +20 -7
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +20 -7
- package/dist/web.module.min.js +1 -1
- package/dist/web.module.min.js.map +1 -1
- package/package.json +12 -12
package/dist/web.module.js
CHANGED
|
@@ -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.8";
|
|
7047
7050
|
|
|
7048
7051
|
const debug$5 = Debug.get("LeaferCanvas");
|
|
7049
7052
|
|
|
@@ -8140,7 +8143,17 @@ Platform.render = function(target, canvas, options) {
|
|
|
8140
8143
|
});
|
|
8141
8144
|
options.topList = new LeafList;
|
|
8142
8145
|
target.__render(canvas, options);
|
|
8143
|
-
if (options.topList.length) options.topList.forEach(item =>
|
|
8146
|
+
if (options.topList.length) options.topList.forEach(item => {
|
|
8147
|
+
const {parent: parent} = item;
|
|
8148
|
+
if (parent && parent.isBranchLeaf && parent.overflow !== "show") {
|
|
8149
|
+
canvas.save();
|
|
8150
|
+
LeafHelper.clip(parent, canvas, topOptions);
|
|
8151
|
+
item.__render(canvas, topOptions);
|
|
8152
|
+
canvas.restore();
|
|
8153
|
+
} else {
|
|
8154
|
+
item.__render(canvas, topOptions);
|
|
8155
|
+
}
|
|
8156
|
+
});
|
|
8144
8157
|
};
|
|
8145
8158
|
|
|
8146
8159
|
function effectType(defaultValue) {
|