Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for non zero origin for the map, and fix a scaling bug #11

Merged
merged 3 commits into from
Aug 28, 2020
Merged

Add support for non zero origin for the map, and fix a scaling bug #11

merged 3 commits into from
Aug 28, 2020

Conversation

Lamakaio
Copy link

The TiledMapComponents bundle now takes a translation which is added to the previous default translation. I don't think it was possible before, but I'm new at this, so I might be wrong.
I also changed the scaling to x4 everywhere, it was previously x4 for map centering and x5 in the .vert file for display.
The scaling could also be fixed to x5 everywhere, I just changed the one that was simpler.

Timothée Le Berre added 2 commits August 28, 2020 12:15
…it was actually scaled 5 times. I put the base scaling to 4, but it could also be fixed by changing map.center()
@StarArawn StarArawn self-requested a review August 28, 2020 14:23
Copy link
Owner

@StarArawn StarArawn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think overall this looks good, can we remove the scaling in the vert shader? Possibly replace it with some camera zoom instead?

src/tile_map.vert Show resolved Hide resolved
src/map.rs Show resolved Hide resolved
@StarArawn StarArawn self-requested a review August 28, 2020 16:12
@StarArawn StarArawn merged commit 872e31a into StarArawn:master Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants