@galacean/effects-plugin-model 2.0.2 → 2.1.0-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.mjs CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects player model plugin
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 飂兮
6
- * Version: v2.0.2
6
+ * Version: v2.1.0-alpha.0
7
7
  */
8
8
 
9
9
  import * as EFFECTS from '@galacean/effects';
@@ -4428,7 +4428,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4428
4428
  var _proto = ModelMeshComponent.prototype;
4429
4429
  /**
4430
4430
  * 组件开始,需要创建内部对象,更新父元素信息和添加到场景管理器中
4431
- */ _proto.start = function start() {
4431
+ */ _proto.onStart = function onStart() {
4432
4432
  var _this_sceneManager;
4433
4433
  this.sceneManager = getSceneManager(this);
4434
4434
  this.createContent();
@@ -4444,7 +4444,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4444
4444
  /**
4445
4445
  * 组件更新,更新内部对象状态
4446
4446
  * @param dt - 更新间隔
4447
- */ _proto.update = function update(dt) {
4447
+ */ _proto.onUpdate = function onUpdate(dt) {
4448
4448
  if (this.sceneManager) {
4449
4449
  this.content.build(this.sceneManager);
4450
4450
  }
@@ -4453,7 +4453,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4453
4453
  /**
4454
4454
  * 组件晚更新,晚更新内部对象状态
4455
4455
  * @param dt - 更新间隔
4456
- */ _proto.lateUpdate = function lateUpdate(dt) {
4456
+ */ _proto.onLateUpdate = function onLateUpdate(dt) {
4457
4457
  this.content.lateUpdate();
4458
4458
  };
4459
4459
  /**
@@ -4551,7 +4551,7 @@ var ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
4551
4551
  var _proto = ModelSkyboxComponent.prototype;
4552
4552
  /**
4553
4553
  * 组件开始,需要创建内部对象和添加到场景管理器中
4554
- */ _proto.start = function start() {
4554
+ */ _proto.onStart = function onStart() {
4555
4555
  var _this_sceneManager;
4556
4556
  this.createContent();
4557
4557
  this.item.type = VFX_ITEM_TYPE_3D;
@@ -4625,7 +4625,7 @@ var ModelLightComponent = /*#__PURE__*/ function(Behaviour) {
4625
4625
  var _proto = ModelLightComponent.prototype;
4626
4626
  /**
4627
4627
  * 组件开始,需要创建内部对象和添加到场景管理器中
4628
- */ _proto.start = function start() {
4628
+ */ _proto.onStart = function onStart() {
4629
4629
  this.createContent();
4630
4630
  this.item.type = VFX_ITEM_TYPE_3D;
4631
4631
  var scene = getSceneManager(this);
@@ -4635,7 +4635,7 @@ var ModelLightComponent = /*#__PURE__*/ function(Behaviour) {
4635
4635
  /**
4636
4636
  * 组件更新,更新内部对象状态
4637
4637
  * @param dt - 更新间隔
4638
- */ _proto.update = function update(dt) {
4638
+ */ _proto.onUpdate = function onUpdate(dt) {
4639
4639
  this.content.update();
4640
4640
  };
4641
4641
  /**
@@ -4690,7 +4690,7 @@ var ModelCameraComponent = /*#__PURE__*/ function(Behaviour) {
4690
4690
  var _proto = ModelCameraComponent.prototype;
4691
4691
  /**
4692
4692
  * 组件开始,需要创建内部对象和添加到场景管理器中
4693
- */ _proto.start = function start() {
4693
+ */ _proto.onStart = function onStart() {
4694
4694
  this.createContent();
4695
4695
  this.item.type = VFX_ITEM_TYPE_3D;
4696
4696
  var scene = getSceneManager(this);
@@ -4700,7 +4700,7 @@ var ModelCameraComponent = /*#__PURE__*/ function(Behaviour) {
4700
4700
  /**
4701
4701
  * 组件更新,更新内部对象状态
4702
4702
  * @param dt - 更新间隔
4703
- */ _proto.update = function update(dt) {
4703
+ */ _proto.onUpdate = function onUpdate(dt) {
4704
4704
  this.content.update();
4705
4705
  this.updateMainCamera();
4706
4706
  };
@@ -4771,14 +4771,14 @@ var AnimationComponent = /*#__PURE__*/ function(Behaviour) {
4771
4771
  var _proto = AnimationComponent.prototype;
4772
4772
  /**
4773
4773
  * 组件开始,需要创建内部对象和添加到场景管理器中
4774
- */ _proto.start = function start() {
4774
+ */ _proto.onStart = function onStart() {
4775
4775
  this.elapsedTime = 0;
4776
4776
  this.item.type = VFX_ITEM_TYPE_3D;
4777
4777
  };
4778
4778
  /**
4779
4779
  * 组件更新,更新内部对象状态
4780
4780
  * @param dt - 更新间隔
4781
- */ _proto.update = function update(dt) {
4781
+ */ _proto.onUpdate = function onUpdate(dt) {
4782
4782
  this.elapsedTime += dt * 0.001;
4783
4783
  if (this.animation >= 0 && this.animation < this.clips.length) {
4784
4784
  this.clips[this.animation].sampleAnimation(this.item, this.elapsedTime);
@@ -9756,7 +9756,7 @@ var ModelPluginComponent = /*#__PURE__*/ function(Behaviour) {
9756
9756
  /**
9757
9757
  * 组件后更新,合成相机和场景管理器更新
9758
9758
  * @param dt - 更新间隔
9759
- */ _proto.lateUpdate = function lateUpdate(dt) {
9759
+ */ _proto.onLateUpdate = function onLateUpdate(dt) {
9760
9760
  var composition = this.item.composition;
9761
9761
  if (this.autoAdjustScene && this.scene.tickCount == 1) {
9762
9762
  var _composition_items;
@@ -10046,7 +10046,7 @@ var ModelTreeComponent = /*#__PURE__*/ function(Behaviour) {
10046
10046
  };
10047
10047
  /**
10048
10048
  * 组件开始,查询合成中场景管理器并设置到动画管理器中
10049
- */ _proto.start = function start() {
10049
+ */ _proto.onStart = function onStart() {
10050
10050
  this.item.type = spec.ItemType.tree;
10051
10051
  this.content.baseTransform.setValid(true);
10052
10052
  var sceneManager = getSceneManager(this);
@@ -10057,7 +10057,7 @@ var ModelTreeComponent = /*#__PURE__*/ function(Behaviour) {
10057
10057
  /**
10058
10058
  * 组件更新,内部对象更新
10059
10059
  * @param dt
10060
- */ _proto.update = function update(dt) {
10060
+ */ _proto.onUpdate = function onUpdate(dt) {
10061
10061
  var // this.timeline?.getRenderData(time, true);
10062
10062
  // TODO: 需要使用lifetime
10063
10063
  _this_content;
@@ -13779,7 +13779,7 @@ var GLTFHelper = /*#__PURE__*/ function() {
13779
13779
 
13780
13780
  registerPlugin("tree", ModelTreePlugin, VFXItem, true);
13781
13781
  registerPlugin("model", ModelPlugin, VFXItem);
13782
- var version = "2.0.2";
13782
+ var version = "2.1.0-alpha.0";
13783
13783
  logger.info("Plugin model version: " + version + ".");
13784
13784
  if (version !== EFFECTS.version) {
13785
13785
  console.error("注意:请统一 Model 插件与 Player 版本,不统一的版本混用会有不可预知的后果!", "\nAttention: Please ensure the Model plugin is synchronized with the Player version. Mixing and matching incompatible versions may result in unpredictable consequences!");