@@ -86,6 +86,8 @@ class GodotTilemapExporter {
86
86
* Creates the Tilemap nodes. One Tilemap per one layer from Tiled.
87
87
*/
88
88
setTileMapsString ( ) {
89
+ const mode = this . map . orientation === TileMap . Isometric ? 1 : undefined
90
+
89
91
// noinspection JSUnresolvedVariable
90
92
for ( let i = 0 ; i < this . map . layerCount ; ++ i ) {
91
93
@@ -100,7 +102,7 @@ class GodotTilemapExporter {
100
102
if ( ! ld . isEmpty ) {
101
103
const tileMapName = idx === 0 ? layer . name || "TileMap " + i : ld . tileset . name || "TileMap " + i + "_" + idx ;
102
104
this . mapLayerToTileset ( layer . name , ld . tilesetID ) ;
103
- this . tileMapsString += this . getTileMapTemplate ( tileMapName , ld . tilesetID , ld . poolIntArrayString , layer , ld . parent ) ;
105
+ this . tileMapsString += this . getTileMapTemplate ( tileMapName , mode , ld . tilesetID , ld . poolIntArrayString , layer , ld . parent ) ;
104
106
}
105
107
}
106
108
} else if ( layer . isObjectLayer ) {
@@ -446,7 +448,7 @@ ${this.tileMapsString}
446
448
* Template for a tilemap node
447
449
* @returns {string }
448
450
*/
449
- getTileMapTemplate ( tileMapName , tilesetID , poolIntArrayString , layer , parent = "." ) {
451
+ getTileMapTemplate ( tileMapName , mode , tilesetID , poolIntArrayString , layer , parent = "." ) {
450
452
const tileWidth = layer . map . tileWidth === undefined ? 16 : layer . map . tileWidth ;
451
453
const tileHeight = layer . map . tileHeight === undefined ? 16 : layer . map . tileHeight ;
452
454
const groups = splitCommaSeparated ( layer . property ( "groups" ) ) ;
@@ -460,7 +462,8 @@ ${this.tileMapsString}
460
462
tile_set : `ExtResource( ${ tilesetID } )` ,
461
463
cell_size : `Vector2( ${ tileWidth } , ${ tileHeight } )` ,
462
464
cell_custom_transform : `Transform2D( 16, 0, 0, 16, 0, 0 )` ,
463
- format : "1" ,
465
+ format : 1 ,
466
+ mode : mode ,
464
467
tile_data : `PoolIntArray( ${ poolIntArrayString } )` ,
465
468
z_index : typeof zIndex === 'number' && ! isNaN ( zIndex ) ? zIndex : undefined
466
469
} ) ;
0 commit comments