StarArawn / bevy_ecs_tilemap

A tilemap rendering crate for bevy which is more ECS friendly.
MIT License
913 stars 196 forks source link

Moved render settings onto entity. #512

Closed StarArawn closed 7 months ago

StarArawn commented 7 months ago

Description

This allows a user to customize render settings per tilemap entity.

Why is this useful?

It allows users to specify render chunk sizes per tilemap/layer. If a user has a tilemap that doesn't change often they can gain performance by setting the chunk size to be very large reducing draw calls and they can mix another tilemap layer that might update more frequently on top of the more static map.

StarArawn commented 7 months ago

Realized I didn't update the examples, working on that now..

rparrett commented 7 months ago

Any reason not to set a reasonable default render chunk size and include this in the bundles?

StarArawn commented 7 months ago

Looks good to me, and I tested all the examples.

It occurred to me that I have no idea how to test when the render feature is not enabled though.

Noticed one more little typo.

You can test that by using the --no-default-features cargo parameter.

rparrett commented 7 months ago

You can test that by using the --no-default-features cargo parameter.

Oh, yeah, I just meant that we don't have any examples that utilize this "mode." They all require the render feature, and I just sort of don't know what is even expected to work.