@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/index.js 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.3
6
+ * Version: v2.1.0-alpha.0
7
7
  */
8
8
 
9
9
  'use strict';
@@ -4451,7 +4451,7 @@ exports.ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4451
4451
  var _proto = ModelMeshComponent.prototype;
4452
4452
  /**
4453
4453
  * 组件开始,需要创建内部对象,更新父元素信息和添加到场景管理器中
4454
- */ _proto.start = function start() {
4454
+ */ _proto.onStart = function onStart() {
4455
4455
  var _this_sceneManager;
4456
4456
  this.sceneManager = getSceneManager(this);
4457
4457
  this.createContent();
@@ -4467,7 +4467,7 @@ exports.ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4467
4467
  /**
4468
4468
  * 组件更新,更新内部对象状态
4469
4469
  * @param dt - 更新间隔
4470
- */ _proto.update = function update(dt) {
4470
+ */ _proto.onUpdate = function onUpdate(dt) {
4471
4471
  if (this.sceneManager) {
4472
4472
  this.content.build(this.sceneManager);
4473
4473
  }
@@ -4476,7 +4476,7 @@ exports.ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4476
4476
  /**
4477
4477
  * 组件晚更新,晚更新内部对象状态
4478
4478
  * @param dt - 更新间隔
4479
- */ _proto.lateUpdate = function lateUpdate(dt) {
4479
+ */ _proto.onLateUpdate = function onLateUpdate(dt) {
4480
4480
  this.content.lateUpdate();
4481
4481
  };
4482
4482
  /**
@@ -4574,7 +4574,7 @@ exports.ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
4574
4574
  var _proto = ModelSkyboxComponent.prototype;
4575
4575
  /**
4576
4576
  * 组件开始,需要创建内部对象和添加到场景管理器中
4577
- */ _proto.start = function start() {
4577
+ */ _proto.onStart = function onStart() {
4578
4578
  var _this_sceneManager;
4579
4579
  this.createContent();
4580
4580
  this.item.type = VFX_ITEM_TYPE_3D;
@@ -4648,7 +4648,7 @@ exports.ModelLightComponent = /*#__PURE__*/ function(Behaviour) {
4648
4648
  var _proto = ModelLightComponent.prototype;
4649
4649
  /**
4650
4650
  * 组件开始,需要创建内部对象和添加到场景管理器中
4651
- */ _proto.start = function start() {
4651
+ */ _proto.onStart = function onStart() {
4652
4652
  this.createContent();
4653
4653
  this.item.type = VFX_ITEM_TYPE_3D;
4654
4654
  var scene = getSceneManager(this);
@@ -4658,7 +4658,7 @@ exports.ModelLightComponent = /*#__PURE__*/ function(Behaviour) {
4658
4658
  /**
4659
4659
  * 组件更新,更新内部对象状态
4660
4660
  * @param dt - 更新间隔
4661
- */ _proto.update = function update(dt) {
4661
+ */ _proto.onUpdate = function onUpdate(dt) {
4662
4662
  this.content.update();
4663
4663
  };
4664
4664
  /**
@@ -4713,7 +4713,7 @@ exports.ModelCameraComponent = /*#__PURE__*/ function(Behaviour) {
4713
4713
  var _proto = ModelCameraComponent.prototype;
4714
4714
  /**
4715
4715
  * 组件开始,需要创建内部对象和添加到场景管理器中
4716
- */ _proto.start = function start() {
4716
+ */ _proto.onStart = function onStart() {
4717
4717
  this.createContent();
4718
4718
  this.item.type = VFX_ITEM_TYPE_3D;
4719
4719
  var scene = getSceneManager(this);
@@ -4723,7 +4723,7 @@ exports.ModelCameraComponent = /*#__PURE__*/ function(Behaviour) {
4723
4723
  /**
4724
4724
  * 组件更新,更新内部对象状态
4725
4725
  * @param dt - 更新间隔
4726
- */ _proto.update = function update(dt) {
4726
+ */ _proto.onUpdate = function onUpdate(dt) {
4727
4727
  this.content.update();
4728
4728
  this.updateMainCamera();
4729
4729
  };
@@ -4794,14 +4794,14 @@ exports.AnimationComponent = /*#__PURE__*/ function(Behaviour) {
4794
4794
  var _proto = AnimationComponent.prototype;
4795
4795
  /**
4796
4796
  * 组件开始,需要创建内部对象和添加到场景管理器中
4797
- */ _proto.start = function start() {
4797
+ */ _proto.onStart = function onStart() {
4798
4798
  this.elapsedTime = 0;
4799
4799
  this.item.type = VFX_ITEM_TYPE_3D;
4800
4800
  };
4801
4801
  /**
4802
4802
  * 组件更新,更新内部对象状态
4803
4803
  * @param dt - 更新间隔
4804
- */ _proto.update = function update(dt) {
4804
+ */ _proto.onUpdate = function onUpdate(dt) {
4805
4805
  this.elapsedTime += dt * 0.001;
4806
4806
  if (this.animation >= 0 && this.animation < this.clips.length) {
4807
4807
  this.clips[this.animation].sampleAnimation(this.item, this.elapsedTime);
@@ -9779,7 +9779,7 @@ exports.ModelPluginComponent = /*#__PURE__*/ function(Behaviour) {
9779
9779
  /**
9780
9780
  * 组件后更新,合成相机和场景管理器更新
9781
9781
  * @param dt - 更新间隔
9782
- */ _proto.lateUpdate = function lateUpdate(dt) {
9782
+ */ _proto.onLateUpdate = function onLateUpdate(dt) {
9783
9783
  var composition = this.item.composition;
9784
9784
  if (this.autoAdjustScene && this.scene.tickCount == 1) {
9785
9785
  var _composition_items;
@@ -10069,7 +10069,7 @@ exports.ModelTreeComponent = /*#__PURE__*/ function(Behaviour) {
10069
10069
  };
10070
10070
  /**
10071
10071
  * 组件开始,查询合成中场景管理器并设置到动画管理器中
10072
- */ _proto.start = function start() {
10072
+ */ _proto.onStart = function onStart() {
10073
10073
  this.item.type = EFFECTS.spec.ItemType.tree;
10074
10074
  this.content.baseTransform.setValid(true);
10075
10075
  var sceneManager = getSceneManager(this);
@@ -10080,7 +10080,7 @@ exports.ModelTreeComponent = /*#__PURE__*/ function(Behaviour) {
10080
10080
  /**
10081
10081
  * 组件更新,内部对象更新
10082
10082
  * @param dt
10083
- */ _proto.update = function update(dt) {
10083
+ */ _proto.onUpdate = function onUpdate(dt) {
10084
10084
  var // this.timeline?.getRenderData(time, true);
10085
10085
  // TODO: 需要使用lifetime
10086
10086
  _this_content;
@@ -13802,7 +13802,7 @@ var GLTFHelper = /*#__PURE__*/ function() {
13802
13802
 
13803
13803
  EFFECTS.registerPlugin("tree", ModelTreePlugin, EFFECTS.VFXItem, true);
13804
13804
  EFFECTS.registerPlugin("model", ModelPlugin, EFFECTS.VFXItem);
13805
- var version = "2.0.3";
13805
+ var version = "2.1.0-alpha.0";
13806
13806
  EFFECTS.logger.info("Plugin model version: " + version + ".");
13807
13807
  if (version !== EFFECTS__namespace.version) {
13808
13808
  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!");