@galacean/effects-plugin-model 2.4.5 → 2.4.6

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.4.5
6
+ * Version: v2.4.6
7
7
  */
8
8
 
9
9
  import * as EFFECTS from '@galacean/effects';
@@ -1862,12 +1862,14 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
1862
1862
  * @param data - 组件参数
1863
1863
  */ _proto.fromData = function fromData(data) {
1864
1864
  RendererComponent.prototype.fromData.call(this, data);
1865
- this.data = data;
1866
- data.rootBone = data.rootBone ? this.engine.findObject(data.rootBone) : undefined;
1867
- data.geometry = this.engine.findObject(data.geometry);
1865
+ this.data = _extends({}, data, {
1866
+ materials: []
1867
+ });
1868
+ this.data.rootBone = data.rootBone ? this.engine.findObject(data.rootBone) : undefined;
1869
+ this.data.geometry = this.engine.findObject(data.geometry);
1868
1870
  if (data.materials) {
1869
1871
  for(var i = 0; i < data.materials.length; i++){
1870
- data.materials[i] = this.engine.findObject(data.materials[i]);
1872
+ this.data.materials[i] = this.engine.findObject(data.materials[i]);
1871
1873
  }
1872
1874
  }
1873
1875
  };
@@ -13199,7 +13201,7 @@ var GLTFHelper = /*#__PURE__*/ function() {
13199
13201
  registerPlugin("model", ModelPlugin, VFXItem);
13200
13202
  /**
13201
13203
  * 插件版本号
13202
- */ var version = "2.4.5";
13204
+ */ var version = "2.4.6";
13203
13205
  logger.info("Plugin model version: " + version + ".");
13204
13206
  if (version !== EFFECTS.version) {
13205
13207
  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!");