@leafer-game/worker 2.1.3 → 2.1.4
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/worker.js +29 -28
- package/dist/worker.min.js +1 -1
- package/dist/worker.min.js.map +1 -1
- package/dist/worker.module.js +29 -28
- package/dist/worker.module.min.js +1 -1
- package/dist/worker.module.min.js.map +1 -1
- package/package.json +12 -12
package/dist/worker.js
CHANGED
|
@@ -2850,7 +2850,8 @@ var LeaferUI = function(exports) {
|
|
|
2850
2850
|
current.length = PathCommandLengthMap[char];
|
|
2851
2851
|
current.index = 0;
|
|
2852
2852
|
pushData(data, current.name);
|
|
2853
|
-
if (char === "m") current.name = PathCommandMap["l"]; else if (char === "M") current.name = PathCommandMap["L"];
|
|
2853
|
+
if (char === "m") current.name = PathCommandMap["l"]; else if (char === "M") current.name = PathCommandMap["L"];
|
|
2854
|
+
if (!needConvert && convertCommand[char]) needConvert = true;
|
|
2854
2855
|
} else {
|
|
2855
2856
|
if (char === "-" || char === "+") {
|
|
2856
2857
|
if (lastChar === "e" || lastChar === "E") {
|
|
@@ -2926,8 +2927,8 @@ var LeaferUI = function(exports) {
|
|
|
2926
2927
|
|
|
2927
2928
|
case S:
|
|
2928
2929
|
smooth = lastCommand === C$4 || lastCommand === S;
|
|
2929
|
-
x1 = smooth ? x * 2 - controlX :
|
|
2930
|
-
y1 = smooth ? y * 2 - controlY :
|
|
2930
|
+
x1 = smooth ? x * 2 - controlX : x;
|
|
2931
|
+
y1 = smooth ? y * 2 - controlY : y;
|
|
2931
2932
|
controlX = old[i + 1];
|
|
2932
2933
|
controlY = old[i + 2];
|
|
2933
2934
|
x = old[i + 3];
|
|
@@ -2961,8 +2962,8 @@ var LeaferUI = function(exports) {
|
|
|
2961
2962
|
|
|
2962
2963
|
case T:
|
|
2963
2964
|
smooth = lastCommand === Q$3 || lastCommand === T;
|
|
2964
|
-
controlX = smooth ? x * 2 - controlX :
|
|
2965
|
-
controlY = smooth ? y * 2 - controlY :
|
|
2965
|
+
controlX = smooth ? x * 2 - controlX : x;
|
|
2966
|
+
controlY = smooth ? y * 2 - controlY : y;
|
|
2966
2967
|
curveMode ? quadraticCurveTo$1(data, x, y, controlX, controlY, old[i + 1], old[i + 2]) : data.push(Q$3, controlX, controlY, old[i + 1], old[i + 2]);
|
|
2967
2968
|
x = old[i + 1];
|
|
2968
2969
|
y = old[i + 2];
|
|
@@ -4568,10 +4569,10 @@ var LeaferUI = function(exports) {
|
|
|
4568
4569
|
y: y
|
|
4569
4570
|
}, transition) : (t.x = x, t.y = y);
|
|
4570
4571
|
},
|
|
4571
|
-
zoomOfWorld(t, origin, scaleX, scaleY, resize, transition) {
|
|
4572
|
-
L$1.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition);
|
|
4572
|
+
zoomOfWorld(t, origin, scaleX, scaleY, resize, transition, boundsType) {
|
|
4573
|
+
L$1.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition, boundsType);
|
|
4573
4574
|
},
|
|
4574
|
-
zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize, transition) {
|
|
4575
|
+
zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize, transition, boundsType) {
|
|
4575
4576
|
const o = t.__localMatrix;
|
|
4576
4577
|
if (!isNumber(scaleY)) {
|
|
4577
4578
|
if (scaleY) transition = scaleY;
|
|
@@ -4580,7 +4581,7 @@ var LeaferUI = function(exports) {
|
|
|
4580
4581
|
copy$5(matrix$1, o);
|
|
4581
4582
|
scaleOfOuter$2(matrix$1, origin, scaleX, scaleY);
|
|
4582
4583
|
if (L$1.hasHighPosition(t)) {
|
|
4583
|
-
L$1.setTransform(t, matrix$1, resize, transition);
|
|
4584
|
+
L$1.setTransform(t, matrix$1, resize, transition, boundsType);
|
|
4584
4585
|
} else {
|
|
4585
4586
|
const x = t.x + matrix$1.e - o.e, y = t.y + matrix$1.f - o.f;
|
|
4586
4587
|
if (transition && !resize) t.animate({
|
|
@@ -4588,7 +4589,7 @@ var LeaferUI = function(exports) {
|
|
|
4588
4589
|
y: y,
|
|
4589
4590
|
scaleX: t.scaleX * scaleX,
|
|
4590
4591
|
scaleY: t.scaleY * scaleY
|
|
4591
|
-
}, transition); else t.x = x, t.y = y, t.scaleResize(scaleX, scaleY, resize !== true);
|
|
4592
|
+
}, transition); else t.x = x, t.y = y, t.scaleResize(scaleX, scaleY, resize !== true, boundsType);
|
|
4592
4593
|
}
|
|
4593
4594
|
},
|
|
4594
4595
|
rotateOfWorld(t, origin, angle, transition) {
|
|
@@ -4612,18 +4613,18 @@ var LeaferUI = function(exports) {
|
|
|
4612
4613
|
skewOfOuter(matrix$1, origin, skewX, skewY);
|
|
4613
4614
|
L$1.setTransform(t, matrix$1, resize, transition);
|
|
4614
4615
|
},
|
|
4615
|
-
transformWorld(t, transform, resize, transition) {
|
|
4616
|
+
transformWorld(t, transform, resize, transition, boundsType) {
|
|
4616
4617
|
copy$5(matrix$1, t.worldTransform);
|
|
4617
4618
|
multiplyParent$3(matrix$1, transform);
|
|
4618
4619
|
if (t.parent) divideParent(matrix$1, t.parent.scrollWorldTransform);
|
|
4619
|
-
L$1.setTransform(t, matrix$1, resize, transition);
|
|
4620
|
+
L$1.setTransform(t, matrix$1, resize, transition, boundsType);
|
|
4620
4621
|
},
|
|
4621
|
-
transform(t, transform, resize, transition) {
|
|
4622
|
+
transform(t, transform, resize, transition, boundsType) {
|
|
4622
4623
|
copy$5(matrix$1, t.localTransform);
|
|
4623
4624
|
multiplyParent$3(matrix$1, transform);
|
|
4624
|
-
L$1.setTransform(t, matrix$1, resize, transition);
|
|
4625
|
+
L$1.setTransform(t, matrix$1, resize, transition, boundsType);
|
|
4625
4626
|
},
|
|
4626
|
-
setTransform(t, transform, resize, transition) {
|
|
4627
|
+
setTransform(t, transform, resize, transition, boundsType) {
|
|
4627
4628
|
const data = t.__, originPoint = data.origin && L$1.getInnerOrigin(t, data.origin);
|
|
4628
4629
|
const layout = getLayout(transform, originPoint, data.around && L$1.getInnerOrigin(t, data.around));
|
|
4629
4630
|
if (L$1.hasOffset(t)) {
|
|
@@ -4639,7 +4640,7 @@ var LeaferUI = function(exports) {
|
|
|
4639
4640
|
PointHelper.move(layout, originPoint.x - changedPoint.x, originPoint.y - changedPoint.y);
|
|
4640
4641
|
}
|
|
4641
4642
|
t.set(layout);
|
|
4642
|
-
t.scaleResize(scaleX, scaleY, false);
|
|
4643
|
+
t.scaleResize(scaleX, scaleY, false, boundsType);
|
|
4643
4644
|
} else t.set(layout, transition);
|
|
4644
4645
|
},
|
|
4645
4646
|
getFlipTransform(t, axis) {
|
|
@@ -6269,11 +6270,11 @@ var LeaferUI = function(exports) {
|
|
|
6269
6270
|
const layer = this.leafer ? this.leafer.zoomLayer : this;
|
|
6270
6271
|
return layer.getWorldPoint(page, relative, distance, change);
|
|
6271
6272
|
}
|
|
6272
|
-
setTransform(matrix, resize, transition) {
|
|
6273
|
-
setTransform(this, matrix, resize, transition);
|
|
6273
|
+
setTransform(matrix, resize, transition, boundsType) {
|
|
6274
|
+
setTransform(this, matrix, resize, transition, boundsType);
|
|
6274
6275
|
}
|
|
6275
|
-
transform(matrix, resize, transition) {
|
|
6276
|
-
transform(this, matrix, resize, transition);
|
|
6276
|
+
transform(matrix, resize, transition, boundsType) {
|
|
6277
|
+
transform(this, matrix, resize, transition, boundsType);
|
|
6277
6278
|
}
|
|
6278
6279
|
move(x, y, transition) {
|
|
6279
6280
|
moveLocal(this, x, y, transition);
|
|
@@ -6281,8 +6282,8 @@ var LeaferUI = function(exports) {
|
|
|
6281
6282
|
moveInner(x, y, transition) {
|
|
6282
6283
|
moveWorld(this, x, y, true, transition);
|
|
6283
6284
|
}
|
|
6284
|
-
scaleOf(origin, scaleX, scaleY, resize, transition) {
|
|
6285
|
-
zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition);
|
|
6285
|
+
scaleOf(origin, scaleX, scaleY, resize, transition, boundsType) {
|
|
6286
|
+
zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition, boundsType);
|
|
6286
6287
|
}
|
|
6287
6288
|
rotateOf(origin, rotation, transition) {
|
|
6288
6289
|
rotateOfLocal(this, getLocalOrigin(this, origin), rotation, transition);
|
|
@@ -6290,14 +6291,14 @@ var LeaferUI = function(exports) {
|
|
|
6290
6291
|
skewOf(origin, skewX, skewY, resize, transition) {
|
|
6291
6292
|
skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize, transition);
|
|
6292
6293
|
}
|
|
6293
|
-
transformWorld(worldTransform, resize, transition) {
|
|
6294
|
-
transformWorld(this, worldTransform, resize, transition);
|
|
6294
|
+
transformWorld(worldTransform, resize, transition, boundsType) {
|
|
6295
|
+
transformWorld(this, worldTransform, resize, transition, boundsType);
|
|
6295
6296
|
}
|
|
6296
6297
|
moveWorld(x, y, transition) {
|
|
6297
6298
|
moveWorld(this, x, y, false, transition);
|
|
6298
6299
|
}
|
|
6299
|
-
scaleOfWorld(worldOrigin, scaleX, scaleY, resize, transition) {
|
|
6300
|
-
zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition);
|
|
6300
|
+
scaleOfWorld(worldOrigin, scaleX, scaleY, resize, transition, boundsType) {
|
|
6301
|
+
zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition, boundsType);
|
|
6301
6302
|
}
|
|
6302
6303
|
rotateOfWorld(worldOrigin, rotation) {
|
|
6303
6304
|
rotateOfWorld(this, worldOrigin, rotation);
|
|
@@ -6308,7 +6309,7 @@ var LeaferUI = function(exports) {
|
|
|
6308
6309
|
flip(axis, transition) {
|
|
6309
6310
|
transform(this, getFlipTransform(this, axis), false, transition);
|
|
6310
6311
|
}
|
|
6311
|
-
scaleResize(scaleX, scaleY = scaleX, _noResize) {
|
|
6312
|
+
scaleResize(scaleX, scaleY = scaleX, _noResize, _boundsType) {
|
|
6312
6313
|
this.scaleX *= scaleX;
|
|
6313
6314
|
this.scaleY *= scaleY;
|
|
6314
6315
|
}
|
|
@@ -6673,7 +6674,7 @@ var LeaferUI = function(exports) {
|
|
|
6673
6674
|
this.levelMap = null;
|
|
6674
6675
|
}
|
|
6675
6676
|
}
|
|
6676
|
-
const version = "2.1.
|
|
6677
|
+
const version = "2.1.4";
|
|
6677
6678
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6678
6679
|
get allowBackgroundColor() {
|
|
6679
6680
|
return true;
|