mirror of
https://github.com/lisk77/comet.git
synced 2025-10-24 05:48:50 +00:00
wip: transitioning to the newer comet_structs and new ComponentStorage through a FlatMap (not the rust implementation)
This commit is contained in:
parent
5b43c7a319
commit
db405bfb2e
12 changed files with 214 additions and 802 deletions
|
|
@ -298,7 +298,7 @@ impl Camera2D {
|
|||
self.dimensions = dimensions;
|
||||
}
|
||||
|
||||
fn in_view_frustum(&self, camera_pos: Position2D, entity: Position2D) -> bool {
|
||||
pub fn in_view_frustum(&self, camera_pos: Position2D, entity: Position2D) -> bool {
|
||||
let left = camera_pos.x() - self.zoom;
|
||||
let right = camera_pos.x() + self.zoom;
|
||||
let bottom = camera_pos.y() - self.zoom;
|
||||
|
|
@ -328,4 +328,4 @@ impl Camera for Camera2D {
|
|||
|
||||
Mat4::OPENGL * Mat4::orthographic_matrix(left, right, bottom, top, 1.0, 0.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue