@galacean/effects-core 2.5.2 → 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/composition.d.ts +0 -1
- package/dist/index.js +16 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/composition.d.ts
CHANGED
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);
|
|
@@ -14290,7 +14292,11 @@ function buildEasingCurve(leftKeyframe, rightKeyframe) {
|
|
|
14290
14292
|
if (BezierMap[str]) {
|
|
14291
14293
|
bezEasing = BezierMap[str];
|
|
14292
14294
|
} else {
|
|
14293
|
-
|
|
14295
|
+
if (decimalEqual(valueInterval, 0)) {
|
|
14296
|
+
bezEasing = new BezierEasing();
|
|
14297
|
+
} else {
|
|
14298
|
+
bezEasing = new BezierEasing(x1, y1, x2, y2);
|
|
14299
|
+
}
|
|
14294
14300
|
BezierMap[str] = bezEasing;
|
|
14295
14301
|
}
|
|
14296
14302
|
return {
|
|
@@ -21432,8 +21438,6 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
21432
21438
|
/**
|
|
21433
21439
|
* 是否开启后处理
|
|
21434
21440
|
*/ _this.postProcessingEnabled = false;
|
|
21435
|
-
// TODO: 待优化
|
|
21436
|
-
_this.assigned = false;
|
|
21437
21441
|
/**
|
|
21438
21442
|
* 销毁状态位
|
|
21439
21443
|
*/ _this.destroyed = false;
|
|
@@ -21499,7 +21503,6 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
21499
21503
|
aspect: width / height
|
|
21500
21504
|
}));
|
|
21501
21505
|
_this.url = scene.url;
|
|
21502
|
-
_this.assigned = true;
|
|
21503
21506
|
_this.interactive = true;
|
|
21504
21507
|
_this.handleItemMessage = handleItemMessage;
|
|
21505
21508
|
_this.createRenderFrame();
|
|
@@ -21671,7 +21674,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
21671
21674
|
* 合成更新,针对所有 item 的更新
|
|
21672
21675
|
* @param deltaTime - 更新的时间步长
|
|
21673
21676
|
*/ _proto.update = function update(deltaTime) {
|
|
21674
|
-
if (
|
|
21677
|
+
if (this.getPaused()) {
|
|
21675
21678
|
return;
|
|
21676
21679
|
}
|
|
21677
21680
|
// scene VFXItem components lifetime function.
|
|
@@ -26379,14 +26382,10 @@ var TextComponentBase = /*#__PURE__*/ function() {
|
|
|
26379
26382
|
_proto.getLineCount = function getLineCount(text, init) {
|
|
26380
26383
|
var context = this.context;
|
|
26381
26384
|
var _this_textLayout = this.textLayout, letterSpace = _this_textLayout.letterSpace, overflow = _this_textLayout.overflow;
|
|
26382
|
-
var fontScale = init ? this.textStyle.fontSize / 10
|
|
26383
|
-
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;
|
|
26384
26387
|
var lineCount = 1;
|
|
26385
26388
|
var x = 0;
|
|
26386
|
-
//设置context.font的字号
|
|
26387
|
-
// if (context) {
|
|
26388
|
-
// context.font = this.getFontDesc(this.textStyle.fontSize);
|
|
26389
|
-
// }
|
|
26390
26389
|
for(var i = 0; i < text.length; i++){
|
|
26391
26390
|
var _context_measureText;
|
|
26392
26391
|
var str = text[i];
|
|
@@ -28575,7 +28574,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
28575
28574
|
return ret;
|
|
28576
28575
|
}
|
|
28577
28576
|
|
|
28578
|
-
var version$1 = "2.5.
|
|
28577
|
+
var version$1 = "2.5.4";
|
|
28579
28578
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
28580
28579
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
28581
28580
|
var reverseParticle = false;
|
|
@@ -31825,7 +31824,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
|
|
|
31825
31824
|
registerPlugin("particle", ParticleLoader, exports.VFXItem);
|
|
31826
31825
|
registerPlugin("cal", CalculateLoader, exports.VFXItem);
|
|
31827
31826
|
registerPlugin("interact", InteractLoader, exports.VFXItem);
|
|
31828
|
-
var version = "2.5.
|
|
31827
|
+
var version = "2.5.4";
|
|
31829
31828
|
logger.info("Core version: " + version + ".");
|
|
31830
31829
|
|
|
31831
31830
|
exports.AbstractPlugin = AbstractPlugin;
|