@galacean/effects-plugin-spine 2.10.0-alpha.1 → 2.10.0-alpha.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 +29 -33
- 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 +30 -34
- 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.10.0-alpha.
|
|
6
|
+
* Version: v2.10.0-alpha.2
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -10769,7 +10769,7 @@ typeof SuppressedError === "function" ? SuppressedError : function _SuppressedEr
|
|
|
10769
10769
|
|
|
10770
10770
|
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;}";
|
|
10771
10771
|
|
|
10772
|
-
var vs = "attribute vec2
|
|
10772
|
+
var vs = "attribute vec2 aPos;attribute vec4 aColor;attribute vec4 aColor2;attribute vec2 aUV;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=aUV;gl_Position=effects_MatrixVP*effects_ObjectToWorld*vec4(aPos*_Size,0.0,1.0);}";
|
|
10773
10773
|
|
|
10774
10774
|
var seed = 1;
|
|
10775
10775
|
var SpineMesh = /*#__PURE__*/ function() {
|
|
@@ -10796,40 +10796,36 @@ var SpineMesh = /*#__PURE__*/ function() {
|
|
|
10796
10796
|
_proto.createGeometry = function createGeometry() {
|
|
10797
10797
|
var BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT;
|
|
10798
10798
|
var stride = BYTES_PER_ELEMENT * SlotGroup.VERTEX_SIZE;
|
|
10799
|
-
var
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
stride: stride,
|
|
10822
|
-
dataSource: "aPosition"
|
|
10823
|
-
}
|
|
10824
|
-
};
|
|
10799
|
+
var _obj;
|
|
10800
|
+
var attributes = (_obj = {}, _obj[EFFECTS.VertexBuffer.PositionKind] = {
|
|
10801
|
+
size: 2,
|
|
10802
|
+
offset: 0,
|
|
10803
|
+
stride: stride,
|
|
10804
|
+
data: new Float32Array(0)
|
|
10805
|
+
}, _obj[EFFECTS.VertexBuffer.ColorKind] = {
|
|
10806
|
+
size: 4,
|
|
10807
|
+
offset: 2 * BYTES_PER_ELEMENT,
|
|
10808
|
+
stride: stride,
|
|
10809
|
+
dataSource: EFFECTS.VertexBuffer.PositionKind
|
|
10810
|
+
}, _obj[EFFECTS.VertexBuffer.UVKind] = {
|
|
10811
|
+
size: 2,
|
|
10812
|
+
offset: 6 * BYTES_PER_ELEMENT,
|
|
10813
|
+
stride: stride,
|
|
10814
|
+
dataSource: EFFECTS.VertexBuffer.PositionKind
|
|
10815
|
+
}, _obj.aColor2 = {
|
|
10816
|
+
size: 4,
|
|
10817
|
+
offset: 8 * BYTES_PER_ELEMENT,
|
|
10818
|
+
stride: stride,
|
|
10819
|
+
dataSource: EFFECTS.VertexBuffer.PositionKind
|
|
10820
|
+
}, _obj);
|
|
10825
10821
|
return EFFECTS.Geometry.create(this.engine, {
|
|
10826
10822
|
attributes: attributes,
|
|
10827
10823
|
indices: {
|
|
10828
|
-
data: new Uint16Array(0)
|
|
10829
|
-
releasable: true
|
|
10824
|
+
data: new Uint16Array(0)
|
|
10830
10825
|
},
|
|
10831
10826
|
mode: EFFECTS.glContext.TRIANGLES,
|
|
10832
|
-
maxVertex: SlotGroup.MAX_VERTICES
|
|
10827
|
+
maxVertex: SlotGroup.MAX_VERTICES,
|
|
10828
|
+
bufferUsage: EFFECTS.glContext.DYNAMIC_DRAW
|
|
10833
10829
|
});
|
|
10834
10830
|
};
|
|
10835
10831
|
_proto.createMaterial = function createMaterial() {
|
|
@@ -10868,7 +10864,7 @@ var SpineMesh = /*#__PURE__*/ function() {
|
|
|
10868
10864
|
for(var i1 = this.indicesLength; i1 < this.indices.length; i1++){
|
|
10869
10865
|
this.indices[i1] = 0;
|
|
10870
10866
|
}
|
|
10871
|
-
this.geometry.setAttributeData(
|
|
10867
|
+
this.geometry.setAttributeData(EFFECTS.VertexBuffer.PositionKind, this.vertices);
|
|
10872
10868
|
this.geometry.setIndexData(this.indices);
|
|
10873
10869
|
this.geometry.setDrawCount(this.indicesLength);
|
|
10874
10870
|
};
|
|
@@ -11613,7 +11609,7 @@ var SpineLoader = /*#__PURE__*/ function(Plugin) {
|
|
|
11613
11609
|
EFFECTS.registerPlugin("spine", SpineLoader);
|
|
11614
11610
|
/**
|
|
11615
11611
|
* 插件版本号
|
|
11616
|
-
*/ var version = "2.10.0-alpha.
|
|
11612
|
+
*/ var version = "2.10.0-alpha.2";
|
|
11617
11613
|
EFFECTS.logger.info("Plugin spine version: " + version + ".");
|
|
11618
11614
|
if (version !== EFFECTS__namespace.version) {
|
|
11619
11615
|
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!");
|