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