@galacean/engine-spine 4.2.0 → 4.2.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/package.json CHANGED
@@ -1,69 +1,78 @@
1
1
  {
2
- "version": "4.2.0",
2
+ "version": "4.2.1",
3
3
  "description": "galacean spine runtime",
4
4
  "name": "@galacean/engine-spine",
5
5
  "main": "dist/main.js",
6
6
  "browser": "dist/browser.js",
7
7
  "module": "dist/module.js",
8
8
  "dependencies": {
9
- "@esotericsoftware/spine-core": "~4.2.1"
9
+ "@esotericsoftware/spine-core": "~4.2.66"
10
10
  },
11
11
  "peerDependencies": {
12
- "@galacean/engine": ">=1.3.20"
12
+ "@galacean/engine": ">=1.4.0"
13
13
  },
14
14
  "devDependencies": {
15
- "@babel/core": "^7.22.5",
16
- "@babel/plugin-proposal-class-properties": "^7.12.1",
17
- "@babel/plugin-proposal-decorators": "^7.12.1",
18
- "@babel/plugin-proposal-optional-chaining": "^7.12.1",
19
- "@babel/plugin-transform-class-properties": "^7.24.7",
20
- "@babel/plugin-transform-object-assign": "^7.12.1",
21
- "@babel/preset-env": "^7.24.8",
22
- "@babel/preset-typescript": "^7.24.7",
23
- "@galacean/engine": "^1.3.0-alpha.3",
15
+ "@babel/core": "^7.26.0",
16
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
17
+ "@babel/plugin-proposal-decorators": "^7.25.9",
18
+ "@babel/plugin-proposal-optional-chaining": "^7.21.0",
19
+ "@babel/plugin-transform-class-properties": "^7.25.9",
20
+ "@babel/plugin-transform-object-assign": "^7.25.9",
21
+ "@babel/preset-env": "^7.26.0",
22
+ "@babel/preset-typescript": "^7.26.0",
23
+ "@galacean/engine": "^1.4.0",
24
24
  "@galacean/engine-toolkit": "beta",
25
- "@rollup/plugin-babel": "^5.2.1",
25
+ "@rollup/plugin-babel": "^5.3.1",
26
26
  "@rollup/plugin-commonjs": "^16.0.0",
27
- "@rollup/plugin-inject": "^4.0.2",
27
+ "@rollup/plugin-inject": "^4.0.4",
28
28
  "@rollup/plugin-node-resolve": "^10.0.0",
29
- "@rollup/plugin-replace": "^2.3.4",
30
- "@rollup/plugin-terser": "^0.4.3",
31
- "@swc/core": "^1.3.32",
32
- "@swc/helpers": "^0.5",
33
- "@types/chai": "^4.3.16",
34
- "@types/jest": "^29.5.12",
35
- "@types/node": "^20.14.10",
36
- "@vitejs/plugin-basic-ssl": "^1.1.0",
29
+ "@rollup/plugin-replace": "^2.4.2",
30
+ "@rollup/plugin-terser": "^0.4.4",
31
+ "@swc/core": "^1.9.3",
32
+ "@swc/helpers": "^0.5.15",
33
+ "@types/chai": "^4.3.20",
34
+ "@types/jest": "^29.5.14",
35
+ "@types/node": "^20.17.9",
36
+ "@vitejs/plugin-basic-ssl": "^1.2.0",
37
37
  "babel-core": "^6.26.3",
38
38
  "babel-jest": "^29.7.0",
39
- "chai": "^4.3.6",
40
- "chai-spies": "^1.0.0",
39
+ "chai": "^4.5.0",
40
+ "chai-spies": "^1.1.0",
41
41
  "cross-env": "^5.2.1",
42
- "cypress": "^13.13.0",
42
+ "cypress": "^13.16.0",
43
43
  "cypress-recurse": "^1.35.3",
44
44
  "dat.gui": "^0.7.9",
45
45
  "jest": "^29.7.0",
46
46
  "jest-environment-jsdom": "^29.7.0",
47
47
  "jest-webgl-canvas-mock": "^2.5.3",
48
- "nock": "^13.5.4",
49
- "odiff-bin": "^3.0.1",
48
+ "nock": "^13.5.6",
49
+ "odiff-bin": "^3.2.0",
50
50
  "react": "^16.14.0",
51
51
  "react-dom": "^16.14.0",
52
52
  "regenerator-runtime": "^0.14.1",
53
- "rollup": "^2.32.0",
54
- "rollup-plugin-glslify": "^1.2.0",
53
+ "rollup": "^2.79.2",
54
+ "rollup-plugin-glslify": "^1.3.1",
55
55
  "rollup-plugin-modify": "^3.0.0",
56
- "rollup-plugin-serve": "^1.1.0",
57
- "rollup-plugin-swc3": "^0.8.0",
56
+ "rollup-plugin-serve": "^1.1.1",
57
+ "rollup-plugin-swc3": "^0.12.1",
58
58
  "rollup-plugin-terser": "^7.0.2",
59
59
  "rollup-plugin-version-injector": "^1.3.3",
60
- "sass": "^1.77.8",
61
- "sinon": "^18.0.0",
62
- "ts-jest": "^29.2.2",
60
+ "sass": "^1.81.1",
61
+ "sinon": "^18.0.1",
62
+ "ts-jest": "^29.2.5",
63
63
  "ts-node": "^10.9.2",
64
64
  "tsconfig-paths": "^4.2.0",
65
65
  "typescript": "^5.5.3",
66
- "vite": "^5.3.4"
66
+ "vite": "^5.3.4",
67
+ "husky": "^8.0.3",
68
+ "lint-staged": "^10.5.4",
69
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
70
+ "@typescript-eslint/parser": "^6.21.0",
71
+ "eslint": "^8.57.1",
72
+ "eslint-config-prettier": "^8.10.0",
73
+ "eslint-plugin-prettier": "^5.2.1",
74
+ "@commitlint/cli": "^11.0.0",
75
+ "@commitlint/config-conventional": "^11.0.0"
67
76
  },
68
77
  "ci": {
69
78
  "type": "aci",
@@ -107,12 +116,15 @@
107
116
  "e2e": "cypress run --browser chrome --headless",
108
117
  "e2e:debug": "cypress open",
109
118
  "dev": "rollup -cw",
110
- "build": "cross-env BUILD_TYPE=ALL rollup -c",
119
+ "build": "npm run b:types && cross-env BUILD_TYPE=ALL rollup -c",
111
120
  "build:watch": "npm run b:types && cross-env BUILD_TYPE=ALL rollup -c --watch",
112
121
  "ci": "npm run lint && npm run test-cov",
113
122
  "lint": "eslint src --fix --ext .ts,.tsx",
114
- "b:types": "tsc --emitDeclarationOnly",
115
- "b:all": "npm run b:types && npm run build"
123
+ "b:types": "tsc",
124
+ "prepare": "husky install"
125
+ },
126
+ "lint-staged": {
127
+ "*.{ts,tsx}": ["eslint --fix"]
116
128
  },
117
129
  "types": "types/index.d.ts",
118
130
  "repository": "https://github.com/johanzhu/engine-spine.git"
package/types/index.d.ts CHANGED
@@ -1,7 +1,4 @@
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
1
  export * from "@esotericsoftware/spine-core";
2
+ export * from "./loader/index";
3
+ export * from "./renderer/index";
7
4
  export declare const version = "__buildVersion";
@@ -1,18 +1,12 @@
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;
1
+ import { SkeletonData, TextureAtlas } from "@esotericsoftware/spine-core";
2
+ import { Engine, Texture2D } from "@galacean/engine";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare class LoaderUtils {
7
+ static createSkeletonData(skeletonRawData: string | ArrayBuffer, textureAtlas: TextureAtlas, skeletonDataScale: number): SkeletonData;
8
+ static createTextureAtlas(atlasText: string, textures: Texture2D[]): TextureAtlas;
9
+ static loadTexturesByPaths(imagePaths: string[], imageExtensions: string[], engine: Engine, reject: (reason?: any) => void): Promise<Texture2D[]>;
10
+ static loadTextureAtlas(atlasPath: string, engine: Engine, reject: (reason?: any) => void): Promise<TextureAtlas>;
11
+ static getBaseUrl(url: string): string;
18
12
  }
@@ -0,0 +1,7 @@
1
+ import { TextureAtlas } from "@esotericsoftware/spine-core";
2
+ import { AssetPromise, Loader, LoadItem, ResourceManager } from "@galacean/engine";
3
+ export declare class SpineAtlasLoader extends Loader<TextureAtlas> {
4
+ private static _groupAssetsByExtension;
5
+ private static _assignAssetPathsFromUrl;
6
+ load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<TextureAtlas>;
7
+ }
@@ -1,29 +1,15 @@
1
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 = {
2
+ import { SpineResource } from "./SpineResource";
3
+ export type SpineLoaderParams = {
12
4
  fileExtensions?: string | string[];
13
5
  };
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;
6
+ export declare class SpineLoader extends Loader<SpineResource> {
7
+ private static _decoder;
8
+ private static _groupAssetsByExtension;
9
+ private static _assignAssetPathsFromUrl;
10
+ static _getUrlExtension(url: string): string | null;
11
+ load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<SpineResource>;
12
+ private _loadAndCreateSpineResource;
13
+ }
14
+ export declare class DeprecatedSpineLoader extends SpineLoader {
28
15
  }
29
- export {};
@@ -0,0 +1,33 @@
1
+ import { AnimationStateData, SkeletonData } from "@esotericsoftware/spine-core";
2
+ import { Engine, Entity, ReferResource } from "@galacean/engine";
3
+ /**
4
+ * Represents a resource that manages Spine animation data, textures, and entity templates for the Galacean engine.
5
+ *
6
+ */
7
+ export declare class SpineResource extends ReferResource {
8
+ /** The url of spine resource. */
9
+ readonly url: string;
10
+ private _texturesInSpineAtlas;
11
+ private _skeletonData;
12
+ private _stateData;
13
+ private _template;
14
+ constructor(engine: Engine, skeletonData: SkeletonData, url?: string);
15
+ /**
16
+ * The skeleton data associated with this Spine resource.
17
+ */
18
+ get skeletonData(): SkeletonData;
19
+ /**
20
+ * The animation state data associated with this Spine resource.
21
+ */
22
+ get stateData(): AnimationStateData;
23
+ /**
24
+ * Creates and returns a new instance of the spine entity template.
25
+ * @returns A instance of the spine entity template
26
+ */
27
+ instantiate(): Entity;
28
+ protected _onDestroy(): void;
29
+ private _createTemplate;
30
+ private _associationTextureInSkeletonData;
31
+ private _disassociationSuperResource;
32
+ private _extractFileName;
33
+ }
@@ -0,0 +1,13 @@
1
+ import { Texture, TextureFilter, TextureWrap } from "@esotericsoftware/spine-core";
2
+ import { Texture2D } from "@galacean/engine";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare class SpineTexture extends Texture {
7
+ constructor(image: Texture2D);
8
+ getImage(): Texture2D;
9
+ setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
10
+ setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
11
+ dispose(): void;
12
+ private _convertWrapMode;
13
+ }
@@ -0,0 +1,4 @@
1
+ import "./SpineLoader";
2
+ import "./SpineAtlasLoader";
3
+ export { SpineResource } from "./SpineResource";
4
+ export { LoaderUtils } from "./LoaderUtils";
@@ -1,6 +1,6 @@
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";
1
+ import { AnimationState, Skeleton } from "@esotericsoftware/spine-core";
2
+ import { BoundingBox, Buffer, Engine, Entity, Material, Primitive, Renderer, SubPrimitive } from "@galacean/engine";
3
+ import { SpineResource } from "../loader/SpineResource";
4
4
  /**
5
5
  * Spine animation renderer, capable of rendering spine animations and providing functions for animation and skeleton manipulation.
6
6
  */
@@ -13,17 +13,23 @@ export declare class SpineAnimationRenderer extends Renderer {
13
13
  /** @internal */
14
14
  static _materialCache: Map<string, Material>;
15
15
  /** @internal */
16
- static _animationDataCache: Map<SkeletonData, AnimationStateData>;
17
- /** @internal */
18
16
  static _getDefaultMaterial(engine: Engine): Material;
19
- /** Render setting for spine rendering. */
20
- setting: SpineRenderSetting;
17
+ /**
18
+ * The spacing between z layers in world units.
19
+ */
20
+ zSpacing: number;
21
+ /**
22
+ * Whether to use premultiplied alpha mode for rendering.
23
+ * When enabled, vertex color values are multiplied by the alpha channel.
24
+ * @remarks
25
+ If this option is enabled, the Spine editor must export textures with "Premultiply Alpha" checked.
26
+ */
27
+ premultipliedAlpha: boolean;
21
28
  /**
22
29
  * Default state for spine animation.
23
- * Contains the default animation name to be played, whether this animation should loop,
24
- * the default skin name, and the default scale of the skeleton.
30
+ * Contains the default animation name to be played, whether this animation should loop, the default skin name.
25
31
  */
26
- defaultState: DefaultState;
32
+ readonly defaultConfig: SpineAnimationDefaultConfig;
27
33
  /** @internal */
28
34
  _primitive: Primitive;
29
35
  /** @internal */
@@ -33,30 +39,27 @@ export declare class SpineAnimationRenderer extends Renderer {
33
39
  /** @internal */
34
40
  _vertexBuffer: Buffer;
35
41
  /** @internal */
36
- _vertices: Float32Array;
42
+ _vertices: Float32Array<ArrayBuffer>;
37
43
  /** @internal */
38
- _indices: Uint16Array;
44
+ _indices: Uint16Array<ArrayBuffer>;
39
45
  /** @internal */
40
46
  _needResizeBuffer: boolean;
41
47
  /** @internal */
42
48
  _vertexCount: number;
43
49
  /** @internal */
44
- _resource: SkeletonDataResource;
50
+ _resource: SpineResource;
51
+ /** @internal */
52
+ _localBounds: BoundingBox;
45
53
  private _skeleton;
46
54
  private _state;
47
55
  /**
48
- * Spine resource of current spine animation.This property allows you to switch between different animations at runtime.
49
- */
50
- get resource(): SkeletonDataResource;
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.
56
+ * The Spine.AnimationState object of this SpineAnimationRenderer.
57
+ * Manage, blend, and transition between multiple simultaneous animations effectively.
55
58
  */
56
59
  get state(): AnimationState;
57
60
  /**
58
- * Provides access to `Skeleton`, which defines the structure of a Spine model.
59
- * Through its API, users can manipulate bone positions, rotations, scaling
61
+ * The Spine.Skeleton object of this SpineAnimationRenderer.
62
+ * Manipulate bone positions, rotations, scaling
60
63
  * and change spine attachment to customize character appearances dynamically during runtime.
61
64
  */
62
65
  get skeleton(): Skeleton;
@@ -64,10 +67,6 @@ export declare class SpineAnimationRenderer extends Renderer {
64
67
  * @internal
65
68
  */
66
69
  constructor(entity: Entity);
67
- /**
68
- * Separate slot by slot name. This will add a new sub primitive, and new materials.
69
- */
70
- addSeparateSlot(slotName: string): void;
71
70
  /**
72
71
  * @internal
73
72
  */
@@ -87,7 +86,11 @@ export declare class SpineAnimationRenderer extends Renderer {
87
86
  /**
88
87
  * @internal
89
88
  */
90
- _calculateGeneratorBounds(worldBounds: BoundingBox): void;
89
+ _setSkeleton(skeleton: Skeleton): void;
90
+ /**
91
+ * @internal
92
+ */
93
+ _setState(state: AnimationState): void;
91
94
  /**
92
95
  * @internal
93
96
  */
@@ -99,7 +102,7 @@ export declare class SpineAnimationRenderer extends Renderer {
99
102
  /**
100
103
  * @internal
101
104
  */
102
- _createBuffer(vertexCount: number): void;
105
+ _createAndBindBuffer(vertexCount: number): void;
103
106
  /**
104
107
  * @internal
105
108
  */
@@ -108,33 +111,27 @@ export declare class SpineAnimationRenderer extends Renderer {
108
111
  * @internal
109
112
  */
110
113
  _clearSubPrimitives(): void;
114
+ private _clearMaterialCache;
115
+ private _applyDefaultConfig;
111
116
  /**
112
- * @internal
113
- */
114
- _isContainDirtyFlag(type: number): boolean;
115
- /**
116
- * @internal
117
+ * * @deprecated This property is deprecated and will be removed in future releases.
118
+ * Spine resource of current spine animation.
117
119
  */
118
- _setDirtyFlagFalse(type: number): void;
120
+ get resource(): SpineResource;
119
121
  /**
120
- * @internal
122
+ * * @deprecated This property is deprecated and will be removed in future releases.
123
+ * Sets the Spine resource for the current animation. This property allows switching to a different `SpineResource`.
124
+ *
125
+ * @param value - The new `SpineResource` to be used for the current animation
121
126
  */
122
- _onWorldVolumeChanged(): void;
123
- private _onAnimationStart;
124
- private _onAnimationComplete;
125
- private _clearMaterialCache;
126
- private _initializeDefaultState;
127
+ set resource(value: SpineResource);
127
128
  }
128
129
  /**
129
130
  * @internal
130
131
  */
131
132
  export declare enum SpineAnimationUpdateFlags {
132
- /** On World Transform Changed */
133
- TransformVolume = 1,
134
- /** On Animation start play */
135
- AnimationVolume = 2,
136
- /** On skeleton data asset changed */
137
- InitialVolume = 4
133
+ /** On Animation change */
134
+ Animation = 2
138
135
  }
139
136
  /**
140
137
  * @internal
@@ -143,41 +140,12 @@ export declare enum RendererUpdateFlags {
143
140
  /** Include world position and world bounds. */
144
141
  WorldVolume = 1
145
142
  }
146
- /**
147
- * Render setting for spine rendering.
148
- */
149
- export declare class SpineRenderSetting {
150
- /**
151
- * The spacing between z layers @defaultValue `0.01`
152
- */
153
- zSpacing: number;
154
- /**
155
- * Whether to use clipping @defaultValue `true`
156
- */
157
- useClipping: boolean;
158
- /**
159
- * Creates an instance of SpineRenderSetting.
160
- */
161
- constructor(
162
- /**
163
- * The spacing between z layers @defaultValue `0.01`
164
- */
165
- zSpacing?: number,
166
- /**
167
- * Whether to use clipping @defaultValue `true`
168
- */
169
- useClipping?: boolean);
170
- }
171
143
  /**
172
144
  * Default state for spine animation.
173
145
  * Contains the default animation name to be played, whether this animation should loop,
174
146
  * the default skin name, and the default scale of the skeleton.
175
147
  */
176
- export declare class DefaultState {
177
- /**
178
- * The default scale of the animation @defaultValue `1`
179
- */
180
- scale: number;
148
+ export declare class SpineAnimationDefaultConfig {
181
149
  /**
182
150
  * Whether the default animation should loop @defaultValue `true. The default animation should loop`
183
151
  */
@@ -191,13 +159,9 @@ export declare class DefaultState {
191
159
  */
192
160
  skinName: string;
193
161
  /**
194
- * Creates an instance of DefaultState
162
+ * Creates an instance of default config
195
163
  */
196
164
  constructor(
197
- /**
198
- * The default scale of the animation @defaultValue `1`
199
- */
200
- scale?: number,
201
165
  /**
202
166
  * Whether the default animation should loop @defaultValue `true. The default animation should loop`
203
167
  */
@@ -1,38 +1,35 @@
1
- import { Texture2D, SubPrimitive, BoundingBox } from "@galacean/engine";
2
- import { Skeleton, Color, BlendMode, SkeletonData } from "@esotericsoftware/spine-core";
1
+ import { BlendMode, Color, Skeleton } from "@esotericsoftware/spine-core";
2
+ import { SubPrimitive, Texture2D } from "@galacean/engine";
3
3
  import { SpineAnimationRenderer } from "./SpineAnimationRenderer";
4
- import { AdaptiveTexture } from "./loader/LoaderUtils";
5
- import { ReturnablePool } from "./util/ReturnablePool";
6
- import { ClearablePool } from "./util/ClearablePool";
4
+ import { ClearablePool } from "../util/ClearablePool";
5
+ import { ReturnablePool } from "../util/ReturnablePool";
7
6
  declare class SubRenderItem {
8
7
  subPrimitive: SubPrimitive;
9
8
  blendMode: BlendMode;
10
9
  texture: any;
11
10
  slotName?: string;
12
11
  }
12
+ /**
13
+ * @internal
14
+ */
13
15
  export declare class SpineGenerator {
14
- static QUAD_TRIANGLES: number[];
15
16
  static VERTEX_SIZE: number;
16
17
  static VERTEX_STRIDE: number;
17
18
  static tempDark: Color;
18
19
  static tempColor: Color;
19
20
  static tempVerts: any[];
20
- static tempBlendMode: BlendMode | null;
21
- static tempTexture: AdaptiveTexture | null;
21
+ static QUAD_TRIANGLES: number[];
22
22
  static subPrimitivePool: ReturnablePool<SubPrimitive>;
23
23
  static subRenderItemPool: ClearablePool<SubRenderItem>;
24
- static bounds: BoundingBox;
25
- private _clipper;
26
- private _subRenderItems;
27
24
  private _separateSlots;
25
+ private _subRenderItems;
26
+ private _clipper;
28
27
  private _separateSlotTextureMap;
29
- getMaxVertexCount(skeletonData: SkeletonData): number;
30
28
  buildPrimitive(skeleton: Skeleton, renderer: SpineAnimationRenderer): void;
31
29
  addSeparateSlot(slotName: string): void;
32
30
  addSeparateSlotTexture(slotName: string, texture: Texture2D): void;
33
31
  private _createMaterialForTexture;
34
- private _expandByPoint;
35
- private _collectUniqueAttachments;
36
- private _calculateTotalVertexCount;
32
+ private _createRenderItem;
33
+ private _expandBounds;
37
34
  }
38
35
  export {};
@@ -0,0 +1,2 @@
1
+ export { SpineAnimationRenderer } from "./SpineAnimationRenderer";
2
+ export { SpineMaterial } from "./SpineMaterial";
@@ -1,4 +1,4 @@
1
1
  import { BlendMode } from "@esotericsoftware/spine-core";
2
2
  import { Material } from "@galacean/engine";
3
- export declare function setBlendMode(material: Material, blendMode: BlendMode): void;
3
+ export declare function setBlendMode(material: Material, blendMode: BlendMode, premultipliedAlpha: boolean): void;
4
4
  export declare function getBlendMode(material: Material): BlendMode;
@@ -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,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
- }