@galacean/effects-plugin-spine 2.3.2 → 2.4.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.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.3.2
6
+ * Version: v2.4.0-alpha.0
7
7
  */
8
8
 
9
9
  import * as EFFECTS from '@galacean/effects';
10
- import { assertExist, glContext, Mesh, Geometry, Material, math, setMaskMode, GLSLVersion, PLAYER_OPTIONS_ENV_EDITOR, serialize, effectsClass, spec, HitTestType, RendererComponent, registerPlugin, VFXItem, logger, AbstractPlugin } from '@galacean/effects';
10
+ import { assertExist, glContext, Mesh, Geometry, Material, math, setMaskMode, GLSLVersion, PLAYER_OPTIONS_ENV_EDITOR, serialize, effectsClass, spec, MaskProcessor, MaskMode, HitTestType, RendererComponent, registerPlugin, VFXItem, logger, AbstractPlugin } from '@galacean/effects';
11
11
 
12
12
  function _set_prototype_of(o, p) {
13
13
  _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
@@ -11076,14 +11076,22 @@ var SpineComponent = /*#__PURE__*/ function(RendererComponent) {
11076
11076
  /**
11077
11077
  * aabb 包围盒的宽度与高度
11078
11078
  */ _this.size = new Vector2();
11079
+ _this.maskManager = new MaskProcessor(engine);
11079
11080
  return _this;
11080
11081
  }
11081
11082
  var _proto = SpineComponent.prototype;
11082
11083
  _proto.fromData = function fromData(data) {
11083
11084
  RendererComponent.prototype.fromData.call(this, data);
11084
11085
  this.options = data.options;
11085
- this.rendererOptions = data.renderer || {};
11086
+ this.rendererOptions = _extends({
11087
+ renderMode: spec.RenderMode.MESH
11088
+ }, data.renderer || {}, {
11089
+ mask: 0,
11090
+ maskMode: MaskMode.NONE
11091
+ });
11086
11092
  this.item.getHitTestParams = this.getHitTestParams.bind(this);
11093
+ this.rendererOptions.maskMode = this.maskManager.getMaskMode(data);
11094
+ this.rendererOptions.mask = this.maskManager.getRefValue();
11087
11095
  // 兼容编辑器逻辑
11088
11096
  if (!this.resource || !Object.keys(this.resource).length) {
11089
11097
  return;
@@ -11493,7 +11501,7 @@ registerPlugin("spine", /*#__PURE__*/ function(AbstractPlugin) {
11493
11501
  }(AbstractPlugin), VFXItem);
11494
11502
  /**
11495
11503
  * 插件版本号
11496
- */ var version = "2.3.2";
11504
+ */ var version = "2.4.0-alpha.0";
11497
11505
  logger.info("Plugin spine version: " + version + ".");
11498
11506
  if (version !== EFFECTS.version) {
11499
11507
  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!");