mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[ts] AnimationState#apply returns boolean indicating if any timeline was applied. #919
This commit is contained in:
parent
3c194a5c9d
commit
b5e08f59e1
@ -42,6 +42,7 @@
|
||||
* Added macros to define typed dynamic arrays, see `Array.h/.c`
|
||||
* Added `spClippingAttachment` and respective enum.
|
||||
* Added `spSkeletonClipper` and `spTriangulator`, used to implement software clipping of attachments.
|
||||
* `AnimationState#apply` returns boolean indicating if any timeline was applied or not.
|
||||
|
||||
### Cocos2d-X
|
||||
* Fixed renderer to work with 3.6 changes
|
||||
@ -71,6 +72,8 @@
|
||||
## C#
|
||||
* **Breaking changes**
|
||||
* `MeshAttachment.parentMesh` is now a private field to enforce using the `.ParentMesh` setter property in external code. The `MeshAttachment.ParentMesh` property is an appropriate replacement wherever `.parentMesh` was used.
|
||||
* **Additions**
|
||||
* `AnimationState#apply` returns boolean indicating if any timeline was applied or not.
|
||||
|
||||
### Unity
|
||||
* Refactored renderer to work with new 3.6 features.
|
||||
@ -127,6 +130,7 @@
|
||||
* Added `PointAttachment`, additional method `newPointAttachment` in `AttachmentLoader` interface.
|
||||
* Added `ClippingAttachment`, additional method `newClippingAttachment` in `AttachmentLoader` interface.
|
||||
* Added `SkeletonClipper` and `Triangulator`, used to implement software clipping of attachments.
|
||||
* `AnimationState#apply` returns boolean indicating if any timeline was applied or not.
|
||||
|
||||
### libGDX
|
||||
* Fixed renderer to work with 3.6 changes
|
||||
@ -147,6 +151,7 @@
|
||||
* Added support for local and relative transform constraint calculation, including additional fields in `TransformConstraintData`
|
||||
* Added `ClippingAttachment`, additional method `newClippingAttachment` in `AttachmentLoader` interface.
|
||||
* Added `SkeletonClipper` and `Triangulator`, used to implement software clipping of attachments.
|
||||
* `AnimationState#apply` returns boolean indicating if any timeline was applied or not.
|
||||
|
||||
### Love2D
|
||||
* Fixed renderer to work with 3.6 changes
|
||||
@ -171,6 +176,7 @@
|
||||
* Added `PointAttachment`, additional method `newPointAttachment` in `AttachmentLoader` interface.
|
||||
* Added `ClippingAttachment`, additional method `newClippingAttachment` in `AttachmentLoader` interface.
|
||||
* Added `SkeletonClipper` and `Triangulator`, used to implement software clipping of attachments.
|
||||
* `AnimationState#apply` returns boolean indicating if any timeline was applied or not.
|
||||
|
||||
### WebGL backend
|
||||
* Fixed WebGL context loss
|
||||
|
||||
592
spine-ts/build/spine-all.d.ts
vendored
592
spine-ts/build/spine-all.d.ts
vendored
@ -1,3 +1,97 @@
|
||||
declare module spine {
|
||||
class AssetManager implements Disposable {
|
||||
private pathPrefix;
|
||||
private textureLoader;
|
||||
private assets;
|
||||
private errors;
|
||||
private toLoad;
|
||||
private loaded;
|
||||
constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
|
||||
loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
|
||||
loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
|
||||
loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
|
||||
get(path: string): any;
|
||||
remove(path: string): void;
|
||||
removeAll(): void;
|
||||
isLoadingComplete(): boolean;
|
||||
getToLoad(): number;
|
||||
getLoaded(): number;
|
||||
dispose(): void;
|
||||
hasErrors(): boolean;
|
||||
getErrors(): Map<string>;
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class AssetManager extends spine.AssetManager {
|
||||
constructor(pathPrefix?: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Texture {
|
||||
protected _image: HTMLImageElement;
|
||||
constructor(image: HTMLImageElement);
|
||||
getImage(): HTMLImageElement;
|
||||
abstract setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
abstract setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
abstract dispose(): void;
|
||||
static filterFromString(text: string): TextureFilter;
|
||||
static wrapFromString(text: string): TextureWrap;
|
||||
}
|
||||
enum TextureFilter {
|
||||
Nearest = 9728,
|
||||
Linear = 9729,
|
||||
MipMap = 9987,
|
||||
MipMapNearestNearest = 9984,
|
||||
MipMapLinearNearest = 9985,
|
||||
MipMapNearestLinear = 9986,
|
||||
MipMapLinearLinear = 9987,
|
||||
}
|
||||
enum TextureWrap {
|
||||
MirroredRepeat = 33648,
|
||||
ClampToEdge = 33071,
|
||||
Repeat = 10497,
|
||||
}
|
||||
class TextureRegion {
|
||||
renderObject: any;
|
||||
u: number;
|
||||
v: number;
|
||||
u2: number;
|
||||
v2: number;
|
||||
width: number;
|
||||
height: number;
|
||||
rotate: boolean;
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
originalWidth: number;
|
||||
originalHeight: number;
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class CanvasTexture extends Texture {
|
||||
constructor(image: HTMLImageElement);
|
||||
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
dispose(): void;
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class SkeletonRenderer {
|
||||
static QUAD_TRIANGLES: number[];
|
||||
static VERTEX_SIZE: number;
|
||||
private ctx;
|
||||
triangleRendering: boolean;
|
||||
debugRendering: boolean;
|
||||
private vertices;
|
||||
private tempColor;
|
||||
constructor(context: CanvasRenderingContext2D);
|
||||
draw(skeleton: Skeleton): void;
|
||||
private drawImages(skeleton);
|
||||
private drawTriangles(skeleton);
|
||||
private drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);
|
||||
private computeRegionVertices(slot, region, pma);
|
||||
private computeMeshVertices(slot, mesh, pma);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class Animation {
|
||||
name: string;
|
||||
@ -245,7 +339,7 @@ declare module spine {
|
||||
constructor(data: AnimationStateData);
|
||||
update(delta: number): void;
|
||||
updateMixingFrom(to: TrackEntry, delta: number): boolean;
|
||||
apply(skeleton: Skeleton): void;
|
||||
apply(skeleton: Skeleton): boolean;
|
||||
applyMixingFrom(to: TrackEntry, skeleton: Skeleton): number;
|
||||
applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, setupPose: boolean, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void;
|
||||
queueEvents(entry: TrackEntry, animationTime: number): void;
|
||||
@ -355,29 +449,6 @@ declare module spine {
|
||||
getMix(from: Animation, to: Animation): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class AssetManager implements Disposable {
|
||||
private pathPrefix;
|
||||
private textureLoader;
|
||||
private assets;
|
||||
private errors;
|
||||
private toLoad;
|
||||
private loaded;
|
||||
constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
|
||||
loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
|
||||
loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
|
||||
loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
|
||||
get(path: string): any;
|
||||
remove(path: string): void;
|
||||
removeAll(): void;
|
||||
isLoadingComplete(): boolean;
|
||||
getToLoad(): number;
|
||||
getLoaded(): number;
|
||||
dispose(): void;
|
||||
hasErrors(): boolean;
|
||||
getErrors(): Map<string>;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class AtlasAttachmentLoader implements AttachmentLoader {
|
||||
atlas: TextureAtlas;
|
||||
@ -390,6 +461,154 @@ declare module spine {
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
}
|
||||
abstract class VertexAttachment extends Attachment {
|
||||
bones: Array<number>;
|
||||
vertices: ArrayLike<number>;
|
||||
worldVerticesLength: number;
|
||||
constructor(name: string);
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
interface AttachmentLoader {
|
||||
newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum AttachmentType {
|
||||
Region = 0,
|
||||
BoundingBox = 1,
|
||||
Mesh = 2,
|
||||
LinkedMesh = 3,
|
||||
Path = 4,
|
||||
Point = 5,
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class ClippingAttachment extends VertexAttachment {
|
||||
endSlot: SlotData;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class MeshAttachment extends VertexAttachment {
|
||||
region: TextureRegion;
|
||||
path: string;
|
||||
regionUVs: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
triangles: Array<number>;
|
||||
color: Color;
|
||||
hullLength: number;
|
||||
private parentMesh;
|
||||
inheritDeform: boolean;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateUVs(): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
getParentMesh(): MeshAttachment;
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PathAttachment extends VertexAttachment {
|
||||
lengths: Array<number>;
|
||||
closed: boolean;
|
||||
constantSpeed: boolean;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class RegionAttachment extends Attachment {
|
||||
static OX1: number;
|
||||
static OY1: number;
|
||||
static OX2: number;
|
||||
static OY2: number;
|
||||
static OX3: number;
|
||||
static OY3: number;
|
||||
static OX4: number;
|
||||
static OY4: number;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
rotation: number;
|
||||
width: number;
|
||||
height: number;
|
||||
color: Color;
|
||||
path: string;
|
||||
rendererObject: any;
|
||||
region: TextureRegion;
|
||||
offset: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateOffset(): void;
|
||||
setRegion(region: TextureRegion): void;
|
||||
computeWorldVertices(bone: Bone, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum BlendMode {
|
||||
Normal = 0,
|
||||
@ -775,46 +994,6 @@ declare module spine {
|
||||
constructor(index: number, name: string, boneData: BoneData);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Texture {
|
||||
protected _image: HTMLImageElement;
|
||||
constructor(image: HTMLImageElement);
|
||||
getImage(): HTMLImageElement;
|
||||
abstract setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
abstract setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
abstract dispose(): void;
|
||||
static filterFromString(text: string): TextureFilter;
|
||||
static wrapFromString(text: string): TextureWrap;
|
||||
}
|
||||
enum TextureFilter {
|
||||
Nearest = 9728,
|
||||
Linear = 9729,
|
||||
MipMap = 9987,
|
||||
MipMapNearestNearest = 9984,
|
||||
MipMapLinearNearest = 9985,
|
||||
MipMapNearestLinear = 9986,
|
||||
MipMapLinearLinear = 9987,
|
||||
}
|
||||
enum TextureWrap {
|
||||
MirroredRepeat = 33648,
|
||||
ClampToEdge = 33071,
|
||||
Repeat = 10497,
|
||||
}
|
||||
class TextureRegion {
|
||||
renderObject: any;
|
||||
u: number;
|
||||
v: number;
|
||||
u2: number;
|
||||
v2: number;
|
||||
width: number;
|
||||
height: number;
|
||||
rotate: boolean;
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
originalWidth: number;
|
||||
originalHeight: number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class TextureAtlas implements Disposable {
|
||||
pages: TextureAtlasPage[];
|
||||
@ -1010,183 +1189,51 @@ declare module spine {
|
||||
getMean(): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
}
|
||||
abstract class VertexAttachment extends Attachment {
|
||||
bones: Array<number>;
|
||||
vertices: ArrayLike<number>;
|
||||
worldVerticesLength: number;
|
||||
constructor(name: string);
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
interface AttachmentLoader {
|
||||
newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum AttachmentType {
|
||||
Region = 0,
|
||||
BoundingBox = 1,
|
||||
Mesh = 2,
|
||||
LinkedMesh = 3,
|
||||
Path = 4,
|
||||
Point = 5,
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class ClippingAttachment extends VertexAttachment {
|
||||
endSlot: SlotData;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class MeshAttachment extends VertexAttachment {
|
||||
region: TextureRegion;
|
||||
path: string;
|
||||
regionUVs: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
triangles: Array<number>;
|
||||
color: Color;
|
||||
hullLength: number;
|
||||
private parentMesh;
|
||||
inheritDeform: boolean;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateUVs(): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
getParentMesh(): MeshAttachment;
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PathAttachment extends VertexAttachment {
|
||||
lengths: Array<number>;
|
||||
closed: boolean;
|
||||
constantSpeed: boolean;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class RegionAttachment extends Attachment {
|
||||
static OX1: number;
|
||||
static OY1: number;
|
||||
static OX2: number;
|
||||
static OY2: number;
|
||||
static OX3: number;
|
||||
static OY3: number;
|
||||
static OX4: number;
|
||||
static OY4: number;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
rotation: number;
|
||||
width: number;
|
||||
height: number;
|
||||
color: Color;
|
||||
path: string;
|
||||
rendererObject: any;
|
||||
region: TextureRegion;
|
||||
offset: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateOffset(): void;
|
||||
setRegion(region: TextureRegion): void;
|
||||
computeWorldVertices(bone: Bone, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
declare module spine.threejs {
|
||||
class AssetManager extends spine.AssetManager {
|
||||
constructor(pathPrefix?: string);
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class CanvasTexture extends Texture {
|
||||
declare module spine.threejs {
|
||||
class MeshBatcher {
|
||||
mesh: THREE.Mesh;
|
||||
private static VERTEX_SIZE;
|
||||
private vertexBuffer;
|
||||
private vertices;
|
||||
private verticesLength;
|
||||
private indices;
|
||||
private indicesLength;
|
||||
constructor(mesh: THREE.Mesh, maxVertices?: number);
|
||||
begin(): void;
|
||||
batch(vertices: ArrayLike<number>, verticesLength: number, indices: ArrayLike<number>, indicesLength: number, z?: number): void;
|
||||
end(): void;
|
||||
}
|
||||
}
|
||||
declare module spine.threejs {
|
||||
class SkeletonMesh extends THREE.Mesh {
|
||||
skeleton: Skeleton;
|
||||
state: AnimationState;
|
||||
zOffset: number;
|
||||
private batcher;
|
||||
private clipper;
|
||||
static QUAD_TRIANGLES: number[];
|
||||
static VERTEX_SIZE: number;
|
||||
private vertices;
|
||||
private tempColor;
|
||||
constructor(skeletonData: SkeletonData);
|
||||
update(deltaTime: number): void;
|
||||
private updateGeometry();
|
||||
}
|
||||
}
|
||||
declare module spine.threejs {
|
||||
class ThreeJsTexture extends Texture {
|
||||
texture: THREE.Texture;
|
||||
constructor(image: HTMLImageElement);
|
||||
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
dispose(): void;
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class SkeletonRenderer {
|
||||
static QUAD_TRIANGLES: number[];
|
||||
static VERTEX_SIZE: number;
|
||||
private ctx;
|
||||
triangleRendering: boolean;
|
||||
debugRendering: boolean;
|
||||
private vertices;
|
||||
private tempColor;
|
||||
constructor(context: CanvasRenderingContext2D);
|
||||
draw(skeleton: Skeleton): void;
|
||||
private drawImages(skeleton);
|
||||
private drawTriangles(skeleton);
|
||||
private drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);
|
||||
private computeRegionVertices(slot, region, pma);
|
||||
private computeMeshVertices(slot, mesh, pma);
|
||||
static toThreeJsTextureFilter(filter: TextureFilter): THREE.TextureFilter;
|
||||
static toThreeJsTextureWrap(wrap: TextureWrap): THREE.Wrapping;
|
||||
}
|
||||
}
|
||||
declare module spine.webgl {
|
||||
@ -1280,22 +1327,22 @@ declare module spine.webgl {
|
||||
}
|
||||
}
|
||||
declare module spine.webgl {
|
||||
const M00 = 0;
|
||||
const M01 = 4;
|
||||
const M02 = 8;
|
||||
const M03 = 12;
|
||||
const M10 = 1;
|
||||
const M11 = 5;
|
||||
const M12 = 9;
|
||||
const M13 = 13;
|
||||
const M20 = 2;
|
||||
const M21 = 6;
|
||||
const M22 = 10;
|
||||
const M23 = 14;
|
||||
const M30 = 3;
|
||||
const M31 = 7;
|
||||
const M32 = 11;
|
||||
const M33 = 15;
|
||||
const M00: number;
|
||||
const M01: number;
|
||||
const M02: number;
|
||||
const M03: number;
|
||||
const M10: number;
|
||||
const M11: number;
|
||||
const M12: number;
|
||||
const M13: number;
|
||||
const M20: number;
|
||||
const M21: number;
|
||||
const M22: number;
|
||||
const M23: number;
|
||||
const M30: number;
|
||||
const M31: number;
|
||||
const M32: number;
|
||||
const M33: number;
|
||||
class Matrix4 {
|
||||
temp: Float32Array;
|
||||
values: Float32Array;
|
||||
@ -1614,53 +1661,6 @@ declare module spine.webgl {
|
||||
static getSourceGLBlendMode(blendMode: BlendMode, premultipliedAlpha?: boolean): number;
|
||||
}
|
||||
}
|
||||
declare module spine.threejs {
|
||||
class AssetManager extends spine.AssetManager {
|
||||
constructor(pathPrefix?: string);
|
||||
}
|
||||
}
|
||||
declare module spine.threejs {
|
||||
class MeshBatcher {
|
||||
mesh: THREE.Mesh;
|
||||
private static VERTEX_SIZE;
|
||||
private vertexBuffer;
|
||||
private vertices;
|
||||
private verticesLength;
|
||||
private indices;
|
||||
private indicesLength;
|
||||
constructor(mesh: THREE.Mesh, maxVertices?: number);
|
||||
begin(): void;
|
||||
batch(vertices: ArrayLike<number>, verticesLength: number, indices: ArrayLike<number>, indicesLength: number, z?: number): void;
|
||||
end(): void;
|
||||
}
|
||||
}
|
||||
declare module spine.threejs {
|
||||
class SkeletonMesh extends THREE.Mesh {
|
||||
skeleton: Skeleton;
|
||||
state: AnimationState;
|
||||
zOffset: number;
|
||||
private batcher;
|
||||
private clipper;
|
||||
static QUAD_TRIANGLES: number[];
|
||||
static VERTEX_SIZE: number;
|
||||
private vertices;
|
||||
private tempColor;
|
||||
constructor(skeletonData: SkeletonData);
|
||||
update(deltaTime: number): void;
|
||||
private updateGeometry();
|
||||
}
|
||||
}
|
||||
declare module spine.threejs {
|
||||
class ThreeJsTexture extends Texture {
|
||||
texture: THREE.Texture;
|
||||
constructor(image: HTMLImageElement);
|
||||
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
dispose(): void;
|
||||
static toThreeJsTextureFilter(filter: TextureFilter): THREE.TextureFilter;
|
||||
static toThreeJsTextureWrap(wrap: TextureWrap): THREE.Wrapping;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class SpineWidget {
|
||||
skeleton: Skeleton;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
486
spine-ts/build/spine-canvas.d.ts
vendored
486
spine-ts/build/spine-canvas.d.ts
vendored
@ -1,3 +1,97 @@
|
||||
declare module spine {
|
||||
class AssetManager implements Disposable {
|
||||
private pathPrefix;
|
||||
private textureLoader;
|
||||
private assets;
|
||||
private errors;
|
||||
private toLoad;
|
||||
private loaded;
|
||||
constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
|
||||
loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
|
||||
loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
|
||||
loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
|
||||
get(path: string): any;
|
||||
remove(path: string): void;
|
||||
removeAll(): void;
|
||||
isLoadingComplete(): boolean;
|
||||
getToLoad(): number;
|
||||
getLoaded(): number;
|
||||
dispose(): void;
|
||||
hasErrors(): boolean;
|
||||
getErrors(): Map<string>;
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class AssetManager extends spine.AssetManager {
|
||||
constructor(pathPrefix?: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Texture {
|
||||
protected _image: HTMLImageElement;
|
||||
constructor(image: HTMLImageElement);
|
||||
getImage(): HTMLImageElement;
|
||||
abstract setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
abstract setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
abstract dispose(): void;
|
||||
static filterFromString(text: string): TextureFilter;
|
||||
static wrapFromString(text: string): TextureWrap;
|
||||
}
|
||||
enum TextureFilter {
|
||||
Nearest = 9728,
|
||||
Linear = 9729,
|
||||
MipMap = 9987,
|
||||
MipMapNearestNearest = 9984,
|
||||
MipMapLinearNearest = 9985,
|
||||
MipMapNearestLinear = 9986,
|
||||
MipMapLinearLinear = 9987,
|
||||
}
|
||||
enum TextureWrap {
|
||||
MirroredRepeat = 33648,
|
||||
ClampToEdge = 33071,
|
||||
Repeat = 10497,
|
||||
}
|
||||
class TextureRegion {
|
||||
renderObject: any;
|
||||
u: number;
|
||||
v: number;
|
||||
u2: number;
|
||||
v2: number;
|
||||
width: number;
|
||||
height: number;
|
||||
rotate: boolean;
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
originalWidth: number;
|
||||
originalHeight: number;
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class CanvasTexture extends Texture {
|
||||
constructor(image: HTMLImageElement);
|
||||
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
dispose(): void;
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class SkeletonRenderer {
|
||||
static QUAD_TRIANGLES: number[];
|
||||
static VERTEX_SIZE: number;
|
||||
private ctx;
|
||||
triangleRendering: boolean;
|
||||
debugRendering: boolean;
|
||||
private vertices;
|
||||
private tempColor;
|
||||
constructor(context: CanvasRenderingContext2D);
|
||||
draw(skeleton: Skeleton): void;
|
||||
private drawImages(skeleton);
|
||||
private drawTriangles(skeleton);
|
||||
private drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);
|
||||
private computeRegionVertices(slot, region, pma);
|
||||
private computeMeshVertices(slot, mesh, pma);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class Animation {
|
||||
name: string;
|
||||
@ -245,7 +339,7 @@ declare module spine {
|
||||
constructor(data: AnimationStateData);
|
||||
update(delta: number): void;
|
||||
updateMixingFrom(to: TrackEntry, delta: number): boolean;
|
||||
apply(skeleton: Skeleton): void;
|
||||
apply(skeleton: Skeleton): boolean;
|
||||
applyMixingFrom(to: TrackEntry, skeleton: Skeleton): number;
|
||||
applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, setupPose: boolean, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void;
|
||||
queueEvents(entry: TrackEntry, animationTime: number): void;
|
||||
@ -355,29 +449,6 @@ declare module spine {
|
||||
getMix(from: Animation, to: Animation): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class AssetManager implements Disposable {
|
||||
private pathPrefix;
|
||||
private textureLoader;
|
||||
private assets;
|
||||
private errors;
|
||||
private toLoad;
|
||||
private loaded;
|
||||
constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
|
||||
loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
|
||||
loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
|
||||
loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
|
||||
get(path: string): any;
|
||||
remove(path: string): void;
|
||||
removeAll(): void;
|
||||
isLoadingComplete(): boolean;
|
||||
getToLoad(): number;
|
||||
getLoaded(): number;
|
||||
dispose(): void;
|
||||
hasErrors(): boolean;
|
||||
getErrors(): Map<string>;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class AtlasAttachmentLoader implements AttachmentLoader {
|
||||
atlas: TextureAtlas;
|
||||
@ -390,6 +461,154 @@ declare module spine {
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
}
|
||||
abstract class VertexAttachment extends Attachment {
|
||||
bones: Array<number>;
|
||||
vertices: ArrayLike<number>;
|
||||
worldVerticesLength: number;
|
||||
constructor(name: string);
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
interface AttachmentLoader {
|
||||
newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum AttachmentType {
|
||||
Region = 0,
|
||||
BoundingBox = 1,
|
||||
Mesh = 2,
|
||||
LinkedMesh = 3,
|
||||
Path = 4,
|
||||
Point = 5,
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class ClippingAttachment extends VertexAttachment {
|
||||
endSlot: SlotData;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class MeshAttachment extends VertexAttachment {
|
||||
region: TextureRegion;
|
||||
path: string;
|
||||
regionUVs: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
triangles: Array<number>;
|
||||
color: Color;
|
||||
hullLength: number;
|
||||
private parentMesh;
|
||||
inheritDeform: boolean;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateUVs(): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
getParentMesh(): MeshAttachment;
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PathAttachment extends VertexAttachment {
|
||||
lengths: Array<number>;
|
||||
closed: boolean;
|
||||
constantSpeed: boolean;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class RegionAttachment extends Attachment {
|
||||
static OX1: number;
|
||||
static OY1: number;
|
||||
static OX2: number;
|
||||
static OY2: number;
|
||||
static OX3: number;
|
||||
static OY3: number;
|
||||
static OX4: number;
|
||||
static OY4: number;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
rotation: number;
|
||||
width: number;
|
||||
height: number;
|
||||
color: Color;
|
||||
path: string;
|
||||
rendererObject: any;
|
||||
region: TextureRegion;
|
||||
offset: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateOffset(): void;
|
||||
setRegion(region: TextureRegion): void;
|
||||
computeWorldVertices(bone: Bone, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum BlendMode {
|
||||
Normal = 0,
|
||||
@ -775,46 +994,6 @@ declare module spine {
|
||||
constructor(index: number, name: string, boneData: BoneData);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Texture {
|
||||
protected _image: HTMLImageElement;
|
||||
constructor(image: HTMLImageElement);
|
||||
getImage(): HTMLImageElement;
|
||||
abstract setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
abstract setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
abstract dispose(): void;
|
||||
static filterFromString(text: string): TextureFilter;
|
||||
static wrapFromString(text: string): TextureWrap;
|
||||
}
|
||||
enum TextureFilter {
|
||||
Nearest = 9728,
|
||||
Linear = 9729,
|
||||
MipMap = 9987,
|
||||
MipMapNearestNearest = 9984,
|
||||
MipMapLinearNearest = 9985,
|
||||
MipMapNearestLinear = 9986,
|
||||
MipMapLinearLinear = 9987,
|
||||
}
|
||||
enum TextureWrap {
|
||||
MirroredRepeat = 33648,
|
||||
ClampToEdge = 33071,
|
||||
Repeat = 10497,
|
||||
}
|
||||
class TextureRegion {
|
||||
renderObject: any;
|
||||
u: number;
|
||||
v: number;
|
||||
u2: number;
|
||||
v2: number;
|
||||
width: number;
|
||||
height: number;
|
||||
rotate: boolean;
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
originalWidth: number;
|
||||
originalHeight: number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class TextureAtlas implements Disposable {
|
||||
pages: TextureAtlasPage[];
|
||||
@ -1010,182 +1189,3 @@ declare module spine {
|
||||
getMean(): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
}
|
||||
abstract class VertexAttachment extends Attachment {
|
||||
bones: Array<number>;
|
||||
vertices: ArrayLike<number>;
|
||||
worldVerticesLength: number;
|
||||
constructor(name: string);
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
interface AttachmentLoader {
|
||||
newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum AttachmentType {
|
||||
Region = 0,
|
||||
BoundingBox = 1,
|
||||
Mesh = 2,
|
||||
LinkedMesh = 3,
|
||||
Path = 4,
|
||||
Point = 5,
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class ClippingAttachment extends VertexAttachment {
|
||||
endSlot: SlotData;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class MeshAttachment extends VertexAttachment {
|
||||
region: TextureRegion;
|
||||
path: string;
|
||||
regionUVs: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
triangles: Array<number>;
|
||||
color: Color;
|
||||
hullLength: number;
|
||||
private parentMesh;
|
||||
inheritDeform: boolean;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateUVs(): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
getParentMesh(): MeshAttachment;
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PathAttachment extends VertexAttachment {
|
||||
lengths: Array<number>;
|
||||
closed: boolean;
|
||||
constantSpeed: boolean;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class RegionAttachment extends Attachment {
|
||||
static OX1: number;
|
||||
static OY1: number;
|
||||
static OX2: number;
|
||||
static OY2: number;
|
||||
static OX3: number;
|
||||
static OY3: number;
|
||||
static OX4: number;
|
||||
static OY4: number;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
rotation: number;
|
||||
width: number;
|
||||
height: number;
|
||||
color: Color;
|
||||
path: string;
|
||||
rendererObject: any;
|
||||
region: TextureRegion;
|
||||
offset: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateOffset(): void;
|
||||
setRegion(region: TextureRegion): void;
|
||||
computeWorldVertices(bone: Bone, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class AssetManager extends spine.AssetManager {
|
||||
constructor(pathPrefix?: string);
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class CanvasTexture extends Texture {
|
||||
constructor(image: HTMLImageElement);
|
||||
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
dispose(): void;
|
||||
}
|
||||
}
|
||||
declare module spine.canvas {
|
||||
class SkeletonRenderer {
|
||||
static QUAD_TRIANGLES: number[];
|
||||
static VERTEX_SIZE: number;
|
||||
private ctx;
|
||||
triangleRendering: boolean;
|
||||
debugRendering: boolean;
|
||||
private vertices;
|
||||
private tempColor;
|
||||
constructor(context: CanvasRenderingContext2D);
|
||||
draw(skeleton: Skeleton): void;
|
||||
private drawImages(skeleton);
|
||||
private drawTriangles(skeleton);
|
||||
private drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);
|
||||
private computeRegionVertices(slot, region, pma);
|
||||
private computeMeshVertices(slot, mesh, pma);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
298
spine-ts/build/spine-core.d.ts
vendored
298
spine-ts/build/spine-core.d.ts
vendored
@ -245,7 +245,7 @@ declare module spine {
|
||||
constructor(data: AnimationStateData);
|
||||
update(delta: number): void;
|
||||
updateMixingFrom(to: TrackEntry, delta: number): boolean;
|
||||
apply(skeleton: Skeleton): void;
|
||||
apply(skeleton: Skeleton): boolean;
|
||||
applyMixingFrom(to: TrackEntry, skeleton: Skeleton): number;
|
||||
applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, setupPose: boolean, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void;
|
||||
queueEvents(entry: TrackEntry, animationTime: number): void;
|
||||
@ -390,6 +390,154 @@ declare module spine {
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
}
|
||||
abstract class VertexAttachment extends Attachment {
|
||||
bones: Array<number>;
|
||||
vertices: ArrayLike<number>;
|
||||
worldVerticesLength: number;
|
||||
constructor(name: string);
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
interface AttachmentLoader {
|
||||
newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum AttachmentType {
|
||||
Region = 0,
|
||||
BoundingBox = 1,
|
||||
Mesh = 2,
|
||||
LinkedMesh = 3,
|
||||
Path = 4,
|
||||
Point = 5,
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class ClippingAttachment extends VertexAttachment {
|
||||
endSlot: SlotData;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class MeshAttachment extends VertexAttachment {
|
||||
region: TextureRegion;
|
||||
path: string;
|
||||
regionUVs: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
triangles: Array<number>;
|
||||
color: Color;
|
||||
hullLength: number;
|
||||
private parentMesh;
|
||||
inheritDeform: boolean;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateUVs(): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
getParentMesh(): MeshAttachment;
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PathAttachment extends VertexAttachment {
|
||||
lengths: Array<number>;
|
||||
closed: boolean;
|
||||
constantSpeed: boolean;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class RegionAttachment extends Attachment {
|
||||
static OX1: number;
|
||||
static OY1: number;
|
||||
static OX2: number;
|
||||
static OY2: number;
|
||||
static OX3: number;
|
||||
static OY3: number;
|
||||
static OX4: number;
|
||||
static OY4: number;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
rotation: number;
|
||||
width: number;
|
||||
height: number;
|
||||
color: Color;
|
||||
path: string;
|
||||
rendererObject: any;
|
||||
region: TextureRegion;
|
||||
offset: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateOffset(): void;
|
||||
setRegion(region: TextureRegion): void;
|
||||
computeWorldVertices(bone: Bone, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum BlendMode {
|
||||
Normal = 0,
|
||||
@ -1010,151 +1158,3 @@ declare module spine {
|
||||
getMean(): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
}
|
||||
abstract class VertexAttachment extends Attachment {
|
||||
bones: Array<number>;
|
||||
vertices: ArrayLike<number>;
|
||||
worldVerticesLength: number;
|
||||
constructor(name: string);
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
interface AttachmentLoader {
|
||||
newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum AttachmentType {
|
||||
Region = 0,
|
||||
BoundingBox = 1,
|
||||
Mesh = 2,
|
||||
LinkedMesh = 3,
|
||||
Path = 4,
|
||||
Point = 5,
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class ClippingAttachment extends VertexAttachment {
|
||||
endSlot: SlotData;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class MeshAttachment extends VertexAttachment {
|
||||
region: TextureRegion;
|
||||
path: string;
|
||||
regionUVs: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
triangles: Array<number>;
|
||||
color: Color;
|
||||
hullLength: number;
|
||||
private parentMesh;
|
||||
inheritDeform: boolean;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateUVs(): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
getParentMesh(): MeshAttachment;
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PathAttachment extends VertexAttachment {
|
||||
lengths: Array<number>;
|
||||
closed: boolean;
|
||||
constantSpeed: boolean;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class RegionAttachment extends Attachment {
|
||||
static OX1: number;
|
||||
static OY1: number;
|
||||
static OX2: number;
|
||||
static OY2: number;
|
||||
static OX3: number;
|
||||
static OY3: number;
|
||||
static OX4: number;
|
||||
static OY4: number;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
rotation: number;
|
||||
width: number;
|
||||
height: number;
|
||||
color: Color;
|
||||
path: string;
|
||||
rendererObject: any;
|
||||
region: TextureRegion;
|
||||
offset: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateOffset(): void;
|
||||
setRegion(region: TextureRegion): void;
|
||||
computeWorldVertices(bone: Bone, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
298
spine-ts/build/spine-threejs.d.ts
vendored
298
spine-ts/build/spine-threejs.d.ts
vendored
@ -245,7 +245,7 @@ declare module spine {
|
||||
constructor(data: AnimationStateData);
|
||||
update(delta: number): void;
|
||||
updateMixingFrom(to: TrackEntry, delta: number): boolean;
|
||||
apply(skeleton: Skeleton): void;
|
||||
apply(skeleton: Skeleton): boolean;
|
||||
applyMixingFrom(to: TrackEntry, skeleton: Skeleton): number;
|
||||
applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, setupPose: boolean, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void;
|
||||
queueEvents(entry: TrackEntry, animationTime: number): void;
|
||||
@ -390,6 +390,154 @@ declare module spine {
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
}
|
||||
abstract class VertexAttachment extends Attachment {
|
||||
bones: Array<number>;
|
||||
vertices: ArrayLike<number>;
|
||||
worldVerticesLength: number;
|
||||
constructor(name: string);
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
interface AttachmentLoader {
|
||||
newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum AttachmentType {
|
||||
Region = 0,
|
||||
BoundingBox = 1,
|
||||
Mesh = 2,
|
||||
LinkedMesh = 3,
|
||||
Path = 4,
|
||||
Point = 5,
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class ClippingAttachment extends VertexAttachment {
|
||||
endSlot: SlotData;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class MeshAttachment extends VertexAttachment {
|
||||
region: TextureRegion;
|
||||
path: string;
|
||||
regionUVs: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
triangles: Array<number>;
|
||||
color: Color;
|
||||
hullLength: number;
|
||||
private parentMesh;
|
||||
inheritDeform: boolean;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateUVs(): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
getParentMesh(): MeshAttachment;
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PathAttachment extends VertexAttachment {
|
||||
lengths: Array<number>;
|
||||
closed: boolean;
|
||||
constantSpeed: boolean;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class RegionAttachment extends Attachment {
|
||||
static OX1: number;
|
||||
static OY1: number;
|
||||
static OX2: number;
|
||||
static OY2: number;
|
||||
static OX3: number;
|
||||
static OY3: number;
|
||||
static OX4: number;
|
||||
static OY4: number;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
rotation: number;
|
||||
width: number;
|
||||
height: number;
|
||||
color: Color;
|
||||
path: string;
|
||||
rendererObject: any;
|
||||
region: TextureRegion;
|
||||
offset: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateOffset(): void;
|
||||
setRegion(region: TextureRegion): void;
|
||||
computeWorldVertices(bone: Bone, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum BlendMode {
|
||||
Normal = 0,
|
||||
@ -1010,154 +1158,6 @@ declare module spine {
|
||||
getMean(): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
}
|
||||
abstract class VertexAttachment extends Attachment {
|
||||
bones: Array<number>;
|
||||
vertices: ArrayLike<number>;
|
||||
worldVerticesLength: number;
|
||||
constructor(name: string);
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
interface AttachmentLoader {
|
||||
newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum AttachmentType {
|
||||
Region = 0,
|
||||
BoundingBox = 1,
|
||||
Mesh = 2,
|
||||
LinkedMesh = 3,
|
||||
Path = 4,
|
||||
Point = 5,
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class ClippingAttachment extends VertexAttachment {
|
||||
endSlot: SlotData;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class MeshAttachment extends VertexAttachment {
|
||||
region: TextureRegion;
|
||||
path: string;
|
||||
regionUVs: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
triangles: Array<number>;
|
||||
color: Color;
|
||||
hullLength: number;
|
||||
private parentMesh;
|
||||
inheritDeform: boolean;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateUVs(): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
getParentMesh(): MeshAttachment;
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PathAttachment extends VertexAttachment {
|
||||
lengths: Array<number>;
|
||||
closed: boolean;
|
||||
constantSpeed: boolean;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class RegionAttachment extends Attachment {
|
||||
static OX1: number;
|
||||
static OY1: number;
|
||||
static OX2: number;
|
||||
static OY2: number;
|
||||
static OX3: number;
|
||||
static OY3: number;
|
||||
static OX4: number;
|
||||
static OY4: number;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
rotation: number;
|
||||
width: number;
|
||||
height: number;
|
||||
color: Color;
|
||||
path: string;
|
||||
rendererObject: any;
|
||||
region: TextureRegion;
|
||||
offset: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateOffset(): void;
|
||||
setRegion(region: TextureRegion): void;
|
||||
computeWorldVertices(bone: Bone, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
}
|
||||
}
|
||||
declare module spine.threejs {
|
||||
class AssetManager extends spine.AssetManager {
|
||||
constructor(pathPrefix?: string);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
2950
spine-ts/build/spine-webgl.d.ts
vendored
2950
spine-ts/build/spine-webgl.d.ts
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
330
spine-ts/build/spine-widget.d.ts
vendored
330
spine-ts/build/spine-widget.d.ts
vendored
@ -245,7 +245,7 @@ declare module spine {
|
||||
constructor(data: AnimationStateData);
|
||||
update(delta: number): void;
|
||||
updateMixingFrom(to: TrackEntry, delta: number): boolean;
|
||||
apply(skeleton: Skeleton): void;
|
||||
apply(skeleton: Skeleton): boolean;
|
||||
applyMixingFrom(to: TrackEntry, skeleton: Skeleton): number;
|
||||
applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, setupPose: boolean, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void;
|
||||
queueEvents(entry: TrackEntry, animationTime: number): void;
|
||||
@ -390,6 +390,154 @@ declare module spine {
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
}
|
||||
abstract class VertexAttachment extends Attachment {
|
||||
bones: Array<number>;
|
||||
vertices: ArrayLike<number>;
|
||||
worldVerticesLength: number;
|
||||
constructor(name: string);
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
interface AttachmentLoader {
|
||||
newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum AttachmentType {
|
||||
Region = 0,
|
||||
BoundingBox = 1,
|
||||
Mesh = 2,
|
||||
LinkedMesh = 3,
|
||||
Path = 4,
|
||||
Point = 5,
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class ClippingAttachment extends VertexAttachment {
|
||||
endSlot: SlotData;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class MeshAttachment extends VertexAttachment {
|
||||
region: TextureRegion;
|
||||
path: string;
|
||||
regionUVs: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
triangles: Array<number>;
|
||||
color: Color;
|
||||
hullLength: number;
|
||||
private parentMesh;
|
||||
inheritDeform: boolean;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateUVs(): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
getParentMesh(): MeshAttachment;
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PathAttachment extends VertexAttachment {
|
||||
lengths: Array<number>;
|
||||
closed: boolean;
|
||||
constantSpeed: boolean;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class RegionAttachment extends Attachment {
|
||||
static OX1: number;
|
||||
static OY1: number;
|
||||
static OX2: number;
|
||||
static OY2: number;
|
||||
static OX3: number;
|
||||
static OY3: number;
|
||||
static OX4: number;
|
||||
static OY4: number;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
rotation: number;
|
||||
width: number;
|
||||
height: number;
|
||||
color: Color;
|
||||
path: string;
|
||||
rendererObject: any;
|
||||
region: TextureRegion;
|
||||
offset: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateOffset(): void;
|
||||
setRegion(region: TextureRegion): void;
|
||||
computeWorldVertices(bone: Bone, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum BlendMode {
|
||||
Normal = 0,
|
||||
@ -1010,154 +1158,6 @@ declare module spine {
|
||||
getMean(): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
}
|
||||
abstract class VertexAttachment extends Attachment {
|
||||
bones: Array<number>;
|
||||
vertices: ArrayLike<number>;
|
||||
worldVerticesLength: number;
|
||||
constructor(name: string);
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
interface AttachmentLoader {
|
||||
newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
enum AttachmentType {
|
||||
Region = 0,
|
||||
BoundingBox = 1,
|
||||
Mesh = 2,
|
||||
LinkedMesh = 3,
|
||||
Path = 4,
|
||||
Point = 5,
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class ClippingAttachment extends VertexAttachment {
|
||||
endSlot: SlotData;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class MeshAttachment extends VertexAttachment {
|
||||
region: TextureRegion;
|
||||
path: string;
|
||||
regionUVs: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
triangles: Array<number>;
|
||||
color: Color;
|
||||
hullLength: number;
|
||||
private parentMesh;
|
||||
inheritDeform: boolean;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateUVs(): void;
|
||||
applyDeform(sourceAttachment: VertexAttachment): boolean;
|
||||
getParentMesh(): MeshAttachment;
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PathAttachment extends VertexAttachment {
|
||||
lengths: Array<number>;
|
||||
closed: boolean;
|
||||
constantSpeed: boolean;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
}
|
||||
}
|
||||
declare module spine {
|
||||
class RegionAttachment extends Attachment {
|
||||
static OX1: number;
|
||||
static OY1: number;
|
||||
static OX2: number;
|
||||
static OY2: number;
|
||||
static OX3: number;
|
||||
static OY3: number;
|
||||
static OX4: number;
|
||||
static OY4: number;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
rotation: number;
|
||||
width: number;
|
||||
height: number;
|
||||
color: Color;
|
||||
path: string;
|
||||
rendererObject: any;
|
||||
region: TextureRegion;
|
||||
offset: ArrayLike<number>;
|
||||
uvs: ArrayLike<number>;
|
||||
tempColor: Color;
|
||||
constructor(name: string);
|
||||
updateOffset(): void;
|
||||
setRegion(region: TextureRegion): void;
|
||||
computeWorldVertices(bone: Bone, worldVertices: ArrayLike<number>, offset: number, stride: number): void;
|
||||
}
|
||||
}
|
||||
declare module spine.webgl {
|
||||
class AssetManager extends spine.AssetManager {
|
||||
constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, pathPrefix?: string);
|
||||
@ -1249,22 +1249,22 @@ declare module spine.webgl {
|
||||
}
|
||||
}
|
||||
declare module spine.webgl {
|
||||
const M00 = 0;
|
||||
const M01 = 4;
|
||||
const M02 = 8;
|
||||
const M03 = 12;
|
||||
const M10 = 1;
|
||||
const M11 = 5;
|
||||
const M12 = 9;
|
||||
const M13 = 13;
|
||||
const M20 = 2;
|
||||
const M21 = 6;
|
||||
const M22 = 10;
|
||||
const M23 = 14;
|
||||
const M30 = 3;
|
||||
const M31 = 7;
|
||||
const M32 = 11;
|
||||
const M33 = 15;
|
||||
const M00: number;
|
||||
const M01: number;
|
||||
const M02: number;
|
||||
const M03: number;
|
||||
const M10: number;
|
||||
const M11: number;
|
||||
const M12: number;
|
||||
const M13: number;
|
||||
const M20: number;
|
||||
const M21: number;
|
||||
const M22: number;
|
||||
const M23: number;
|
||||
const M30: number;
|
||||
const M31: number;
|
||||
const M32: number;
|
||||
const M33: number;
|
||||
class Matrix4 {
|
||||
temp: Float32Array;
|
||||
values: Float32Array;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -131,16 +131,18 @@ module spine {
|
||||
return false;
|
||||
}
|
||||
|
||||
apply (skeleton: Skeleton) {
|
||||
apply (skeleton: Skeleton) : boolean {
|
||||
if (skeleton == null) throw new Error("skeleton cannot be null.");
|
||||
if (this.animationsChanged) this._animationsChanged();
|
||||
|
||||
let events = this.events;
|
||||
let tracks = this.tracks;
|
||||
let applied = false;
|
||||
|
||||
for (let i = 0, n = tracks.length; i < n; i++) {
|
||||
let current = tracks[i];
|
||||
if (current == null || current.delay > 0) continue;
|
||||
applied = true;
|
||||
|
||||
// Apply mixing from entries first.
|
||||
let mix = current.alpha;
|
||||
@ -179,6 +181,7 @@ module spine {
|
||||
}
|
||||
|
||||
this.queue.drain();
|
||||
return applied;
|
||||
}
|
||||
|
||||
applyMixingFrom (to: TrackEntry, skeleton: Skeleton) {
|
||||
@ -206,7 +209,7 @@ module spine {
|
||||
let timelinesRotation = from.timelinesRotation;
|
||||
|
||||
let first = false;
|
||||
let alphaDip = from.alpha * to.interruptAlpha, alphaMix = alphaDip * (1 - mix), alpha;
|
||||
let alphaDip = from.alpha * to.interruptAlpha, alphaMix = alphaDip * (1 - mix), alpha = 0;
|
||||
from.totalAlpha = 0;
|
||||
for (var i = 0; i < timelineCount; i++) {
|
||||
let timeline = timelines[i];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user