@galacean/effects-plugin-spine 2.9.3 → 2.10.0-alpha.1

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 spine plugin
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 十弦
6
- * Version: v2.9.3
6
+ * Version: v2.10.0-alpha.1
7
7
  */
8
8
 
9
9
  import * as EFFECTS from '@galacean/effects';
10
- import { assertExist, glContext, Mesh, Geometry, Material, GLSLVersion, PLAYER_OPTIONS_ENV_EDITOR, math, serialize, effectsClass, spec, MaskMode, HitTestType, RendererComponent, Plugin, registerPlugin, logger } from '@galacean/effects';
10
+ import { assertExist, glContext, Mesh, Geometry, Material, GLSLVersion, PLAYER_OPTIONS_ENV_EDITOR, math, serialize, effectsClass, spec, HitTestType, RendererComponent, Plugin, registerPlugin, logger } from '@galacean/effects';
11
11
 
12
12
  function _set_prototype_of(o, p) {
13
13
  _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
@@ -10753,14 +10753,13 @@ var SpineMesh = /*#__PURE__*/ function() {
10753
10753
  function SpineMesh(renderInfo) {
10754
10754
  this.verticesLength = 0;
10755
10755
  this.indicesLength = 0;
10756
- var blendMode = renderInfo.blendMode, texture = renderInfo.texture, priority = renderInfo.priority, _renderInfo_renderOptions = renderInfo.renderOptions, renderOptions = _renderInfo_renderOptions === void 0 ? {} : _renderInfo_renderOptions, _renderInfo_name = renderInfo.name, name = _renderInfo_name === void 0 ? "MSpine" : _renderInfo_name, engine = renderInfo.engine;
10757
- var _renderOptions_mask = renderOptions.mask, mask = _renderOptions_mask === void 0 ? 0 : _renderOptions_mask, _renderOptions_maskMode = renderOptions.maskMode, maskMode = _renderOptions_maskMode === void 0 ? 0 : _renderOptions_maskMode;
10756
+ var blendMode = renderInfo.blendMode, texture = renderInfo.texture, priority = renderInfo.priority, _renderInfo_name = renderInfo.name, name = _renderInfo_name === void 0 ? "MSpine" : _renderInfo_name, engine = renderInfo.engine;
10758
10757
  this.blendMode = blendMode;
10759
10758
  this.lastTexture = texture;
10760
10759
  this.priority = priority;
10761
10760
  this.engine = engine;
10762
10761
  this.geometry = this.createGeometry();
10763
- this.material = this.createMaterial(maskMode, mask);
10762
+ this.material = this.createMaterial();
10764
10763
  this.mesh = Mesh.create(engine, {
10765
10764
  name: name + seed++,
10766
10765
  priority: this.priority,
@@ -10810,7 +10809,7 @@ var SpineMesh = /*#__PURE__*/ function() {
10810
10809
  maxVertex: SlotGroup.MAX_VERTICES
10811
10810
  });
10812
10811
  };
10813
- _proto.createMaterial = function createMaterial(maskMode, maskOrder) {
10812
+ _proto.createMaterial = function createMaterial() {
10814
10813
  var material = Material.create(this.engine, {
10815
10814
  shader: createShader(this.engine)
10816
10815
  });
@@ -10923,7 +10922,6 @@ var SlotGroup = /*#__PURE__*/ function() {
10923
10922
  this.transform = props.transform;
10924
10923
  this.listIndex = props.listIndex;
10925
10924
  this.pma = props.pma;
10926
- this.renderOptions = props.renderOptions;
10927
10925
  this.engine = props.engine;
10928
10926
  }
10929
10927
  var _proto = SlotGroup.prototype;
@@ -11056,7 +11054,6 @@ var SlotGroup = /*#__PURE__*/ function() {
11056
11054
  texture: texture,
11057
11055
  name: this.meshName,
11058
11056
  priority: this.listIndex += 0.01,
11059
- renderOptions: this.renderOptions,
11060
11057
  engine: this.engine
11061
11058
  });
11062
11059
  currentIndex = this.meshGroups.length;
@@ -11140,16 +11137,11 @@ var SpineComponent = /*#__PURE__*/ function(RendererComponent) {
11140
11137
  this.options = data.options;
11141
11138
  this.rendererOptions = _extends({
11142
11139
  renderMode: spec.RenderMode.MESH
11143
- }, data.renderer || {}, {
11144
- mask: 0,
11145
- maskMode: MaskMode.NONE
11146
- });
11140
+ }, data.renderer || {});
11147
11141
  this.item.getHitTestParams = this.getHitTestParams.bind(this);
11148
11142
  if (data.mask) {
11149
11143
  this.maskManager.setMaskOptions(this.engine, data.mask);
11150
11144
  }
11151
- this.rendererOptions.maskMode = this.maskManager.maskMode;
11152
- this.rendererOptions.mask = this.maskManager.getRefValue();
11153
11145
  // 兼容编辑器逻辑
11154
11146
  if (!this.resource || !Object.keys(this.resource).length) {
11155
11147
  return;
@@ -11273,7 +11265,6 @@ var SpineComponent = /*#__PURE__*/ function(RendererComponent) {
11273
11265
  meshName: this.name,
11274
11266
  transform: this.transform,
11275
11267
  pma: this.pma,
11276
- renderOptions: this.rendererOptions,
11277
11268
  engine: this.engine
11278
11269
  });
11279
11270
  };
@@ -11599,7 +11590,7 @@ var SpineLoader = /*#__PURE__*/ function(Plugin) {
11599
11590
  registerPlugin("spine", SpineLoader);
11600
11591
  /**
11601
11592
  * 插件版本号
11602
- */ var version = "2.9.3";
11593
+ */ var version = "2.10.0-alpha.1";
11603
11594
  logger.info("Plugin spine version: " + version + ".");
11604
11595
  if (version !== EFFECTS.version) {
11605
11596
  console.error("注意:请统一 Spine 插件与 Player 版本,不统一的版本混用会有不可预知的后果!", "\nAttention: Please ensure the Spine plugin is synchronized with the Player version. Mixing and matching incompatible versions may result in unpredictable consequences!");