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

Offen
#331 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
javascript
Bereich
game-dev

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
                }
            }
      }
]
Vorherrschende Sprache
JavaScript
Sterne
1.4k
Forks
485
Ø Merge
1 T. 2 Std.
Gemergte PRs (30 T.)
9

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus phaserjs/phaser-ce

Alle Issues in phaserjs/phaser-ce

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.