Hi! I’m making a test, playable game (Phaser + Spine, assembly into one index.html should be). What I use is on the screen;
Problem:
Spine animations (in .atlas, .json, .png formats) work in dev mode, but after the build (vite build) the character is not displayed, because the .atlas file contains a link to .png, but this link is not converted to base64 during the build. As a result, after the build, atlas cannot find the image.
I’ve already tried:
-
Manually insert base64 into HTML (partially works, cumbersome).
-
Tried with phaser cache and imports via atlas?raw, but it didn’t work, a rather specific approach.
Question:
How to properly load spine animation in Phaser + spine-phaser-v4 so that it:
- Works after assembly (in one HTML file),
- Pulls .png from .atlas (or its base64 equivalent),
- Does not require manual insertion of base64 into HTML
Maybe there is a spine+phaser project template, where the build goes to 1 index.html and png links from the spine atlas work correctly?