-
-
Notifications
You must be signed in to change notification settings - Fork 913
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Compute scale in TileLayers based on native map tile size rather…
… than image sizes to support oversized/undersized tiles. (#2634) Compute isometric tile scale based on the map's tile size rather than the tile image's default size. This fixes an issue where scale was incorrect when those two sizes differed.
- Loading branch information
Showing
13 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/flame_tiled/test/assets/oversized_tiles_hexagonal.tmx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<map version="1.10" tiledversion="1.10.1" orientation="hexagonal" renderorder="right-down" width="4" height="4" tilewidth="16" tileheight="16" infinite="0" hexsidelength="8" staggeraxis="y" staggerindex="odd" nextlayerid="2" nextobjectid="1"> | ||
<tileset firstgid="1" name="0x72_DungeonTilesetII_v1.4" tilewidth="32" tileheight="32" tilecount="256" columns="16"> | ||
<image source="0x72_DungeonTilesetII_v1.4.png" width="512" height="512"/> | ||
</tileset> | ||
<layer id="1" name="Tile Layer 1" width="4" height="4"> | ||
<data encoding="base64" compression="zlib"> | ||
eJxjYEAFrlA6lQE7KIbSJUC8AIgBKkgCMg== | ||
</data> | ||
</layer> | ||
</map> |
11 changes: 11 additions & 0 deletions
11
packages/flame_tiled/test/assets/oversized_tiles_isometric.tmx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<map version="1.10" tiledversion="1.10.1" orientation="isometric" renderorder="right-down" width="4" height="4" tilewidth="16" tileheight="16" infinite="0" nextlayerid="2" nextobjectid="1"> | ||
<tileset firstgid="1" name="0x72_DungeonTilesetII_v1.4" tilewidth="32" tileheight="32" tilecount="256" columns="16"> | ||
<image source="0x72_DungeonTilesetII_v1.4.png" width="512" height="512"/> | ||
</tileset> | ||
<layer id="1" name="Tile Layer 1" width="4" height="4"> | ||
<data encoding="base64" compression="zlib"> | ||
eJxjYMAOiqB0EpQOhtKFaOoALSgBmQ== | ||
</data> | ||
</layer> | ||
</map> |
11 changes: 11 additions & 0 deletions
11
packages/flame_tiled/test/assets/oversized_tiles_orthogonal.tmx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="4" height="4" tilewidth="16" tileheight="16" infinite="0" nextlayerid="2" nextobjectid="1"> | ||
<tileset firstgid="1" name="0x72_DungeonTilesetII_v1.4" tilewidth="32" tileheight="32" tilecount="256" columns="16"> | ||
<image source="0x72_DungeonTilesetII_v1.4.png" width="512" height="512"/> | ||
</tileset> | ||
<layer id="1" name="Tile Layer 1" width="4" height="4"> | ||
<data encoding="base64" compression="zlib"> | ||
eJxjYEAFxVC6hAE7KITSRVAaADKQAcs= | ||
</data> | ||
</layer> | ||
</map> |
11 changes: 11 additions & 0 deletions
11
packages/flame_tiled/test/assets/oversized_tiles_staggered.tmx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<map version="1.10" tiledversion="1.10.1" orientation="staggered" renderorder="right-down" width="4" height="4" tilewidth="16" tileheight="16" infinite="0" staggeraxis="y" staggerindex="odd" nextlayerid="2" nextobjectid="1"> | ||
<tileset firstgid="1" name="0x72_DungeonTilesetII_v1.4" tilewidth="32" tileheight="32" tilecount="256" columns="16"> | ||
<image source="0x72_DungeonTilesetII_v1.4.png" width="512" height="512"/> | ||
</tileset> | ||
<layer id="1" name="Tile Layer 1" width="4" height="4"> | ||
<data encoding="base64" compression="zlib"> | ||
eJxjYMANDgBxEppYMZQuAeI+IAYANIgCmA== | ||
</data> | ||
</layer> | ||
</map> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters