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

Abierto
#331 7 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript
Área
game-dev

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
                }
            }
      }
]
Lenguaje dominante
JavaScript
Estrellas
1.4k
Forks
485
Merge medio
1 d 2 h
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de phaserjs/phaser-ce

Todos los issues de phaserjs/phaser-ce

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.