@galacean/effects-threejs 2.1.4 → 2.1.5-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 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.4
6
+ * Version: v2.1.5-alpha.0
7
7
  */
8
8
 
9
9
  'use strict';
@@ -16604,10 +16604,17 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
16604
16604
  ];
16605
16605
  };
16606
16606
  _proto.onStart = function onStart() {
16607
+ var _this = this;
16608
+ var _this_item_composition;
16607
16609
  var options = this.item.props.content.options;
16608
16610
  var env = this.item.engine.renderer.env;
16609
16611
  var composition = this.item.composition;
16610
16612
  var _this_interactData_options = this.interactData.options, type = _this_interactData_options.type, showPreview = _this_interactData_options.showPreview;
16613
+ (_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.on("goto", function() {
16614
+ if (_this.item.time > 0) {
16615
+ _this.duringPlay = true;
16616
+ }
16617
+ });
16611
16618
  if (type === InteractType.CLICK) {
16612
16619
  this.clickable = true;
16613
16620
  if (showPreview && env === PLAYER_OPTIONS_ENV_EDITOR) {
@@ -16648,12 +16655,12 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
16648
16655
  };
16649
16656
  _proto.onUpdate = function onUpdate(dt) {
16650
16657
  var _this_previewContent;
16651
- this.duringPlay = true;
16652
16658
  // trigger messageBegin when item enter
16653
- if (this.item.time > 0 && this.item.time - dt / 1000 <= 0) {
16659
+ if (this.item.time > 0 && !this.duringPlay) {
16654
16660
  var _this_item_composition;
16655
16661
  var options = this.item.props.content.options;
16656
16662
  (_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.addInteractiveItem(this.item, options.type);
16663
+ this.duringPlay = true;
16657
16664
  }
16658
16665
  (_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
16659
16666
  if (!this.dragEvent || !this.bouncingArg) {
@@ -31407,7 +31414,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
31407
31414
  registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
31408
31415
  registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
31409
31416
  registerPlugin("interact", InteractLoader, exports.VFXItem, true);
31410
- var version$1 = "2.1.4";
31417
+ var version$1 = "2.1.5-alpha.0";
31411
31418
  logger.info("Core version: " + version$1 + ".");
31412
31419
 
31413
31420
  var _obj;
@@ -33034,7 +33041,7 @@ setMaxSpriteMeshItemCount(8);
33034
33041
  */ Mesh.create = function(engine, props) {
33035
33042
  return new ThreeMesh(engine, props);
33036
33043
  };
33037
- var version = "2.1.4";
33044
+ var version = "2.1.5-alpha.0";
33038
33045
  logger.info("THREEJS plugin version: " + version + ".");
33039
33046
 
33040
33047
  exports.AbstractPlugin = AbstractPlugin;