@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/alipay.js CHANGED
@@ -4443,7 +4443,7 @@ exports.ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4443
4443
  var _proto = ModelMeshComponent.prototype;
4444
4444
  /**
4445
4445
  * 组件开始,需要创建内部对象,更新父元素信息和添加到场景管理器中
4446
- */ _proto.start = function start() {
4446
+ */ _proto.onStart = function onStart() {
4447
4447
  var _this_sceneManager;
4448
4448
  this.sceneManager = getSceneManager(this);
4449
4449
  this.createContent();
@@ -4459,7 +4459,7 @@ exports.ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4459
4459
  /**
4460
4460
  * 组件更新,更新内部对象状态
4461
4461
  * @param dt - 更新间隔
4462
- */ _proto.update = function update(dt) {
4462
+ */ _proto.onUpdate = function onUpdate(dt) {
4463
4463
  if (this.sceneManager) {
4464
4464
  this.content.build(this.sceneManager);
4465
4465
  }
@@ -4468,7 +4468,7 @@ exports.ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4468
4468
  /**
4469
4469
  * 组件晚更新,晚更新内部对象状态
4470
4470
  * @param dt - 更新间隔
4471
- */ _proto.lateUpdate = function lateUpdate(dt) {
4471
+ */ _proto.onLateUpdate = function onLateUpdate(dt) {
4472
4472
  this.content.lateUpdate();
4473
4473
  };
4474
4474
  /**
@@ -4566,7 +4566,7 @@ exports.ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
4566
4566
  var _proto = ModelSkyboxComponent.prototype;
4567
4567
  /**
4568
4568
  * 组件开始,需要创建内部对象和添加到场景管理器中
4569
- */ _proto.start = function start() {
4569
+ */ _proto.onStart = function onStart() {
4570
4570
  var _this_sceneManager;
4571
4571
  this.createContent();
4572
4572
  this.item.type = VFX_ITEM_TYPE_3D;
@@ -4640,7 +4640,7 @@ exports.ModelLightComponent = /*#__PURE__*/ function(Behaviour) {
4640
4640
  var _proto = ModelLightComponent.prototype;
4641
4641
  /**
4642
4642
  * 组件开始,需要创建内部对象和添加到场景管理器中
4643
- */ _proto.start = function start() {
4643
+ */ _proto.onStart = function onStart() {
4644
4644
  this.createContent();
4645
4645
  this.item.type = VFX_ITEM_TYPE_3D;
4646
4646
  var scene = getSceneManager(this);
@@ -4650,7 +4650,7 @@ exports.ModelLightComponent = /*#__PURE__*/ function(Behaviour) {
4650
4650
  /**
4651
4651
  * 组件更新,更新内部对象状态
4652
4652
  * @param dt - 更新间隔
4653
- */ _proto.update = function update(dt) {
4653
+ */ _proto.onUpdate = function onUpdate(dt) {
4654
4654
  this.content.update();
4655
4655
  };
4656
4656
  /**
@@ -4705,7 +4705,7 @@ exports.ModelCameraComponent = /*#__PURE__*/ function(Behaviour) {
4705
4705
  var _proto = ModelCameraComponent.prototype;
4706
4706
  /**
4707
4707
  * 组件开始,需要创建内部对象和添加到场景管理器中
4708
- */ _proto.start = function start() {
4708
+ */ _proto.onStart = function onStart() {
4709
4709
  this.createContent();
4710
4710
  this.item.type = VFX_ITEM_TYPE_3D;
4711
4711
  var scene = getSceneManager(this);
@@ -4715,7 +4715,7 @@ exports.ModelCameraComponent = /*#__PURE__*/ function(Behaviour) {
4715
4715
  /**
4716
4716
  * 组件更新,更新内部对象状态
4717
4717
  * @param dt - 更新间隔
4718
- */ _proto.update = function update(dt) {
4718
+ */ _proto.onUpdate = function onUpdate(dt) {
4719
4719
  this.content.update();
4720
4720
  this.updateMainCamera();
4721
4721
  };
@@ -4786,14 +4786,14 @@ exports.AnimationComponent = /*#__PURE__*/ function(Behaviour) {
4786
4786
  var _proto = AnimationComponent.prototype;
4787
4787
  /**
4788
4788
  * 组件开始,需要创建内部对象和添加到场景管理器中
4789
- */ _proto.start = function start() {
4789
+ */ _proto.onStart = function onStart() {
4790
4790
  this.elapsedTime = 0;
4791
4791
  this.item.type = VFX_ITEM_TYPE_3D;
4792
4792
  };
4793
4793
  /**
4794
4794
  * 组件更新,更新内部对象状态
4795
4795
  * @param dt - 更新间隔
4796
- */ _proto.update = function update(dt) {
4796
+ */ _proto.onUpdate = function onUpdate(dt) {
4797
4797
  this.elapsedTime += dt * 0.001;
4798
4798
  if (this.animation >= 0 && this.animation < this.clips.length) {
4799
4799
  this.clips[this.animation].sampleAnimation(this.item, this.elapsedTime);
@@ -9771,7 +9771,7 @@ exports.ModelPluginComponent = /*#__PURE__*/ function(Behaviour) {
9771
9771
  /**
9772
9772
  * 组件后更新,合成相机和场景管理器更新
9773
9773
  * @param dt - 更新间隔
9774
- */ _proto.lateUpdate = function lateUpdate(dt) {
9774
+ */ _proto.onLateUpdate = function onLateUpdate(dt) {
9775
9775
  var composition = this.item.composition;
9776
9776
  if (this.autoAdjustScene && this.scene.tickCount == 1) {
9777
9777
  var _composition_items;
@@ -10061,7 +10061,7 @@ exports.ModelTreeComponent = /*#__PURE__*/ function(Behaviour) {
10061
10061
  };
10062
10062
  /**
10063
10063
  * 组件开始,查询合成中场景管理器并设置到动画管理器中
10064
- */ _proto.start = function start() {
10064
+ */ _proto.onStart = function onStart() {
10065
10065
  this.item.type = EFFECTS.spec.ItemType.tree;
10066
10066
  this.content.baseTransform.setValid(true);
10067
10067
  var sceneManager = getSceneManager(this);
@@ -10072,7 +10072,7 @@ exports.ModelTreeComponent = /*#__PURE__*/ function(Behaviour) {
10072
10072
  /**
10073
10073
  * 组件更新,内部对象更新
10074
10074
  * @param dt
10075
- */ _proto.update = function update(dt) {
10075
+ */ _proto.onUpdate = function onUpdate(dt) {
10076
10076
  var // this.timeline?.getRenderData(time, true);
10077
10077
  // TODO: 需要使用lifetime
10078
10078
  _this_content;
@@ -13794,7 +13794,7 @@ var GLTFHelper = /*#__PURE__*/ function() {
13794
13794
 
13795
13795
  EFFECTS.registerPlugin("tree", ModelTreePlugin, EFFECTS.VFXItem, true);
13796
13796
  EFFECTS.registerPlugin("model", ModelPlugin, EFFECTS.VFXItem);
13797
- var version = "2.0.2";
13797
+ var version = "2.1.0-alpha.0";
13798
13798
  EFFECTS.logger.info("Plugin model version: " + version + ".");
13799
13799
  if (version !== EFFECTS__namespace.version) {
13800
13800
  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!");