@galacean/effects-threejs 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 +16 -10
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +16 -10
- 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 threejs plugin 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';
|
|
@@ -16414,6 +16414,7 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16414
16414
|
0
|
|
16415
16415
|
]
|
|
16416
16416
|
};
|
|
16417
|
+
_this.duringPlay = false;
|
|
16417
16418
|
/** 是否响应点击和拖拽交互事件 */ _this._interactive = true;
|
|
16418
16419
|
_this.getHitTestParams = function(force) {
|
|
16419
16420
|
if (!_this.clickable) {
|
|
@@ -16478,7 +16479,10 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16478
16479
|
_proto.onDisable = function onDisable() {
|
|
16479
16480
|
if (this.item && this.item.composition) {
|
|
16480
16481
|
var _this_previewContent;
|
|
16481
|
-
|
|
16482
|
+
if (this.duringPlay) {
|
|
16483
|
+
this.item.composition.removeInteractiveItem(this.item, this.item.props.content.options.type);
|
|
16484
|
+
this.duringPlay = false;
|
|
16485
|
+
}
|
|
16482
16486
|
this.clickable = false;
|
|
16483
16487
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.mesh.dispose();
|
|
16484
16488
|
this.endDragTarget();
|
|
@@ -16489,15 +16493,15 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16489
16493
|
if (type === InteractType.CLICK) {
|
|
16490
16494
|
this.clickable = true;
|
|
16491
16495
|
}
|
|
16492
|
-
var options = this.item.props.content.options;
|
|
16493
|
-
if (this.item.composition) {
|
|
16494
|
-
this.item.composition.addInteractiveItem(this.item, options.type);
|
|
16495
|
-
}
|
|
16496
16496
|
};
|
|
16497
16497
|
_proto.onUpdate = function onUpdate(dt) {
|
|
16498
16498
|
var _this_previewContent;
|
|
16499
|
-
|
|
16500
|
-
|
|
16499
|
+
this.duringPlay = true;
|
|
16500
|
+
// trigger messageBegin when item enter
|
|
16501
|
+
if (this.item.time > 0 && this.item.time - dt / 1000 <= 0) {
|
|
16502
|
+
var _this_item_composition;
|
|
16503
|
+
var options = this.item.props.content.options;
|
|
16504
|
+
(_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.addInteractiveItem(this.item, options.type);
|
|
16501
16505
|
}
|
|
16502
16506
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
|
|
16503
16507
|
if (!this.dragEvent || !this.bouncingArg) {
|
|
@@ -24633,6 +24637,8 @@ exports.TextComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
|
24633
24637
|
/**
|
|
24634
24638
|
* 文本行数
|
|
24635
24639
|
*/ _this.lineCount = 0;
|
|
24640
|
+
_this.SCALE_FACTOR = 0.1;
|
|
24641
|
+
_this.ALPHA_FIX_VALUE = 1 / 255;
|
|
24636
24642
|
_this.name = "MText" + seed$2++;
|
|
24637
24643
|
_this.geometry = _this.createGeometry(glContext.TRIANGLES);
|
|
24638
24644
|
if (props) {
|
|
@@ -31154,7 +31160,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
|
|
|
31154
31160
|
registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
|
|
31155
31161
|
registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
|
|
31156
31162
|
registerPlugin("interact", InteractLoader, exports.VFXItem, true);
|
|
31157
|
-
var version$1 = "2.1.0-alpha.
|
|
31163
|
+
var version$1 = "2.1.0-alpha.12";
|
|
31158
31164
|
logger.info("Core version: " + version$1 + ".");
|
|
31159
31165
|
|
|
31160
31166
|
var _obj;
|
|
@@ -32798,7 +32804,7 @@ setMaxSpriteMeshItemCount(8);
|
|
|
32798
32804
|
*/ Mesh.create = function(engine, props) {
|
|
32799
32805
|
return new ThreeMesh(engine, props);
|
|
32800
32806
|
};
|
|
32801
|
-
var version = "2.1.0-alpha.
|
|
32807
|
+
var version = "2.1.0-alpha.12";
|
|
32802
32808
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
32803
32809
|
|
|
32804
32810
|
exports.AbstractPlugin = AbstractPlugin;
|