@galacean/effects-plugin-spine 1.1.8 → 1.2.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/index.d.ts +1 -1
- package/dist/index.js +6968 -5555
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.mjs +6944 -5557
- package/dist/index.mjs.map +1 -1
- package/dist/polyfill/index.d.ts +1 -0
- package/dist/slot-group.d.ts +1 -1
- package/dist/spine-loader.d.ts +2 -2
- package/dist/spine-mesh.d.ts +1 -1
- package/dist/utils.d.ts +3 -70
- package/package.json +5 -2
- package/dist/core/Animation.d.ts +0 -362
- package/dist/core/AnimationState.d.ts +0 -370
- package/dist/core/AnimationStateData.d.ts +0 -23
- package/dist/core/AtlasAttachmentLoader.d.ts +0 -25
- package/dist/core/Bone.d.ts +0 -110
- package/dist/core/BoneData.d.ts +0 -44
- package/dist/core/ConstraintData.d.ts +0 -7
- package/dist/core/Event.d.ts +0 -16
- package/dist/core/EventData.d.ts +0 -13
- package/dist/core/IkConstraint.d.ts +0 -36
- package/dist/core/IkConstraintData.d.ts +0 -28
- package/dist/core/PathConstraint.d.ts +0 -43
- package/dist/core/PathConstraintData.d.ts +0 -54
- package/dist/core/Skeleton.d.ts +0 -133
- package/dist/core/SkeletonBinary.d.ts +0 -40
- package/dist/core/SkeletonBounds.d.ts +0 -49
- package/dist/core/SkeletonClipping.d.ts +0 -22
- package/dist/core/SkeletonData.d.ts +0 -86
- package/dist/core/SkeletonJson.d.ts +0 -25
- package/dist/core/Skin.d.ts +0 -43
- package/dist/core/Slot.d.ts +0 -41
- package/dist/core/SlotData.d.ts +0 -29
- package/dist/core/Texture.d.ts +0 -28
- package/dist/core/TextureAtlas.d.ts +0 -39
- package/dist/core/TransformConstraint.d.ts +0 -32
- package/dist/core/TransformConstraintData.d.ts +0 -34
- package/dist/core/Triangulator.d.ts +0 -15
- package/dist/core/Updatable.d.ts +0 -9
- package/dist/core/attachments/Attachment.d.ts +0 -44
- package/dist/core/attachments/AttachmentLoader.d.ts +0 -26
- package/dist/core/attachments/BoundingBoxAttachment.d.ts +0 -13
- package/dist/core/attachments/ClippingAttachment.d.ts +0 -15
- package/dist/core/attachments/HasTextureRegion.d.ts +0 -16
- package/dist/core/attachments/MeshAttachment.d.ts +0 -53
- package/dist/core/attachments/PathAttachment.d.ts +0 -20
- package/dist/core/attachments/PointAttachment.d.ts +0 -22
- package/dist/core/attachments/RegionAttachment.d.ts +0 -84
- package/dist/core/attachments/Sequence.d.ts +0 -27
- package/dist/core/attachments/index.d.ts +0 -8
- package/dist/core/index.d.ts +0 -37
- package/dist/core/polyfills.d.ts +0 -1
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Texture } from '@galacean/effects';
|
|
2
|
-
import { TextureFilter, TextureWrap, TextureRegion } from './Texture';
|
|
3
|
-
import type { Disposable } from '../utils';
|
|
4
|
-
export declare class TextureAtlas implements Disposable {
|
|
5
|
-
pages: TextureAtlasPage[];
|
|
6
|
-
regions: TextureAtlasRegion[];
|
|
7
|
-
constructor(atlasText: string);
|
|
8
|
-
findRegion(name: string): TextureAtlasRegion | null;
|
|
9
|
-
setTextures(assetManager: any, pathPrefix?: string): void;
|
|
10
|
-
dispose(): void;
|
|
11
|
-
}
|
|
12
|
-
export declare class TextureAtlasPage {
|
|
13
|
-
name: string;
|
|
14
|
-
minFilter: TextureFilter;
|
|
15
|
-
magFilter: TextureFilter;
|
|
16
|
-
uWrap: TextureWrap;
|
|
17
|
-
vWrap: TextureWrap;
|
|
18
|
-
texture: Texture | null;
|
|
19
|
-
width: number;
|
|
20
|
-
height: number;
|
|
21
|
-
pma: boolean;
|
|
22
|
-
constructor(name: string);
|
|
23
|
-
setTexture(texture: Texture): void;
|
|
24
|
-
}
|
|
25
|
-
export declare class TextureAtlasRegion extends TextureRegion {
|
|
26
|
-
page: TextureAtlasPage;
|
|
27
|
-
name: string;
|
|
28
|
-
x: number;
|
|
29
|
-
y: number;
|
|
30
|
-
offsetX: number;
|
|
31
|
-
offsetY: number;
|
|
32
|
-
originalWidth: number;
|
|
33
|
-
originalHeight: number;
|
|
34
|
-
index: number;
|
|
35
|
-
degrees: number;
|
|
36
|
-
names: string[] | null;
|
|
37
|
-
values: number[][] | null;
|
|
38
|
-
constructor(page: TextureAtlasPage, name: string);
|
|
39
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Bone } from './Bone';
|
|
3
|
-
import type { Skeleton } from './Skeleton';
|
|
4
|
-
import type { TransformConstraintData } from './TransformConstraintData';
|
|
5
|
-
import type { Updatable } from './Updatable';
|
|
6
|
-
/** Stores the current pose for a transform constraint. A transform constraint adjusts the world transform of the constrained
|
|
7
|
-
* bones to match that of the target bone.
|
|
8
|
-
*
|
|
9
|
-
* See [Transform constraints](http://esotericsoftware.com/spine-transform-constraints) in the Spine User Guide. */
|
|
10
|
-
export declare class TransformConstraint implements Updatable {
|
|
11
|
-
/** The transform constraint's setup pose data. */
|
|
12
|
-
data: TransformConstraintData;
|
|
13
|
-
/** The bones that will be modified by this transform constraint. */
|
|
14
|
-
bones: Array<Bone>;
|
|
15
|
-
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
16
|
-
target: Bone;
|
|
17
|
-
mixRotate: number;
|
|
18
|
-
mixX: number;
|
|
19
|
-
mixY: number;
|
|
20
|
-
mixScaleX: number;
|
|
21
|
-
mixScaleY: number;
|
|
22
|
-
mixShearY: number;
|
|
23
|
-
temp: math.Vector2;
|
|
24
|
-
active: boolean;
|
|
25
|
-
constructor(data: TransformConstraintData, skeleton: Skeleton);
|
|
26
|
-
isActive(): boolean;
|
|
27
|
-
update(): void;
|
|
28
|
-
applyAbsoluteWorld(): void;
|
|
29
|
-
applyRelativeWorld(): void;
|
|
30
|
-
applyAbsoluteLocal(): void;
|
|
31
|
-
applyRelativeLocal(): void;
|
|
32
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ConstraintData } from './ConstraintData';
|
|
2
|
-
import type { BoneData } from './BoneData';
|
|
3
|
-
/** Stores the setup pose for a {@link TransformConstraint}.
|
|
4
|
-
*
|
|
5
|
-
* See [Transform constraints](http://esotericsoftware.com/spine-transform-constraints) in the Spine User Guide. */
|
|
6
|
-
export declare class TransformConstraintData extends ConstraintData {
|
|
7
|
-
/** The bones that will be modified by this transform constraint. */
|
|
8
|
-
bones: BoneData[];
|
|
9
|
-
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
10
|
-
private _target;
|
|
11
|
-
set target(boneData: BoneData);
|
|
12
|
-
get target(): BoneData;
|
|
13
|
-
mixRotate: number;
|
|
14
|
-
mixX: number;
|
|
15
|
-
mixY: number;
|
|
16
|
-
mixScaleX: number;
|
|
17
|
-
mixScaleY: number;
|
|
18
|
-
mixShearY: number;
|
|
19
|
-
/** An offset added to the constrained bone rotation. */
|
|
20
|
-
offsetRotation: number;
|
|
21
|
-
/** An offset added to the constrained bone X translation. */
|
|
22
|
-
offsetX: number;
|
|
23
|
-
/** An offset added to the constrained bone Y translation. */
|
|
24
|
-
offsetY: number;
|
|
25
|
-
/** An offset added to the constrained bone scaleX. */
|
|
26
|
-
offsetScaleX: number;
|
|
27
|
-
/** An offset added to the constrained bone scaleY. */
|
|
28
|
-
offsetScaleY: number;
|
|
29
|
-
/** An offset added to the constrained bone shearY. */
|
|
30
|
-
offsetShearY: number;
|
|
31
|
-
relative: boolean;
|
|
32
|
-
local: boolean;
|
|
33
|
-
constructor(name: string);
|
|
34
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { NumberArrayLike } from '../utils';
|
|
2
|
-
export declare class Triangulator {
|
|
3
|
-
private convexPolygons;
|
|
4
|
-
private convexPolygonsIndices;
|
|
5
|
-
private indicesArray;
|
|
6
|
-
private isConcaveArray;
|
|
7
|
-
private triangles;
|
|
8
|
-
private polygonPool;
|
|
9
|
-
private polygonIndicesPool;
|
|
10
|
-
triangulate(verticesArray: NumberArrayLike | Array<number>): Array<number>;
|
|
11
|
-
decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
|
|
12
|
-
private static isConcave;
|
|
13
|
-
private static positiveArea;
|
|
14
|
-
private static winding;
|
|
15
|
-
}
|
package/dist/core/Updatable.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** The interface for items updated by {@link Skeleton#updateWorldTransform()}. */
|
|
2
|
-
export interface Updatable {
|
|
3
|
-
update(): void;
|
|
4
|
-
/** Returns false when this item has not been updated because a skin is required and the {@link Skeleton#skin active skin}
|
|
5
|
-
* does not contain this item.
|
|
6
|
-
* @see Skin#getBones()
|
|
7
|
-
* @see Skin#getConstraints() */
|
|
8
|
-
isActive(): boolean;
|
|
9
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { Slot } from '../Slot';
|
|
2
|
-
import type { NumberArrayLike } from '../../utils';
|
|
3
|
-
/** The base class for all attachments. */
|
|
4
|
-
export declare abstract class Attachment {
|
|
5
|
-
name: string;
|
|
6
|
-
constructor(name: string);
|
|
7
|
-
abstract copy(): Attachment;
|
|
8
|
-
}
|
|
9
|
-
/** Base class for an attachment with vertices that are transformed by one or more bones and can be deformed by a slot's
|
|
10
|
-
* {@link Slot#deform}. */
|
|
11
|
-
export declare abstract class VertexAttachment extends Attachment {
|
|
12
|
-
private static nextID;
|
|
13
|
-
/** The unique ID for this attachment. */
|
|
14
|
-
id: number;
|
|
15
|
-
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
|
16
|
-
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
|
17
|
-
* if this attachment has no weights. */
|
|
18
|
-
bones: Array<number> | null;
|
|
19
|
-
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
|
20
|
-
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
|
21
|
-
* each vertex. */
|
|
22
|
-
vertices: NumberArrayLike | Array<number>;
|
|
23
|
-
/** The maximum number of world vertex values that can be output by
|
|
24
|
-
* {@link #computeWorldVertices()} using the `count` parameter. */
|
|
25
|
-
worldVerticesLength: number;
|
|
26
|
-
/** Timelines for the timeline attachment are also applied to this attachment.
|
|
27
|
-
* May be null if no attachment-specific timelines should be applied. */
|
|
28
|
-
timelineAttachment: Attachment;
|
|
29
|
-
constructor(name: string);
|
|
30
|
-
/** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
|
|
31
|
-
* not empty, it is used to deform the vertices.
|
|
32
|
-
*
|
|
33
|
-
* See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
|
|
34
|
-
* Runtimes Guide.
|
|
35
|
-
* @param start The index of the first {@link #vertices} value to transform. Each vertex has 2 values, x and y.
|
|
36
|
-
* @param count The number of world vertex values to output. Must be <= {@link #worldVerticesLength} - `start`.
|
|
37
|
-
* @param worldVertices The output world vertices. Must have a length >= `offset` + `count` *
|
|
38
|
-
* `stride` / 2.
|
|
39
|
-
* @param offset The `worldVertices` index to begin writing values.
|
|
40
|
-
* @param stride The number of `worldVertices` entries between the value pairs written. */
|
|
41
|
-
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: NumberArrayLike | Array<number>, offset: number, stride: number): void;
|
|
42
|
-
/** Does not copy id (generated) or name (set on construction). **/
|
|
43
|
-
copyTo(attachment: VertexAttachment): void;
|
|
44
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Skin } from '../Skin';
|
|
2
|
-
import type { BoundingBoxAttachment } from './BoundingBoxAttachment';
|
|
3
|
-
import type { ClippingAttachment } from './ClippingAttachment';
|
|
4
|
-
import type { MeshAttachment } from './MeshAttachment';
|
|
5
|
-
import type { PathAttachment } from './PathAttachment';
|
|
6
|
-
import type { PointAttachment } from './PointAttachment';
|
|
7
|
-
import type { RegionAttachment } from './RegionAttachment';
|
|
8
|
-
import type { Sequence } from './Sequence';
|
|
9
|
-
/** The interface which can be implemented to customize creating and populating attachments.
|
|
10
|
-
*
|
|
11
|
-
* See [Loading skeleton data](http://esotericsoftware.com/spine-loading-skeleton-data#AttachmentLoader) in the Spine
|
|
12
|
-
* Runtimes Guide. */
|
|
13
|
-
export interface AttachmentLoader {
|
|
14
|
-
/** @return May be null to not load an attachment. */
|
|
15
|
-
newRegionAttachment(skin: Skin, name: string, path: string, sequence: Sequence | null): RegionAttachment;
|
|
16
|
-
/** @return May be null to not load an attachment. */
|
|
17
|
-
newMeshAttachment(skin: Skin, name: string, path: string, sequence: Sequence | null): MeshAttachment;
|
|
18
|
-
/** @return May be null to not load an attachment. */
|
|
19
|
-
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
|
20
|
-
/** @return May be null to not load an attachment */
|
|
21
|
-
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
|
22
|
-
/** @return May be null to not load an attachment */
|
|
23
|
-
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
|
24
|
-
/** @return May be null to not load an attachment */
|
|
25
|
-
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
|
26
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Color } from '../../utils';
|
|
2
|
-
import type { Attachment } from './Attachment';
|
|
3
|
-
import { VertexAttachment } from './Attachment';
|
|
4
|
-
/** An attachment with vertices that make up a polygon. Can be used for hit detection, creating physics bodies, spawning particle
|
|
5
|
-
* effects, and more.
|
|
6
|
-
*
|
|
7
|
-
* See {@link SkeletonBounds} and [Bounding Boxes](http://esotericsoftware.com/spine-bounding-boxes) in the Spine User
|
|
8
|
-
* Guide. */
|
|
9
|
-
export declare class BoundingBoxAttachment extends VertexAttachment {
|
|
10
|
-
color: Color;
|
|
11
|
-
constructor(name: string);
|
|
12
|
-
copy(): Attachment;
|
|
13
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { SlotData } from '../SlotData';
|
|
2
|
-
import { Color } from '../../utils';
|
|
3
|
-
import type { Attachment } from './Attachment';
|
|
4
|
-
import { VertexAttachment } from './Attachment';
|
|
5
|
-
/** An attachment with vertices that make up a polygon used for clipping the rendering of other attachments. */
|
|
6
|
-
export declare class ClippingAttachment extends VertexAttachment {
|
|
7
|
-
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
8
|
-
* the skeleton's rendering. */
|
|
9
|
-
endSlot: SlotData | null;
|
|
10
|
-
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
11
|
-
* are not usually rendered at runtime. */
|
|
12
|
-
color: Color;
|
|
13
|
-
constructor(name: string);
|
|
14
|
-
copy(): Attachment;
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { TextureRegion } from '../Texture';
|
|
2
|
-
import type { Color } from '../../utils';
|
|
3
|
-
import type { Sequence } from './Sequence';
|
|
4
|
-
export interface HasTextureRegion {
|
|
5
|
-
/** The name used to find the {@link #region()}. */
|
|
6
|
-
path: string;
|
|
7
|
-
/** The region used to draw the attachment. After setting the region or if the region's properties are changed,
|
|
8
|
-
* {@link #updateRegion()} must be called. */
|
|
9
|
-
region: TextureRegion | null;
|
|
10
|
-
/** Updates any values the attachment calculates using the {@link #getRegion()}. Must be called after setting the
|
|
11
|
-
* {@link #getRegion()} or if the region's properties are changed. */
|
|
12
|
-
updateRegion(): void;
|
|
13
|
-
/** The color to tint the attachment. */
|
|
14
|
-
color: Color;
|
|
15
|
-
sequence: Sequence | null;
|
|
16
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { TextureRegion } from '../Texture';
|
|
2
|
-
import type { NumberArrayLike } from '../../utils';
|
|
3
|
-
import { Color } from '../../utils';
|
|
4
|
-
import type { Attachment } from './Attachment';
|
|
5
|
-
import { VertexAttachment } from './Attachment';
|
|
6
|
-
import type { HasTextureRegion } from './HasTextureRegion';
|
|
7
|
-
import type { Sequence } from './Sequence';
|
|
8
|
-
import type { Slot } from '../Slot';
|
|
9
|
-
/** An attachment that displays a textured mesh. A mesh has hull vertices and internal vertices within the hull. Holes are not
|
|
10
|
-
* supported. Each vertex has UVs (texture coordinates) and triangles are used to map an image on to the mesh.
|
|
11
|
-
*
|
|
12
|
-
* See [Mesh attachments](http://esotericsoftware.com/spine-meshes) in the Spine User Guide. */
|
|
13
|
-
export declare class MeshAttachment extends VertexAttachment implements HasTextureRegion {
|
|
14
|
-
region: TextureRegion | null;
|
|
15
|
-
/** The name of the texture region for this attachment. */
|
|
16
|
-
path: string;
|
|
17
|
-
/** The UV pair for each vertex, normalized within the texture region. */
|
|
18
|
-
regionUVs: NumberArrayLike | Array<number>;
|
|
19
|
-
/** The UV pair for each vertex, normalized within the entire texture.
|
|
20
|
-
*
|
|
21
|
-
* See {@link #updateUVs}. */
|
|
22
|
-
uvs: NumberArrayLike | Array<number>;
|
|
23
|
-
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
24
|
-
triangles: Array<number>;
|
|
25
|
-
/** The color to tint the mesh. */
|
|
26
|
-
color: Color;
|
|
27
|
-
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
28
|
-
width: number;
|
|
29
|
-
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
30
|
-
height: number;
|
|
31
|
-
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
32
|
-
hullLength: number;
|
|
33
|
-
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
34
|
-
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
35
|
-
edges: Array<number>;
|
|
36
|
-
private parentMesh;
|
|
37
|
-
sequence: Sequence | null;
|
|
38
|
-
tempColor: Color;
|
|
39
|
-
constructor(name: string, path: string);
|
|
40
|
-
/** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
|
|
41
|
-
* the {@link #regionUVs} are changed. */
|
|
42
|
-
updateRegion(): void;
|
|
43
|
-
/** The parent mesh if this is a linked mesh, else null. A linked mesh shares the {@link #bones}, {@link #vertices},
|
|
44
|
-
* {@link #regionUVs}, {@link #triangles}, {@link #hullLength}, {@link #edges}, {@link #width}, and {@link #height} with the
|
|
45
|
-
* parent mesh, but may have a different {@link #name} or {@link #path} (and therefore a different texture). */
|
|
46
|
-
getParentMesh(): MeshAttachment | null;
|
|
47
|
-
/** @param parentMesh May be null. */
|
|
48
|
-
setParentMesh(parentMesh: MeshAttachment): void;
|
|
49
|
-
copy(): Attachment;
|
|
50
|
-
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: NumberArrayLike | Array<number>, offset: number, stride: number): void;
|
|
51
|
-
/** Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh. **/
|
|
52
|
-
newLinkedMesh(): MeshAttachment;
|
|
53
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Color } from '../../utils';
|
|
2
|
-
import type { Attachment } from './Attachment';
|
|
3
|
-
import { VertexAttachment } from './Attachment';
|
|
4
|
-
/** An attachment whose vertices make up a composite Bezier curve.
|
|
5
|
-
*
|
|
6
|
-
* See {@link PathConstraint} and [Paths](http://esotericsoftware.com/spine-paths) in the Spine User Guide. */
|
|
7
|
-
export declare class PathAttachment extends VertexAttachment {
|
|
8
|
-
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
9
|
-
lengths: Array<number>;
|
|
10
|
-
/** If true, the start and end knots are connected. */
|
|
11
|
-
closed: boolean;
|
|
12
|
-
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
13
|
-
* calculations are performed but calculating positions along the path is less accurate. */
|
|
14
|
-
constantSpeed: boolean;
|
|
15
|
-
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
16
|
-
* rendered at runtime. */
|
|
17
|
-
color: Color;
|
|
18
|
-
constructor(name: string);
|
|
19
|
-
copy(): Attachment;
|
|
20
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { math } from '@galacean/effects';
|
|
2
|
-
import type { Bone } from '../Bone';
|
|
3
|
-
import { Color } from '../../utils';
|
|
4
|
-
import type { Attachment } from './Attachment';
|
|
5
|
-
import { VertexAttachment } from './Attachment';
|
|
6
|
-
/** An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be
|
|
7
|
-
* used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a
|
|
8
|
-
* skin.
|
|
9
|
-
*
|
|
10
|
-
* See [Point Attachments](http://esotericsoftware.com/spine-point-attachments) in the Spine User Guide. */
|
|
11
|
-
export declare class PointAttachment extends VertexAttachment {
|
|
12
|
-
x: number;
|
|
13
|
-
y: number;
|
|
14
|
-
rotation: number;
|
|
15
|
-
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
16
|
-
* are not usually rendered at runtime. */
|
|
17
|
-
color: Color;
|
|
18
|
-
constructor(name: string);
|
|
19
|
-
computeWorldPosition(bone: Bone, point: math.Vector2): math.Vector2;
|
|
20
|
-
computeWorldRotation(bone: Bone): number;
|
|
21
|
-
copy(): Attachment;
|
|
22
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { TextureRegion } from '../Texture';
|
|
2
|
-
import type { NumberArrayLike } from '../../utils';
|
|
3
|
-
import { Color } from '../../utils';
|
|
4
|
-
import { Attachment } from './Attachment';
|
|
5
|
-
import type { HasTextureRegion } from './HasTextureRegion';
|
|
6
|
-
import type { Sequence } from './Sequence';
|
|
7
|
-
import type { Slot } from '../Slot';
|
|
8
|
-
/** An attachment that displays a textured quadrilateral.
|
|
9
|
-
*
|
|
10
|
-
* See [Region attachments](http://esotericsoftware.com/spine-regions) in the Spine User Guide. */
|
|
11
|
-
export declare class RegionAttachment extends Attachment implements HasTextureRegion {
|
|
12
|
-
/** The local x translation. */
|
|
13
|
-
x: number;
|
|
14
|
-
/** The local y translation. */
|
|
15
|
-
y: number;
|
|
16
|
-
/** The local scaleX. */
|
|
17
|
-
scaleX: number;
|
|
18
|
-
/** The local scaleY. */
|
|
19
|
-
scaleY: number;
|
|
20
|
-
/** The local rotation. */
|
|
21
|
-
rotation: number;
|
|
22
|
-
/** The width of the region attachment in Spine. */
|
|
23
|
-
width: number;
|
|
24
|
-
/** The height of the region attachment in Spine. */
|
|
25
|
-
height: number;
|
|
26
|
-
/** The color to tint the region attachment. */
|
|
27
|
-
color: Color;
|
|
28
|
-
/** The name of the texture region for this attachment. */
|
|
29
|
-
path: string;
|
|
30
|
-
private rendererObject;
|
|
31
|
-
region: TextureRegion | null;
|
|
32
|
-
sequence: Sequence | null;
|
|
33
|
-
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
34
|
-
*
|
|
35
|
-
* See {@link #updateOffset()}. */
|
|
36
|
-
offset: NumberArrayLike;
|
|
37
|
-
uvs: NumberArrayLike;
|
|
38
|
-
tempColor: Color;
|
|
39
|
-
constructor(name: string, path: string);
|
|
40
|
-
/** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
|
|
41
|
-
updateRegion(): void;
|
|
42
|
-
/** Transforms the attachment's four vertices to world coordinates. If the attachment has a {@link #sequence}, the region may
|
|
43
|
-
* be changed.
|
|
44
|
-
* <p>
|
|
45
|
-
* See <a href="http://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
|
|
46
|
-
* Runtimes Guide.
|
|
47
|
-
* @param worldVertices The output world vertices. Must have a length >= <code>offset</code> + 8.
|
|
48
|
-
* @param offset The <code>worldVertices</code> index to begin writing values.
|
|
49
|
-
* @param stride The number of <code>worldVertices</code> entries between the value pairs written. */
|
|
50
|
-
computeWorldVertices(slot: Slot, worldVertices: Array<number>, offset: number, stride: number): void;
|
|
51
|
-
copy(): Attachment;
|
|
52
|
-
static X1: number;
|
|
53
|
-
static Y1: number;
|
|
54
|
-
static C1R: number;
|
|
55
|
-
static C1G: number;
|
|
56
|
-
static C1B: number;
|
|
57
|
-
static C1A: number;
|
|
58
|
-
static U1: number;
|
|
59
|
-
static V1: number;
|
|
60
|
-
static X2: number;
|
|
61
|
-
static Y2: number;
|
|
62
|
-
static C2R: number;
|
|
63
|
-
static C2G: number;
|
|
64
|
-
static C2B: number;
|
|
65
|
-
static C2A: number;
|
|
66
|
-
static U2: number;
|
|
67
|
-
static V2: number;
|
|
68
|
-
static X3: number;
|
|
69
|
-
static Y3: number;
|
|
70
|
-
static C3R: number;
|
|
71
|
-
static C3G: number;
|
|
72
|
-
static C3B: number;
|
|
73
|
-
static C3A: number;
|
|
74
|
-
static U3: number;
|
|
75
|
-
static V3: number;
|
|
76
|
-
static X4: number;
|
|
77
|
-
static Y4: number;
|
|
78
|
-
static C4R: number;
|
|
79
|
-
static C4G: number;
|
|
80
|
-
static C4B: number;
|
|
81
|
-
static C4A: number;
|
|
82
|
-
static U4: number;
|
|
83
|
-
static V4: number;
|
|
84
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { TextureRegion } from '../Texture';
|
|
2
|
-
import type { Slot } from '../Slot';
|
|
3
|
-
import type { HasTextureRegion } from './HasTextureRegion';
|
|
4
|
-
export declare class Sequence {
|
|
5
|
-
private static _nextID;
|
|
6
|
-
id: number;
|
|
7
|
-
regions: TextureRegion[];
|
|
8
|
-
start: number;
|
|
9
|
-
digits: number;
|
|
10
|
-
/** The index of the region to show for the setup pose. */
|
|
11
|
-
setupIndex: number;
|
|
12
|
-
constructor(count: number);
|
|
13
|
-
copy(): Sequence;
|
|
14
|
-
apply(slot: Slot, attachment: HasTextureRegion): void;
|
|
15
|
-
getPath(basePath: string, index: number): string;
|
|
16
|
-
private static nextID;
|
|
17
|
-
}
|
|
18
|
-
export declare enum SequenceMode {
|
|
19
|
-
hold = 0,
|
|
20
|
-
once = 1,
|
|
21
|
-
loop = 2,
|
|
22
|
-
pingpong = 3,
|
|
23
|
-
onceReverse = 4,
|
|
24
|
-
loopReverse = 5,
|
|
25
|
-
pingpongReverse = 6
|
|
26
|
-
}
|
|
27
|
-
export declare const SequenceModeValues: SequenceMode[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './Attachment';
|
|
2
|
-
export * from './AttachmentLoader';
|
|
3
|
-
export * from './BoundingBoxAttachment';
|
|
4
|
-
export * from './ClippingAttachment';
|
|
5
|
-
export * from './MeshAttachment';
|
|
6
|
-
export * from './PathAttachment';
|
|
7
|
-
export * from './PointAttachment';
|
|
8
|
-
export * from './RegionAttachment';
|
package/dist/core/index.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export * from './Animation';
|
|
2
|
-
export * from './AnimationState';
|
|
3
|
-
export * from './AnimationStateData';
|
|
4
|
-
export * from './AtlasAttachmentLoader';
|
|
5
|
-
export * from './Bone';
|
|
6
|
-
export * from './BoneData';
|
|
7
|
-
export * from './ConstraintData';
|
|
8
|
-
export * from './Event';
|
|
9
|
-
export * from './EventData';
|
|
10
|
-
export * from './IkConstraint';
|
|
11
|
-
export * from './IkConstraintData';
|
|
12
|
-
export * from './PathConstraint';
|
|
13
|
-
export * from './PathConstraintData';
|
|
14
|
-
export * from './Skeleton';
|
|
15
|
-
export * from './SkeletonBinary';
|
|
16
|
-
export * from './SkeletonBounds';
|
|
17
|
-
export * from './SkeletonClipping';
|
|
18
|
-
export * from './SkeletonData';
|
|
19
|
-
export * from './SkeletonJson';
|
|
20
|
-
export * from './Skin';
|
|
21
|
-
export * from './Slot';
|
|
22
|
-
export * from './SlotData';
|
|
23
|
-
export * from './Texture';
|
|
24
|
-
export * from './TextureAtlas';
|
|
25
|
-
export * from './TransformConstraint';
|
|
26
|
-
export * from './TransformConstraintData';
|
|
27
|
-
export * from './Triangulator';
|
|
28
|
-
export * from './Updatable';
|
|
29
|
-
export * from './polyfills';
|
|
30
|
-
export * from './attachments/Attachment';
|
|
31
|
-
export * from './attachments/AttachmentLoader';
|
|
32
|
-
export * from './attachments/BoundingBoxAttachment';
|
|
33
|
-
export * from './attachments/ClippingAttachment';
|
|
34
|
-
export * from './attachments/MeshAttachment';
|
|
35
|
-
export * from './attachments/PathAttachment';
|
|
36
|
-
export * from './attachments/PointAttachment';
|
|
37
|
-
export * from './attachments/RegionAttachment';
|
package/dist/core/polyfills.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|