rs-tiled
= "0.11.1"
A crate for reading TMX (map) and TSX (tileset) files from the Tiled Map Editor into Rust. It provides a huge set of features as well as a strong wrapper over internal features such as GIDs.
Documentation is available on docs.rs.
Code contributions are welcome as are bug reports, documentation, suggestions and criticism.
The minimum supported TMX version is 0.13.
Example
use Loader;
WASM
The crate supports WASM, but since it does not currently support asynchronous loading, there are some gotchas.
- First, to make it work on any WASM target, enable the wasm feature, like so:
[]
# ...
= { = ".....", = ["wasm"] }
- Second, since you cannot use the filesystem as normally on the web, you cannot use
FilesystemResourceReader. As such, you'll need to implement your ownResourceReader. This is a pretty simple task, as you just need to return anything that isReadable when given a path, e.g.:
use Cursor;
;
Check the ResourceReader docs for more information.
Licences
assets/tilesheet.png by Buch
Licenced under MIT