Can I load a background image with TileMap.images (Image Layer from Tiled)?


#1

Hi all,

I’m new to Phaser 3. The documentation seems slightly scattered across the web so I’m hoping someone can finally clear up my confusion.

Is it possible to load a background image from Tilemap.images array?

I have an Image Layer within Tiled and loaded in via const map = this.load.tilemapTiledJSON(). If I look into map.images I see the image loaded into Tiled.

However, after doing some digging I realized map.images is a basic array of objects. Each object contains:

{
    alpha: 1
    image: "../tilesets/landscape.png"
    name: "background"
    ​​​properties: Object {  }
    ​​​visible: true
    ​​​x: 0
    ​​​y: 0
}

It looks like the only useful information it contains is the path to the image. Is there even a point to loading background images from Image Layers within Tiled?