Attempting to utilize the multiatlas functionality in Phaser alongside TexturePacker.
Encountering this issue:
VM32201:1 GET http://localhost:8080/bg-sd.json 404 (Not Found)
Texture.js:250 Texture.frame missing: 1/1.png
The JSON file can actually be found at
http://localhost:8080/dist/img/bg-sd.json
and is accessible. Similarly, http://localhost:8080/dist/img/bg-1-sd.png
is also reachable.
I am loading the atlas as follows:
scene.load.multiatlas({
key: 'bg-sd',
atlasURL: 'dist/img/bg-sd.json',
baseURL: 'dist/img'
});
The 1/1.png
frame is present in the file:
{
"textures": [
{
"image": "bg-1-sd.png",
"format": "RGBA8888",
"size": {
"w": 1924,
"h": 2039
},
"scale": 0.5,
"frames": [
{
"filename": "1/1.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 960,
"h": 540
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 960,
"h": 540
},
"frame": {
"x": 1,
"y": 1,
"w": 960,
"h": 540
}
},
Various combinations of the path
and baseURL
settings have been attempted, but the file from dist/img
remains unable to load.