Resize camera projection on window resize
This commit is contained in:
parent
afb4e2d8d8
commit
6e2762eb5c
|
@ -144,6 +144,11 @@ impl CameraController {
|
||||||
|
|
||||||
pub fn process_events(&mut self, event: &WindowEvent) -> bool {
|
pub fn process_events(&mut self, event: &WindowEvent) -> bool {
|
||||||
match event {
|
match event {
|
||||||
|
WindowEvent::Resized(physical_size) => {
|
||||||
|
self.projection
|
||||||
|
.resize(physical_size.width, physical_size.height);
|
||||||
|
true
|
||||||
|
}
|
||||||
WindowEvent::KeyboardInput {
|
WindowEvent::KeyboardInput {
|
||||||
input:
|
input:
|
||||||
KeyboardInput {
|
KeyboardInput {
|
||||||
|
|
Loading…
Reference in New Issue