(data)
| 30 | * @param {object} data - tileset, tile, or layer data |
| 31 | */ |
| 32 | export function resolveEmbeddedImage(data) { |
| 33 | if (data.imagedata) { |
| 34 | const format = data.imageformat || "png"; |
| 35 | data.image = cacheEmbeddedImage( |
| 36 | data.imagedata, |
| 37 | format, |
| 38 | data.imagewidth ? +data.imagewidth : undefined, |
| 39 | data.imageheight ? +data.imageheight : undefined, |
| 40 | ); |
| 41 | delete data.imagedata; |
| 42 | delete data.imageformat; |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Convert a Tiled blend mode name to a canonical melonJS blend mode. |
no test coverage detected