Skip to content

Commit

Permalink
[ts] Ported new fix for 0 timeScale not returning to setup pose. See #…
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Oct 30, 2018
1 parent 69df568 commit 32f6e44
Show file tree
Hide file tree
Showing 19 changed files with 230 additions and 284 deletions.
92 changes: 46 additions & 46 deletions spine-ts/build/spine-all.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ declare module spine {
setup = 0,
first = 1,
replace = 2,
add = 3
add = 3,
}
enum MixDirection {
in = 0,
out = 1
out = 1,
}
enum TimelineType {
rotate = 0,
Expand All @@ -37,7 +37,7 @@ declare module spine {
pathConstraintPosition = 11,
pathConstraintSpacing = 12,
pathConstraintMix = 13,
twoColor = 14
twoColor = 14,
}
abstract class CurveTimeline implements Timeline {
static LINEAR: number;
Expand Down Expand Up @@ -341,7 +341,7 @@ declare module spine {
end = 2,
dispose = 3,
complete = 4,
event = 5
event = 5,
}
interface AnimationStateListener2 {
start(entry: TrackEntry): void;
Expand Down Expand Up @@ -380,8 +380,8 @@ declare module spine {
private toLoad;
private loaded;
constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
private static downloadText;
private static downloadBinary;
private static downloadText(url, success, error);
private static downloadBinary(url, success, error);
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;
Expand Down Expand Up @@ -414,7 +414,7 @@ declare module spine {
Normal = 0,
Additive = 1,
Multiply = 2,
Screen = 3
Screen = 3,
}
}
declare module spine {
Expand Down Expand Up @@ -483,7 +483,7 @@ declare module spine {
OnlyTranslation = 1,
NoRotationOrReflection = 2,
NoScale = 3,
NoScaleOrReflection = 4
NoScaleOrReflection = 4,
}
}
declare module spine {
Expand Down Expand Up @@ -593,17 +593,17 @@ declare module spine {
}
enum PositionMode {
Fixed = 0,
Percent = 1
Percent = 1,
}
enum SpacingMode {
Length = 0,
Fixed = 1,
Percent = 2
Percent = 2,
}
enum RotateMode {
Tangent = 0,
Chain = 1,
ChainScale = 2
ChainScale = 2,
}
}
declare module spine {
Expand All @@ -614,12 +614,12 @@ declare module spine {
private rawAssets;
private errors;
constructor(pathPrefix?: string);
private queueAsset;
private queueAsset(clientId, textureLoader, path);
loadText(clientId: string, path: string): void;
loadJson(clientId: string, path: string): void;
loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
get(clientId: string, path: string): any;
private updateClientAssets;
private updateClientAssets(clientAssets);
isLoadingComplete(clientId: string): boolean;
dispose(): void;
hasErrors(): boolean;
Expand Down Expand Up @@ -823,12 +823,12 @@ declare module spine {
MipMapNearestNearest = 9984,
MipMapLinearNearest = 9985,
MipMapNearestLinear = 9986,
MipMapLinearLinear = 9987
MipMapLinearLinear = 9987,
}
enum TextureWrap {
MirroredRepeat = 33648,
ClampToEdge = 33071,
Repeat = 10497
Repeat = 10497,
}
class TextureRegion {
renderObject: any;
Expand All @@ -855,7 +855,7 @@ declare module spine {
pages: TextureAtlasPage[];
regions: TextureAtlasRegion[];
constructor(atlasText: string, textureLoader: (path: string) => any);
private load;
private load(atlasText, textureLoader);
findRegion(name: string): TextureAtlasRegion;
dispose(): void;
}
Expand Down Expand Up @@ -931,9 +931,9 @@ declare module spine {
private polygonIndicesPool;
triangulate(verticesArray: ArrayLike<number>): Array<number>;
decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
private static isConcave;
private static positiveArea;
private static winding;
private static isConcave(index, vertexCount, vertices, indices);
private static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y);
private static winding(p1x, p1y, p2x, p2y, p3x, p3y);
}
}
declare module spine {
Expand Down Expand Up @@ -1105,7 +1105,7 @@ declare module spine {
Mesh = 2,
LinkedMesh = 3,
Path = 4,
Point = 5
Point = 5,
}
}
declare module spine {
Expand Down Expand Up @@ -1271,11 +1271,11 @@ declare module spine.canvas {
private tempColor;
constructor(context: CanvasRenderingContext2D);
draw(skeleton: Skeleton): void;
private drawImages;
private drawTriangles;
private drawTriangle;
private computeRegionVertices;
private computeMeshVertices;
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.webgl {
Expand Down Expand Up @@ -1330,7 +1330,7 @@ declare module spine.webgl {
touchesPool: Pool<Touch>;
private listeners;
constructor(element: HTMLElement);
private setupCallbacks;
private setupCallbacks(element);
addListener(listener: InputListener): void;
removeListener(listener: InputListener): void;
}
Expand Down Expand Up @@ -1439,7 +1439,7 @@ declare module spine.webgl {
drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void;
bind(shader: Shader): void;
unbind(shader: Shader): void;
private update;
private update();
restore(): void;
dispose(): void;
}
Expand All @@ -1465,7 +1465,7 @@ declare module spine.webgl {
constructor();
}
enum VertexAttributeType {
Float = 0
Float = 0,
}
}
declare module spine.webgl {
Expand All @@ -1484,7 +1484,7 @@ declare module spine.webgl {
begin(shader: Shader): void;
setBlendMode(srcBlend: number, dstBlend: number): void;
draw(texture: GLTexture, vertices: ArrayLike<number>, indices: Array<number>): void;
private flush;
private flush();
end(): void;
getDrawCalls(): number;
dispose(): void;
Expand Down Expand Up @@ -1524,13 +1524,13 @@ declare module spine.webgl {
curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
end(): void;
resize(resizeMode: ResizeMode): void;
private enableRenderer;
private enableRenderer(renderer);
dispose(): void;
}
enum ResizeMode {
Stretch = 0,
Expand = 1,
Fit = 2
Fit = 2,
}
}
declare module spine.webgl {
Expand Down Expand Up @@ -1558,9 +1558,9 @@ declare module spine.webgl {
getVertexShaderSource(): string;
getFragmentSource(): string;
constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, vertexShader: string, fragmentShader: string);
private compile;
private compileShader;
private compileProgram;
private compile();
private compileShader(type, source);
private compileProgram(vs, fs);
restore(): void;
bind(): void;
unbind(): void;
Expand Down Expand Up @@ -1607,16 +1607,16 @@ declare module spine.webgl {
polygon(polygonVertices: ArrayLike<number>, offset: number, count: number, color?: Color): void;
circle(filled: boolean, x: number, y: number, radius: number, color?: Color, segments?: number): void;
curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
private vertex;
private vertex(x, y, color);
end(): void;
private flush;
private check;
private flush();
private check(shapeType, numVertices);
dispose(): void;
}
enum ShapeType {
Point = 0,
Line = 1,
Filled = 4
Filled = 4,
}
}
declare module spine.webgl {
Expand Down Expand Up @@ -1756,9 +1756,9 @@ declare module spine.threejs {
private tempColor;
constructor(skeletonData: SkeletonData);
update(deltaTime: number): void;
private clearBatches;
private nextBatch;
private updateGeometry;
private clearBatches();
private nextBatch();
private updateGeometry();
}
}
declare module spine.threejs {
Expand Down Expand Up @@ -1793,18 +1793,18 @@ declare module spine {
private loaded;
private bounds;
constructor(element: HTMLElement | string, config: SpineWidgetConfig);
private validateConfig;
private load;
private render;
private resize;
private validateConfig(config);
private load();
private render();
private resize();
pause(): void;
play(): void;
isPlaying(): boolean;
setAnimation(animationName: string, animationStateListener?: AnimationStateListener2): void;
static loadWidgets(): void;
static loadWidget(widget: HTMLElement): void;
static pageLoaded: boolean;
private static ready;
private static ready();
static setupDOMListener(): void;
}
class SpineWidgetConfig {
Expand Down
20 changes: 6 additions & 14 deletions spine-ts/build/spine-all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spine-ts/build/spine-all.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 32f6e44

Please sign in to comment.