[ts][player] Add startRendering method to restart rendering, if it was stopped.

This commit is contained in:
Davide Tantillo 2024-04-24 17:16:35 +02:00
parent 60f3aeabfc
commit da05fb8f92
No known key found for this signature in database
GPG Key ID: 473ABA42CC0FDDC6

View File

@ -936,6 +936,11 @@ export class SpinePlayer implements Disposable {
}
}
startRendering () {
this.stopRequestAnimationFrame = false;
requestAnimationFrame(() => this.drawFrame());
}
stopRendering () {
this.stopRequestAnimationFrame = true;
}