@galacean/effects-threejs 2.1.5-alpha.0 → 2.1.5

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.5-alpha.0
6
+ * Version: v2.1.5
7
7
  */
8
8
 
9
9
  'use strict';
@@ -16604,17 +16604,10 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
16604
16604
  ];
16605
16605
  };
16606
16606
  _proto.onStart = function onStart() {
16607
- var _this = this;
16608
- var _this_item_composition;
16609
16607
  var options = this.item.props.content.options;
16610
16608
  var env = this.item.engine.renderer.env;
16611
16609
  var composition = this.item.composition;
16612
16610
  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
- });
16618
16611
  if (type === InteractType.CLICK) {
16619
16612
  this.clickable = true;
16620
16613
  if (showPreview && env === PLAYER_OPTIONS_ENV_EDITOR) {
@@ -16655,12 +16648,12 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
16655
16648
  };
16656
16649
  _proto.onUpdate = function onUpdate(dt) {
16657
16650
  var _this_previewContent;
16651
+ this.duringPlay = true;
16658
16652
  // trigger messageBegin when item enter
16659
- if (this.item.time > 0 && !this.duringPlay) {
16653
+ if (this.item.time > 0 && this.item.time - dt / 1000 <= 0) {
16660
16654
  var _this_item_composition;
16661
16655
  var options = this.item.props.content.options;
16662
16656
  (_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.addInteractiveItem(this.item, options.type);
16663
- this.duringPlay = true;
16664
16657
  }
16665
16658
  (_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
16666
16659
  if (!this.dragEvent || !this.bouncingArg) {
@@ -23337,7 +23330,7 @@ var RuntimeClip = /*#__PURE__*/ function() {
23337
23330
  this.playable.play();
23338
23331
  }
23339
23332
  this.parentMixer.setInputWeight(this.playable, weight);
23340
- var clipTime = clip.toLocalTime(localTime);
23333
+ var clipTime = parseFloat(clip.toLocalTime(localTime).toFixed(3));
23341
23334
  this.playable.setTime(clipTime);
23342
23335
  // 判断动画是否结束
23343
23336
  if (ended) {
@@ -28937,7 +28930,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
28937
28930
  if (!this.assigned || this.paused) {
28938
28931
  return;
28939
28932
  }
28940
- var dt = this.getUpdateTime(deltaTime * this.speed);
28933
+ var dt = parseFloat(this.getUpdateTime(deltaTime * this.speed).toFixed(0));
28941
28934
  this.updateRootComposition(dt / 1000);
28942
28935
  this.updateVideo();
28943
28936
  // 更新 model-tree-plugin
@@ -31414,7 +31407,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
31414
31407
  registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
31415
31408
  registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
31416
31409
  registerPlugin("interact", InteractLoader, exports.VFXItem, true);
31417
- var version$1 = "2.1.5-alpha.0";
31410
+ var version$1 = "2.1.5";
31418
31411
  logger.info("Core version: " + version$1 + ".");
31419
31412
 
31420
31413
  var _obj;
@@ -33041,7 +33034,7 @@ setMaxSpriteMeshItemCount(8);
33041
33034
  */ Mesh.create = function(engine, props) {
33042
33035
  return new ThreeMesh(engine, props);
33043
33036
  };
33044
- var version = "2.1.5-alpha.0";
33037
+ var version = "2.1.5";
33045
33038
  logger.info("THREEJS plugin version: " + version + ".");
33046
33039
 
33047
33040
  exports.AbstractPlugin = AbstractPlugin;