@galacean/effects-core 2.8.4 → 2.8.6
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 +25 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -15
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/particle/link.d.ts +1 -2
- package/dist/plugins/particle/particle-system.d.ts +1 -0
- 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.8.
|
|
6
|
+
* Version: v2.8.6
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -23510,8 +23510,20 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
23510
23510
|
this.destroyed = false;
|
|
23511
23511
|
};
|
|
23512
23512
|
_proto.onStart = function onStart() {
|
|
23513
|
+
var _this = this;
|
|
23513
23514
|
this.startEmit();
|
|
23514
23515
|
this.initEmitterTransform();
|
|
23516
|
+
this.item.on("click", function() {
|
|
23517
|
+
var _this_interaction;
|
|
23518
|
+
if (((_this_interaction = _this.interaction) == null ? void 0 : _this_interaction.behavior) === ParticleInteractionBehavior.removeParticle) {
|
|
23519
|
+
var pointIndex = _this.clickedPoint.content[1];
|
|
23520
|
+
_this.renderer.removeParticlePoint(pointIndex);
|
|
23521
|
+
_this.clearPointTrail(pointIndex);
|
|
23522
|
+
_this.clickedPoint.content = [
|
|
23523
|
+
0
|
|
23524
|
+
];
|
|
23525
|
+
}
|
|
23526
|
+
});
|
|
23515
23527
|
};
|
|
23516
23528
|
_proto.onUpdate = function onUpdate(dt) {
|
|
23517
23529
|
this.update(dt);
|
|
@@ -23614,7 +23626,10 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
23614
23626
|
this.particleLink.forEach(function(content) {
|
|
23615
23627
|
content[0] -= duration;
|
|
23616
23628
|
content[2] -= duration;
|
|
23617
|
-
|
|
23629
|
+
// TODO 优化粒子销毁逻辑
|
|
23630
|
+
if (content[3]) {
|
|
23631
|
+
content[3].delay -= duration;
|
|
23632
|
+
}
|
|
23618
23633
|
});
|
|
23619
23634
|
this.renderer.minusTimeForLoop(duration);
|
|
23620
23635
|
} else {
|
|
@@ -23706,7 +23721,7 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
23706
23721
|
var finish = false;
|
|
23707
23722
|
if (node && node.content) {
|
|
23708
23723
|
do {
|
|
23709
|
-
var _node_content = node.content, currentTime = _node_content[0]
|
|
23724
|
+
var _node_content = node.content, currentTime = _node_content[0]; _node_content[2]; var point = _node_content[3];
|
|
23710
23725
|
if (currentTime > this.timePassed) {
|
|
23711
23726
|
var pos = this.getPointPosition(point);
|
|
23712
23727
|
var ray = options.ray;
|
|
@@ -23718,13 +23733,7 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
23718
23733
|
}, temp);
|
|
23719
23734
|
}
|
|
23720
23735
|
if (pass) {
|
|
23721
|
-
|
|
23722
|
-
renderer.removeParticlePoint(pointIndex);
|
|
23723
|
-
this.clearPointTrail(pointIndex);
|
|
23724
|
-
node.content = [
|
|
23725
|
-
0
|
|
23726
|
-
];
|
|
23727
|
-
}
|
|
23736
|
+
this.clickedPoint = node;
|
|
23728
23737
|
hitPositions.push(pos);
|
|
23729
23738
|
if (!options.multiple) {
|
|
23730
23739
|
finish = true;
|
|
@@ -29343,7 +29352,8 @@ exports.TextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
29343
29352
|
var fontSize = style.fontSize * fontScale;
|
|
29344
29353
|
var lineHeight = layout.lineHeight * fontScale;
|
|
29345
29354
|
style.fontDesc = this.getFontDesc(fontSize);
|
|
29346
|
-
|
|
29355
|
+
// 使用 Array.from 正确分割 Unicode 字符(包括 emoji)
|
|
29356
|
+
var char = Array.from(this.text || "");
|
|
29347
29357
|
var baseHeight = 0;
|
|
29348
29358
|
if (layout.autoWidth) {
|
|
29349
29359
|
baseHeight = finalHeight * fontScale;
|
|
@@ -31615,7 +31625,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
31615
31625
|
return ret;
|
|
31616
31626
|
}
|
|
31617
31627
|
|
|
31618
|
-
var version$1 = "2.8.
|
|
31628
|
+
var version$1 = "2.8.6";
|
|
31619
31629
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
31620
31630
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
31621
31631
|
var reverseParticle = false;
|
|
@@ -34675,8 +34685,8 @@ var DEFAULT_FPS = 60;
|
|
|
34675
34685
|
});
|
|
34676
34686
|
this.resetTickers = false;
|
|
34677
34687
|
}
|
|
34678
|
-
for(var
|
|
34679
|
-
var tick =
|
|
34688
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.tickers), _step; !(_step = _iterator()).done;){
|
|
34689
|
+
var tick = _step.value;
|
|
34680
34690
|
tick(this.dt);
|
|
34681
34691
|
}
|
|
34682
34692
|
}
|
|
@@ -35315,7 +35325,7 @@ registerPlugin("text", TextLoader);
|
|
|
35315
35325
|
registerPlugin("sprite", SpriteLoader);
|
|
35316
35326
|
registerPlugin("particle", ParticleLoader);
|
|
35317
35327
|
registerPlugin("interact", InteractLoader);
|
|
35318
|
-
var version = "2.8.
|
|
35328
|
+
var version = "2.8.6";
|
|
35319
35329
|
logger.info("Core version: " + version + ".");
|
|
35320
35330
|
|
|
35321
35331
|
exports.ActivationMixerPlayable = ActivationMixerPlayable;
|