chunk rebuilder system
refactoring
This commit is contained in:
@@ -11,8 +11,6 @@ use bevy::{
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
||||
pub fn generate_chunk_mesh(
|
||||
chunk: &Chunk,
|
||||
map: &Map,
|
||||
@@ -33,9 +31,8 @@ pub fn generate_chunk_mesh(
|
||||
let temperature = chunk.temperature[x + z * Chunk::SIZE];
|
||||
let off_pos = Vec3::new(x as f32, height, z as f32);
|
||||
let tile_pos = offset3d_to_world(off_pos);
|
||||
let coord = HexCoord::from_offset(
|
||||
IVec2::new(x as i32, z as i32) + (chunk.chunk_offset * Chunk::SIZE as i32),
|
||||
);
|
||||
let coord =
|
||||
HexCoord::from_offset(IVec2::new(x as i32, z as i32) + (chunk.chunk_offset * Chunk::SIZE as i32));
|
||||
let n = map.get_neighbors(&coord);
|
||||
let biome = mappers.get(painter.sample_biome(moisture, temperature));
|
||||
let tile_handle = biome.unwrap().sample_tile(height);
|
||||
|
||||
Reference in New Issue
Block a user