@galacean/effects-plugin-model 2.10.0-alpha.1 → 2.10.0-alpha.2

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,11 +3,11 @@
3
3
  * Description: Galacean Effects player model plugin
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 飂兮
6
- * Version: v2.10.0-alpha.1
6
+ * Version: v2.10.0-alpha.2
7
7
  */
8
8
 
9
9
  import * as EFFECTS from '@galacean/effects';
10
- import { math, spec, Transform, PLAYER_OPTIONS_ENV_EDITOR, RenderPassAttachmentStorageType, glContext, Material, Mesh, Geometry, ShaderFactory, effectsClass, HitTestType, RendererComponent, Behaviour, AnimationClip, TextureSourceType, Texture, DestroyOptions, RenderPassDestroyAttachmentType, GLSLVersion, Player, Renderer, getDefaultTextureFactory, loadImage, generateGUID, addItem, removeItem, VFXItem, Plugin, glType2VertexFormatType, Downloader, getStandardJSON, isObject, registerPlugin, logger } from '@galacean/effects';
10
+ import { math, spec, Transform, PLAYER_OPTIONS_ENV_EDITOR, RenderPassAttachmentStorageType, glContext, Material, Mesh, Geometry, VertexBuffer, ShaderFactory, effectsClass, HitTestType, RendererComponent, Behaviour, AnimationClip, TextureSourceType, Texture, DestroyOptions, RenderPassDestroyAttachmentType, GLSLVersion, Player, Renderer, getDefaultTextureFactory, loadImage, generateGUID, addItem, removeItem, VFXItem, Plugin, glType2VertexFormatType, Downloader, getStandardJSON, isObject, registerPlugin, logger } from '@galacean/effects';
11
11
 
12
12
  /**
13
13
  * Model 插件元素类型
@@ -1437,16 +1437,15 @@ function GetNum2GLName(ctx) {
1437
1437
  3,
1438
1438
  7
1439
1439
  ]);
1440
+ var _obj;
1440
1441
  return {
1441
- attributes: {
1442
- aPos: {
1443
- type: glContext.FLOAT,
1444
- size: 1,
1445
- data: data,
1446
- stride: Float32Array.BYTES_PER_ELEMENT,
1447
- offset: 0
1448
- }
1449
- },
1442
+ attributes: (_obj = {}, _obj[VertexBuffer.PositionKind] = {
1443
+ type: glContext.FLOAT,
1444
+ size: 1,
1445
+ data: data,
1446
+ stride: Float32Array.BYTES_PER_ELEMENT,
1447
+ offset: 0
1448
+ }, _obj),
1450
1449
  mode: glContext.LINES,
1451
1450
  indices: {
1452
1451
  data: index
@@ -3134,30 +3133,27 @@ var normal = new Vector3();
3134
3133
  * @returns 几何参数
3135
3134
  */ MeshHelper.getPlaneGeometry = function getPlaneGeometry() {
3136
3135
  var data = MeshHelper.getPlaneVertexArray();
3136
+ var _obj;
3137
3137
  return {
3138
- attributes: {
3139
- aPos: {
3140
- type: glContext.FLOAT,
3141
- size: 3,
3142
- data: data,
3143
- stride: Float32Array.BYTES_PER_ELEMENT * 8,
3144
- offset: 0
3145
- },
3146
- aUV: {
3147
- type: glContext.FLOAT,
3148
- size: 2,
3149
- stride: Float32Array.BYTES_PER_ELEMENT * 8,
3150
- offset: Float32Array.BYTES_PER_ELEMENT * 3,
3151
- dataSource: "aPos"
3152
- },
3153
- aNormal: {
3154
- type: glContext.FLOAT,
3155
- size: 3,
3156
- stride: Float32Array.BYTES_PER_ELEMENT * 8,
3157
- offset: Float32Array.BYTES_PER_ELEMENT * 5,
3158
- dataSource: "aPos"
3159
- }
3160
- },
3138
+ attributes: (_obj = {}, _obj[VertexBuffer.PositionKind] = {
3139
+ type: glContext.FLOAT,
3140
+ size: 3,
3141
+ data: data,
3142
+ stride: Float32Array.BYTES_PER_ELEMENT * 8,
3143
+ offset: 0
3144
+ }, _obj[VertexBuffer.UVKind] = {
3145
+ type: glContext.FLOAT,
3146
+ size: 2,
3147
+ stride: Float32Array.BYTES_PER_ELEMENT * 8,
3148
+ offset: Float32Array.BYTES_PER_ELEMENT * 3,
3149
+ dataSource: VertexBuffer.PositionKind
3150
+ }, _obj[VertexBuffer.NormalKind] = {
3151
+ type: glContext.FLOAT,
3152
+ size: 3,
3153
+ stride: Float32Array.BYTES_PER_ELEMENT * 8,
3154
+ offset: Float32Array.BYTES_PER_ELEMENT * 5,
3155
+ dataSource: VertexBuffer.PositionKind
3156
+ }, _obj),
3161
3157
  drawStart: 0,
3162
3158
  drawCount: data.length / 8
3163
3159
  };
@@ -3584,19 +3580,19 @@ var normal = new Vector3();
3584
3580
  */ PluginHelper.getAttributeName = function getAttributeName(name) {
3585
3581
  switch(name){
3586
3582
  case "POSITION":
3587
- return "aPos";
3583
+ return VertexBuffer.PositionKind;
3588
3584
  case "NORMAL":
3589
- return "aNormal";
3585
+ return VertexBuffer.NormalKind;
3590
3586
  case "TANGENT":
3591
- return "aTangent";
3587
+ return VertexBuffer.TangentKind;
3592
3588
  case "TEXCOORD_0":
3593
- return "aUV";
3589
+ return VertexBuffer.UVKind;
3594
3590
  case "TEXCOORD_1":
3595
- return "aUV2";
3591
+ return VertexBuffer.UV2Kind;
3596
3592
  case "JOINTS_0":
3597
- return "aJoints";
3593
+ return VertexBuffer.JointsKind;
3598
3594
  case "WEIGHTS_0":
3599
- return "aWeights";
3595
+ return VertexBuffer.WeightsKind;
3600
3596
  }
3601
3597
  if (!name.startsWith("a")) {
3602
3598
  // aPos, aNormal, aTangent,
@@ -3988,21 +3984,18 @@ var AttributeArray = /*#__PURE__*/ function() {
3988
3984
  */ _proto.create = function create(geometry, bindMatrices) {
3989
3985
  this.drawStart = 0;
3990
3986
  this.drawCount = Math.abs(geometry.getDrawCount());
3991
- // FIXME: 需要geometry中的attributes数组,GLGeometry有这个数组,其他的没有
3992
- // @ts-expect-error
3993
- var attributes = geometry.attributes;
3994
3987
  //
3995
3988
  this.index = geometry.getIndexData();
3996
- var positionAttrib = attributes["aPos"];
3997
- var positionArray = geometry.getAttributeData("aPos");
3989
+ var positionAttrib = getAttributeLayout(geometry.getVertexBuffer(VertexBuffer.PositionKind));
3990
+ var positionArray = geometry.getAttributeData(VertexBuffer.PositionKind);
3998
3991
  this.position = new AttributeArray();
3999
3992
  this.position.create(positionAttrib, positionArray);
4000
3993
  //
4001
- var jointAttrib = attributes["aJoints"];
4002
- var weightAttrib = attributes["aWeights"];
3994
+ var jointAttrib = getAttributeLayout(geometry.getVertexBuffer(VertexBuffer.JointsKind));
3995
+ var weightAttrib = getAttributeLayout(geometry.getVertexBuffer(VertexBuffer.WeightsKind));
4003
3996
  if (jointAttrib !== undefined && weightAttrib !== undefined) {
4004
- var jointArray = geometry.getAttributeData("aJoints");
4005
- var weightArray = geometry.getAttributeData("aWeights");
3997
+ var jointArray = geometry.getAttributeData(VertexBuffer.JointsKind);
3998
+ var weightArray = geometry.getAttributeData(VertexBuffer.WeightsKind);
4006
3999
  this.joint = new AttributeArray();
4007
4000
  this.joint.create(jointAttrib, jointArray);
4008
4001
  this.weight = new AttributeArray();
@@ -4102,21 +4095,18 @@ var AttributeArray = /*#__PURE__*/ function() {
4102
4095
  */ _proto.create = function create(geometry, doubleSided, bindMatrices) {
4103
4096
  this.drawStart = 0;
4104
4097
  this.drawCount = Math.abs(geometry.getDrawCount());
4105
- // FIXME: 需要geometry中的attributes数组,GLGeometry有这个数组,其他的没有
4106
- // @ts-expect-error
4107
- var attributes = geometry.attributes;
4108
4098
  //
4109
4099
  this.index = geometry.getIndexData();
4110
- var positionAttrib = attributes["aPos"];
4111
- var positionArray = geometry.getAttributeData("aPos");
4100
+ var positionAttrib = getAttributeLayout(geometry.getVertexBuffer(VertexBuffer.PositionKind));
4101
+ var positionArray = geometry.getAttributeData(VertexBuffer.PositionKind);
4112
4102
  this.position = new AttributeArray();
4113
4103
  this.position.create(positionAttrib, positionArray);
4114
4104
  //
4115
- var jointAttrib = attributes["aJoints"];
4116
- var weightAttrib = attributes["aWeights"];
4105
+ var jointAttrib = getAttributeLayout(geometry.getVertexBuffer(VertexBuffer.JointsKind));
4106
+ var weightAttrib = getAttributeLayout(geometry.getVertexBuffer(VertexBuffer.WeightsKind));
4117
4107
  if (jointAttrib !== undefined && weightAttrib !== undefined) {
4118
- var jointArray = geometry.getAttributeData("aJoints");
4119
- var weightArray = geometry.getAttributeData("aWeights");
4108
+ var jointArray = geometry.getAttributeData(VertexBuffer.JointsKind);
4109
+ var weightArray = geometry.getAttributeData(VertexBuffer.WeightsKind);
4120
4110
  this.joint = new AttributeArray();
4121
4111
  this.joint.create(jointAttrib, jointArray);
4122
4112
  this.weight = new AttributeArray();
@@ -4505,8 +4495,7 @@ var AttributeArray = /*#__PURE__*/ function() {
4505
4495
  if (!_instanceof1(v, Geometry)) {
4506
4496
  console.error("Invalid geometry type " + this.stringify(v) + ".");
4507
4497
  }
4508
- // @ts-expect-error
4509
- if (v.isDestroyed === true) {
4498
+ if (v.isDisposed()) {
4510
4499
  console.error("Geometry object is destroyed.");
4511
4500
  }
4512
4501
  if (!this.checkNonnegative(v.getDrawStart())) {
@@ -4579,12 +4568,7 @@ var AttributeArray = /*#__PURE__*/ function() {
4579
4568
  * @param name - 名称
4580
4569
  * @returns
4581
4570
  */ CheckerHelper.createAttributeArray = function createAttributeArray(v, name) {
4582
- // @ts-expect-error
4583
- var attributes = v.attributes;
4584
- if (attributes === undefined) {
4585
- return;
4586
- }
4587
- var dataAttrib = attributes[name];
4571
+ var dataAttrib = getAttributeLayout(v.getVertexBuffer(name));
4588
4572
  if (dataAttrib === undefined) {
4589
4573
  return;
4590
4574
  }
@@ -5055,6 +5039,18 @@ var AttributeArray = /*#__PURE__*/ function() {
5055
5039
  };
5056
5040
  return CheckerHelper;
5057
5041
  }();
5042
+ function getAttributeLayout(vertexBuffer) {
5043
+ if (!vertexBuffer) {
5044
+ return;
5045
+ }
5046
+ return {
5047
+ type: vertexBuffer.type,
5048
+ size: vertexBuffer.getSize(),
5049
+ offset: vertexBuffer.byteOffset,
5050
+ stride: vertexBuffer.byteStride,
5051
+ normalize: vertexBuffer.normalized
5052
+ };
5053
+ }
5058
5054
  /**
5059
5055
  * 半精度浮点数组类
5060
5056
  */ var Float16ArrayWrapper = /*#__PURE__*/ function() {
@@ -7224,7 +7220,10 @@ var PSkyboxType;
7224
7220
  this.loadSkybox = loadSkybox;
7225
7221
  if (this.brdfLutTexture === undefined || this.brdfLutTexture.isDestroyed) {
7226
7222
  if (CompositionCache.brdfLutTexOptions === undefined) {
7227
- throw new Error("Please load brdfLutTexOptions at first.");
7223
+ // A Composition can be created and played directly without going through
7224
+ // the player's asynchronous asset-loading lifecycle. In that case the
7225
+ // optional BRDF LUT is not ready yet, but non-PBR content can still run.
7226
+ return;
7228
7227
  }
7229
7228
  //
7230
7229
  var brdfLutTextureName = "brdfLutTexture";
@@ -7858,6 +7857,14 @@ function _assert_this_initialized(self) {
7858
7857
  return self;
7859
7858
  }
7860
7859
 
7860
+ var uvKinds = [
7861
+ VertexBuffer.UVKind,
7862
+ VertexBuffer.UV2Kind,
7863
+ VertexBuffer.UV3Kind,
7864
+ VertexBuffer.UV4Kind,
7865
+ VertexBuffer.UV5Kind,
7866
+ VertexBuffer.UV6Kind
7867
+ ];
7861
7868
  /**
7862
7869
  * Mesh 类,负责 Mesh 相关的骨骼动画和 PBR 渲染
7863
7870
  */ var PMesh = /*#__PURE__*/ function(PEntity) {
@@ -8767,7 +8774,7 @@ function _assert_this_initialized(self) {
8767
8774
  * 是否压缩格式
8768
8775
  * @returns
8769
8776
  */ _proto.isCompressed = function isCompressed() {
8770
- var positionAttrib = this.geometry.getAttributeData("aPos");
8777
+ var positionAttrib = this.geometry.getAttributeData(VertexBuffer.PositionKind);
8771
8778
  if (positionAttrib === undefined) {
8772
8779
  return false;
8773
8780
  }
@@ -8779,48 +8786,45 @@ function _assert_this_initialized(self) {
8779
8786
  * 是否有位置属性
8780
8787
  * @returns
8781
8788
  */ _proto.hasPositions = function hasPositions() {
8782
- return this.hasAttribute("aPos");
8789
+ return this.hasAttribute(VertexBuffer.PositionKind);
8783
8790
  };
8784
8791
  /**
8785
8792
  * 是否有法线属性
8786
8793
  * @returns
8787
8794
  */ _proto.hasNormals = function hasNormals() {
8788
- return this.hasAttribute("aNormal");
8795
+ return this.hasAttribute(VertexBuffer.NormalKind);
8789
8796
  };
8790
8797
  /**
8791
8798
  * 是否有切线属性
8792
8799
  * @returns
8793
8800
  */ _proto.hasTangents = function hasTangents() {
8794
- return this.hasAttribute("aTangent");
8801
+ return this.hasAttribute(VertexBuffer.TangentKind);
8795
8802
  };
8796
8803
  /**
8797
8804
  * 是否有纹理坐标属性
8798
8805
  * @param index - 纹理坐标索引
8799
8806
  * @returns
8800
8807
  */ _proto.hasUVCoords = function hasUVCoords(index) {
8801
- if (index === 1) {
8802
- return this.hasAttribute("aUV");
8803
- } else {
8804
- return this.hasAttribute("aUV" + index);
8805
- }
8808
+ var kind = uvKinds[index - 1];
8809
+ return kind !== undefined && this.hasAttribute(kind);
8806
8810
  };
8807
8811
  /**
8808
8812
  * 是否有颜色属性
8809
8813
  * @returns
8810
8814
  */ _proto.hasColors = function hasColors() {
8811
- return this.hasAttribute("aColor");
8815
+ return this.hasAttribute(VertexBuffer.ColorKind);
8812
8816
  };
8813
8817
  /**
8814
8818
  * 是否有关节点属性
8815
8819
  * @returns
8816
8820
  */ _proto.hasJoints = function hasJoints() {
8817
- return this.hasAttribute("aJoints");
8821
+ return this.hasAttribute(VertexBuffer.JointsKind);
8818
8822
  };
8819
8823
  /**
8820
8824
  * 是否有权重属性
8821
8825
  * @returns
8822
8826
  */ _proto.hasWeights = function hasWeights() {
8823
- return this.hasAttribute("aWeights");
8827
+ return this.hasAttribute(VertexBuffer.WeightsKind);
8824
8828
  };
8825
8829
  return PGeometry;
8826
8830
  }();
@@ -10455,8 +10459,9 @@ var JSONConverter = /*#__PURE__*/ function() {
10455
10459
  var _geomProps_indices;
10456
10460
  var geomProps = deserializeGeometry(prim.geometry, oldScene.bins);
10457
10461
  var material = _this.getMaterialData(prim.material, oldScene);
10458
- if (_instanceof1((_geomProps_indices = geomProps.indices) == null ? void 0 : _geomProps_indices.data, Uint8Array)) {
10459
- var oldIndices = geomProps.indices.data;
10462
+ var indexData = (_geomProps_indices = geomProps.indices) == null ? void 0 : _geomProps_indices.data;
10463
+ if (_instanceof1(indexData, Uint8Array)) {
10464
+ var oldIndices = indexData;
10460
10465
  var newIndices = new Uint16Array(oldIndices.length);
10461
10466
  for(var i = 0; i < oldIndices.length; i++){
10462
10467
  newIndices[i] = oldIndices[i];
@@ -11113,7 +11118,7 @@ function getGeometryDataFromOptions(geomOptions) {
11113
11118
  verticesNormalize = (_attribData_normalize = attribData.normalize) != null ? _attribData_normalize : false;
11114
11119
  var _attribData_type;
11115
11120
  verticesType = glType2VertexFormatType((_attribData_type = attribData.type) != null ? _attribData_type : glContext.FLOAT);
11116
- } else if (attrib === "aNormal") {
11121
+ } else if (attrib === VertexBuffer.NormalKind) {
11117
11122
  // @ts-expect-error
11118
11123
  modelData.normals = attribData.data;
11119
11124
  var _attribData_normalize1;
@@ -11428,45 +11433,10 @@ function mergeTypedArray(array1, array2, offset) {
11428
11433
  return result6;
11429
11434
  }
11430
11435
  }
11431
- var vertexBufferSemanticMap = {
11432
- aPos: "POSITION",
11433
- aUV: "TEXCOORD0",
11434
- aUV2: "TEXCOORD1",
11435
- aNormal: "NORMAL",
11436
- aTangent: "TANGENT",
11437
- aColor: "COLOR",
11438
- aJoints: "JOINTS",
11439
- aWeights: "WEIGHTS",
11440
- //
11441
- a_Position: "POSITION",
11442
- a_UV: "TEXCOORD0",
11443
- a_UV1: "TEXCOORD0",
11444
- a_UV2: "TEXCOORD1",
11445
- a_Normal: "NORMAL",
11446
- a_Tangent: "TANGENT",
11447
- a_Color: "COLOR",
11448
- a_Joints: "JOINTS",
11449
- a_Joint1: "JOINTS",
11450
- a_Weights: "WEIGHTS",
11451
- a_Weight1: "WEIGHTS",
11452
- //
11453
- a_Target_Position0: "POSITION_BS0",
11454
- a_Target_Position1: "POSITION_BS1",
11455
- a_Target_Position2: "POSITION_BS2",
11456
- a_Target_Position3: "POSITION_BS3",
11457
- a_Target_Position4: "POSITION_BS4",
11458
- a_Target_Position5: "POSITION_BS5",
11459
- a_Target_Position6: "POSITION_BS6",
11460
- a_Target_Position7: "POSITION_BS7",
11461
- a_Target_Normal0: "NORMAL_BS0",
11462
- a_Target_Normal1: "NORMAL_BS1",
11463
- a_Target_Normal2: "NORMAL_BS2",
11464
- a_Target_Normal3: "NORMAL_BS3",
11465
- a_Target_Tangent0: "TANGENT_BS0",
11466
- a_Target_Tangent1: "TANGENT_BS1",
11467
- a_Target_Tangent2: "TANGENT_BS2",
11468
- a_Target_Tangent3: "TANGENT_BS3"
11469
- };
11436
+ var _obj;
11437
+ var vertexBufferSemanticMap = (_obj = {}, _obj[VertexBuffer.PositionKind] = "POSITION", _obj[VertexBuffer.UVKind] = "TEXCOORD0", _obj[VertexBuffer.UV2Kind] = "TEXCOORD1", _obj[VertexBuffer.NormalKind] = "NORMAL", _obj[VertexBuffer.TangentKind] = "TANGENT", _obj[VertexBuffer.ColorKind] = "COLOR", _obj[VertexBuffer.JointsKind] = "JOINTS", _obj[VertexBuffer.WeightsKind] = "WEIGHTS", //
11438
+ _obj.a_Position = "POSITION", _obj.a_UV = "TEXCOORD0", _obj.a_UV1 = "TEXCOORD0", _obj.a_UV2 = "TEXCOORD1", _obj.a_Normal = "NORMAL", _obj.a_Tangent = "TANGENT", _obj.a_Color = "COLOR", _obj.a_Joints = "JOINTS", _obj.a_Joint1 = "JOINTS", _obj.a_Weights = "WEIGHTS", _obj.a_Weight1 = "WEIGHTS", //
11439
+ _obj.a_Target_Position0 = "POSITION_BS0", _obj.a_Target_Position1 = "POSITION_BS1", _obj.a_Target_Position2 = "POSITION_BS2", _obj.a_Target_Position3 = "POSITION_BS3", _obj.a_Target_Position4 = "POSITION_BS4", _obj.a_Target_Position5 = "POSITION_BS5", _obj.a_Target_Position6 = "POSITION_BS6", _obj.a_Target_Position7 = "POSITION_BS7", _obj.a_Target_Normal0 = "NORMAL_BS0", _obj.a_Target_Normal1 = "NORMAL_BS1", _obj.a_Target_Normal2 = "NORMAL_BS2", _obj.a_Target_Normal3 = "NORMAL_BS3", _obj.a_Target_Tangent0 = "TANGENT_BS0", _obj.a_Target_Tangent1 = "TANGENT_BS1", _obj.a_Target_Tangent2 = "TANGENT_BS2", _obj.a_Target_Tangent3 = "TANGENT_BS3", _obj);
11470
11440
 
11471
11441
  function getDefaultEffectsGLTFLoader(engine, options) {
11472
11442
  if (!defaultGLTFLoader) {
@@ -12351,8 +12321,8 @@ var LoaderImpl = /*#__PURE__*/ function() {
12351
12321
  return false;
12352
12322
  }
12353
12323
  };
12354
- /**
12355
- * for old scene compatibility
12324
+ /**
12325
+ * for old scene compatibility
12356
12326
  */ _proto.processLight = function processLight(lights, fromGLTF) {
12357
12327
  var _this = this;
12358
12328
  lights.forEach(function(l) {
@@ -12726,8 +12696,8 @@ var GeometryProxy = /*#__PURE__*/ function() {
12726
12696
  attributes["a_Weight1"] = this._getBufferAttrib(weightAttrib);
12727
12697
  }
12728
12698
  }
12729
- /**
12730
- * 设置Morph动画需要的Attribute,主要包括Position,Normal和Tangent
12699
+ /**
12700
+ * 设置Morph动画需要的Attribute,主要包括Position,Normal和Tangent
12731
12701
  */ for(var i = 0; i < 8; i++){
12732
12702
  var positionAttrib = this.getTargetPosition(i);
12733
12703
  if (positionAttrib !== undefined) {
@@ -12744,13 +12714,14 @@ var GeometryProxy = /*#__PURE__*/ function() {
12744
12714
  }
12745
12715
  var indexArray = this.indexArray;
12746
12716
  if (indexArray !== undefined) {
12717
+ var indices = _instanceof1(indexArray, Uint8Array) ? new Uint16Array(indexArray) : indexArray;
12747
12718
  return Geometry.create(this.engine, {
12748
12719
  attributes: attributes,
12749
12720
  indices: {
12750
- data: indexArray
12721
+ data: indices
12751
12722
  },
12752
12723
  drawStart: 0,
12753
- drawCount: indexArray.length,
12724
+ drawCount: indices.length,
12754
12725
  mode: glContext.TRIANGLES
12755
12726
  });
12756
12727
  } else {
@@ -13192,7 +13163,7 @@ var GLTFHelper = /*#__PURE__*/ function() {
13192
13163
  registerPlugin("model", ModelPlugin);
13193
13164
  /**
13194
13165
  * 插件版本号
13195
- */ var version = "2.10.0-alpha.1";
13166
+ */ var version = "2.10.0-alpha.2";
13196
13167
  logger.info("Plugin model version: " + version + ".");
13197
13168
  if (version !== EFFECTS.version) {
13198
13169
  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!");