[ts][player] Restored skelUrl.

This commit is contained in:
Davide Tantillo 2024-06-17 10:57:41 +02:00
parent 28a503a7ac
commit d1bbb102d3

View File

@ -291,6 +291,7 @@ export class SpinePlayer implements Disposable {
private validateConfig (config: SpinePlayerConfig) { private validateConfig (config: SpinePlayerConfig) {
if (!config) throw new Error("A configuration object must be passed to to new SpinePlayer()."); if (!config) throw new Error("A configuration object must be passed to to new SpinePlayer().");
if ((config as any).skelUrl) config.skeleton = (config as any).skelUrl;
if (!config.skeleton && !config.jsonUrl && !config.binaryUrl) throw new Error("A URL must be specified for the skeleton JSON or binary file."); if (!config.skeleton && !config.jsonUrl && !config.binaryUrl) throw new Error("A URL must be specified for the skeleton JSON or binary file.");
if (!config.scale) config.scale = 1; if (!config.scale) config.scale = 1;
if (!config.atlas && !config.atlasUrl) throw new Error("A URL must be specified for the atlas file."); if (!config.atlas && !config.atlasUrl) throw new Error("A URL must be specified for the atlas file.");