@galacean/engine 1.1.0-beta.36 → 1.1.0-beta.38
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/browser.js +24 -7
- package/dist/browser.min.js +1 -1
- package/dist/main.js +1 -1
- package/dist/miniprogram.js +1 -1
- package/dist/module.js +1 -1
- package/package.json +5 -5
package/dist/browser.js
CHANGED
|
@@ -6797,6 +6797,9 @@
|
|
|
6797
6797
|
var baseline = Math.ceil(context.measureText(TextUtils._measureBaseline).width);
|
|
6798
6798
|
var height = baseline * TextUtils._heightMultiplier;
|
|
6799
6799
|
baseline = TextUtils._baselineMultiplier * baseline | 0;
|
|
6800
|
+
var _extendHeight = TextUtils._extendHeight;
|
|
6801
|
+
height += _extendHeight;
|
|
6802
|
+
baseline += _extendHeight * 0.5;
|
|
6800
6803
|
canvas.width = width;
|
|
6801
6804
|
canvas.height = height;
|
|
6802
6805
|
context.font = fontString;
|
|
@@ -6831,6 +6834,7 @@
|
|
|
6831
6834
|
}
|
|
6832
6835
|
if (top !== -1 && bottom !== -1) {
|
|
6833
6836
|
ascent = baseline - top;
|
|
6837
|
+
// Baseline belong to descent
|
|
6834
6838
|
descent = bottom - baseline + 1;
|
|
6835
6839
|
size = ascent + descent;
|
|
6836
6840
|
}
|
|
@@ -6907,9 +6911,8 @@
|
|
|
6907
6911
|
];
|
|
6908
6912
|
})();
|
|
6909
6913
|
(function() {
|
|
6910
|
-
//
|
|
6911
|
-
|
|
6912
|
-
/** @internal */ TextUtils._heightMultiplier = 2;
|
|
6914
|
+
// _extendHeight used to extend the height of canvas, because in miniprogram performance is different from h5.
|
|
6915
|
+
/** @internal */ TextUtils._extendHeight = 0;
|
|
6913
6916
|
})();
|
|
6914
6917
|
(function() {
|
|
6915
6918
|
/** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
|
|
@@ -6917,6 +6920,9 @@
|
|
|
6917
6920
|
(function() {
|
|
6918
6921
|
TextUtils._measureBaseline = "M";
|
|
6919
6922
|
})();
|
|
6923
|
+
(function() {
|
|
6924
|
+
TextUtils._heightMultiplier = 2;
|
|
6925
|
+
})();
|
|
6920
6926
|
(function() {
|
|
6921
6927
|
TextUtils._baselineMultiplier = 1.4;
|
|
6922
6928
|
})();
|
|
@@ -13130,7 +13136,7 @@
|
|
|
13130
13136
|
_this._byteLength = byteLength;
|
|
13131
13137
|
_this._platformBuffer = engine._hardwareRenderer.createPlatformBuffer(type, byteLength, bufferUsage, data);
|
|
13132
13138
|
if (readable) {
|
|
13133
|
-
var buffer =
|
|
13139
|
+
var buffer = data.constructor === ArrayBuffer ? data.slice(0) : data.buffer.slice(data.byteOffset, data.byteOffset + byteLength);
|
|
13134
13140
|
_this._data = new Uint8Array(buffer);
|
|
13135
13141
|
}
|
|
13136
13142
|
}
|
|
@@ -21013,6 +21019,7 @@
|
|
|
21013
21019
|
this._pointers.length = 0;
|
|
21014
21020
|
this._downList.length = 0;
|
|
21015
21021
|
this._upList.length = 0;
|
|
21022
|
+
this._nativeEvents.length = 0;
|
|
21016
21023
|
}
|
|
21017
21024
|
};
|
|
21018
21025
|
/**
|
|
@@ -26656,7 +26663,12 @@
|
|
|
26656
26663
|
if (componentA.instanceId === componentB.instanceId) {
|
|
26657
26664
|
return dataA.material._priority - dataB.material._priority || componentA._distanceForSort - componentB._distanceForSort;
|
|
26658
26665
|
} else {
|
|
26659
|
-
|
|
26666
|
+
var distanceDiff = componentA._distanceForSort - componentB._distanceForSort;
|
|
26667
|
+
if (distanceDiff === 0) {
|
|
26668
|
+
return componentA.instanceId - componentB.instanceId;
|
|
26669
|
+
} else {
|
|
26670
|
+
return distanceDiff;
|
|
26671
|
+
}
|
|
26660
26672
|
}
|
|
26661
26673
|
};
|
|
26662
26674
|
/**
|
|
@@ -26674,7 +26686,12 @@
|
|
|
26674
26686
|
if (componentA.instanceId === componentB.instanceId) {
|
|
26675
26687
|
return dataA.material._priority - dataB.material._priority || componentB._distanceForSort - componentA._distanceForSort;
|
|
26676
26688
|
} else {
|
|
26677
|
-
|
|
26689
|
+
var distanceDiff = componentB._distanceForSort - componentA._distanceForSort;
|
|
26690
|
+
if (distanceDiff === 0) {
|
|
26691
|
+
return componentA.instanceId - componentB.instanceId;
|
|
26692
|
+
} else {
|
|
26693
|
+
return distanceDiff;
|
|
26694
|
+
}
|
|
26678
26695
|
}
|
|
26679
26696
|
};
|
|
26680
26697
|
return RenderQueue;
|
|
@@ -44028,7 +44045,7 @@
|
|
|
44028
44045
|
], GALACEAN_animation_event);
|
|
44029
44046
|
|
|
44030
44047
|
//@ts-ignore
|
|
44031
|
-
var version = "1.1.0-beta.
|
|
44048
|
+
var version = "1.1.0-beta.38";
|
|
44032
44049
|
console.log("Galacean engine version: " + version);
|
|
44033
44050
|
for(var key in CoreObjects){
|
|
44034
44051
|
Loader.registerClass(key, CoreObjects[key]);
|