@galacean/effects-plugin-spine 2.6.5 → 2.7.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/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 +10 -10
- 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 -11
- package/dist/index.mjs.map +1 -1
- package/dist/spine-mesh.d.ts +2 -2
- 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
|
+
* Version: v2.7.0-alpha.0
|
|
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;uniform vec2 _Size
|
|
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;varying 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);}";
|
|
10705
10705
|
|
|
10706
10706
|
var seed = 1;
|
|
10707
10707
|
var SpineMesh = /*#__PURE__*/ function() {
|
|
@@ -10767,14 +10767,9 @@ var SpineMesh = /*#__PURE__*/ function() {
|
|
|
10767
10767
|
};
|
|
10768
10768
|
_proto.createMaterial = function createMaterial(maskMode, maskOrder) {
|
|
10769
10769
|
var material = EFFECTS.Material.create(this.engine, {
|
|
10770
|
-
shader: createShader(this.engine)
|
|
10771
|
-
uniformSemantics: {
|
|
10772
|
-
effects_MatrixVP: "VIEWPROJECTION",
|
|
10773
|
-
uEditorTransform: "EDITOR_TRANSFORM"
|
|
10774
|
-
}
|
|
10770
|
+
shader: createShader(this.engine)
|
|
10775
10771
|
});
|
|
10776
10772
|
material.setTexture("uTexture", this.lastTexture);
|
|
10777
|
-
material.setMatrix("effects_ObjectToWorld", EFFECTS.math.Matrix4.fromIdentity());
|
|
10778
10773
|
material.blending = true;
|
|
10779
10774
|
material.culling = false;
|
|
10780
10775
|
material.depthTest = false;
|
|
@@ -10814,7 +10809,6 @@ var SpineMesh = /*#__PURE__*/ function() {
|
|
|
10814
10809
|
this.geometry.setAttributeData("aPosition", this.vertices);
|
|
10815
10810
|
this.geometry.setIndexData(this.indices);
|
|
10816
10811
|
this.geometry.setDrawCount(this.indicesLength);
|
|
10817
|
-
this.material.setMatrix("effects_ObjectToWorld", worldMatrix);
|
|
10818
10812
|
};
|
|
10819
10813
|
_proto.startUpdate = function startUpdate() {
|
|
10820
10814
|
this.verticesLength = 0;
|
|
@@ -11263,6 +11257,12 @@ exports.SpineComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
11263
11257
|
var p1 = new Vector3(centerX + width / 2, centerY - height / 2, 0);
|
|
11264
11258
|
var p2 = new Vector3(centerX + width / 2, centerY + height / 2, 0);
|
|
11265
11259
|
var p3 = new Vector3(centerX - width / 2, centerY + height / 2, 0);
|
|
11260
|
+
// TODO: 优化 Spine 初始大小逻辑
|
|
11261
|
+
var startSizeScaleFactor = this.startSize * this.scaleFactor;
|
|
11262
|
+
p0.multiply(startSizeScaleFactor);
|
|
11263
|
+
p1.multiply(startSizeScaleFactor);
|
|
11264
|
+
p2.multiply(startSizeScaleFactor);
|
|
11265
|
+
p3.multiply(startSizeScaleFactor);
|
|
11266
11266
|
wm.projectPoint(p0);
|
|
11267
11267
|
wm.projectPoint(p1);
|
|
11268
11268
|
wm.projectPoint(p2);
|
|
@@ -11558,7 +11558,7 @@ EFFECTS.registerPlugin("spine", /*#__PURE__*/ function(AbstractPlugin) {
|
|
|
11558
11558
|
}(EFFECTS.AbstractPlugin), EFFECTS.VFXItem);
|
|
11559
11559
|
/**
|
|
11560
11560
|
* 插件版本号
|
|
11561
|
-
*/ var version = "2.
|
|
11561
|
+
*/ var version = "2.7.0-alpha.0";
|
|
11562
11562
|
EFFECTS.logger.info("Plugin spine version: " + version + ".");
|
|
11563
11563
|
if (version !== EFFECTS__namespace.version) {
|
|
11564
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!");
|