parseTiledJSON error when using Tiled "Collection of images" tileset.

Aperta
#331 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
game-dev

Direzione di ricerca

Start by locating parseTiledJSON and the access to map.tiles[tile.index][2] described in the issue. Compare how that path handles the empty map.tiles array with the populated map.imagecollections data shown in the example. Done means collection-of-images tilesets parse without crashing; verify with a test using the supplied tileset structure.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement help wanted

In this case map.tiles is empty because there is no tileset image and each tile has it's own. Code crashes at sid = map.tiles[tile.index][2];

in the same time map.imagecollections is ok.

"tilesets":[
        {
         "columns":0,
         "firstgid":1,
         "grid":
            {
             "height":1,
             "orientation":"orthogonal",
             "width":1
            },
         "margin":0,
         "name":"test",
         "spacing":0,
         "tilecount":7,
         "tileheight":302,
         "tiles":
            {
             "0":
                {
                 "image":"chest.png",
                 "imageheight":200,
                 "imagewidth":200
                },
             "2":
                {
                 "image":"coopers.png",
                 "imageheight":172,
                 "imagewidth":222
                }
            }
      }
]
Lingua principale
JavaScript
Stelle
1.4k
Fork
485
Merge medio
1g 2h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di phaserjs/phaser-ce

Tutte le issue di phaserjs/phaser-ce

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.