@galacean/engine-core 1.1.0-beta.37 → 1.1.0-beta.39
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 +11 -4
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +11 -4
- package/dist/module.js +11 -4
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -1837,6 +1837,9 @@ var Logger = {
|
|
|
1837
1837
|
var baseline = Math.ceil(context.measureText(TextUtils._measureBaseline).width);
|
|
1838
1838
|
var height = baseline * TextUtils._heightMultiplier;
|
|
1839
1839
|
baseline = TextUtils._baselineMultiplier * baseline | 0;
|
|
1840
|
+
var _extendHeight = TextUtils._extendHeight;
|
|
1841
|
+
height += _extendHeight;
|
|
1842
|
+
baseline += _extendHeight * 0.5;
|
|
1840
1843
|
canvas.width = width;
|
|
1841
1844
|
canvas.height = height;
|
|
1842
1845
|
context.font = fontString;
|
|
@@ -1871,6 +1874,7 @@ var Logger = {
|
|
|
1871
1874
|
}
|
|
1872
1875
|
if (top !== -1 && bottom !== -1) {
|
|
1873
1876
|
ascent = baseline - top;
|
|
1877
|
+
// Baseline belong to descent
|
|
1874
1878
|
descent = bottom - baseline + 1;
|
|
1875
1879
|
size = ascent + descent;
|
|
1876
1880
|
}
|
|
@@ -1947,9 +1951,8 @@ var Logger = {
|
|
|
1947
1951
|
];
|
|
1948
1952
|
})();
|
|
1949
1953
|
(function() {
|
|
1950
|
-
//
|
|
1951
|
-
|
|
1952
|
-
/** @internal */ TextUtils._heightMultiplier = 2;
|
|
1954
|
+
// _extendHeight used to extend the height of canvas, because in miniprogram performance is different from h5.
|
|
1955
|
+
/** @internal */ TextUtils._extendHeight = 0;
|
|
1953
1956
|
})();
|
|
1954
1957
|
(function() {
|
|
1955
1958
|
/** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
|
|
@@ -1957,6 +1960,9 @@ var Logger = {
|
|
|
1957
1960
|
(function() {
|
|
1958
1961
|
TextUtils._measureBaseline = "M";
|
|
1959
1962
|
})();
|
|
1963
|
+
(function() {
|
|
1964
|
+
TextUtils._heightMultiplier = 2;
|
|
1965
|
+
})();
|
|
1960
1966
|
(function() {
|
|
1961
1967
|
TextUtils._baselineMultiplier = 1.4;
|
|
1962
1968
|
})();
|
|
@@ -8314,7 +8320,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
8314
8320
|
_this._byteLength = byteLength;
|
|
8315
8321
|
_this._platformBuffer = engine._hardwareRenderer.createPlatformBuffer(type, byteLength, bufferUsage, data);
|
|
8316
8322
|
if (readable) {
|
|
8317
|
-
var buffer =
|
|
8323
|
+
var buffer = data.constructor === ArrayBuffer ? data.slice(0) : data.buffer.slice(data.byteOffset, data.byteOffset + byteLength);
|
|
8318
8324
|
_this._data = new Uint8Array(buffer);
|
|
8319
8325
|
}
|
|
8320
8326
|
}
|
|
@@ -16265,6 +16271,7 @@ __decorate([
|
|
|
16265
16271
|
this._pointers.length = 0;
|
|
16266
16272
|
this._downList.length = 0;
|
|
16267
16273
|
this._upList.length = 0;
|
|
16274
|
+
this._nativeEvents.length = 0;
|
|
16268
16275
|
}
|
|
16269
16276
|
};
|
|
16270
16277
|
/**
|