@galacean/engine-core 1.1.0-beta.35 → 1.1.0-beta.37
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/main.js +19 -7
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +19 -7
- package/dist/module.js +19 -7
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/miniprogram.js
CHANGED
|
@@ -1948,13 +1948,15 @@ var Logger = {
|
|
|
1948
1948
|
];
|
|
1949
1949
|
})();
|
|
1950
1950
|
(function() {
|
|
1951
|
-
|
|
1951
|
+
// _heightMultiplier used to measure the height of text, but in miniprogram performance is different from h5.
|
|
1952
|
+
// so can set _heightMultiplier to adapt miniprogram, the larger the value, the worse the performance.
|
|
1953
|
+
/** @internal */ TextUtils._heightMultiplier = 2;
|
|
1952
1954
|
})();
|
|
1953
1955
|
(function() {
|
|
1954
|
-
TextUtils.
|
|
1956
|
+
/** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
|
|
1955
1957
|
})();
|
|
1956
1958
|
(function() {
|
|
1957
|
-
TextUtils.
|
|
1959
|
+
TextUtils._measureBaseline = "M";
|
|
1958
1960
|
})();
|
|
1959
1961
|
(function() {
|
|
1960
1962
|
TextUtils._baselineMultiplier = 1.4;
|
|
@@ -2038,7 +2040,7 @@ var Logger = {
|
|
|
2038
2040
|
var _this = this, engine = _this._engine;
|
|
2039
2041
|
var fontAtlas = new FontAtlas(engine);
|
|
2040
2042
|
var texture = new Texture2D(engine, 256, 256, exports.TextureFormat.R8G8B8A8, false);
|
|
2041
|
-
texture.filterMode = exports.TextureFilterMode.
|
|
2043
|
+
texture.filterMode = exports.TextureFilterMode.Bilinear;
|
|
2042
2044
|
fontAtlas.texture = texture;
|
|
2043
2045
|
fontAtlas.isGCIgnored = texture.isGCIgnored = true;
|
|
2044
2046
|
this._fontAtlases.push(fontAtlas);
|
|
@@ -18703,7 +18705,7 @@ var /**
|
|
|
18703
18705
|
var left = startX * pixelsPerUnitReciprocal;
|
|
18704
18706
|
var right = (startX + w) * pixelsPerUnitReciprocal;
|
|
18705
18707
|
var top = (startY + ascent) * pixelsPerUnitReciprocal;
|
|
18706
|
-
var bottom = (startY - descent
|
|
18708
|
+
var bottom = (startY - descent) * pixelsPerUnitReciprocal;
|
|
18707
18709
|
localPositions.set(left, top, right, bottom);
|
|
18708
18710
|
i === firstLine && (maxY = Math.max(maxY, top));
|
|
18709
18711
|
minY = Math.min(minY, bottom);
|
|
@@ -21972,7 +21974,12 @@ var passNum = 0;
|
|
|
21972
21974
|
if (componentA.instanceId === componentB.instanceId) {
|
|
21973
21975
|
return dataA.material._priority - dataB.material._priority || componentA._distanceForSort - componentB._distanceForSort;
|
|
21974
21976
|
} else {
|
|
21975
|
-
|
|
21977
|
+
var distanceDiff = componentA._distanceForSort - componentB._distanceForSort;
|
|
21978
|
+
if (distanceDiff === 0) {
|
|
21979
|
+
return componentA.instanceId - componentB.instanceId;
|
|
21980
|
+
} else {
|
|
21981
|
+
return distanceDiff;
|
|
21982
|
+
}
|
|
21976
21983
|
}
|
|
21977
21984
|
};
|
|
21978
21985
|
/**
|
|
@@ -21990,7 +21997,12 @@ var passNum = 0;
|
|
|
21990
21997
|
if (componentA.instanceId === componentB.instanceId) {
|
|
21991
21998
|
return dataA.material._priority - dataB.material._priority || componentB._distanceForSort - componentA._distanceForSort;
|
|
21992
21999
|
} else {
|
|
21993
|
-
|
|
22000
|
+
var distanceDiff = componentB._distanceForSort - componentA._distanceForSort;
|
|
22001
|
+
if (distanceDiff === 0) {
|
|
22002
|
+
return componentA.instanceId - componentB.instanceId;
|
|
22003
|
+
} else {
|
|
22004
|
+
return distanceDiff;
|
|
22005
|
+
}
|
|
21994
22006
|
}
|
|
21995
22007
|
};
|
|
21996
22008
|
return RenderQueue;
|
package/dist/module.js
CHANGED
|
@@ -1943,13 +1943,15 @@ var Logger = {
|
|
|
1943
1943
|
];
|
|
1944
1944
|
})();
|
|
1945
1945
|
(function() {
|
|
1946
|
-
|
|
1946
|
+
// _heightMultiplier used to measure the height of text, but in miniprogram performance is different from h5.
|
|
1947
|
+
// so can set _heightMultiplier to adapt miniprogram, the larger the value, the worse the performance.
|
|
1948
|
+
/** @internal */ TextUtils._heightMultiplier = 2;
|
|
1947
1949
|
})();
|
|
1948
1950
|
(function() {
|
|
1949
|
-
TextUtils.
|
|
1951
|
+
/** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
|
|
1950
1952
|
})();
|
|
1951
1953
|
(function() {
|
|
1952
|
-
TextUtils.
|
|
1954
|
+
TextUtils._measureBaseline = "M";
|
|
1953
1955
|
})();
|
|
1954
1956
|
(function() {
|
|
1955
1957
|
TextUtils._baselineMultiplier = 1.4;
|
|
@@ -2033,7 +2035,7 @@ var Logger = {
|
|
|
2033
2035
|
var _this = this, engine = _this._engine;
|
|
2034
2036
|
var fontAtlas = new FontAtlas(engine);
|
|
2035
2037
|
var texture = new Texture2D(engine, 256, 256, TextureFormat.R8G8B8A8, false);
|
|
2036
|
-
texture.filterMode = TextureFilterMode.
|
|
2038
|
+
texture.filterMode = TextureFilterMode.Bilinear;
|
|
2037
2039
|
fontAtlas.texture = texture;
|
|
2038
2040
|
fontAtlas.isGCIgnored = texture.isGCIgnored = true;
|
|
2039
2041
|
this._fontAtlases.push(fontAtlas);
|
|
@@ -18698,7 +18700,7 @@ var /**
|
|
|
18698
18700
|
var left = startX * pixelsPerUnitReciprocal;
|
|
18699
18701
|
var right = (startX + w) * pixelsPerUnitReciprocal;
|
|
18700
18702
|
var top = (startY + ascent) * pixelsPerUnitReciprocal;
|
|
18701
|
-
var bottom = (startY - descent
|
|
18703
|
+
var bottom = (startY - descent) * pixelsPerUnitReciprocal;
|
|
18702
18704
|
localPositions.set(left, top, right, bottom);
|
|
18703
18705
|
i === firstLine && (maxY = Math.max(maxY, top));
|
|
18704
18706
|
minY = Math.min(minY, bottom);
|
|
@@ -21967,7 +21969,12 @@ var passNum = 0;
|
|
|
21967
21969
|
if (componentA.instanceId === componentB.instanceId) {
|
|
21968
21970
|
return dataA.material._priority - dataB.material._priority || componentA._distanceForSort - componentB._distanceForSort;
|
|
21969
21971
|
} else {
|
|
21970
|
-
|
|
21972
|
+
var distanceDiff = componentA._distanceForSort - componentB._distanceForSort;
|
|
21973
|
+
if (distanceDiff === 0) {
|
|
21974
|
+
return componentA.instanceId - componentB.instanceId;
|
|
21975
|
+
} else {
|
|
21976
|
+
return distanceDiff;
|
|
21977
|
+
}
|
|
21971
21978
|
}
|
|
21972
21979
|
};
|
|
21973
21980
|
/**
|
|
@@ -21985,7 +21992,12 @@ var passNum = 0;
|
|
|
21985
21992
|
if (componentA.instanceId === componentB.instanceId) {
|
|
21986
21993
|
return dataA.material._priority - dataB.material._priority || componentB._distanceForSort - componentA._distanceForSort;
|
|
21987
21994
|
} else {
|
|
21988
|
-
|
|
21995
|
+
var distanceDiff = componentB._distanceForSort - componentA._distanceForSort;
|
|
21996
|
+
if (distanceDiff === 0) {
|
|
21997
|
+
return componentA.instanceId - componentB.instanceId;
|
|
21998
|
+
} else {
|
|
21999
|
+
return distanceDiff;
|
|
22000
|
+
}
|
|
21989
22001
|
}
|
|
21990
22002
|
};
|
|
21991
22003
|
return RenderQueue;
|