@galacean/effects-core 2.8.8 → 2.8.9
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 +27 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
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.8.
|
|
6
|
+
* Version: v2.8.9
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -17845,14 +17845,14 @@ exports.CompositionComponent = /*#__PURE__*/ function(Component) {
|
|
|
17845
17845
|
}
|
|
17846
17846
|
}
|
|
17847
17847
|
}
|
|
17848
|
-
|
|
17849
|
-
|
|
17850
|
-
|
|
17851
|
-
|
|
17852
|
-
}
|
|
17853
|
-
|
|
17854
|
-
|
|
17855
|
-
|
|
17848
|
+
}
|
|
17849
|
+
if (exports.VFXItem.isComposition(hitTestItem)) {
|
|
17850
|
+
if (hitTestItem.getComponent(CompositionComponent).hitTest(ray, x, y, regions, force, options)) {
|
|
17851
|
+
hitTestSuccess = true;
|
|
17852
|
+
}
|
|
17853
|
+
} else {
|
|
17854
|
+
if (_this.hitTestRecursive(hitTestItem, ray, x, y, regions, force, options)) {
|
|
17855
|
+
hitTestSuccess = true;
|
|
17856
17856
|
}
|
|
17857
17857
|
}
|
|
17858
17858
|
};
|
|
@@ -29379,12 +29379,6 @@ exports.TextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
29379
29379
|
} else {
|
|
29380
29380
|
context.font = style.fontDesc;
|
|
29381
29381
|
}
|
|
29382
|
-
if (style.hasShadow) {
|
|
29383
|
-
_this.setupShadow();
|
|
29384
|
-
}
|
|
29385
|
-
if (style.isOutlined) {
|
|
29386
|
-
_this.setupOutline();
|
|
29387
|
-
}
|
|
29388
29382
|
// textColor 统一是 0-1,写入 canvas 时乘 255
|
|
29389
29383
|
var _style_textColor = style.textColor, r = _style_textColor[0], g = _style_textColor[1], b = _style_textColor[2], a = _style_textColor[3];
|
|
29390
29384
|
context.fillStyle = "rgba(" + r * 255 + ", " + g * 255 + ", " + b * 255 + ", " + a + ")";
|
|
@@ -29425,8 +29419,13 @@ exports.TextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
29425
29419
|
chars: charsArray,
|
|
29426
29420
|
charOffsetX: charOffsetX
|
|
29427
29421
|
});
|
|
29428
|
-
|
|
29429
|
-
if (
|
|
29422
|
+
var hasOutline = style.isOutlined && style.outlineWidth > 0;
|
|
29423
|
+
if (hasOutline) {
|
|
29424
|
+
// 有描边:在描边时启用阴影
|
|
29425
|
+
if (style.hasShadow) {
|
|
29426
|
+
_this.setupShadow();
|
|
29427
|
+
}
|
|
29428
|
+
_this.setupOutline();
|
|
29430
29429
|
charsInfo.forEach(function(charInfo) {
|
|
29431
29430
|
var ox = layout.getOffsetX(style, charInfo.width);
|
|
29432
29431
|
for(var i = 0; i < charInfo.chars.length; i++){
|
|
@@ -29436,8 +29435,15 @@ exports.TextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
29436
29435
|
context.strokeText(str, drawX, drawY);
|
|
29437
29436
|
}
|
|
29438
29437
|
});
|
|
29438
|
+
// 描边完成后立即禁用阴影,避免填充时重复绘制阴影
|
|
29439
|
+
if (style.hasShadow) {
|
|
29440
|
+
context.shadowColor = "transparent";
|
|
29441
|
+
}
|
|
29442
|
+
}
|
|
29443
|
+
// 填充阶段:无描边时才启用阴影
|
|
29444
|
+
if (!hasOutline && style.hasShadow) {
|
|
29445
|
+
_this.setupShadow();
|
|
29439
29446
|
}
|
|
29440
|
-
// 再填充
|
|
29441
29447
|
charsInfo.forEach(function(charInfo) {
|
|
29442
29448
|
var ox = layout.getOffsetX(style, charInfo.width);
|
|
29443
29449
|
for(var i = 0; i < charInfo.chars.length; i++){
|
|
@@ -29447,6 +29453,7 @@ exports.TextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
29447
29453
|
context.fillText(str, drawX, drawY);
|
|
29448
29454
|
}
|
|
29449
29455
|
});
|
|
29456
|
+
// 清理阴影状态
|
|
29450
29457
|
if (style.hasShadow) {
|
|
29451
29458
|
context.shadowColor = "transparent";
|
|
29452
29459
|
}
|
|
@@ -31630,7 +31637,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
31630
31637
|
return ret;
|
|
31631
31638
|
}
|
|
31632
31639
|
|
|
31633
|
-
var version$1 = "2.8.
|
|
31640
|
+
var version$1 = "2.8.9";
|
|
31634
31641
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
31635
31642
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
31636
31643
|
var reverseParticle = false;
|
|
@@ -35330,7 +35337,7 @@ registerPlugin("text", TextLoader);
|
|
|
35330
35337
|
registerPlugin("sprite", SpriteLoader);
|
|
35331
35338
|
registerPlugin("particle", ParticleLoader);
|
|
35332
35339
|
registerPlugin("interact", InteractLoader);
|
|
35333
|
-
var version = "2.8.
|
|
35340
|
+
var version = "2.8.9";
|
|
35334
35341
|
logger.info("Core version: " + version + ".");
|
|
35335
35342
|
|
|
35336
35343
|
exports.ActivationMixerPlayable = ActivationMixerPlayable;
|