@safe-engine/pixi 8.4.7 → 8.5.1
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/README.md +14 -23
- package/dist/box2d-wasm/ContactListener.d.ts +1 -1
- package/dist/box2d-wasm/ContactListener.d.ts.map +1 -1
- package/dist/box2d-wasm/ContactListener.js +50 -18
- package/dist/box2d-wasm/PhysicsComponent.d.ts +27 -30
- package/dist/box2d-wasm/PhysicsComponent.d.ts.map +1 -1
- package/dist/box2d-wasm/PhysicsComponent.js +44 -11
- package/dist/box2d-wasm/PhysicsSprite.d.ts +3 -0
- package/dist/box2d-wasm/PhysicsSprite.d.ts.map +1 -1
- package/dist/box2d-wasm/PhysicsSprite.js +24 -3
- package/dist/box2d-wasm/PhysicsSystem.d.ts +4 -2
- package/dist/box2d-wasm/PhysicsSystem.d.ts.map +1 -1
- package/dist/box2d-wasm/PhysicsSystem.js +134 -44
- package/dist/collider/CollideComponent.d.ts +27 -10
- package/dist/collider/CollideComponent.d.ts.map +1 -1
- package/dist/collider/CollideComponent.js +10 -12
- package/dist/collider/helper/Intersection.d.ts +6 -6
- package/dist/collider/helper/Intersection.d.ts.map +1 -1
- package/dist/collider/helper/Intersection.js +4 -4
- package/dist/helper/utils.d.ts +0 -6
- package/dist/helper/utils.d.ts.map +1 -1
- package/dist/helper/utils.js +0 -12
- package/package.json +6 -2
- package/.github/workflows/npm-publish.yml +0 -35
- package/dist/@types/safex.d.ts +0 -15
- package/src/@types/index.d.ts +0 -2
- package/src/app.ts +0 -91
- package/src/base/EnhancedComponent.ts +0 -38
- package/src/base/gworld.ts +0 -20
- package/src/base/index.ts +0 -14
- package/src/base/utils.ts +0 -23
- package/src/box2d-wasm/ContactListener.ts +0 -66
- package/src/box2d-wasm/PhysicsComponent.ts +0 -83
- package/src/box2d-wasm/PhysicsSprite.ts +0 -42
- package/src/box2d-wasm/PhysicsSystem.ts +0 -142
- package/src/box2d-wasm/debugDraw.ts +0 -249
- package/src/box2d-wasm/index.ts +0 -19
- package/src/collider/CollideComponent.ts +0 -257
- package/src/collider/CollideSystem.ts +0 -166
- package/src/collider/helper/Intersection.ts +0 -139
- package/src/collider/helper/utils.ts +0 -37
- package/src/collider/index.ts +0 -16
- package/src/components/BaseComponent.ts +0 -17
- package/src/components/NodeComp.ts +0 -442
- package/src/components/Scene.ts +0 -17
- package/src/core/Color.ts +0 -7
- package/src/core/LoadingBar.ts +0 -63
- package/src/core/NodePool.ts +0 -28
- package/src/core/Size.ts +0 -21
- package/src/core/Vec2.ts +0 -108
- package/src/core/director.ts +0 -11
- package/src/core/index.ts +0 -7
- package/src/core/loader.ts +0 -14
- package/src/core/math.ts +0 -22
- package/src/dragonbones/DragonBonesComponent.ts +0 -32
- package/src/dragonbones/DragonBonesSystem.ts +0 -35
- package/src/dragonbones/index.ts +0 -11
- package/src/gui/GUIComponent.ts +0 -155
- package/src/gui/GUISystem.ts +0 -125
- package/src/helper/utils.ts +0 -50
- package/src/index.ts +0 -21
- package/src/norender/NoRenderComponent.ts +0 -60
- package/src/norender/NoRenderSystem.ts +0 -67
- package/src/norender/Touch.ts +0 -37
- package/src/planck/PhysicsComponent.ts +0 -83
- package/src/planck/PhysicsSprite.ts +0 -43
- package/src/planck/PhysicsSystem.ts +0 -201
- package/src/planck/index.ts +0 -3
- package/src/render/RenderComponent.ts +0 -132
- package/src/render/RenderSystem.ts +0 -64
- package/src/richtext/RichTextComp.ts +0 -50
- package/src/richtext/RichTextSystem.ts +0 -26
- package/src/richtext/html-text-parser.ts +0 -87
- package/src/richtext/index.ts +0 -8
- package/src/spine/SpineComponent.ts +0 -18
- package/src/spine/SpineSystem.ts +0 -30
- package/src/spine/index.ts +0 -11
- package/src/spine/lib/BatchableSpineSlot.ts +0 -138
- package/src/spine/lib/Spine.ts +0 -894
- package/src/spine/lib/SpineDebugRenderer.ts +0 -615
- package/src/spine/lib/SpinePipe.ts +0 -203
- package/src/spine/lib/SpineTexture.ts +0 -143
- package/src/spine/lib/assets/atlasLoader.ts +0 -158
- package/src/spine/lib/assets/skeletonLoader.ts +0 -81
- package/src/spine/lib/darktint/DarkTintBatchGeometry.ts +0 -92
- package/src/spine/lib/darktint/DarkTintBatcher.ts +0 -186
- package/src/spine/lib/darktint/DarkTintShader.ts +0 -74
- package/src/spine/lib/darktint/darkTintBit.ts +0 -77
- package/src/spine/lib/index.ts +0 -43
- package/src/spine/lib/require-shim.ts +0 -43
- package/tsconfig.json +0 -18
- /package/{dist/@types → @types}/index.d.ts +0 -0
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/******************************************************************************
|
|
2
|
-
* Spine Runtimes License Agreement
|
|
3
|
-
* Last updated July 28, 2023. Replaces all prior versions.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2013-2023, Esoteric Software LLC
|
|
6
|
-
*
|
|
7
|
-
* Integration of the Spine Runtimes into software or otherwise creating
|
|
8
|
-
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
9
|
-
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
10
|
-
* http://esotericsoftware.com/spine-editor-license
|
|
11
|
-
*
|
|
12
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
|
13
|
-
* otherwise create derivative works of the Spine Runtimes (collectively,
|
|
14
|
-
* "Products"), provided that each user of the Products must obtain their own
|
|
15
|
-
* Spine Editor license and redistribution of the Products in any form must
|
|
16
|
-
* include this license and copyright notice.
|
|
17
|
-
*
|
|
18
|
-
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
19
|
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
-
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
22
|
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
24
|
-
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
25
|
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
|
|
27
|
-
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
-
*****************************************************************************/
|
|
29
|
-
|
|
30
|
-
import {
|
|
31
|
-
Batcher,
|
|
32
|
-
Color,
|
|
33
|
-
DefaultBatchableMeshElement,
|
|
34
|
-
DefaultBatchableQuadElement,
|
|
35
|
-
extensions,
|
|
36
|
-
ExtensionType,
|
|
37
|
-
Shader
|
|
38
|
-
} from 'pixi.js';
|
|
39
|
-
import { DarkTintBatchGeometry } from './DarkTintBatchGeometry.js';
|
|
40
|
-
import { DarkTintShader } from './DarkTintShader.js';
|
|
41
|
-
|
|
42
|
-
let defaultShader: Shader | null = null;
|
|
43
|
-
|
|
44
|
-
/** The default batcher is used to batch quads and meshes. */
|
|
45
|
-
export class DarkTintBatcher extends Batcher {
|
|
46
|
-
/** @ignore */
|
|
47
|
-
public static extension = {
|
|
48
|
-
type: [
|
|
49
|
-
ExtensionType.Batcher,
|
|
50
|
-
],
|
|
51
|
-
name: 'darkTint',
|
|
52
|
-
} as const;
|
|
53
|
-
|
|
54
|
-
public geometry = new DarkTintBatchGeometry();
|
|
55
|
-
public shader = defaultShader || (defaultShader = new DarkTintShader(this.maxTextures));
|
|
56
|
-
public name = DarkTintBatcher.extension.name;
|
|
57
|
-
|
|
58
|
-
/** The size of one attribute. 1 = 32 bit. x, y, u, v, color, darkColor, textureIdAndRound -> total = 7 */
|
|
59
|
-
public vertexSize = 7;
|
|
60
|
-
|
|
61
|
-
public packAttributes (
|
|
62
|
-
element: DefaultBatchableMeshElement & { darkColor: number },
|
|
63
|
-
float32View: Float32Array,
|
|
64
|
-
uint32View: Uint32Array,
|
|
65
|
-
index: number,
|
|
66
|
-
textureId: number
|
|
67
|
-
) {
|
|
68
|
-
const textureIdAndRound = (textureId << 16) | (element.roundPixels & 0xFFFF);
|
|
69
|
-
|
|
70
|
-
const wt = element.transform;
|
|
71
|
-
|
|
72
|
-
const a = wt.a;
|
|
73
|
-
const b = wt.b;
|
|
74
|
-
const c = wt.c;
|
|
75
|
-
const d = wt.d;
|
|
76
|
-
const tx = wt.tx;
|
|
77
|
-
const ty = wt.ty;
|
|
78
|
-
|
|
79
|
-
const { positions, uvs } = element;
|
|
80
|
-
|
|
81
|
-
const argb = element.color;
|
|
82
|
-
const worldAlpha = ((argb >> 24) & 0xFF) / 255;
|
|
83
|
-
const darkColor = Color.shared.setValue(element.darkColor).premultiply(worldAlpha, true).toPremultiplied(1, false);
|
|
84
|
-
|
|
85
|
-
const offset = element.attributeOffset;
|
|
86
|
-
const end = offset + element.attributeSize;
|
|
87
|
-
|
|
88
|
-
for (let i = offset; i < end; i++) {
|
|
89
|
-
const i2 = i * 2;
|
|
90
|
-
|
|
91
|
-
const x = positions[i2];
|
|
92
|
-
const y = positions[(i2) + 1];
|
|
93
|
-
|
|
94
|
-
float32View[index++] = (a * x) + (c * y) + tx;
|
|
95
|
-
float32View[index++] = (d * y) + (b * x) + ty;
|
|
96
|
-
|
|
97
|
-
float32View[index++] = uvs[i2];
|
|
98
|
-
float32View[index++] = uvs[(i2) + 1];
|
|
99
|
-
|
|
100
|
-
uint32View[index++] = argb;
|
|
101
|
-
uint32View[index++] = darkColor;
|
|
102
|
-
|
|
103
|
-
uint32View[index++] = textureIdAndRound;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
public packQuadAttributes (
|
|
108
|
-
element: DefaultBatchableQuadElement & { darkColor: number },
|
|
109
|
-
float32View: Float32Array,
|
|
110
|
-
uint32View: Uint32Array,
|
|
111
|
-
index: number,
|
|
112
|
-
textureId: number
|
|
113
|
-
) {
|
|
114
|
-
const texture = element.texture;
|
|
115
|
-
|
|
116
|
-
const wt = element.transform;
|
|
117
|
-
|
|
118
|
-
const a = wt.a;
|
|
119
|
-
const b = wt.b;
|
|
120
|
-
const c = wt.c;
|
|
121
|
-
const d = wt.d;
|
|
122
|
-
const tx = wt.tx;
|
|
123
|
-
const ty = wt.ty;
|
|
124
|
-
|
|
125
|
-
const bounds = element.bounds;
|
|
126
|
-
|
|
127
|
-
const w0 = bounds.maxX;
|
|
128
|
-
const w1 = bounds.minX;
|
|
129
|
-
const h0 = bounds.maxY;
|
|
130
|
-
const h1 = bounds.minY;
|
|
131
|
-
|
|
132
|
-
const uvs = texture.uvs;
|
|
133
|
-
|
|
134
|
-
// _ _ _ _
|
|
135
|
-
// a b g r
|
|
136
|
-
const argb = element.color;
|
|
137
|
-
const darkColor = element.darkColor;
|
|
138
|
-
|
|
139
|
-
const textureIdAndRound = (textureId << 16) | (element.roundPixels & 0xFFFF);
|
|
140
|
-
|
|
141
|
-
float32View[index + 0] = (a * w1) + (c * h1) + tx;
|
|
142
|
-
float32View[index + 1] = (d * h1) + (b * w1) + ty;
|
|
143
|
-
|
|
144
|
-
float32View[index + 2] = uvs.x0;
|
|
145
|
-
float32View[index + 3] = uvs.y0;
|
|
146
|
-
|
|
147
|
-
uint32View[index + 4] = argb;
|
|
148
|
-
uint32View[index + 5] = darkColor;
|
|
149
|
-
uint32View[index + 6] = textureIdAndRound;
|
|
150
|
-
|
|
151
|
-
// xy
|
|
152
|
-
float32View[index + 7] = (a * w0) + (c * h1) + tx;
|
|
153
|
-
float32View[index + 8] = (d * h1) + (b * w0) + ty;
|
|
154
|
-
|
|
155
|
-
float32View[index + 9] = uvs.x1;
|
|
156
|
-
float32View[index + 10] = uvs.y1;
|
|
157
|
-
|
|
158
|
-
uint32View[index + 11] = argb;
|
|
159
|
-
uint32View[index + 12] = darkColor;
|
|
160
|
-
uint32View[index + 13] = textureIdAndRound;
|
|
161
|
-
|
|
162
|
-
// xy
|
|
163
|
-
float32View[index + 14] = (a * w0) + (c * h0) + tx;
|
|
164
|
-
float32View[index + 15] = (d * h0) + (b * w0) + ty;
|
|
165
|
-
|
|
166
|
-
float32View[index + 16] = uvs.x2;
|
|
167
|
-
float32View[index + 17] = uvs.y2;
|
|
168
|
-
|
|
169
|
-
uint32View[index + 18] = argb;
|
|
170
|
-
uint32View[index + 19] = darkColor;
|
|
171
|
-
uint32View[index + 20] = textureIdAndRound;
|
|
172
|
-
|
|
173
|
-
// xy
|
|
174
|
-
float32View[index + 21] = (a * w1) + (c * h0) + tx;
|
|
175
|
-
float32View[index + 22] = (d * h0) + (b * w1) + ty;
|
|
176
|
-
|
|
177
|
-
float32View[index + 23] = uvs.x3;
|
|
178
|
-
float32View[index + 24] = uvs.y3;
|
|
179
|
-
|
|
180
|
-
uint32View[index + 25] = argb;
|
|
181
|
-
uint32View[index + 26] = darkColor;
|
|
182
|
-
uint32View[index + 27] = textureIdAndRound;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
extensions.add(DarkTintBatcher);
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/******************************************************************************
|
|
2
|
-
* Spine Runtimes License Agreement
|
|
3
|
-
* Last updated July 28, 2023. Replaces all prior versions.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2013-2023, Esoteric Software LLC
|
|
6
|
-
*
|
|
7
|
-
* Integration of the Spine Runtimes into software or otherwise creating
|
|
8
|
-
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
9
|
-
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
10
|
-
* http://esotericsoftware.com/spine-editor-license
|
|
11
|
-
*
|
|
12
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
|
13
|
-
* otherwise create derivative works of the Spine Runtimes (collectively,
|
|
14
|
-
* "Products"), provided that each user of the Products must obtain their own
|
|
15
|
-
* Spine Editor license and redistribution of the Products in any form must
|
|
16
|
-
* include this license and copyright notice.
|
|
17
|
-
*
|
|
18
|
-
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
19
|
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
-
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
22
|
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
24
|
-
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
25
|
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
|
|
27
|
-
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
-
*****************************************************************************/
|
|
29
|
-
|
|
30
|
-
import {
|
|
31
|
-
colorBit,
|
|
32
|
-
colorBitGl,
|
|
33
|
-
compileHighShaderGlProgram,
|
|
34
|
-
compileHighShaderGpuProgram,
|
|
35
|
-
generateTextureBatchBit,
|
|
36
|
-
generateTextureBatchBitGl,
|
|
37
|
-
getBatchSamplersUniformGroup,
|
|
38
|
-
roundPixelsBit,
|
|
39
|
-
roundPixelsBitGl,
|
|
40
|
-
Shader
|
|
41
|
-
} from 'pixi.js';
|
|
42
|
-
import { darkTintBit, darkTintBitGl } from './darkTintBit.js';
|
|
43
|
-
|
|
44
|
-
export class DarkTintShader extends Shader {
|
|
45
|
-
constructor (maxTextures: number) {
|
|
46
|
-
const glProgram = compileHighShaderGlProgram({
|
|
47
|
-
name: 'dark-tint-batch',
|
|
48
|
-
bits: [
|
|
49
|
-
colorBitGl,
|
|
50
|
-
darkTintBitGl,
|
|
51
|
-
generateTextureBatchBitGl(maxTextures),
|
|
52
|
-
roundPixelsBitGl,
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
const gpuProgram = compileHighShaderGpuProgram({
|
|
57
|
-
name: 'dark-tint-batch',
|
|
58
|
-
bits: [
|
|
59
|
-
colorBit,
|
|
60
|
-
darkTintBit,
|
|
61
|
-
generateTextureBatchBit(maxTextures),
|
|
62
|
-
roundPixelsBit,
|
|
63
|
-
]
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
super({
|
|
67
|
-
glProgram,
|
|
68
|
-
gpuProgram,
|
|
69
|
-
resources: {
|
|
70
|
-
batchSamplers: getBatchSamplersUniformGroup(maxTextures),
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/******************************************************************************
|
|
2
|
-
* Spine Runtimes License Agreement
|
|
3
|
-
* Last updated July 28, 2023. Replaces all prior versions.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2013-2023, Esoteric Software LLC
|
|
6
|
-
*
|
|
7
|
-
* Integration of the Spine Runtimes into software or otherwise creating
|
|
8
|
-
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
9
|
-
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
10
|
-
* http://esotericsoftware.com/spine-editor-license
|
|
11
|
-
*
|
|
12
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
|
13
|
-
* otherwise create derivative works of the Spine Runtimes (collectively,
|
|
14
|
-
* "Products"), provided that each user of the Products must obtain their own
|
|
15
|
-
* Spine Editor license and redistribution of the Products in any form must
|
|
16
|
-
* include this license and copyright notice.
|
|
17
|
-
*
|
|
18
|
-
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
19
|
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
-
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
22
|
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
24
|
-
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
25
|
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
|
|
27
|
-
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
-
*****************************************************************************/
|
|
29
|
-
|
|
30
|
-
export const darkTintBit = {
|
|
31
|
-
name: 'color-bit',
|
|
32
|
-
vertex: {
|
|
33
|
-
header: /* wgsl */`
|
|
34
|
-
@in aDarkColor: vec4<f32>;
|
|
35
|
-
@out vDarkColor: vec4<f32>;
|
|
36
|
-
`,
|
|
37
|
-
main: /* wgsl */`
|
|
38
|
-
vDarkColor = aDarkColor;
|
|
39
|
-
`
|
|
40
|
-
},
|
|
41
|
-
fragment: {
|
|
42
|
-
header: /* wgsl */`
|
|
43
|
-
@in vDarkColor: vec4<f32>;
|
|
44
|
-
`,
|
|
45
|
-
end: /* wgsl */`
|
|
46
|
-
|
|
47
|
-
let alpha = outColor.a * vColor.a;
|
|
48
|
-
let rgb = ((outColor.a - 1.0) * vDarkColor.a + 1.0 - outColor.rgb) * vDarkColor.rgb + outColor.rgb * vColor.rgb;
|
|
49
|
-
|
|
50
|
-
finalColor = vec4<f32>(rgb, alpha);
|
|
51
|
-
|
|
52
|
-
`
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const darkTintBitGl = {
|
|
57
|
-
name: 'color-bit',
|
|
58
|
-
vertex: {
|
|
59
|
-
header: /* glsl */`
|
|
60
|
-
in vec4 aDarkColor;
|
|
61
|
-
out vec4 vDarkColor;
|
|
62
|
-
`,
|
|
63
|
-
main: /* glsl */`
|
|
64
|
-
vDarkColor = aDarkColor;
|
|
65
|
-
`
|
|
66
|
-
},
|
|
67
|
-
fragment: {
|
|
68
|
-
header: /* glsl */`
|
|
69
|
-
in vec4 vDarkColor;
|
|
70
|
-
`,
|
|
71
|
-
end: /* glsl */`
|
|
72
|
-
|
|
73
|
-
finalColor.a = outColor.a * vColor.a;
|
|
74
|
-
finalColor.rgb = ((outColor.a - 1.0) * vDarkColor.a + 1.0 - outColor.rgb) * vDarkColor.rgb + outColor.rgb * vColor.rgb;
|
|
75
|
-
`
|
|
76
|
-
}
|
|
77
|
-
};
|
package/src/spine/lib/index.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/** ****************************************************************************
|
|
2
|
-
* Spine Runtimes License Agreement
|
|
3
|
-
* Last updated September 24, 2021. Replaces all prior versions.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2013-2021, Esoteric Software LLC
|
|
6
|
-
*
|
|
7
|
-
* Integration of the Spine Runtimes into software or otherwise creating
|
|
8
|
-
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
9
|
-
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
10
|
-
* http://esotericsoftware.com/spine-editor-license
|
|
11
|
-
*
|
|
12
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
13
|
-
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
|
14
|
-
* "Products"), provided that each user of the Products must obtain their own
|
|
15
|
-
* Spine Editor license and redistribution of the Products in any form must
|
|
16
|
-
* include this license and copyright notice.
|
|
17
|
-
*
|
|
18
|
-
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
19
|
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
-
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
22
|
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
24
|
-
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
25
|
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
27
|
-
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
-
*****************************************************************************/
|
|
29
|
-
|
|
30
|
-
import './require-shim.js'; // Side effects add require pixi.js to global scope
|
|
31
|
-
import './assets/atlasLoader.js'; // Side effects install the loaders into pixi
|
|
32
|
-
import './assets/skeletonLoader.js'; // Side effects install the loaders into pixi
|
|
33
|
-
import './darktint/DarkTintBatcher.js'; // Side effects install the batcher into pixi
|
|
34
|
-
import './SpinePipe.js';
|
|
35
|
-
|
|
36
|
-
export * from './assets/atlasLoader.js';
|
|
37
|
-
export * from './assets/skeletonLoader.js';
|
|
38
|
-
export * from './require-shim.js';
|
|
39
|
-
export * from './Spine.js';
|
|
40
|
-
export * from './SpineDebugRenderer.js';
|
|
41
|
-
export * from './SpinePipe.js';
|
|
42
|
-
export * from './SpineTexture.js';
|
|
43
|
-
export * from '@esotericsoftware/spine-core';
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/** ****************************************************************************
|
|
2
|
-
* Spine Runtimes License Agreement
|
|
3
|
-
* Last updated July 28, 2023. Replaces all prior versions.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2013-2023, Esoteric Software LLC
|
|
6
|
-
*
|
|
7
|
-
* Integration of the Spine Runtimes into software or otherwise creating
|
|
8
|
-
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
9
|
-
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
10
|
-
* http://esotericsoftware.com/spine-editor-license
|
|
11
|
-
*
|
|
12
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
|
13
|
-
* otherwise create derivative works of the Spine Runtimes (collectively,
|
|
14
|
-
* "Products"), provided that each user of the Products must obtain their own
|
|
15
|
-
* Spine Editor license and redistribution of the Products in any form must
|
|
16
|
-
* include this license and copyright notice.
|
|
17
|
-
*
|
|
18
|
-
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
19
|
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
-
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
22
|
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
24
|
-
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
25
|
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
|
|
27
|
-
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
-
*****************************************************************************/
|
|
29
|
-
|
|
30
|
-
declare global {
|
|
31
|
-
// var require: any;
|
|
32
|
-
var PIXI: any;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (typeof window !== 'undefined' && window.PIXI) {
|
|
36
|
-
const prevRequire = window.require;
|
|
37
|
-
(window as any).require = (x: string) => {
|
|
38
|
-
if (prevRequire) return prevRequire(x);
|
|
39
|
-
else if (x.startsWith("@pixi/") || x.startsWith("pixi.js")) return window.PIXI;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { };
|
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"lib": ["ES2020", "dom"],
|
|
4
|
-
"outDir": "dist",
|
|
5
|
-
"target": "ES6",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"strict": false,
|
|
12
|
-
"module": "ESNext",
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"types": ["node"],
|
|
15
|
-
"noEmit": false
|
|
16
|
-
},
|
|
17
|
-
"exclude": ["node_modules", "dist"]
|
|
18
|
-
}
|
|
File without changes
|