• Runtimes
  • Viewport Alignment in Spine Player

A feature suggestion - I'm using the Spine Player in my application, and it would be very useful to control the alignment of the viewport - i.e. push it to the left or right within the canvas.
The way the viewport is defined by the initial animation is totally fine - I just want to control where that is placed in the available space. Currently it's always centred.
Cheers!

Related Discussions
...

Erika True but unless I'm missing something that doesn't include any settings for alignment?

  • تم التحرير

Ah, gotcha. That would make for a nice feature, I've added a task for it:
EsotericSoftware/spine-runtimes2468

Until then, if you're savvy enough to change the player code, this is where the centering happens:

renderer.camera.position.x = viewport.x + viewport.width / 2;
renderer.camera.position.y = viewport.y + viewport.height / 2;

Nice one thanks.