CarlLydon

Hello,

I'm starting to get the hang of this program, but I'm not a .js coder, and the coders are busy right now...

I'm trying to use the spine-player.js to play an animation. I've managed to display a test animation successfully before.

My current animation involves scrolling a city (see attachment). The game it's going into is 2048px wide, but the assets extend beyond the screen and scroll in. I strategically turn attachments on and off so things won't be rendering so much outside the view screen.

My problem is, I don't know how to center animations in the player, and all I'm getting is a blank screen and the controls. The assets have loaded.

I suspect that player is starting from the upper hand corner or something, which is blank, instead of using the center. I've tried un-attaching elements on the setup screen so that maybe the player would count the central box as the viewing rectangle, but that didn't work, plus I noticed a bug in the exporter that if a slot starts out unfilled, the coders can't find the slot because it doesn't export. Plus, I'm not sure if the viewing rect is based on the largest size of any of the animations regardless of the setup screen, I think it is.

So, I don't do HTML of .js, (I've done C# and Java), I've experimented with changing this line:

<div id="player-container" style="width: 100%; height: 100vh"></div>

But nothing happens.

Thanks for any help.


Screen Shot 2022-09-21 at 10.55.11 AM.png


---

Also, I have the same sort of problem with the QuickTime export. It always makes the animation much larger than the intended viewing rectangle if anything starts out outside the rect.

---

Edit:

I tried removing all scrolling, and having nothing extending beyond the borders of the background, and it still doesn't work, so maybe my original theory about centering the animation is wrong.

The console is showing no errors, all the assets appear to be loaded, and all I see is a black screen and the controls.

This is the link:

http://www.carllydon.net/dropbox/cityScroll/

What might be a common reason for the spine player to show nothing?
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
CarlLydon
  • Postovi: 5

SilverStraw

Your JSON version reads, "3.7-from-3.8-from-4.0-from-4.1.09".
Based on your animation timeline attribute, your JSON was exported for version 3 and the Spine player used is version 4.
SilverStraw
  • Postovi: 86

CarlLydon

Thank you, I will see if that makes a difference. The programmers need 3.7 for use with Pixi, for some reason.
CarlLydon
  • Postovi: 5


Natrag na Runtimes