mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +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.pause();
|
||||
}
|
||||
} else if (!this.currentViewport) {
|
||||
this.setViewport(entry.animation!);
|
||||
} else {
|
||||
if (this.currentViewport.x === undefined) {
|
||||
this.setViewport(entry.animation!);
|
||||
}
|
||||
if (!config.animation) {
|
||||
config.animation = entry.animation?.name
|
||||
}
|
||||
this.play();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user