@galacean/effects-core 2.1.0 → 2.1.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 CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects runtime core for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v2.1.0
6
+ * Version: v2.1.2-alpha.0
7
7
  */
8
8
 
9
9
  'use strict';
@@ -16597,13 +16597,11 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
16597
16597
  _proto.onDisable = function onDisable() {
16598
16598
  RendererComponent.prototype.onDisable.call(this);
16599
16599
  if (this.item && this.item.composition) {
16600
- var _this_previewContent;
16601
16600
  if (this.duringPlay && !this.item.transform.getValid()) {
16602
16601
  this.item.composition.removeInteractiveItem(this.item, this.item.props.content.options.type);
16603
16602
  this.duringPlay = false;
16604
16603
  }
16605
16604
  this.clickable = false;
16606
- (_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.mesh.dispose();
16607
16605
  this.endDragTarget();
16608
16606
  }
16609
16607
  };
@@ -16640,10 +16638,14 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
16640
16638
  };
16641
16639
  _proto.render = function render(renderer) {
16642
16640
  if (this.previewContent) {
16641
+ this.previewContent.mesh.worldMatrix = this.transform.getWorldMatrix();
16643
16642
  this.previewContent.mesh.render(renderer);
16644
16643
  }
16645
16644
  };
16646
- _proto.onDestroy = function onDestroy() {};
16645
+ _proto.onDestroy = function onDestroy() {
16646
+ var _this_previewContent;
16647
+ (_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.mesh.dispose();
16648
+ };
16647
16649
  _proto.endDragTarget = function endDragTarget() {
16648
16650
  // OVERRIDE
16649
16651
  };
@@ -17001,7 +17003,7 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
17001
17003
  // 更新节点时间
17002
17004
  for(var _iterator3 = _create_for_of_iterator_helper_loose(this.playables), _step3; !(_step3 = _iterator3()).done;){
17003
17005
  var playable = _step3.value;
17004
- this.updatePlayableTime(playable, dt);
17006
+ this.updatePlayableTime(playable, dt / 1000);
17005
17007
  }
17006
17008
  };
17007
17009
  _proto.connect = function connect(source, sourceOutputPort, destination, destinationInputPort) {
@@ -28473,14 +28475,12 @@ var listOrder = 0;
28473
28475
  if (Number.isInteger(shape)) {
28474
28476
  var _this_jsonScene;
28475
28477
  shapeData = (_this_jsonScene = this.jsonScene) == null ? void 0 : _this_jsonScene.shapes[shape];
28476
- } else {
28478
+ } else if (shape) {
28477
28479
  shapeData = shape;
28478
28480
  }
28479
- if (shapeData !== undefined) {
28480
- if (!("aPoint" in shapeData && "index" in shapeData)) {
28481
- // @ts-expect-error 类型转换问题
28482
- renderContent.renderer.shape = getGeometryByShape(shapeData, split);
28483
- }
28481
+ if (shapeData !== undefined && !("aPoint" in shapeData && "index" in shapeData)) {
28482
+ // @ts-expect-error 类型转换问题
28483
+ renderContent.renderer.shape = getGeometryByShape(shapeData, split);
28484
28484
  }
28485
28485
  }
28486
28486
  if ("trails" in renderContent && renderContent.trails !== undefined) {
@@ -29019,7 +29019,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
29019
29019
  * 更新主合成组件
29020
29020
  */ _proto.updateRootComposition = function updateRootComposition(deltaTime) {
29021
29021
  if (this.rootComposition.isActiveAndEnabled) {
29022
- var localTime = this.time + deltaTime - this.rootItem.start;
29022
+ var localTime = parseFloat((this.time + deltaTime - this.rootItem.start).toFixed(3));
29023
29023
  var isEnded = false;
29024
29024
  var duration = this.rootItem.duration;
29025
29025
  var endBehavior = this.rootItem.endBehavior;
@@ -31381,7 +31381,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
31381
31381
  registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
31382
31382
  registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
31383
31383
  registerPlugin("interact", InteractLoader, exports.VFXItem, true);
31384
- var version = "2.1.0";
31384
+ var version = "2.1.2-alpha.0";
31385
31385
  logger.info("Core version: " + version + ".");
31386
31386
 
31387
31387
  exports.AbstractPlugin = AbstractPlugin;