leafer-game 2.0.4 → 2.0.6
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 +8 -6
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +8 -6
- 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.js
CHANGED
|
@@ -6637,7 +6637,7 @@ var LeaferUI = function(exports) {
|
|
|
6637
6637
|
this.levelMap = null;
|
|
6638
6638
|
}
|
|
6639
6639
|
}
|
|
6640
|
-
const version = "2.0.
|
|
6640
|
+
const version = "2.0.6";
|
|
6641
6641
|
const debug$5 = Debug.get("LeaferCanvas");
|
|
6642
6642
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6643
6643
|
set zIndex(zIndex) {
|
|
@@ -6921,7 +6921,6 @@ var LeaferUI = function(exports) {
|
|
|
6921
6921
|
});
|
|
6922
6922
|
const {userAgent: userAgent} = navigator;
|
|
6923
6923
|
if (userAgent.indexOf("Firefox") > -1) {
|
|
6924
|
-
Platform.conicGradientRotate90 = true;
|
|
6925
6924
|
Platform.intWheelDeltaY = true;
|
|
6926
6925
|
Platform.syncDomFont = true;
|
|
6927
6926
|
} else if (/iPhone|iPad|iPod/.test(navigator.userAgent) || /Macintosh/.test(navigator.userAgent) && /Version\/[\d.]+.*Safari/.test(navigator.userAgent)) {
|
|
@@ -8240,6 +8239,7 @@ var LeaferUI = function(exports) {
|
|
|
8240
8239
|
createProxyData() {
|
|
8241
8240
|
return undefined;
|
|
8242
8241
|
}
|
|
8242
|
+
clearProxyData() {}
|
|
8243
8243
|
find(_condition, _options) {
|
|
8244
8244
|
return Plugin.need("find");
|
|
8245
8245
|
}
|
|
@@ -11487,17 +11487,19 @@ var LeaferUI = function(exports) {
|
|
|
11487
11487
|
return leafPaint;
|
|
11488
11488
|
}
|
|
11489
11489
|
function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds) {
|
|
11490
|
+
let needUpdate = true;
|
|
11490
11491
|
const data = ui.__;
|
|
11491
11492
|
if (attrName === "fill" && !data.__naturalWidth) {
|
|
11492
11493
|
data.__naturalWidth = image.width / data.pixelRatio;
|
|
11493
11494
|
data.__naturalHeight = image.height / data.pixelRatio;
|
|
11494
11495
|
if (data.__autoSide) {
|
|
11495
11496
|
ui.forceUpdate("width");
|
|
11497
|
+
LeafHelper.updateBounds(ui);
|
|
11496
11498
|
if (ui.__proxyData) {
|
|
11497
11499
|
ui.setProxyAttr("width", data.width);
|
|
11498
11500
|
ui.setProxyAttr("height", data.height);
|
|
11499
11501
|
}
|
|
11500
|
-
|
|
11502
|
+
needUpdate = false;
|
|
11501
11503
|
}
|
|
11502
11504
|
}
|
|
11503
11505
|
if (!leafPaint.data) {
|
|
@@ -11507,7 +11509,7 @@ var LeaferUI = function(exports) {
|
|
|
11507
11509
|
if (clip || opacity && opacity < 1 || blendMode) leafPaint.complex = clip ? 2 : true;
|
|
11508
11510
|
}
|
|
11509
11511
|
if (paint.filter) PaintImage.applyFilter(leafPaint, image, paint.filter, ui);
|
|
11510
|
-
return
|
|
11512
|
+
return needUpdate;
|
|
11511
11513
|
}
|
|
11512
11514
|
function onLoad(ui, event) {
|
|
11513
11515
|
emit(ui, ImageEvent.LOAD, event);
|
|
@@ -11910,10 +11912,10 @@ var LeaferUI = function(exports) {
|
|
|
11910
11912
|
const realFrom = {};
|
|
11911
11913
|
const realTo = {};
|
|
11912
11914
|
function conicGradient(paint, box) {
|
|
11913
|
-
let {from: from, to: to, type: type, opacity: opacity, stretch: stretch} = paint;
|
|
11915
|
+
let {from: from, to: to, type: type, opacity: opacity, rotation: rotation, stretch: stretch} = paint;
|
|
11914
11916
|
toPoint(from || "center", box, realFrom);
|
|
11915
11917
|
toPoint(to || "bottom", box, realTo);
|
|
11916
|
-
const style = Platform.conicGradientSupport ? Platform.canvas.createConicGradient(0, realFrom.x, realFrom.y) : Platform.canvas.createRadialGradient(realFrom.x, realFrom.y, 0, realFrom.x, realFrom.y, getDistance$1(realFrom, realTo));
|
|
11918
|
+
const style = Platform.conicGradientSupport ? Platform.canvas.createConicGradient(rotation ? rotation * OneRadian : 0, realFrom.x, realFrom.y) : Platform.canvas.createRadialGradient(realFrom.x, realFrom.y, 0, realFrom.x, realFrom.y, getDistance$1(realFrom, realTo));
|
|
11917
11919
|
const data = {
|
|
11918
11920
|
type: type,
|
|
11919
11921
|
style: style
|