Permalink
Browse files

[ts] Added AssetManager subclasses for WebGL and Canvas backend

  • Loading branch information...
badlogic committed Aug 16, 2016
1 parent 61c5c36 commit 22cc0993f7ee456bb81634bdc5251d2ca5488271
@@ -1,3 +1,29 @@
declare module spine {
class AssetManager implements Disposable {
private _textureLoader;
private _assets;
private _errors;
private _toLoad;
private _loaded;
constructor(textureLoader: (image: HTMLImageElement) => any);
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;
get(path: string): any;
remove(path: string): void;
removeAll(): void;
isLoadingComplete(): boolean;
toLoad(): number;
loaded(): number;
dispose(): void;
hasErrors(): boolean;
errors(): Map<string>;
}
}
declare module spine.canvas {
class AssetManager extends spine.AssetManager {
constructor();
}
}
declare module spine {
abstract class Texture {
protected _image: HTMLImageElement;
@@ -50,8 +76,8 @@ declare module spine.canvas {
class SkeletonRenderer {
static QUAD_TRIANGLES: number[];
private _ctx;
useTriangleRendering: boolean;
useDebugRendering: boolean;
triangleRendering: boolean;
debugRendering: boolean;
constructor(context: CanvasRenderingContext2D);
draw(skeleton: Skeleton): void;
private drawImages(skeleton);
@@ -295,27 +321,6 @@ declare module spine {
getMix(from: Animation, to: Animation): number;
}
}
declare module spine {
class AssetManager implements Disposable {
private _textureLoader;
private _assets;
private _errors;
private _toLoad;
private _loaded;
constructor(textureLoader: (image: HTMLImageElement) => any);
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;
get(path: string): any;
remove(path: string): void;
removeAll(): void;
isLoadingComplete(): boolean;
toLoad(): number;
loaded(): number;
dispose(): void;
hasErrors(): boolean;
errors(): Map<string>;
}
}
declare module spine {
enum BlendMode {
Normal = 0,
@@ -894,6 +899,11 @@ declare module spine {
updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike<number>;
}
}
declare module spine.webgl {
class AssetManager extends spine.AssetManager {
constructor(gl: WebGLRenderingContext);
}
}
declare module spine.webgl {
class GLTexture extends Texture implements Disposable {
private _gl;
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 22cc099

Please sign in to comment.