Skip to content

Commit

Permalink
[ts][player] Add startRendering method to restart rendering, if it wa…
Browse files Browse the repository at this point in the history
…s stopped.
  • Loading branch information
davidetan committed Apr 24, 2024
1 parent 60f3aea commit da05fb8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spine-ts/spine-player/src/Player.ts
Expand Up @@ -936,6 +936,11 @@ export class SpinePlayer implements Disposable {
}
}

startRendering () {
this.stopRequestAnimationFrame = false;
requestAnimationFrame(() => this.drawFrame());
}

stopRendering () {
this.stopRequestAnimationFrame = true;
}
Expand Down

0 comments on commit da05fb8

Please sign in to comment.