Reads files from the Tiled editor into Rust
Maintenance release. Updates dependencies and documentation.
Image
docs. (#270)libflate
dependency to 2.0.0
. (#279)next
branch by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/271
Full Changelog: https://github.com/mapeditor/rs-tiled/compare/v0.11.1...v0.11.2
Adds WASM support and support for staggered maps.
wasm
feature; Check README.md
for instructions on how to set it up. (#252)stagger_axis
and stagger_index
property. (#262)as_x
functions for layer types. (#235)as_x
fns for layer types by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/235
Full Changelog: https://github.com/mapeditor/rs-tiled/compare/v0.11.0...v0.11.1
A really big feature update that adds support for virtual file systems, templates, text objects and more!
If you are planning to upgrade to the new version, check out the full release notes on the CHANGELOG.
Layer
suffix from LayerType
variants by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/203
Chunk
& ChunkWrapper
by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/231
Full Changelog: https://github.com/mapeditor/rs-tiled/compare/v0.10.3...v0.11.0###
Adds support for Wang Sets, Tiled 1.9, tile offsets and updates deps.
get_attrs
by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/219
class
property by @barthap in https://github.com/mapeditor/rs-tiled/pull/238
Full Changelog: https://github.com/mapeditor/rs-tiled/compare/v0.10.2...v0.10.3
This update fixes some small issues and also adds basic chunk utilities as described in #210, improving infinite tile layer usage.
.travis.yml
by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/204
Full Changelog: https://github.com/mapeditor/rs-tiled/compare/v0.10.1...v0.10.2
This update fixes a small documentation issue and adds a more streamlined way of loading assets. The old methods for loading maps and tilesets have been deprecated.
Before:
use tiled::{FilesystemResourceCache, Map};
fn main() {
let map = Map::parse_file(
"assets/tiled_base64_zlib.tmx",
&mut FilesystemResourceCache::new(),
)
.unwrap();
println!("{:?}", map);
println!("{:?}", map.tilesets()[0].get_tile(0).unwrap().probability);
}
Now:
use tiled::Loader;
fn main() {
let mut loader = Loader::new();
let map = loader.load_tmx_map("assets/tiled_base64_zlib.tmx").unwrap();
println!("{:?}", map);
println!("{:?}", map.tilesets()[0].get_tile(0).unwrap().probability);
let tileset = loader.load_tsx_tileset("assets/tilesheet.tsx").unwrap();
assert_eq!(*map.tilesets()[0], tileset);
}
See the docs for more detail.
Full Changelog: https://github.com/mapeditor/rs-tiled/compare/v0.10.0...v0.10.1
A big update!
This new release changes the entire interface, focusing on making everything more streamlined. The four most important changes are:
ResourceCache
trait, used to speed up loading for maps that share external assets (for now, only tilesets).Layer
, Tile
, Object
, etc) which Defer
to the regular data types, but conveniently also contain a reference to the parent structure (Tileset in the case of tiles, Map for everything else) for easy access to functions that require both the data type and its container.Of course, there have been a lot of more additions and changes, including new features, bugfixes and everything in between.
For 0.9.5 users it is very recommended that you check out the new examples for porting old code over.
Another important update is that the repository has been moved to the official mapeditor organization and there are now three more maintainers: @aleokdev (me), @bjorn (creator of Tiled) and @PieKing1215.
I'd like to thank @mattyhall for having maintained this crate for the last 7 years and for letting us continue the work of maintaining it, @bjorn for all the code reviews and feedback provided, and of course all the contributors that have joined us and users who have provided feedback and bug reports!
Here's the full changelog:
Color
parsing issues by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/150
Data
types from the interface by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/163
Tile
over a data type by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/172
Color
for color property type by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/180
Image::source
+ example by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/186
TiledError
to Error
+ Add Result
type by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/185
Tileset::iter
, remove Iterator types by @aleokdev in https://github.com/mapeditor/rs-tiled/pull/189
Full Changelog: https://github.com/mapeditor/rs-tiled/compare/v0.9.5...v0.10.0