@galacean/effects-plugin-model 2.0.3 → 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/weapp.mjs CHANGED
@@ -4420,7 +4420,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4420
4420
  var _proto = ModelMeshComponent.prototype;
4421
4421
  /**
4422
4422
  * 组件开始,需要创建内部对象,更新父元素信息和添加到场景管理器中
4423
- */ _proto.start = function start() {
4423
+ */ _proto.onStart = function onStart() {
4424
4424
  var _this_sceneManager;
4425
4425
  this.sceneManager = getSceneManager(this);
4426
4426
  this.createContent();
@@ -4436,7 +4436,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4436
4436
  /**
4437
4437
  * 组件更新,更新内部对象状态
4438
4438
  * @param dt - 更新间隔
4439
- */ _proto.update = function update(dt) {
4439
+ */ _proto.onUpdate = function onUpdate(dt) {
4440
4440
  if (this.sceneManager) {
4441
4441
  this.content.build(this.sceneManager);
4442
4442
  }
@@ -4445,7 +4445,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4445
4445
  /**
4446
4446
  * 组件晚更新,晚更新内部对象状态
4447
4447
  * @param dt - 更新间隔
4448
- */ _proto.lateUpdate = function lateUpdate(dt) {
4448
+ */ _proto.onLateUpdate = function onLateUpdate(dt) {
4449
4449
  this.content.lateUpdate();
4450
4450
  };
4451
4451
  /**
@@ -4543,7 +4543,7 @@ var ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
4543
4543
  var _proto = ModelSkyboxComponent.prototype;
4544
4544
  /**
4545
4545
  * 组件开始,需要创建内部对象和添加到场景管理器中
4546
- */ _proto.start = function start() {
4546
+ */ _proto.onStart = function onStart() {
4547
4547
  var _this_sceneManager;
4548
4548
  this.createContent();
4549
4549
  this.item.type = VFX_ITEM_TYPE_3D;
@@ -4617,7 +4617,7 @@ var ModelLightComponent = /*#__PURE__*/ function(Behaviour) {
4617
4617
  var _proto = ModelLightComponent.prototype;
4618
4618
  /**
4619
4619
  * 组件开始,需要创建内部对象和添加到场景管理器中
4620
- */ _proto.start = function start() {
4620
+ */ _proto.onStart = function onStart() {
4621
4621
  this.createContent();
4622
4622
  this.item.type = VFX_ITEM_TYPE_3D;
4623
4623
  var scene = getSceneManager(this);
@@ -4627,7 +4627,7 @@ var ModelLightComponent = /*#__PURE__*/ function(Behaviour) {
4627
4627
  /**
4628
4628
  * 组件更新,更新内部对象状态
4629
4629
  * @param dt - 更新间隔
4630
- */ _proto.update = function update(dt) {
4630
+ */ _proto.onUpdate = function onUpdate(dt) {
4631
4631
  this.content.update();
4632
4632
  };
4633
4633
  /**
@@ -4682,7 +4682,7 @@ var ModelCameraComponent = /*#__PURE__*/ function(Behaviour) {
4682
4682
  var _proto = ModelCameraComponent.prototype;
4683
4683
  /**
4684
4684
  * 组件开始,需要创建内部对象和添加到场景管理器中
4685
- */ _proto.start = function start() {
4685
+ */ _proto.onStart = function onStart() {
4686
4686
  this.createContent();
4687
4687
  this.item.type = VFX_ITEM_TYPE_3D;
4688
4688
  var scene = getSceneManager(this);
@@ -4692,7 +4692,7 @@ var ModelCameraComponent = /*#__PURE__*/ function(Behaviour) {
4692
4692
  /**
4693
4693
  * 组件更新,更新内部对象状态
4694
4694
  * @param dt - 更新间隔
4695
- */ _proto.update = function update(dt) {
4695
+ */ _proto.onUpdate = function onUpdate(dt) {
4696
4696
  this.content.update();
4697
4697
  this.updateMainCamera();
4698
4698
  };
@@ -4763,14 +4763,14 @@ var AnimationComponent = /*#__PURE__*/ function(Behaviour) {
4763
4763
  var _proto = AnimationComponent.prototype;
4764
4764
  /**
4765
4765
  * 组件开始,需要创建内部对象和添加到场景管理器中
4766
- */ _proto.start = function start() {
4766
+ */ _proto.onStart = function onStart() {
4767
4767
  this.elapsedTime = 0;
4768
4768
  this.item.type = VFX_ITEM_TYPE_3D;
4769
4769
  };
4770
4770
  /**
4771
4771
  * 组件更新,更新内部对象状态
4772
4772
  * @param dt - 更新间隔
4773
- */ _proto.update = function update(dt) {
4773
+ */ _proto.onUpdate = function onUpdate(dt) {
4774
4774
  this.elapsedTime += dt * 0.001;
4775
4775
  if (this.animation >= 0 && this.animation < this.clips.length) {
4776
4776
  this.clips[this.animation].sampleAnimation(this.item, this.elapsedTime);
@@ -9748,7 +9748,7 @@ var ModelPluginComponent = /*#__PURE__*/ function(Behaviour) {
9748
9748
  /**
9749
9749
  * 组件后更新,合成相机和场景管理器更新
9750
9750
  * @param dt - 更新间隔
9751
- */ _proto.lateUpdate = function lateUpdate(dt) {
9751
+ */ _proto.onLateUpdate = function onLateUpdate(dt) {
9752
9752
  var composition = this.item.composition;
9753
9753
  if (this.autoAdjustScene && this.scene.tickCount == 1) {
9754
9754
  var _composition_items;
@@ -10038,7 +10038,7 @@ var ModelTreeComponent = /*#__PURE__*/ function(Behaviour) {
10038
10038
  };
10039
10039
  /**
10040
10040
  * 组件开始,查询合成中场景管理器并设置到动画管理器中
10041
- */ _proto.start = function start() {
10041
+ */ _proto.onStart = function onStart() {
10042
10042
  this.item.type = spec.ItemType.tree;
10043
10043
  this.content.baseTransform.setValid(true);
10044
10044
  var sceneManager = getSceneManager(this);
@@ -10049,7 +10049,7 @@ var ModelTreeComponent = /*#__PURE__*/ function(Behaviour) {
10049
10049
  /**
10050
10050
  * 组件更新,内部对象更新
10051
10051
  * @param dt
10052
- */ _proto.update = function update(dt) {
10052
+ */ _proto.onUpdate = function onUpdate(dt) {
10053
10053
  var // this.timeline?.getRenderData(time, true);
10054
10054
  // TODO: 需要使用lifetime
10055
10055
  _this_content;
@@ -13771,7 +13771,7 @@ var GLTFHelper = /*#__PURE__*/ function() {
13771
13771
 
13772
13772
  registerPlugin("tree", ModelTreePlugin, VFXItem, true);
13773
13773
  registerPlugin("model", ModelPlugin, VFXItem);
13774
- var version = "2.0.3";
13774
+ var version = "2.1.0-alpha.0";
13775
13775
  logger.info("Plugin model version: " + version + ".");
13776
13776
  if (version !== EFFECTS.version) {
13777
13777
  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!");