@galacean/engine-spine 0.0.0-experimental-2024071901 → 0.0.0-experimental-engine-spine-20240821
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 +6 -8
- package/dist/browser.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +1 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/package.json +8 -62
- package/types/{src/SpineAnimationRenderer.d.ts → SpineAnimationRenderer.d.ts} +1 -1
- package/types/SpineGenerator.d.ts +7 -6
- package/types/index.d.ts +2 -2
- package/types/loader/EditorSpineAtlasLoader.d.ts +1 -1
- package/types/loader/LoaderUtils.d.ts +1 -1
- package/types/loader/SkeletonDataResource.d.ts +1 -1
- package/types/loader/SpineLoader.d.ts +1 -1
- package/types/spine-core/Animation.d.ts +378 -0
- package/types/spine-core/AnimationState.d.ts +365 -0
- package/types/spine-core/AnimationStateData.d.ts +23 -0
- package/types/spine-core/AssetManager.d.ts +36 -0
- package/types/spine-core/AtlasAttachmentLoader.d.ts +23 -0
- package/types/spine-core/BlendMode.d.ts +7 -0
- package/types/spine-core/Bone.d.ts +110 -0
- package/types/spine-core/BoneData.d.ts +44 -0
- package/types/spine-core/ConstraintData.d.ts +7 -0
- package/types/spine-core/Event.d.ts +16 -0
- package/types/spine-core/EventData.d.ts +13 -0
- package/types/spine-core/IkConstraint.d.ts +38 -0
- package/types/spine-core/IkConstraintData.d.ts +26 -0
- package/types/spine-core/PathConstraint.d.ts +46 -0
- package/types/spine-core/PathConstraintData.d.ts +52 -0
- package/types/spine-core/SharedAssetManager.d.ts +19 -0
- package/types/spine-core/Skeleton.d.ts +134 -0
- package/types/spine-core/SkeletonBinary.d.ts +49 -0
- package/types/spine-core/SkeletonBounds.d.ts +48 -0
- package/types/spine-core/SkeletonClipping.d.ts +22 -0
- package/types/spine-core/SkeletonData.d.ts +89 -0
- package/types/spine-core/SkeletonJson.d.ts +34 -0
- package/types/spine-core/Skin.d.ts +43 -0
- package/types/spine-core/Slot.d.ts +42 -0
- package/types/spine-core/SlotData.d.ts +23 -0
- package/types/spine-core/Texture.d.ts +43 -0
- package/types/spine-core/TextureAtlas.d.ts +30 -0
- package/types/spine-core/TransformConstraint.d.ts +36 -0
- package/types/spine-core/TransformConstraintData.d.ts +34 -0
- package/types/spine-core/Triangulator.d.ts +14 -0
- package/types/spine-core/Updatable.d.ts +9 -0
- package/types/spine-core/Utils.d.ts +124 -0
- package/types/spine-core/VertexEffect.d.ts +7 -0
- package/types/spine-core/attachments/Attachment.d.ts +43 -0
- package/types/spine-core/attachments/AttachmentLoader.d.ts +25 -0
- package/types/spine-core/attachments/AttachmentType.d.ts +9 -0
- package/types/spine-core/attachments/BoundingBoxAttachment.d.ts +12 -0
- package/types/spine-core/attachments/ClippingAttachment.d.ts +14 -0
- package/types/spine-core/attachments/MeshAttachment.d.ts +46 -0
- package/types/spine-core/attachments/PathAttachment.d.ts +19 -0
- package/types/spine-core/attachments/PointAttachment.d.ts +20 -0
- package/types/spine-core/attachments/RegionAttachment.d.ts +88 -0
- package/types/spine-core/index.d.ts +45 -0
- package/types/spine-core/vertexeffects/JitterEffect.d.ts +11 -0
- package/types/spine-core/vertexeffects/SwirlEffect.d.ts +16 -0
- package/types/util/BlendMode.d.ts +1 -1
- package/types/SpineAnimation.d.ts +0 -147
- package/types/core/MeshGenerator.d.ts +0 -43
- package/types/core/SpineGenerator.d.ts +0 -42
- package/types/core/SpineMesh.d.ts +0 -11
- package/types/core/SpinePrimitive.d.ts +0 -15
- package/types/cypress.config.d.ts +0 -2
- package/types/e2e/case/.mockForE2E.d.ts +0 -3
- package/types/e2e/case/raptor.d.ts +0 -1
- package/types/e2e/case/spine-boy.d.ts +0 -1
- package/types/e2e/config.d.ts +0 -19
- package/types/e2e/support/commands.d.ts +0 -8
- package/types/e2e/support/e2e.d.ts +0 -1
- package/types/e2e/tests/index.cy.d.ts +0 -1
- package/types/example/main.d.ts +0 -1
- package/types/example/outline.d.ts +0 -11
- package/types/jest.setup.d.ts +0 -5
- package/types/loader/BufferReader.d.ts +0 -9
- package/types/loader/EditorSkeletonDataLoader.d.ts +0 -6
- package/types/src/SpineGenerator.d.ts +0 -37
- package/types/src/SpineMaterial.d.ts +0 -6
- package/types/src/index.d.ts +0 -7
- package/types/src/loader/EditorSpineAtlasLoader.d.ts +0 -6
- package/types/src/loader/LoaderUtils.d.ts +0 -18
- package/types/src/loader/SkeletonDataResource.d.ts +0 -12
- package/types/src/loader/SpineLoader.d.ts +0 -29
- package/types/src/util/BlendMode.d.ts +0 -4
- package/types/src/util/BufferReader.d.ts +0 -10
- package/types/src/util/ClearablePool.d.ts +0 -8
- package/types/src/util/ReturnablePool.d.ts +0 -8
- package/types/tests/SpineAnimation.test.d.ts +0 -1
- package/types/tests/SpineGenerator.test.d.ts +0 -1
- package/types/tests/SpineMaterial.test.d.ts +0 -1
- package/types/tests/loader/EditorSpineAtlasLoader.test.d.ts +0 -1
- package/types/tests/loader/SkeletonDataResource.test.d.ts +0 -1
- package/types/tests/loader/SpineLoader.test.d.ts +0 -1
- package/types/tests/loader/loaderUtil.test.d.ts +0 -0
- package/types/tests/testUtils.d.ts +0 -3
- package/types/tests/util/BlendMode.test.d.ts +0 -1
- package/types/tests/util/BufferReader.test.d.ts +0 -1
- package/types/tests/util/ClearablePool.test.d.ts +0 -1
- package/types/tests/util/ReturnablePool.test.d.ts +0 -1
- package/types/types.d.ts +0 -4
- package/types/util/Cache.d.ts +0 -19
- /package/types/{e2e/case/mix-and-match.d.ts → spine-core/polyfills.d.ts} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VertexEffect } from "../VertexEffect";
|
|
2
|
+
import { Skeleton } from "../Skeleton";
|
|
3
|
+
import { Color, Vector2 } from "../Utils";
|
|
4
|
+
export declare class JitterEffect implements VertexEffect {
|
|
5
|
+
jitterX: number;
|
|
6
|
+
jitterY: number;
|
|
7
|
+
constructor(jitterX: number, jitterY: number);
|
|
8
|
+
begin(skeleton: Skeleton): void;
|
|
9
|
+
transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void;
|
|
10
|
+
end(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VertexEffect } from "../VertexEffect";
|
|
2
|
+
import { PowOut, Color, Vector2 } from "../Utils";
|
|
3
|
+
import { Skeleton } from "../Skeleton";
|
|
4
|
+
export declare class SwirlEffect implements VertexEffect {
|
|
5
|
+
static interpolation: PowOut;
|
|
6
|
+
centerX: number;
|
|
7
|
+
centerY: number;
|
|
8
|
+
radius: number;
|
|
9
|
+
angle: number;
|
|
10
|
+
private worldX;
|
|
11
|
+
private worldY;
|
|
12
|
+
constructor(radius: number);
|
|
13
|
+
begin(skeleton: Skeleton): void;
|
|
14
|
+
transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void;
|
|
15
|
+
end(): void;
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlendMode } from "
|
|
1
|
+
import { BlendMode } from "../spine-core";
|
|
2
2
|
import { Material } from "@galacean/engine";
|
|
3
3
|
export declare function setBlendMode(material: Material, blendMode: BlendMode): void;
|
|
4
4
|
export declare function getBlendMode(material: Material): BlendMode;
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { Skeleton, SkeletonData, AnimationState, AnimationStateData } from "@esotericsoftware/spine-core";
|
|
2
|
-
import { Buffer, Renderer, Entity, Material, Engine, BoundingBox, Primitive, SubPrimitive } from "@galacean/engine";
|
|
3
|
-
import { SkeletonDataResource } from "./loader/SkeletonDataResource";
|
|
4
|
-
interface DefaultState {
|
|
5
|
-
animationName: string;
|
|
6
|
-
skinName: string;
|
|
7
|
-
loop: boolean;
|
|
8
|
-
scale: number;
|
|
9
|
-
}
|
|
10
|
-
export type SpineRenderSetting = {
|
|
11
|
-
useClipping: boolean;
|
|
12
|
-
zSpacing: number;
|
|
13
|
-
};
|
|
14
|
-
export declare class SpineAnimation extends Renderer {
|
|
15
|
-
private static _defaultMaterial;
|
|
16
|
-
private static _spineGenerator;
|
|
17
|
-
private static positionVertexElement;
|
|
18
|
-
private static colorVertexElement;
|
|
19
|
-
private static uvVertexElement;
|
|
20
|
-
static materialCache: Map<string, Material>;
|
|
21
|
-
static animationDataCache: Map<SkeletonData, AnimationStateData>;
|
|
22
|
-
static getDefaultMaterial(engine: Engine): Material;
|
|
23
|
-
/** Render setting for spine rendering. */
|
|
24
|
-
setting: SpineRenderSetting;
|
|
25
|
-
/** Initial spine animation and skin state. */
|
|
26
|
-
defaultState: DefaultState;
|
|
27
|
-
/** @internal */
|
|
28
|
-
_primitive: Primitive;
|
|
29
|
-
/** @internal */
|
|
30
|
-
_subPrimitives: SubPrimitive[];
|
|
31
|
-
/** @internal */
|
|
32
|
-
_indexBuffer: Buffer;
|
|
33
|
-
/** @internal */
|
|
34
|
-
_vertexBuffer: Buffer;
|
|
35
|
-
/** @internal */
|
|
36
|
-
_vertices: Float32Array;
|
|
37
|
-
/** @internal */
|
|
38
|
-
_indices: Uint16Array;
|
|
39
|
-
/** @internal */
|
|
40
|
-
_needResizeBuffer: boolean;
|
|
41
|
-
/** @internal */
|
|
42
|
-
_vertexCount: number;
|
|
43
|
-
/** @internal */
|
|
44
|
-
_resource: SkeletonDataResource;
|
|
45
|
-
private _skeleton;
|
|
46
|
-
private _state;
|
|
47
|
-
/**
|
|
48
|
-
* Setting `skeletonData` initializes a new Spine animation with the provided data.
|
|
49
|
-
* This property allows you to switch between different animations at runtime.
|
|
50
|
-
*/
|
|
51
|
-
set resource(value: SkeletonDataResource);
|
|
52
|
-
/**
|
|
53
|
-
* Provides access to `AnimationState` which controls animation playback on a skeleton.
|
|
54
|
-
* You can use its API to manage, blend, and transition between multiple simultaneous animations effectively.
|
|
55
|
-
*/
|
|
56
|
-
get state(): AnimationState;
|
|
57
|
-
/**
|
|
58
|
-
* Provides access to `Skeleton`, which defines the structure of a Spine model.
|
|
59
|
-
* Through its API, users can manipulate bone positions, rotations, scaling
|
|
60
|
-
* and change spine attachment to customize character appearances dynamically during runtime.
|
|
61
|
-
*/
|
|
62
|
-
get skeleton(): Skeleton;
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
66
|
-
get engine(): Engine;
|
|
67
|
-
constructor(entity: Entity);
|
|
68
|
-
/**
|
|
69
|
-
* @internal
|
|
70
|
-
*/
|
|
71
|
-
_onEnable(): void;
|
|
72
|
-
/**
|
|
73
|
-
* Separate slot by slot name. This will add a new sub primitive, and new materials.
|
|
74
|
-
*/
|
|
75
|
-
addSeparateSlot(slotName: string): void;
|
|
76
|
-
/**
|
|
77
|
-
* @internal
|
|
78
|
-
*/
|
|
79
|
-
update(delta: number): void;
|
|
80
|
-
/**
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
|
-
_render(context: any): void;
|
|
84
|
-
/**
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
_updateBounds(worldBounds: BoundingBox): void;
|
|
88
|
-
/**
|
|
89
|
-
* @internal
|
|
90
|
-
*/
|
|
91
|
-
_calculateGeneratorBounds(worldBounds: BoundingBox): void;
|
|
92
|
-
/**
|
|
93
|
-
* @internal
|
|
94
|
-
*/
|
|
95
|
-
_cloneTo(target: SpineAnimation): void;
|
|
96
|
-
/**
|
|
97
|
-
* @internal
|
|
98
|
-
*/
|
|
99
|
-
_onDestroy(): void;
|
|
100
|
-
/**
|
|
101
|
-
* @internal
|
|
102
|
-
*/
|
|
103
|
-
_createBuffer(vertexCount: number): void;
|
|
104
|
-
/**
|
|
105
|
-
* @internal
|
|
106
|
-
*/
|
|
107
|
-
_addSubPrimitive(subPrimitive: SubPrimitive): void;
|
|
108
|
-
/**
|
|
109
|
-
* @internal
|
|
110
|
-
*/
|
|
111
|
-
_clearSubPrimitives(): void;
|
|
112
|
-
/**
|
|
113
|
-
* @internal
|
|
114
|
-
*/
|
|
115
|
-
_isContainDirtyFlag(type: number): boolean;
|
|
116
|
-
/**
|
|
117
|
-
* @internal
|
|
118
|
-
*/
|
|
119
|
-
_setDirtyFlagFalse(type: number): void;
|
|
120
|
-
/**
|
|
121
|
-
* @internal
|
|
122
|
-
*/
|
|
123
|
-
_onWorldVolumeChanged(): void;
|
|
124
|
-
private onAnimationStart;
|
|
125
|
-
private onAnimationComplete;
|
|
126
|
-
private _clearMaterialCache;
|
|
127
|
-
private _initializeDefaultState;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* @internal
|
|
131
|
-
*/
|
|
132
|
-
export declare enum SpineAnimationUpdateFlags {
|
|
133
|
-
/** On World Transform Changed */
|
|
134
|
-
TransformVolume = 1,
|
|
135
|
-
/** On Animation start play */
|
|
136
|
-
AnimationVolume = 2,
|
|
137
|
-
/** On skeleton data asset changed */
|
|
138
|
-
InitialVolume = 4
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* @internal
|
|
142
|
-
*/
|
|
143
|
-
export declare enum RendererUpdateFlags {
|
|
144
|
-
/** Include world position and world bounds. */
|
|
145
|
-
WorldVolume = 1
|
|
146
|
-
}
|
|
147
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Engine, SubMesh, Texture2D } from "@galacean/engine";
|
|
2
|
-
import { Skeleton, SkeletonData, Color, BlendMode } from "@esotericsoftware/spine-core";
|
|
3
|
-
import { SpineRenderSetting } from "../types";
|
|
4
|
-
import { AdaptiveTexture } from "../loader/LoaderUtils";
|
|
5
|
-
import { SpineAnimation } from "../SpineAnimation";
|
|
6
|
-
type SubMeshItem = {
|
|
7
|
-
subMesh: SubMesh;
|
|
8
|
-
blendMode: BlendMode;
|
|
9
|
-
texture: any;
|
|
10
|
-
slotName?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare class MeshGenerator {
|
|
13
|
-
static QUAD_TRIANGLES: number[];
|
|
14
|
-
static VERTEX_SIZE: number;
|
|
15
|
-
static VERTEX_STRIDE: number;
|
|
16
|
-
static tempColor: Color;
|
|
17
|
-
static tempDark: Color;
|
|
18
|
-
static tempBlendMode: BlendMode | null;
|
|
19
|
-
static tempTexture: AdaptiveTexture | null;
|
|
20
|
-
private _setting;
|
|
21
|
-
private _engine;
|
|
22
|
-
private _clipper;
|
|
23
|
-
private _spineMesh;
|
|
24
|
-
private _renderer;
|
|
25
|
-
private _vertexCount;
|
|
26
|
-
private _vertices;
|
|
27
|
-
private _verticesWithZ;
|
|
28
|
-
private _indices;
|
|
29
|
-
private _needResize;
|
|
30
|
-
private _subMeshItems;
|
|
31
|
-
readonly separateSlots: string[];
|
|
32
|
-
readonly separateSlotTextureMap: Map<string, Texture2D>;
|
|
33
|
-
get mesh(): import("@galacean/engine").BufferMesh;
|
|
34
|
-
get subMeshItems(): SubMeshItem[];
|
|
35
|
-
constructor(engine: Engine, renderer: SpineAnimation);
|
|
36
|
-
initialize(skeletonData: SkeletonData, setting?: SpineRenderSetting): void;
|
|
37
|
-
buildMesh(skeleton: Skeleton): void;
|
|
38
|
-
addSeparateSlot(slotName: string): void;
|
|
39
|
-
addSeparateSlotTexture(slotName: string, texture: Texture2D): void;
|
|
40
|
-
private _prepareBufferData;
|
|
41
|
-
private setBlendMode;
|
|
42
|
-
}
|
|
43
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Engine, Texture2D, SubPrimitive } from "@galacean/engine";
|
|
2
|
-
import { Skeleton, SkeletonData, Color, BlendMode } from "@esotericsoftware/spine-core";
|
|
3
|
-
import { SpineRenderSetting } from "../types";
|
|
4
|
-
import { AdaptiveTexture } from "../loader/LoaderUtils";
|
|
5
|
-
import { SpineAnimation } from "../SpineAnimation";
|
|
6
|
-
type subRenderItems = {
|
|
7
|
-
subPrimitive: SubPrimitive;
|
|
8
|
-
blendMode: BlendMode;
|
|
9
|
-
texture: any;
|
|
10
|
-
slotName?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare class SpineGenerator {
|
|
13
|
-
static QUAD_TRIANGLES: number[];
|
|
14
|
-
static VERTEX_SIZE: number;
|
|
15
|
-
static VERTEX_STRIDE: number;
|
|
16
|
-
static tempColor: Color;
|
|
17
|
-
static tempDark: Color;
|
|
18
|
-
static tempBlendMode: BlendMode | null;
|
|
19
|
-
static tempTexture: AdaptiveTexture | null;
|
|
20
|
-
private _setting;
|
|
21
|
-
private _engine;
|
|
22
|
-
private _clipper;
|
|
23
|
-
private _spinePrimitive;
|
|
24
|
-
private _renderer;
|
|
25
|
-
private _vertexCount;
|
|
26
|
-
private _vertices;
|
|
27
|
-
private _verticesWithZ;
|
|
28
|
-
private _indices;
|
|
29
|
-
private _needResize;
|
|
30
|
-
private _subRenderItems;
|
|
31
|
-
readonly separateSlots: string[];
|
|
32
|
-
readonly separateSlotTextureMap: Map<string, Texture2D>;
|
|
33
|
-
get subRenderItems(): subRenderItems[];
|
|
34
|
-
constructor(engine: Engine, renderer: SpineAnimation);
|
|
35
|
-
initialize(skeletonData: SkeletonData, setting?: SpineRenderSetting): void;
|
|
36
|
-
buildPrimitive(skeleton: Skeleton): void;
|
|
37
|
-
addSeparateSlot(slotName: string): void;
|
|
38
|
-
addSeparateSlotTexture(slotName: string, texture: Texture2D): void;
|
|
39
|
-
private _prepareBufferData;
|
|
40
|
-
private setBlendMode;
|
|
41
|
-
}
|
|
42
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BufferMesh, Engine, Buffer } from '@galacean/engine';
|
|
2
|
-
export declare class SpineMesh {
|
|
3
|
-
private _mesh;
|
|
4
|
-
private _indexBuffer;
|
|
5
|
-
private _vertexBuffer;
|
|
6
|
-
get mesh(): BufferMesh;
|
|
7
|
-
get indexBuffer(): Buffer;
|
|
8
|
-
get vertexBuffer(): Buffer;
|
|
9
|
-
initialize(engine: Engine, vertexCount: number): void;
|
|
10
|
-
changeBuffer(engine: Engine, vertexCount: number): void;
|
|
11
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Engine, Buffer, SubPrimitive } from '@galacean/engine';
|
|
2
|
-
export declare class SpinePrimitive {
|
|
3
|
-
private _primitive;
|
|
4
|
-
private _subPrimitive;
|
|
5
|
-
private _indexBuffer;
|
|
6
|
-
private _vertexBuffer;
|
|
7
|
-
get primitive(): Primitive;
|
|
8
|
-
get subPrimitive(): SubPrimitive[];
|
|
9
|
-
get indexBuffer(): Buffer;
|
|
10
|
-
get vertexBuffer(): Buffer;
|
|
11
|
-
initialize(engine: Engine, vertexCount: number): void;
|
|
12
|
-
addSubPrimitive(subPrimitive: SubPrimitive): void;
|
|
13
|
-
clearSubPrimitive(): void;
|
|
14
|
-
changeBuffer(engine: Engine, vertexCount: number): void;
|
|
15
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Camera, Engine } from "@galacean/engine-core";
|
|
2
|
-
export declare const updateForE2E: (engine: any, deltaTime?: number, loopTime?: number) => void;
|
|
3
|
-
export declare function initScreenshot(engine: Engine, camera: Camera, width?: number, height?: number, flipY?: boolean, isPNG?: boolean, jpgQuality?: number): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/types/e2e/config.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const E2E_CONFIG: {
|
|
2
|
-
Spine: {
|
|
3
|
-
'spine-boy': {
|
|
4
|
-
category: string;
|
|
5
|
-
caseFileName: string;
|
|
6
|
-
threshold: number;
|
|
7
|
-
};
|
|
8
|
-
raptor: {
|
|
9
|
-
category: string;
|
|
10
|
-
caseFileName: string;
|
|
11
|
-
threshold: number;
|
|
12
|
-
};
|
|
13
|
-
'mix-and-match': {
|
|
14
|
-
category: string;
|
|
15
|
-
caseFileName: string;
|
|
16
|
-
threshold: number;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./commands";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/types/example/main.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Entity, MeshRenderer, Camera } from '@galacean/engine';
|
|
2
|
-
export default class BoundingBoxLine extends MeshRenderer {
|
|
3
|
-
private attachedEntity;
|
|
4
|
-
private renderers;
|
|
5
|
-
private boundingBox;
|
|
6
|
-
constructor(entity: Entity);
|
|
7
|
-
updateBoundingBox(): void;
|
|
8
|
-
attachToEntity(entity: Entity): void;
|
|
9
|
-
private updateVertices;
|
|
10
|
-
_render(camera: Camera): void;
|
|
11
|
-
}
|
package/types/jest.setup.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AssetPromise, Loader, LoadItem, ResourceManager } from "@galacean/engine";
|
|
2
|
-
import { SkeletonDataResource } from "./SkeletonDataResource";
|
|
3
|
-
declare class EditorSkeletonDataLoader extends Loader<SkeletonDataResource> {
|
|
4
|
-
load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<SkeletonDataResource>;
|
|
5
|
-
}
|
|
6
|
-
export { EditorSkeletonDataLoader };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Texture2D, SubPrimitive, BoundingBox } from "@galacean/engine";
|
|
2
|
-
import { Skeleton, Color, BlendMode, SkeletonData } from "@esotericsoftware/spine-core";
|
|
3
|
-
import { SpineAnimationRenderer } from "./SpineAnimationRenderer";
|
|
4
|
-
import { AdaptiveTexture } from "./loader/LoaderUtils";
|
|
5
|
-
import { ReturnablePool } from "./util/ReturnablePool";
|
|
6
|
-
import { ClearablePool } from "./util/ClearablePool";
|
|
7
|
-
declare class SubRenderItem {
|
|
8
|
-
subPrimitive: SubPrimitive;
|
|
9
|
-
blendMode: BlendMode;
|
|
10
|
-
texture: any;
|
|
11
|
-
slotName?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class SpineGenerator {
|
|
14
|
-
static QUAD_TRIANGLES: number[];
|
|
15
|
-
static VERTEX_SIZE: number;
|
|
16
|
-
static VERTEX_STRIDE: number;
|
|
17
|
-
static tempDark: Color;
|
|
18
|
-
static tempColor: Color;
|
|
19
|
-
static tempVerts: any[];
|
|
20
|
-
static tempBlendMode: BlendMode | null;
|
|
21
|
-
static tempTexture: AdaptiveTexture | null;
|
|
22
|
-
static subPrimitivePool: ReturnablePool<SubPrimitive>;
|
|
23
|
-
static subRenderItemPool: ClearablePool<SubRenderItem>;
|
|
24
|
-
static bounds: BoundingBox;
|
|
25
|
-
private _clipper;
|
|
26
|
-
private _subRenderItems;
|
|
27
|
-
private _separateSlots;
|
|
28
|
-
private _separateSlotTextureMap;
|
|
29
|
-
getMaxVertexCount(skeletonData: SkeletonData): number;
|
|
30
|
-
buildPrimitive(skeleton: Skeleton, renderer: SpineAnimationRenderer): void;
|
|
31
|
-
addSeparateSlot(slotName: string): void;
|
|
32
|
-
addSeparateSlotTexture(slotName: string, texture: Texture2D): void;
|
|
33
|
-
private _createMaterialForTexture;
|
|
34
|
-
private _expandByPoint;
|
|
35
|
-
private _getSkinVertexCount;
|
|
36
|
-
}
|
|
37
|
-
export {};
|
package/types/src/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./loader/SpineLoader";
|
|
2
|
-
import "./loader/EditorSpineAtlasLoader";
|
|
3
|
-
export { SpineAnimationRenderer } from "./SpineAnimationRenderer";
|
|
4
|
-
export { SkeletonDataResource } from "./loader/SkeletonDataResource";
|
|
5
|
-
export { createTextureAtlas } from "./loader/LoaderUtils";
|
|
6
|
-
export * from "@esotericsoftware/spine-core";
|
|
7
|
-
export declare const version = "__buildVersion";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AssetPromise, Loader, ResourceManager, LoadItem } from "@galacean/engine";
|
|
2
|
-
import { TextureAtlas } from "@esotericsoftware/spine-core";
|
|
3
|
-
declare class EditorSpineAtlasLoader extends Loader<TextureAtlas> {
|
|
4
|
-
load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<TextureAtlas>;
|
|
5
|
-
}
|
|
6
|
-
export { EditorSpineAtlasLoader };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AssetPromise, Engine, Texture2D } from "@galacean/engine";
|
|
2
|
-
import { TextureAtlas, SkeletonData, Texture, TextureFilter, TextureWrap } from "@esotericsoftware/spine-core";
|
|
3
|
-
export declare function createSkeletonData(textureAtlas: TextureAtlas, skeletonTextData: string | ArrayBuffer, skeletonFileType: 'json' | 'skel'): SkeletonData;
|
|
4
|
-
export declare function loadTexturesByPath(imagePaths: string[], imageExtensions: string[], engine: Engine): Promise<Texture2D[]>;
|
|
5
|
-
export declare function loadTextureAtlas(atlasPath: string, engine: Engine): Promise<TextureAtlas>;
|
|
6
|
-
export declare function createTextureAtlas(atlasText: string, textures: Texture2D[]): TextureAtlas;
|
|
7
|
-
export declare function loadTexture(url: string, engine: Engine, imageLoaderType?: string): AssetPromise<Texture2D>;
|
|
8
|
-
export declare function createAdaptiveTexture(texture: Texture2D): AdaptiveTexture;
|
|
9
|
-
export declare function getBaseUrl(url: string): string;
|
|
10
|
-
export declare class AdaptiveTexture extends Texture {
|
|
11
|
-
texture: Texture2D;
|
|
12
|
-
constructor(image: HTMLImageElement | ImageBitmap, texture: Texture2D);
|
|
13
|
-
getImage(): any;
|
|
14
|
-
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
|
15
|
-
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
|
16
|
-
dispose(): void;
|
|
17
|
-
private _convertWrapMode;
|
|
18
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SkeletonData } from "@esotericsoftware/spine-core";
|
|
2
|
-
import { Engine, ReferResource, Texture2D } from "@galacean/engine";
|
|
3
|
-
export declare class SkeletonDataResource extends ReferResource {
|
|
4
|
-
readonly textures: Texture2D[];
|
|
5
|
-
private _skeletonData;
|
|
6
|
-
get skeletonData(): SkeletonData;
|
|
7
|
-
constructor(engine: Engine, skeletonData: SkeletonData);
|
|
8
|
-
protected _onDestroy(): void;
|
|
9
|
-
private _disassociationSuperResource;
|
|
10
|
-
private _associationTextureInSkeletonData;
|
|
11
|
-
private _clearAttachmentTextures;
|
|
12
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AssetPromise, Loader, LoadItem, ResourceManager } from "@galacean/engine";
|
|
2
|
-
import { SkeletonDataResource } from "./SkeletonDataResource";
|
|
3
|
-
export type SpineAssetBundle = {
|
|
4
|
-
skeletonPath: string;
|
|
5
|
-
skeletonExtension: string;
|
|
6
|
-
skeletonTextData?: string | ArrayBuffer;
|
|
7
|
-
atlasPath: string;
|
|
8
|
-
imagePaths: string[];
|
|
9
|
-
imageExtensions: string[];
|
|
10
|
-
};
|
|
11
|
-
type SpineLoaderParams = {
|
|
12
|
-
fileExtensions?: string | string[];
|
|
13
|
-
};
|
|
14
|
-
type SpineLoadItem = LoadItem & {
|
|
15
|
-
params?: SpineLoaderParams;
|
|
16
|
-
};
|
|
17
|
-
export declare class SpineLoader extends Loader<SkeletonDataResource> {
|
|
18
|
-
static imageExtensions: string[];
|
|
19
|
-
static skeletonExtensions: string[];
|
|
20
|
-
static parseAndAssignSpineAsset(url: string, fileExtension: string | null, bundle: SpineAssetBundle): void;
|
|
21
|
-
static deriveAndAssignSpineAsset(url: string, fileExtension: string | null, bundle: SpineAssetBundle): void;
|
|
22
|
-
static verifyFileExtensions(fileExtensions: string | string[], expectArray: boolean): string | string[] | null;
|
|
23
|
-
static getUrlExtension(url: string, fileExtension: string): string | null;
|
|
24
|
-
load(item: SpineLoadItem, resourceManager: ResourceManager): AssetPromise<SkeletonDataResource>;
|
|
25
|
-
private _handleEditorAsset;
|
|
26
|
-
private _handleOriginAsset;
|
|
27
|
-
private _determineSkeletonDataType;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class BufferReader {
|
|
2
|
-
data: Uint8Array;
|
|
3
|
-
private _dataView;
|
|
4
|
-
private _position;
|
|
5
|
-
constructor(data: Uint8Array, byteOffset?: number, byteLength?: number);
|
|
6
|
-
nextUint16(): number;
|
|
7
|
-
nextStr(): string;
|
|
8
|
-
nextImageData(): Uint8Array;
|
|
9
|
-
private decodeText;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/types/types.d.ts
DELETED
package/types/util/Cache.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SkeletonData, AnimationStateData } from "@esotericsoftware/spine-core";
|
|
2
|
-
import { Material } from "@galacean/engine";
|
|
3
|
-
declare class Cache<K, V> {
|
|
4
|
-
protected _cache: Map<K, V>;
|
|
5
|
-
get(key: K): V;
|
|
6
|
-
set(key: K, value: V): void;
|
|
7
|
-
clear(keys?: K[]): void;
|
|
8
|
-
}
|
|
9
|
-
export declare class AnimationStateDataCache extends Cache<SkeletonData, AnimationStateData> {
|
|
10
|
-
private static _instance;
|
|
11
|
-
static get instance(): AnimationStateDataCache;
|
|
12
|
-
getAnimationStateData(skeletonData: SkeletonData): AnimationStateData;
|
|
13
|
-
}
|
|
14
|
-
export declare class MaterialCache extends Cache<string, Material> {
|
|
15
|
-
private static _instance;
|
|
16
|
-
static get instance(): MaterialCache;
|
|
17
|
-
getMaterial(key: string): Material;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
File without changes
|