All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Improved documentation on
Map::layers
andMap::get_layer
. (#306)
- Add
text
,width
andheight
members toObjectShape::Text
. (#278) - Implement
ResourceReader
for appropiate functions. (#272) Read the README's FAQ for more information about this change. - Support for custom type properties. (#283)
- Underlying reader for maps now uses a BufReader, which should give a large performance boost. (#286)
- Update
base64
to0.22.1
. (#294) - Update
libflate
to2.1.0
. (#294) - Update
zstd
to0.13.1
. (#294)
ObjectShape::Text::kerning
's default value, which should have been set totrue
instead offalse
. (#278)- Unhandled u32 parsing panic in
decode_csv
. (#288) - Panic in
<Color as FromStr>::from_str
when parsing non-ascii input. (#290) - Index out of bounds in
InfiniteTileLayerData
when parsing a chunk. (#289) - Panic on unexpected XML in
ObjectData
content. (#291) - Divide by zero when parsing a tileset with height/width dimension of 0. (#292)
- Replace
libflate
withflate2
. (#281)
- Updated
Image
docs. (#270) - Update
libflate
dependency to2.0.0
. (#279) - Fix some doc links. (#273)
- Update ggez example to 0.9.3.
- WASM support +
wasm
feature; CheckREADME.md
for instructions on how to set it up. (#252) - Support for staggered maps. Maps now have an
stagger_axis
andstagger_index
property. (#262)
- Template support!
Templates are loaded automatically when they are encountered, and are treated as intermediate
objects. As such,
ResourceCache
has now methods for both getting and inserting them (#170). - VFS support (#199).
as_x
functions for layer types (#235).- Text object support (#230).
cache_mut
loader property (#207).
LayerType
variants have been stripped from theLayer
suffix (#203).TileData::tile_type
has been renamed toTileData::user_type
. (#253)Orientation
'sFromStr
impl now returnsOrientationParseError
as the error type. (#253)ResourceCache::get_or_try_insert_tileset_with
has been replaced byResourceCache::insert_tileset
.DefaultResourceCache
's members have been made public.
ObjectData::obj_type
,ObjectData::width
,ObjectData::height
. (#253)TileData::tile_type
(which has been renamed toTileData::user_type
) (#253)Loader::load_tmx_map_from
,Loader::load_tsx_tileset_from
: This was a hacky solution to loading embedded maps and tilesets. While there is no direct, ready-to-use replacement for this within the crate, you can create aResourceReader
that works like this function previously did:
struct EmbeddedResourceReader<R: Read> {
reader: Option<R>,
}
impl<R: Read> EmbeddedResourceReader<R> {
fn new(reader: R) -> Self {
Self {
reader: Some(reader),
}
}
}
impl<R: Read> tiled::ResourceReader for EmbeddedResourceReader<R> {
type Resource = R;
type Error = std::io::Error;
fn read_from(&mut self, path: &Path) -> std::result::Result<Self::Resource, Self::Error> {
if path == "the_path_to_load.tmx" {
if let Some(x) = self.reader.take() {
Ok(x)
} else {
Err(std::io::Error::from(ErrorKind::ResourceBusy))
}
} else {
Err(std::io::Error::from(ErrorKind::NotFound))
}
}
}
Note: This works for both maps and tilesets, and you can extend to use more than one reader if neccessary, which is something you couldn't do before.
- Support for Wang sets.
- Support for Tiled 1.9
Class
property. Maps, tilesets and layers now have auser_type
property. - Support for tile offsets. Tilesets now have an
offset_x
andoffset_y
property.
Object::obj_type
UseObject::user_type
instead.
- Update
zstd
to0.12.0
. - Update
sfml
dev dependency to0.20.0
. - Update
base64
to0.21.0
.
- Map-wrapped chunks:
ChunkWrapper
. - Ability to access infinite tile layer chunks via
InfiniteTileLayer::chunks
,InfiniteTileLayerData::chunk_data
,InfiniteTileLayerData::get_chunk_data
&InfiniteTileLayer::get_chunk
, as well as chunk data viaChunk::get_tile_data
&ChunkWrapper::get_tile
. TileLayer::width
&TileLayer::height
for ergonomic access of width/height.FiniteTileLayerData::get_tile_data
,InfiniteTileLayerData::get_tile_data
.Default
derived implementation forLoader
&FilesystemResourceCache
- Update
zstd
to0.11.0
.
Loader
type for loading map and tileset files without having to necessarily mention the cache to use.
Map::parse_reader
: UseLoader::parse_tmx_map_from
instead.Map::parse_file
: UseLoader::load_tmx_map
instead.Tileset::parse_reader
: UseLoader::load_tsx_tileset
instead.
- Fix message when a tileset is missing the
tilecount
attribute (#194).
As this release changes practically the entire interface of the crate, it is recommended that you check out the examples instead of the changelog if you are migrating from an older version.
- Documentation to all crate items.
- Group layer support.
- Layer ID parsing.
- Object property parsing.
- Support for multiline string properties.
- SFML example.
Result
type.Layer::parallax_x
&Layer::parallax_y
.Tileset::columns
.- Missing derive and inline attributes.
- Tests for
zstd
-compressed files.
- Set the minimum Tiled TMX version to 0.13.
- Refactor crate interface and internals to be more consistent, sound and easy to use.
- Hide GIDs as internal data; Provide a cleaner API.
- Contain all layer types in an enum as opposed to different containers.
- Rename
TiledError
toError
. Tileset::tilecount
is no longer optional.- Improve errors.
- Use
Color
type in color properties. - Rename "colour"-related appareances to "color".
- Use
impl AsRef<Path>
where appropiate. - Change
Tileset::image
to be a single image at most instead of a vector. - Update README.
- Make layer and tileset names optional, defaulting to an empty string.
- Reorganize crate internally.
- Update
zstd
to0.9
.
- Color parsing issues: #148
Layer::layer_index
, as all layer types are now stored in a common container.Map::source
, since it is known from where the load function was called.
- Support for file properties.
- Parsing csv data without newlines (LDtk).
- Support for layer offsets.
- Feature gate zstd to allow targeting wasm32-unknown-unknown.
- Object visibility parsing.
- Support for base64 and zstd compressed maps.
- Support for point objects.
- Support for infinite maps.
- Properties to Tilesets.
- Test verifying
tileset.properties
. - Tileset tile count parsing.
- Object
width
andheight
fields.
- Make fields on
Frame
pub
.
- Migration to
rust 2018
and?