@galacean/effects-threejs 2.2.1-alpha.0 → 2.2.2-alpha.0
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 +12 -5
- 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 +12 -5
- 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.2.
|
|
6
|
+
* Version: v2.2.2-alpha.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -16608,10 +16608,17 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16608
16608
|
];
|
|
16609
16609
|
};
|
|
16610
16610
|
_proto.onStart = function onStart() {
|
|
16611
|
+
var _this = this;
|
|
16612
|
+
var _this_item_composition;
|
|
16611
16613
|
var options = this.item.props.content.options;
|
|
16612
16614
|
var env = this.item.engine.renderer.env;
|
|
16613
16615
|
var composition = this.item.composition;
|
|
16614
16616
|
var _this_interactData_options = this.interactData.options, type = _this_interactData_options.type, showPreview = _this_interactData_options.showPreview;
|
|
16617
|
+
(_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.on("goto", function() {
|
|
16618
|
+
if (_this.item.time > 0) {
|
|
16619
|
+
_this.duringPlay = true;
|
|
16620
|
+
}
|
|
16621
|
+
});
|
|
16615
16622
|
if (type === InteractType.CLICK) {
|
|
16616
16623
|
this.clickable = true;
|
|
16617
16624
|
if (showPreview && env === PLAYER_OPTIONS_ENV_EDITOR) {
|
|
@@ -16652,12 +16659,12 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16652
16659
|
};
|
|
16653
16660
|
_proto.onUpdate = function onUpdate(dt) {
|
|
16654
16661
|
var _this_previewContent;
|
|
16655
|
-
this.duringPlay = true;
|
|
16656
16662
|
// trigger messageBegin when item enter
|
|
16657
|
-
if (this.item.time > 0 && this.
|
|
16663
|
+
if (this.item.time > 0 && !this.duringPlay) {
|
|
16658
16664
|
var _this_item_composition;
|
|
16659
16665
|
var options = this.item.props.content.options;
|
|
16660
16666
|
(_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.addInteractiveItem(this.item, options.type);
|
|
16667
|
+
this.duringPlay = true;
|
|
16661
16668
|
}
|
|
16662
16669
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
|
|
16663
16670
|
if (!this.dragEvent || !this.bouncingArg) {
|
|
@@ -31366,7 +31373,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
|
|
|
31366
31373
|
registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
|
|
31367
31374
|
registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
|
|
31368
31375
|
registerPlugin("interact", InteractLoader, exports.VFXItem, true);
|
|
31369
|
-
var version$1 = "2.2.
|
|
31376
|
+
var version$1 = "2.2.2-alpha.0";
|
|
31370
31377
|
logger.info("Core version: " + version$1 + ".");
|
|
31371
31378
|
|
|
31372
31379
|
var _obj;
|
|
@@ -32999,7 +33006,7 @@ setMaxSpriteMeshItemCount(8);
|
|
|
32999
33006
|
*/ Mesh.create = function(engine, props) {
|
|
33000
33007
|
return new ThreeMesh(engine, props);
|
|
33001
33008
|
};
|
|
33002
|
-
var version = "2.2.
|
|
33009
|
+
var version = "2.2.2-alpha.0";
|
|
33003
33010
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
33004
33011
|
|
|
33005
33012
|
exports.AbstractPlugin = AbstractPlugin;
|