better lighting
This commit is contained in:
parent
805a2713a3
commit
6ed4e17065
75 changed files with 6417 additions and 3667 deletions
|
|
@ -38,10 +38,6 @@ impl World {
|
|||
self.chunks.remove(id)
|
||||
}
|
||||
|
||||
pub fn set_active(&mut self, id: ChunkId) {
|
||||
self.active = Some(id);
|
||||
}
|
||||
|
||||
pub fn active(&self) -> Option<&Chunk> {
|
||||
self.active.as_ref().and_then(|id| self.chunks.get(id))
|
||||
}
|
||||
|
|
@ -50,6 +46,14 @@ impl World {
|
|||
self.active
|
||||
}
|
||||
|
||||
pub fn set_active(&mut self, id: ChunkId) {
|
||||
self.active = Some(id);
|
||||
}
|
||||
|
||||
pub fn clear_active(&mut self) {
|
||||
self.active = None;
|
||||
}
|
||||
|
||||
pub fn trace(&self, from: Vec3, to: Vec3, radius: f32) -> Vec3 {
|
||||
if let Some(chunk) = self.active() {
|
||||
return chunk.trace(from, to, radius);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue