Giter Club home page Giter Club logo

Comments (6)

bjorn avatar bjorn commented on September 25, 2024

I got only 1 chunk with width: 2 and height: 2 positioned at (0,0). Where are the rest of the tiles? A more general question is what's the easiest way to iterate through all of the tiles on an infinite layer?

Hmm, chunks actually don't have an individual width and height, so I'm not sure which width and height you're referring to there? Since chunks are currently always 16x16, it is at least expected that for that map there is only a single chunk.

The documentation for InfiniteTileLayer::chunks provides an example showing how to iterate the tiles in a chunk.

from rs-tiled.

feelingsonice avatar feelingsonice commented on September 25, 2024

@bjorn I see. Thanks for the clarification.

An unrelated question for you. I want to load a tmx map async. What would be the easiest way to do that? an async reader?

from rs-tiled.

aleokdev avatar aleokdev commented on September 25, 2024

I want to load a tmx map async. What would be the easiest way to do that? an async reader?

Since the crate has no async support (it'd require an entire rewrite of the interface) the best option is to either block or load the map on another thread and then send it over via a channel or some other send mechanism.

from rs-tiled.

bjorn avatar bjorn commented on September 25, 2024

@feelingsonice I guess we can close this issue now, but I'm still curious, where did you see the "width: 2 and height: 2" reported in the original question?

from rs-tiled.

feelingsonice avatar feelingsonice commented on September 25, 2024

Screenshot 2023-12-26 at 1 08 20 PM

I think it was referring to the width and height in that screenshot. But I see now that the chunk width and height are 16x16

from rs-tiled.

bjorn avatar bjorn commented on September 25, 2024

I think it was referring to the width and height in that screenshot.

Hmm, yes, that looks quite confusing. Since the map is marked as Infinite, the map's Width and Height properties are meaningless / not actually used. Would be nice to reflect this better in Tiled's UI.

from rs-tiled.

Related Issues (20)

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.