pub fn remove_far_chunks(&mut self, player_chunk: ChunkPos, render_distance: &RenderDistance) {
        let Self { ref mut chunks, ref mut renderer, .. } = self;
        chunks.retain(|chunk_pos, _| {
            if render_distance.is_chunk_visible(player_chunk, *chunk_pos) {
                true
            } else {
                renderer.remove_chunk_mesh(*chunk_pos);
                false
            }
        })
    }
/// Remove chunks that are too far for the player
Remove chunks that are too far for the player
Remove chunks that are too far for the player
pub fn remove_far_chunks(&mut self, player_chunk: ChunkPos, render_distance: &RenderDistance) {
        let Self { ref mut chunks, ref mut renderer, .. } = self;
        chunks.retain(|chunk_pos, _| {
            if render_distance.is_chunk_visible(player_chunk, *chunk_pos) {
                true
            } else {
                renderer.remove_chunk_mesh(*chunk_pos);
                false
            }
        })
    }
pub fn remove_far_chunks ( & mut self , player_chunk : ChunkPos , render_distance : & RenderDistance ) { let Self { ref mut chunks , ref mut renderer , .. } = self ; chunks . retain ( | chunk_pos , _ | { if render_distance . is_chunk_visible ( player_chunk , * chunk_pos ) { true } else { renderer . remove_chunk_mesh ( * chunk_pos ) ; false } } ) }
Remove chunks that are too far for the player
Remove chunks that are too far for the player
&mut self
player_chunk
ChunkPos
render_distance
&RenderDistance
&mut self
player_chunk
ChunkPos
render_distance
&RenderDistance