@galacean/effects-core 2.1.0-alpha.11 → 2.1.0-alpha.12
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
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.1.0-alpha.
|
|
6
|
+
* Version: v2.1.0-alpha.12
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -16392,6 +16392,7 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16392
16392
|
0
|
|
16393
16393
|
]
|
|
16394
16394
|
};
|
|
16395
|
+
_this.duringPlay = false;
|
|
16395
16396
|
/** 是否响应点击和拖拽交互事件 */ _this._interactive = true;
|
|
16396
16397
|
_this.getHitTestParams = function(force) {
|
|
16397
16398
|
if (!_this.clickable) {
|
|
@@ -16456,7 +16457,10 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16456
16457
|
_proto.onDisable = function onDisable() {
|
|
16457
16458
|
if (this.item && this.item.composition) {
|
|
16458
16459
|
var _this_previewContent;
|
|
16459
|
-
|
|
16460
|
+
if (this.duringPlay) {
|
|
16461
|
+
this.item.composition.removeInteractiveItem(this.item, this.item.props.content.options.type);
|
|
16462
|
+
this.duringPlay = false;
|
|
16463
|
+
}
|
|
16460
16464
|
this.clickable = false;
|
|
16461
16465
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.mesh.dispose();
|
|
16462
16466
|
this.endDragTarget();
|
|
@@ -16467,15 +16471,15 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16467
16471
|
if (type === InteractType.CLICK) {
|
|
16468
16472
|
this.clickable = true;
|
|
16469
16473
|
}
|
|
16470
|
-
var options = this.item.props.content.options;
|
|
16471
|
-
if (this.item.composition) {
|
|
16472
|
-
this.item.composition.addInteractiveItem(this.item, options.type);
|
|
16473
|
-
}
|
|
16474
16474
|
};
|
|
16475
16475
|
_proto.onUpdate = function onUpdate(dt) {
|
|
16476
16476
|
var _this_previewContent;
|
|
16477
|
-
|
|
16478
|
-
|
|
16477
|
+
this.duringPlay = true;
|
|
16478
|
+
// trigger messageBegin when item enter
|
|
16479
|
+
if (this.item.time > 0 && this.item.time - dt / 1000 <= 0) {
|
|
16480
|
+
var _this_item_composition;
|
|
16481
|
+
var options = this.item.props.content.options;
|
|
16482
|
+
(_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.addInteractiveItem(this.item, options.type);
|
|
16479
16483
|
}
|
|
16480
16484
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
|
|
16481
16485
|
if (!this.dragEvent || !this.bouncingArg) {
|
|
@@ -24611,6 +24615,8 @@ exports.TextComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
|
24611
24615
|
/**
|
|
24612
24616
|
* 文本行数
|
|
24613
24617
|
*/ _this.lineCount = 0;
|
|
24618
|
+
_this.SCALE_FACTOR = 0.1;
|
|
24619
|
+
_this.ALPHA_FIX_VALUE = 1 / 255;
|
|
24614
24620
|
_this.name = "MText" + seed$1++;
|
|
24615
24621
|
_this.geometry = _this.createGeometry(glContext.TRIANGLES);
|
|
24616
24622
|
if (props) {
|
|
@@ -31132,7 +31138,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
|
|
|
31132
31138
|
registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
|
|
31133
31139
|
registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
|
|
31134
31140
|
registerPlugin("interact", InteractLoader, exports.VFXItem, true);
|
|
31135
|
-
var version = "2.1.0-alpha.
|
|
31141
|
+
var version = "2.1.0-alpha.12";
|
|
31136
31142
|
logger.info("Core version: " + version + ".");
|
|
31137
31143
|
|
|
31138
31144
|
exports.AbstractPlugin = AbstractPlugin;
|