@galacean/effects-threejs 2.1.0 → 2.1.1

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.0
6
+ * Version: v2.1.1
7
7
  */
8
8
 
9
9
  'use strict';
@@ -16619,13 +16619,11 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
16619
16619
  _proto.onDisable = function onDisable() {
16620
16620
  RendererComponent.prototype.onDisable.call(this);
16621
16621
  if (this.item && this.item.composition) {
16622
- var _this_previewContent;
16623
16622
  if (this.duringPlay && !this.item.transform.getValid()) {
16624
16623
  this.item.composition.removeInteractiveItem(this.item, this.item.props.content.options.type);
16625
16624
  this.duringPlay = false;
16626
16625
  }
16627
16626
  this.clickable = false;
16628
- (_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.mesh.dispose();
16629
16627
  this.endDragTarget();
16630
16628
  }
16631
16629
  };
@@ -16662,10 +16660,14 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
16662
16660
  };
16663
16661
  _proto.render = function render(renderer) {
16664
16662
  if (this.previewContent) {
16663
+ this.previewContent.mesh.worldMatrix = this.transform.getWorldMatrix();
16665
16664
  this.previewContent.mesh.render(renderer);
16666
16665
  }
16667
16666
  };
16668
- _proto.onDestroy = function onDestroy() {};
16667
+ _proto.onDestroy = function onDestroy() {
16668
+ var _this_previewContent;
16669
+ (_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.mesh.dispose();
16670
+ };
16669
16671
  _proto.endDragTarget = function endDragTarget() {
16670
16672
  // OVERRIDE
16671
16673
  };
@@ -17023,7 +17025,7 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
17023
17025
  // 更新节点时间
17024
17026
  for(var _iterator3 = _create_for_of_iterator_helper_loose(this.playables), _step3; !(_step3 = _iterator3()).done;){
17025
17027
  var playable = _step3.value;
17026
- this.updatePlayableTime(playable, dt);
17028
+ this.updatePlayableTime(playable, dt / 1000);
17027
17029
  }
17028
17030
  };
17029
17031
  _proto.connect = function connect(source, sourceOutputPort, destination, destinationInputPort) {
@@ -28495,14 +28497,12 @@ var listOrder = 0;
28495
28497
  if (Number.isInteger(shape)) {
28496
28498
  var _this_jsonScene;
28497
28499
  shapeData = (_this_jsonScene = this.jsonScene) == null ? void 0 : _this_jsonScene.shapes[shape];
28498
- } else {
28500
+ } else if (shape) {
28499
28501
  shapeData = shape;
28500
28502
  }
28501
- if (shapeData !== undefined) {
28502
- if (!("aPoint" in shapeData && "index" in shapeData)) {
28503
- // @ts-expect-error 类型转换问题
28504
- renderContent.renderer.shape = getGeometryByShape(shapeData, split);
28505
- }
28503
+ if (shapeData !== undefined && !("aPoint" in shapeData && "index" in shapeData)) {
28504
+ // @ts-expect-error 类型转换问题
28505
+ renderContent.renderer.shape = getGeometryByShape(shapeData, split);
28506
28506
  }
28507
28507
  }
28508
28508
  if ("trails" in renderContent && renderContent.trails !== undefined) {
@@ -29041,7 +29041,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
29041
29041
  * 更新主合成组件
29042
29042
  */ _proto.updateRootComposition = function updateRootComposition(deltaTime) {
29043
29043
  if (this.rootComposition.isActiveAndEnabled) {
29044
- var localTime = this.time + deltaTime - this.rootItem.start;
29044
+ var localTime = parseFloat((this.time + deltaTime - this.rootItem.start).toFixed(3));
29045
29045
  var isEnded = false;
29046
29046
  var duration = this.rootItem.duration;
29047
29047
  var endBehavior = this.rootItem.endBehavior;
@@ -31403,7 +31403,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
31403
31403
  registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
31404
31404
  registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
31405
31405
  registerPlugin("interact", InteractLoader, exports.VFXItem, true);
31406
- var version$1 = "2.1.0";
31406
+ var version$1 = "2.1.1";
31407
31407
  logger.info("Core version: " + version$1 + ".");
31408
31408
 
31409
31409
  var _obj;
@@ -33030,7 +33030,7 @@ setMaxSpriteMeshItemCount(8);
33030
33030
  */ Mesh.create = function(engine, props) {
33031
33031
  return new ThreeMesh(engine, props);
33032
33032
  };
33033
- var version = "2.1.0";
33033
+ var version = "2.1.1";
33034
33034
  logger.info("THREEJS plugin version: " + version + ".");
33035
33035
 
33036
33036
  exports.AbstractPlugin = AbstractPlugin;