StarArawn / bevy_tiled

A plugin for rendering tiled maps.
MIT License
151 stars 40 forks source link

Remove hardcoded scaling, allow scaling through the `Transform` #23

Closed Kurble closed 3 years ago

Kurble commented 3 years ago

First of all, thanks for this crate, it saves a lot of work!

Anyway, for this crate to be usable to me I needed to get rid of the hardcoded 4 times scaling, as zooming the camera is not really an acceptable solution. This pull request allows to scale the tiled map dynamically through it's Transform component, by simply setting the scale. As the transform had to be performed during vertex shading anyway, this comes at no cost at all.

I understand that this is a breaking change, but I think it's a reasonable one as I would expect more people to run into this problem.

I also removed the normals from the generated Meshes, since they are not needed.