Davide Thank you for the quick response! I was able to patch the functionality in drawFrame and keep the initial viewport zoom and placement of the viewport by adding a new a variable in the SpinePlayer constructor. I named it frame_count and initialized it with 0. then I wrapped those 3 lines in an if condition:
if(this.frame_count < this.config.fps)
{
renderer.camera.zoom = this.canvas.height / this.canvas.width > viewport.height / viewport.width ? viewport.width / this.canvas.width : viewport.height / this.canvas.height;
renderer.camera.position.x = viewport.x + viewport.width / 2;
renderer.camera.position.y = viewport.y + viewport.height / 2;
this.frame_count++;
}
and add a reset at dispose()
dispose() {
this.frame_count = 0;
for (let i = 0; i < this.pages.length; i++) {
this.pages.texture?.dispose();
}
}
Pretty sure this is not the best way to do this but I was not able to find another way to determine how to limit the camera resetting. I am using an FPS of 120 but 30 and 60 work fine as well. If FPS is less than 17 player runs but nothing is displayed.