Giter VIP home page Giter VIP logo

rs-tiled's Introduction

rs-tiled

tiled = "0.10.1"

Rust Crates.io

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 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);
}

Licences

assets/tilesheet.png by Buch

Licenced under MIT

rs-tiled's People

Contributors

mattyhall avatar aleokdev avatar pieking1215 avatar bjorn avatar kevinbalz avatar tatrix avatar axelmagn avatar frizi avatar jengamon avatar tatref avatar anti-alias avatar sinistersnare avatar guodman avatar mystal avatar rsaarelm avatar afonso360 avatar blockcat avatar connicpu avatar issotm avatar jonil avatar nicoxxl avatar siegelord avatar alec-deason avatar aep avatar dmtaub avatar nnubes256 avatar felixmcfelix avatar martinlindhe avatar mbstavola avatar mswiger avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.