mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-27 09:35:52 +00:00
Initialize camera on initial model load
This commit is contained in:
parent
6568d0c8c3
commit
a34e872db4
@ -135,7 +135,7 @@ fn main() -> anyhow::Result<()> {
|
||||
processed_shape.update_geometry(&mut renderer);
|
||||
|
||||
let mut draw_config = DrawConfig::default();
|
||||
let mut camera = Some(Camera::new(&processed_shape.aabb));
|
||||
let mut camera = None;
|
||||
|
||||
event_loop.run(move |event, _, control_flow| {
|
||||
trace!("Handling event: {:?}", event);
|
||||
@ -147,6 +147,10 @@ fn main() -> anyhow::Result<()> {
|
||||
if let Some(shape) = watcher.receive() {
|
||||
processed_shape = shape_processor.process(&shape);
|
||||
processed_shape.update_geometry(&mut renderer);
|
||||
|
||||
if camera.is_none() {
|
||||
camera = Some(Camera::new(&processed_shape.aabb));
|
||||
}
|
||||
}
|
||||
|
||||
match event {
|
||||
|
Loading…
Reference in New Issue
Block a user