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