nak3ddogs Posted January 7, 2015 Share Posted January 7, 2015 hi! how can i use a frame of atlas for tilemap's tileset image? i cant? i have to copy out and make a new bitmapdata and use that? pls. Link to comment Share on other sites More sharing options...
lexfrost Posted January 11, 2016 Share Posted January 11, 2016 Is there a solution to this? I'm currently using the below where 'tilesetimage1' is a preloaded image: this.tilemap.addTilesetImage('tilemap','tilesetImage1'); I'd like to use an image from an atlas for the tilemap Thanks Link to comment Share on other sites More sharing options...
Igor Georgiev Posted March 1, 2017 Share Posted March 1, 2017 Looking for the same thing. I tried adding image to the game and then using that image, but it doesn't work. Link to comment Share on other sites More sharing options...
hicotech Posted March 11, 2017 Share Posted March 11, 2017 I did this.. if this is what you are looking for function preload() { game.load.atlas('terrain', 'resources/images/terrain/terrain.png', 'resources/images/terrain/terrain.json', Phaser.Loader.TEXTURE_ATLAS_JSON_HASH); game.load.tilemap('staticMap', 'resources/map/map.json', null, Phaser.Tilemap.TILED_JSON); } function create() { // Create map map = game.add.tilemap('staticMap'); map.addTilesetImage('terrain', 'terrain'); // Create layers grass = map.createLayer('Grass'); stones = map.createLayer('Stones'); } Link to comment Share on other sites More sharing options...
Recommended Posts