@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/loader.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';
@@ -3637,7 +3637,7 @@ var ModelPluginComponent = /*#__PURE__*/ function(Behaviour) {
3637
3637
  /**
3638
3638
  * 组件后更新,合成相机和场景管理器更新
3639
3639
  * @param dt - 更新间隔
3640
- */ _proto.lateUpdate = function lateUpdate(dt) {
3640
+ */ _proto.onLateUpdate = function onLateUpdate(dt) {
3641
3641
  var composition = this.item.composition;
3642
3642
  if (this.autoAdjustScene && this.scene.tickCount == 1) {
3643
3643
  var _composition_items;
@@ -3927,7 +3927,7 @@ var ModelTreeComponent = /*#__PURE__*/ function(Behaviour) {
3927
3927
  };
3928
3928
  /**
3929
3929
  * 组件开始,查询合成中场景管理器并设置到动画管理器中
3930
- */ _proto.start = function start() {
3930
+ */ _proto.onStart = function onStart() {
3931
3931
  this.item.type = spec.ItemType.tree;
3932
3932
  this.content.baseTransform.setValid(true);
3933
3933
  var sceneManager = getSceneManager(this);
@@ -3938,7 +3938,7 @@ var ModelTreeComponent = /*#__PURE__*/ function(Behaviour) {
3938
3938
  /**
3939
3939
  * 组件更新,内部对象更新
3940
3940
  * @param dt
3941
- */ _proto.update = function update(dt) {
3941
+ */ _proto.onUpdate = function onUpdate(dt) {
3942
3942
  var // this.timeline?.getRenderData(time, true);
3943
3943
  // TODO: 需要使用lifetime
3944
3944
  _this_content;
@@ -4401,7 +4401,7 @@ var CameraGestureHandlerImp = /*#__PURE__*/ function() {
4401
4401
 
4402
4402
  registerPlugin("tree", ModelTreePlugin, VFXItem, true);
4403
4403
  registerPlugin("model", ModelPlugin, VFXItem);
4404
- var version = "2.0.2";
4404
+ var version = "2.1.0-alpha.0";
4405
4405
  logger.info("Plugin model version: " + version + ".");
4406
4406
  if (version !== EFFECTS.version) {
4407
4407
  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!");
@@ -4473,7 +4473,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4473
4473
  var _proto = ModelMeshComponent.prototype;
4474
4474
  /**
4475
4475
  * 组件开始,需要创建内部对象,更新父元素信息和添加到场景管理器中
4476
- */ _proto.start = function start() {
4476
+ */ _proto.onStart = function onStart() {
4477
4477
  var _this_sceneManager;
4478
4478
  this.sceneManager = getSceneManager(this);
4479
4479
  this.createContent();
@@ -4489,7 +4489,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4489
4489
  /**
4490
4490
  * 组件更新,更新内部对象状态
4491
4491
  * @param dt - 更新间隔
4492
- */ _proto.update = function update(dt) {
4492
+ */ _proto.onUpdate = function onUpdate(dt) {
4493
4493
  if (this.sceneManager) {
4494
4494
  this.content.build(this.sceneManager);
4495
4495
  }
@@ -4498,7 +4498,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4498
4498
  /**
4499
4499
  * 组件晚更新,晚更新内部对象状态
4500
4500
  * @param dt - 更新间隔
4501
- */ _proto.lateUpdate = function lateUpdate(dt) {
4501
+ */ _proto.onLateUpdate = function onLateUpdate(dt) {
4502
4502
  this.content.lateUpdate();
4503
4503
  };
4504
4504
  /**
@@ -4596,7 +4596,7 @@ var ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
4596
4596
  var _proto = ModelSkyboxComponent.prototype;
4597
4597
  /**
4598
4598
  * 组件开始,需要创建内部对象和添加到场景管理器中
4599
- */ _proto.start = function start() {
4599
+ */ _proto.onStart = function onStart() {
4600
4600
  var _this_sceneManager;
4601
4601
  this.createContent();
4602
4602
  this.item.type = VFX_ITEM_TYPE_3D;
@@ -4670,7 +4670,7 @@ var ModelLightComponent = /*#__PURE__*/ function(Behaviour) {
4670
4670
  var _proto = ModelLightComponent.prototype;
4671
4671
  /**
4672
4672
  * 组件开始,需要创建内部对象和添加到场景管理器中
4673
- */ _proto.start = function start() {
4673
+ */ _proto.onStart = function onStart() {
4674
4674
  this.createContent();
4675
4675
  this.item.type = VFX_ITEM_TYPE_3D;
4676
4676
  var scene = getSceneManager(this);
@@ -4680,7 +4680,7 @@ var ModelLightComponent = /*#__PURE__*/ function(Behaviour) {
4680
4680
  /**
4681
4681
  * 组件更新,更新内部对象状态
4682
4682
  * @param dt - 更新间隔
4683
- */ _proto.update = function update(dt) {
4683
+ */ _proto.onUpdate = function onUpdate(dt) {
4684
4684
  this.content.update();
4685
4685
  };
4686
4686
  /**
@@ -4735,7 +4735,7 @@ var ModelCameraComponent = /*#__PURE__*/ function(Behaviour) {
4735
4735
  var _proto = ModelCameraComponent.prototype;
4736
4736
  /**
4737
4737
  * 组件开始,需要创建内部对象和添加到场景管理器中
4738
- */ _proto.start = function start() {
4738
+ */ _proto.onStart = function onStart() {
4739
4739
  this.createContent();
4740
4740
  this.item.type = VFX_ITEM_TYPE_3D;
4741
4741
  var scene = getSceneManager(this);
@@ -4745,7 +4745,7 @@ var ModelCameraComponent = /*#__PURE__*/ function(Behaviour) {
4745
4745
  /**
4746
4746
  * 组件更新,更新内部对象状态
4747
4747
  * @param dt - 更新间隔
4748
- */ _proto.update = function update(dt) {
4748
+ */ _proto.onUpdate = function onUpdate(dt) {
4749
4749
  this.content.update();
4750
4750
  this.updateMainCamera();
4751
4751
  };
@@ -4816,14 +4816,14 @@ var AnimationComponent = /*#__PURE__*/ function(Behaviour) {
4816
4816
  var _proto = AnimationComponent.prototype;
4817
4817
  /**
4818
4818
  * 组件开始,需要创建内部对象和添加到场景管理器中
4819
- */ _proto.start = function start() {
4819
+ */ _proto.onStart = function onStart() {
4820
4820
  this.elapsedTime = 0;
4821
4821
  this.item.type = VFX_ITEM_TYPE_3D;
4822
4822
  };
4823
4823
  /**
4824
4824
  * 组件更新,更新内部对象状态
4825
4825
  * @param dt - 更新间隔
4826
- */ _proto.update = function update(dt) {
4826
+ */ _proto.onUpdate = function onUpdate(dt) {
4827
4827
  this.elapsedTime += dt * 0.001;
4828
4828
  if (this.animation >= 0 && this.animation < this.clips.length) {
4829
4829
  this.clips[this.animation].sampleAnimation(this.item, this.elapsedTime);