@galacean/effects-plugin-spine 2.3.4 → 2.3.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/alipay.js +1 -1
- package/dist/alipay.js.map +1 -1
- package/dist/alipay.mjs +1 -1
- package/dist/alipay.mjs.map +1 -1
- package/dist/douyin.js +1 -1
- package/dist/douyin.js.map +1 -1
- package/dist/douyin.mjs +1 -1
- package/dist/douyin.mjs.map +1 -1
- package/dist/index.js +11 -12
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +11 -12
- package/dist/index.mjs.map +1 -1
- package/dist/spine-mesh.d.ts +1 -2
- package/dist/utils.d.ts +1 -1
- package/dist/weapp.js +1 -1
- package/dist/weapp.js.map +1 -1
- package/dist/weapp.mjs +1 -1
- package/dist/weapp.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects player spine plugin
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 十弦
|
|
6
|
-
* Version: v2.3.
|
|
6
|
+
* Version: v2.3.6
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as EFFECTS from '@galacean/effects';
|
|
@@ -10489,7 +10489,7 @@ function decodeText(array) {
|
|
|
10489
10489
|
return decodeURIComponent(encodeURIComponent(s));
|
|
10490
10490
|
}
|
|
10491
10491
|
|
|
10492
|
-
function setBlending(material, mode
|
|
10492
|
+
function setBlending(material, mode) {
|
|
10493
10493
|
material.blendEquation = [
|
|
10494
10494
|
glContext.FUNC_ADD,
|
|
10495
10495
|
glContext.FUNC_ADD
|
|
@@ -10499,7 +10499,7 @@ function setBlending(material, mode, pma) {
|
|
|
10499
10499
|
material.blendFunction = [
|
|
10500
10500
|
glContext.DST_COLOR,
|
|
10501
10501
|
glContext.ONE_MINUS_SRC_ALPHA,
|
|
10502
|
-
glContext.
|
|
10502
|
+
glContext.DST_COLOR,
|
|
10503
10503
|
glContext.ONE_MINUS_SRC_ALPHA
|
|
10504
10504
|
];
|
|
10505
10505
|
break;
|
|
@@ -10513,7 +10513,7 @@ function setBlending(material, mode, pma) {
|
|
|
10513
10513
|
break;
|
|
10514
10514
|
case BlendMode.Additive:
|
|
10515
10515
|
material.blendFunction = [
|
|
10516
|
-
|
|
10516
|
+
glContext.ONE,
|
|
10517
10517
|
glContext.ONE,
|
|
10518
10518
|
glContext.ONE,
|
|
10519
10519
|
glContext.ONE
|
|
@@ -10521,7 +10521,7 @@ function setBlending(material, mode, pma) {
|
|
|
10521
10521
|
break;
|
|
10522
10522
|
case BlendMode.Normal:
|
|
10523
10523
|
material.blendFunction = [
|
|
10524
|
-
|
|
10524
|
+
glContext.ONE,
|
|
10525
10525
|
glContext.ONE_MINUS_SRC_ALPHA,
|
|
10526
10526
|
glContext.ONE,
|
|
10527
10527
|
glContext.ONE_MINUS_SRC_ALPHA
|
|
@@ -10676,7 +10676,7 @@ typeof SuppressedError === "function" ? SuppressedError : function _SuppressedEr
|
|
|
10676
10676
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
10677
10677
|
};
|
|
10678
10678
|
|
|
10679
|
-
var fs = "precision mediump float;varying mediump vec4 vLight;varying mediump vec4 vDark;varying vec2 vTexCoords;uniform sampler2D uTexture;void main(){vec4 texColor=texture2D(uTexture,vTexCoords);gl_FragColor.a=texColor.a*vLight.a;gl_FragColor.rgb=((texColor.a-1.0)*vDark.a+1.0-texColor.rgb)*vDark.rgb+texColor.rgb*vLight.rgb;}";
|
|
10679
|
+
var fs = "precision mediump float;varying mediump vec4 vLight;varying mediump vec4 vDark;varying vec2 vTexCoords;uniform sampler2D uTexture;void main(){vec4 texColor=texture2D(uTexture,vTexCoords);gl_FragColor.a=texColor.a*vLight.a;gl_FragColor.rgb=((texColor.a-1.0)*vDark.a+1.0-texColor.rgb)*vDark.rgb+texColor.rgb*vLight.rgb;gl_FragColor.rgb*=gl_FragColor.a;}";
|
|
10680
10680
|
|
|
10681
10681
|
var vs = "attribute vec2 aPosition;attribute vec4 aColor;attribute vec4 aColor2;attribute vec2 aTexCoords;uniform mat4 effects_ObjectToWorld;uniform mat4 effects_MatrixVP;\n#ifdef ENV_EDITOR\nuniform vec4 uEditorTransform;\n#endif\nvarying vec4 vLight;varying vec4 vDark;varying vec2 vTexCoords;void main(){vLight=aColor;vDark=aColor2;vTexCoords=aTexCoords;gl_Position=effects_MatrixVP*effects_ObjectToWorld*vec4(aPosition,0.0,1.0);\n#ifdef ENV_EDITOR\ngl_Position=vec4(gl_Position.xy*uEditorTransform.xy+uEditorTransform.zw*gl_Position.w,gl_Position.zw);\n#endif\n}";
|
|
10682
10682
|
|
|
@@ -10685,14 +10685,14 @@ var SpineMesh = /*#__PURE__*/ function() {
|
|
|
10685
10685
|
function SpineMesh(renderInfo) {
|
|
10686
10686
|
this.verticesLength = 0;
|
|
10687
10687
|
this.indicesLength = 0;
|
|
10688
|
-
var blendMode = renderInfo.blendMode, texture = renderInfo.texture, priority = renderInfo.priority, _renderInfo_renderOptions = renderInfo.renderOptions, renderOptions = _renderInfo_renderOptions === void 0 ? {} : _renderInfo_renderOptions,
|
|
10688
|
+
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;
|
|
10689
10689
|
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;
|
|
10690
10690
|
this.blendMode = blendMode;
|
|
10691
10691
|
this.lastTexture = texture;
|
|
10692
10692
|
this.priority = priority;
|
|
10693
10693
|
this.engine = engine;
|
|
10694
10694
|
this.geometry = this.createGeometry();
|
|
10695
|
-
this.material = this.createMaterial(
|
|
10695
|
+
this.material = this.createMaterial(maskMode, mask);
|
|
10696
10696
|
this.mesh = Mesh.create(engine, {
|
|
10697
10697
|
name: name + seed++,
|
|
10698
10698
|
priority: this.priority,
|
|
@@ -10742,7 +10742,7 @@ var SpineMesh = /*#__PURE__*/ function() {
|
|
|
10742
10742
|
maxVertex: SlotGroup.MAX_VERTICES
|
|
10743
10743
|
});
|
|
10744
10744
|
};
|
|
10745
|
-
_proto.createMaterial = function createMaterial(
|
|
10745
|
+
_proto.createMaterial = function createMaterial(maskMode, maskOrder) {
|
|
10746
10746
|
var material = Material.create(this.engine, {
|
|
10747
10747
|
shader: createShader(this.engine),
|
|
10748
10748
|
uniformSemantics: {
|
|
@@ -10760,7 +10760,7 @@ var SpineMesh = /*#__PURE__*/ function() {
|
|
|
10760
10760
|
maskOrder,
|
|
10761
10761
|
maskOrder
|
|
10762
10762
|
] : undefined;
|
|
10763
|
-
setBlending(material, this.blendMode
|
|
10763
|
+
setBlending(material, this.blendMode);
|
|
10764
10764
|
setMaskMode(material, maskMode);
|
|
10765
10765
|
return material;
|
|
10766
10766
|
};
|
|
@@ -10999,7 +10999,6 @@ var SlotGroup = /*#__PURE__*/ function() {
|
|
|
10999
10999
|
texture: texture,
|
|
11000
11000
|
name: this.meshName,
|
|
11001
11001
|
priority: this.listIndex += 0.01,
|
|
11002
|
-
pma: pma,
|
|
11003
11002
|
renderOptions: this.renderOptions,
|
|
11004
11003
|
engine: this.engine
|
|
11005
11004
|
});
|
|
@@ -11493,7 +11492,7 @@ registerPlugin("spine", /*#__PURE__*/ function(AbstractPlugin) {
|
|
|
11493
11492
|
}(AbstractPlugin), VFXItem);
|
|
11494
11493
|
/**
|
|
11495
11494
|
* 插件版本号
|
|
11496
|
-
*/ var version = "2.3.
|
|
11495
|
+
*/ var version = "2.3.6";
|
|
11497
11496
|
logger.info("Plugin spine version: " + version + ".");
|
|
11498
11497
|
if (version !== EFFECTS.version) {
|
|
11499
11498
|
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!");
|