[ts] rebuild artifacts

This commit is contained in:
badlogic 2017-04-11 13:39:07 +02:00
parent 0733ce8af2
commit 0fc89aa529
17 changed files with 9800 additions and 9670 deletions

View File

@ -9,6 +9,7 @@ declare module spine {
constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string); constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; 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; 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; get(path: string): any;
remove(path: string): void; remove(path: string): void;
removeAll(): void; removeAll(): void;

View File

@ -61,6 +61,30 @@ var spine;
error(path, "Couldn't load image " + path); error(path, "Couldn't load image " + path);
}; };
}; };
AssetManager.prototype.loadTextureData = function (path, data, success, error) {
var _this = this;
if (success === void 0) { success = null; }
if (error === void 0) { error = null; }
path = this.pathPrefix + path;
this.toLoad++;
var img = new Image();
img.src = data;
img.onload = function (ev) {
var texture = _this.textureLoader(img);
_this.assets[path] = texture;
_this.toLoad--;
_this.loaded++;
if (success)
success(path, img);
};
img.onerror = function (ev) {
_this.errors[path] = "Couldn't load image " + path;
_this.toLoad--;
_this.loaded++;
if (error)
error(path, "Couldn't load image " + path);
};
};
AssetManager.prototype.get = function (path) { AssetManager.prototype.get = function (path) {
path = this.pathPrefix + path; path = this.pathPrefix + path;
return this.assets[path]; return this.assets[path];
@ -8599,9 +8623,14 @@ var spine;
} }
else { else {
for (var i = 0; i < config.atlasPages.length; i++) { for (var i = 0; i < config.atlasPages.length; i++) {
if (config.atlasPagesContent && config.atlasPagesContent[i]) {
assets.loadTextureData(config.atlasPages[i], config.atlasPagesContent[0]);
}
else {
assets.loadTexture(config.atlasPages[i]); assets.loadTexture(config.atlasPages[i]);
} }
} }
}
requestAnimationFrame(function () { _this.load(); }); requestAnimationFrame(function () { _this.load(); });
} }
SpineWidget.prototype.validateConfig = function (config) { SpineWidget.prototype.validateConfig = function (config) {

File diff suppressed because one or more lines are too long

View File

@ -9,6 +9,7 @@ declare module spine {
constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string); constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; 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; 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; get(path: string): any;
remove(path: string): void; remove(path: string): void;
removeAll(): void; removeAll(): void;

View File

@ -61,6 +61,30 @@ var spine;
error(path, "Couldn't load image " + path); error(path, "Couldn't load image " + path);
}; };
}; };
AssetManager.prototype.loadTextureData = function (path, data, success, error) {
var _this = this;
if (success === void 0) { success = null; }
if (error === void 0) { error = null; }
path = this.pathPrefix + path;
this.toLoad++;
var img = new Image();
img.src = data;
img.onload = function (ev) {
var texture = _this.textureLoader(img);
_this.assets[path] = texture;
_this.toLoad--;
_this.loaded++;
if (success)
success(path, img);
};
img.onerror = function (ev) {
_this.errors[path] = "Couldn't load image " + path;
_this.toLoad--;
_this.loaded++;
if (error)
error(path, "Couldn't load image " + path);
};
};
AssetManager.prototype.get = function (path) { AssetManager.prototype.get = function (path) {
path = this.pathPrefix + path; path = this.pathPrefix + path;
return this.assets[path]; return this.assets[path];

File diff suppressed because one or more lines are too long

View File

@ -362,6 +362,7 @@ declare module spine {
constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string); constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; 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; 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; get(path: string): any;
remove(path: string): void; remove(path: string): void;
removeAll(): void; removeAll(): void;

View File

@ -1824,6 +1824,30 @@ var spine;
error(path, "Couldn't load image " + path); error(path, "Couldn't load image " + path);
}; };
}; };
AssetManager.prototype.loadTextureData = function (path, data, success, error) {
var _this = this;
if (success === void 0) { success = null; }
if (error === void 0) { error = null; }
path = this.pathPrefix + path;
this.toLoad++;
var img = new Image();
img.src = data;
img.onload = function (ev) {
var texture = _this.textureLoader(img);
_this.assets[path] = texture;
_this.toLoad--;
_this.loaded++;
if (success)
success(path, img);
};
img.onerror = function (ev) {
_this.errors[path] = "Couldn't load image " + path;
_this.toLoad--;
_this.loaded++;
if (error)
error(path, "Couldn't load image " + path);
};
};
AssetManager.prototype.get = function (path) { AssetManager.prototype.get = function (path) {
path = this.pathPrefix + path; path = this.pathPrefix + path;
return this.assets[path]; return this.assets[path];

File diff suppressed because one or more lines are too long

View File

@ -362,6 +362,7 @@ declare module spine {
constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string); constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; 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; 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; get(path: string): any;
remove(path: string): void; remove(path: string): void;
removeAll(): void; removeAll(): void;

View File

@ -1824,6 +1824,30 @@ var spine;
error(path, "Couldn't load image " + path); error(path, "Couldn't load image " + path);
}; };
}; };
AssetManager.prototype.loadTextureData = function (path, data, success, error) {
var _this = this;
if (success === void 0) { success = null; }
if (error === void 0) { error = null; }
path = this.pathPrefix + path;
this.toLoad++;
var img = new Image();
img.src = data;
img.onload = function (ev) {
var texture = _this.textureLoader(img);
_this.assets[path] = texture;
_this.toLoad--;
_this.loaded++;
if (success)
success(path, img);
};
img.onerror = function (ev) {
_this.errors[path] = "Couldn't load image " + path;
_this.toLoad--;
_this.loaded++;
if (error)
error(path, "Couldn't load image " + path);
};
};
AssetManager.prototype.get = function (path) { AssetManager.prototype.get = function (path) {
path = this.pathPrefix + path; path = this.pathPrefix + path;
return this.assets[path]; return this.assets[path];

File diff suppressed because one or more lines are too long

View File

@ -362,6 +362,7 @@ declare module spine {
constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string); constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; 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; 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; get(path: string): any;
remove(path: string): void; remove(path: string): void;
removeAll(): void; removeAll(): void;

View File

@ -1824,6 +1824,30 @@ var spine;
error(path, "Couldn't load image " + path); error(path, "Couldn't load image " + path);
}; };
}; };
AssetManager.prototype.loadTextureData = function (path, data, success, error) {
var _this = this;
if (success === void 0) { success = null; }
if (error === void 0) { error = null; }
path = this.pathPrefix + path;
this.toLoad++;
var img = new Image();
img.src = data;
img.onload = function (ev) {
var texture = _this.textureLoader(img);
_this.assets[path] = texture;
_this.toLoad--;
_this.loaded++;
if (success)
success(path, img);
};
img.onerror = function (ev) {
_this.errors[path] = "Couldn't load image " + path;
_this.toLoad--;
_this.loaded++;
if (error)
error(path, "Couldn't load image " + path);
};
};
AssetManager.prototype.get = function (path) { AssetManager.prototype.get = function (path) {
path = this.pathPrefix + path; path = this.pathPrefix + path;
return this.assets[path]; return this.assets[path];

File diff suppressed because one or more lines are too long