@galacean/effects-plugin-spine 2.6.1 → 2.6.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/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 +12 -7
- 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 +12 -7
- package/dist/index.mjs.map +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.js
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.6.
|
|
6
|
+
* Version: v2.6.2
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -10701,7 +10701,7 @@ typeof SuppressedError === "function" ? SuppressedError : function _SuppressedEr
|
|
|
10701
10701
|
|
|
10702
10702
|
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;}";
|
|
10703
10703
|
|
|
10704
|
-
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}";
|
|
10704
|
+
var vs = "attribute vec2 aPosition;attribute vec4 aColor;attribute vec4 aColor2;attribute vec2 aTexCoords;uniform mat4 effects_ObjectToWorld;uniform mat4 effects_MatrixVP;uniform vec2 _Size;\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*_Size,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}";
|
|
10705
10705
|
|
|
10706
10706
|
var seed = 1;
|
|
10707
10707
|
var SpineMesh = /*#__PURE__*/ function() {
|
|
@@ -11169,9 +11169,15 @@ exports.SpineComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
11169
11169
|
}
|
|
11170
11170
|
};
|
|
11171
11171
|
_proto.render = function render(renderer) {
|
|
11172
|
-
|
|
11172
|
+
if (!this.content) {
|
|
11173
|
+
return;
|
|
11174
|
+
}
|
|
11175
|
+
for(var i = 0; i < this.content.meshGroups.length; i++){
|
|
11176
|
+
var material = this.content.meshGroups[i].mesh.material;
|
|
11177
|
+
material.setVector2("_Size", new Vector2(this.startSize * this.scaleFactor, this.startSize * this.scaleFactor));
|
|
11178
|
+
}
|
|
11173
11179
|
this.maskManager.drawStencilMask(renderer);
|
|
11174
|
-
|
|
11180
|
+
this.content.render(renderer);
|
|
11175
11181
|
};
|
|
11176
11182
|
_proto.drawStencilMask = function drawStencilMask(renderer) {
|
|
11177
11183
|
if (!this.isActiveAndEnabled) {
|
|
@@ -11492,7 +11498,6 @@ exports.SpineComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
11492
11498
|
return;
|
|
11493
11499
|
}
|
|
11494
11500
|
var width = res.width;
|
|
11495
|
-
var scale = this.transform.scale;
|
|
11496
11501
|
var scaleFactor;
|
|
11497
11502
|
if (this.resizeRule) {
|
|
11498
11503
|
var camera = this.item.composition.camera;
|
|
@@ -11507,7 +11512,7 @@ exports.SpineComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
11507
11512
|
scaleFactor = 1 / width;
|
|
11508
11513
|
}
|
|
11509
11514
|
this.scaleFactor = scaleFactor;
|
|
11510
|
-
this.transform.setScale(
|
|
11515
|
+
this.transform.setScale(1, 1, this.transform.scale.z);
|
|
11511
11516
|
};
|
|
11512
11517
|
// 转换当前大小为旧缩放规则下的大小
|
|
11513
11518
|
_proto.convertSizeToOldRule = function convertSizeToOldRule() {
|
|
@@ -11553,7 +11558,7 @@ EFFECTS.registerPlugin("spine", /*#__PURE__*/ function(AbstractPlugin) {
|
|
|
11553
11558
|
}(EFFECTS.AbstractPlugin), EFFECTS.VFXItem);
|
|
11554
11559
|
/**
|
|
11555
11560
|
* 插件版本号
|
|
11556
|
-
*/ var version = "2.6.
|
|
11561
|
+
*/ var version = "2.6.2";
|
|
11557
11562
|
EFFECTS.logger.info("Plugin spine version: " + version + ".");
|
|
11558
11563
|
if (version !== EFFECTS__namespace.version) {
|
|
11559
11564
|
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!");
|