bevy_entitiles 0.4.0

A 2d tilemap library for bevy. With many useful algorithms/tools built in.
Documentation
1
2
3
4
5
6
7
8
9
10
#define_import_path bevy_entitiles::square

#import bevy_entitiles::common::{VertexInput, tilemap}

fn get_mesh_origin(input: VertexInput) -> vec2<f32> {
    let index = vec2<f32>(input.index.xy) * tilemap.axis_dir;
    
    return index.xy * tilemap.slot_size
           - (1. - tilemap.axis_dir) / 2. * tilemap.slot_size;
}