mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
[ts][player] Fix state.setAnimation and player.setViewport not working on success callback.
This commit is contained in:
parent
44646bedfa
commit
6792bc72c1
@ -561,8 +561,13 @@ export class SpinePlayer implements Disposable {
|
|||||||
this.setViewport(entry.animation!);
|
this.setViewport(entry.animation!);
|
||||||
this.pause();
|
this.pause();
|
||||||
}
|
}
|
||||||
} else if (!this.currentViewport) {
|
} else {
|
||||||
|
if (this.currentViewport.x === undefined) {
|
||||||
this.setViewport(entry.animation!);
|
this.setViewport(entry.animation!);
|
||||||
|
}
|
||||||
|
if (!config.animation) {
|
||||||
|
config.animation = entry.animation?.name
|
||||||
|
}
|
||||||
this.play();
|
this.play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user