How to export infinite map to finite map? #3028
-
|
I'm trying to make a custom export format with Javascript following this guide which would "crop" an infinite map (i.e. undefined tiles are removed). The problem is that I can't find any way to get a layer's Any ideas on this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
I think you should be able to use Are you writing a custom format entirely or would you actually like to just export as finite map in an existing format supported by Tiled? I think there's still a problem with doing that latter since you can't modify the map passed into the |
Beta Was this translation helpful? Give feedback.
I think you should be able to use
TileLayer.regionto get the region occupied by tiles. While the region doesn't currently provide much introspection, it does have aboundingRectproperty from which you can derive the values forstartx,startyetc.Are you writing a custom format entirely or would you actually like to just export as finite map in an existing format supported by Tiled? I think there's still a problem with doing that latter since you can't modify the map passed into the
writefunction, so let me know if you need help with that.