@galacean/effects-core 2.5.3 → 2.5.4
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/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime core for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.5.
|
|
6
|
+
* Version: v2.5.4
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -5927,8 +5927,8 @@ function initGLContext() {
|
|
|
5927
5927
|
copy(WebGLRenderingContext);
|
|
5928
5928
|
copy(WebGLRenderingContext.prototype);
|
|
5929
5929
|
} else {
|
|
5930
|
-
initErrors.push(// iOS 16 lockdown mode
|
|
5931
|
-
"iOS16 lockdown mode, WebGL Constants not in global");
|
|
5930
|
+
initErrors.push(isIOS() ? // iOS 16 lockdown mode
|
|
5931
|
+
"iOS16 lockdown mode, WebGL Constants not in global" : "WebGL Constants not in global, please check your environment");
|
|
5932
5932
|
}
|
|
5933
5933
|
if (!initErrors.length && !("HALF_FLOAT" in glContext)) {
|
|
5934
5934
|
// @ts-expect-error set default value
|
|
@@ -6548,7 +6548,9 @@ function _loadVideo() {
|
|
|
6548
6548
|
return [
|
|
6549
6549
|
2,
|
|
6550
6550
|
new Promise(function(resolve, reject) {
|
|
6551
|
-
var pending = video.play()
|
|
6551
|
+
var pending = video.play().catch(function(e) {
|
|
6552
|
+
reject(e);
|
|
6553
|
+
});
|
|
6552
6554
|
if (pending) {
|
|
6553
6555
|
void pending.then(function() {
|
|
6554
6556
|
return resolve(video);
|
|
@@ -26380,14 +26382,10 @@ var TextComponentBase = /*#__PURE__*/ function() {
|
|
|
26380
26382
|
_proto.getLineCount = function getLineCount(text, init) {
|
|
26381
26383
|
var context = this.context;
|
|
26382
26384
|
var _this_textLayout = this.textLayout, letterSpace = _this_textLayout.letterSpace, overflow = _this_textLayout.overflow;
|
|
26383
|
-
var fontScale = init ? this.textStyle.fontSize / 10
|
|
26384
|
-
var width = this.textLayout.width + this.textStyle.fontOffset;
|
|
26385
|
+
var fontScale = init ? this.textStyle.fontSize / 10 * this.textStyle.fontScale : this.textStyle.fontScale;
|
|
26386
|
+
var width = (this.textLayout.width + this.textStyle.fontOffset) * this.textStyle.fontScale;
|
|
26385
26387
|
var lineCount = 1;
|
|
26386
26388
|
var x = 0;
|
|
26387
|
-
//设置context.font的字号
|
|
26388
|
-
// if (context) {
|
|
26389
|
-
// context.font = this.getFontDesc(this.textStyle.fontSize);
|
|
26390
|
-
// }
|
|
26391
26389
|
for(var i = 0; i < text.length; i++){
|
|
26392
26390
|
var _context_measureText;
|
|
26393
26391
|
var str = text[i];
|
|
@@ -28576,7 +28574,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
28576
28574
|
return ret;
|
|
28577
28575
|
}
|
|
28578
28576
|
|
|
28579
|
-
var version$1 = "2.5.
|
|
28577
|
+
var version$1 = "2.5.4";
|
|
28580
28578
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
28581
28579
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
28582
28580
|
var reverseParticle = false;
|
|
@@ -31826,7 +31824,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
|
|
|
31826
31824
|
registerPlugin("particle", ParticleLoader, exports.VFXItem);
|
|
31827
31825
|
registerPlugin("cal", CalculateLoader, exports.VFXItem);
|
|
31828
31826
|
registerPlugin("interact", InteractLoader, exports.VFXItem);
|
|
31829
|
-
var version = "2.5.
|
|
31827
|
+
var version = "2.5.4";
|
|
31830
31828
|
logger.info("Core version: " + version + ".");
|
|
31831
31829
|
|
|
31832
31830
|
exports.AbstractPlugin = AbstractPlugin;
|