Comments (6)
I got only 1 chunk with
width: 2
andheight: 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.
@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.
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.
@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.
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.
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)
- Renaming the `0.11` branch to `next` and `master` to `current` HOT 2
- Yanking the 0.9.5 release HOT 1
- Polygon colliders load as Rect shapes HOT 5
- Support for Web Assembly HOT 15
- since tiled 1.9 object type is renamed into class HOT 3
- tiled::FiniteTileLayer::get_tile returns empty tiles HOT 7
- Optional GIDs feature HOT 1
- Default zstd feature is unhelpful for wasm builds HOT 2
- Add support for tileset offset
- Nicer way to iterate over layers of a given type HOT 2
- Expose map's staggeraxis and staggerindex options.
- Allow obtaining the path of tilemaps that have been loaded HOT 9
- Loading map with TSX tileset error "Missing attribute: tilecount" HOT 11
- More convenient way to load embedded maps HOT 8
- Image docs are outdated
- get rotaion of tile HOT 3
- Support for Tiled Custom Types HOT 2
- Unsigned indecies for getting a tile HOT 1
- Parsing may be slow for some use cases HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rs-tiled.