nd_vector 0.1.0

[WIP] Lengthen! Shrink! Iterate! Scale! Twist and turn to your imagination along any dimension on a vector!
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use bevy::prelude::*;
use crate::VectorGrid;

#[derive(Component)]
pub struct ChunkMap<ItemType> {
    chunk_size: usize,
    grid: VectorGrid<ItemType>,
}

impl<ItemType> ChunkMap<ItemType> {
    pub fn new(chunk_size: usize, grid: VectorGrid<ItemType>) -> Self {
        Self { chunk_size, grid }
    }

    pub fn spawn_chunks(&self, child_builder: &ChildBuilder) {
        self.grid.get_chunk_ref(vec![2..5]);
    }
}