mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-27 01:25:52 +00:00
Simplify variable name
This commit is contained in:
parent
3a5441fff8
commit
3574ed401e
@ -131,7 +131,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
|
|
||||||
let mut draw_config = DrawConfig::default();
|
let mut draw_config = DrawConfig::default();
|
||||||
|
|
||||||
let mut processed_shape = None;
|
let mut shape = None;
|
||||||
let mut camera = None;
|
let mut camera = None;
|
||||||
|
|
||||||
event_loop.run(move |event, _, control_flow| {
|
event_loop.run(move |event, _, control_flow| {
|
||||||
@ -149,7 +149,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
camera = Some(Camera::new(&new_shape.aabb));
|
camera = Some(Camera::new(&new_shape.aabb));
|
||||||
}
|
}
|
||||||
|
|
||||||
processed_shape = Some(new_shape);
|
shape = Some(new_shape);
|
||||||
}
|
}
|
||||||
|
|
||||||
match event {
|
match event {
|
||||||
@ -184,8 +184,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
event: WindowEvent::MouseInput { state, button, .. },
|
event: WindowEvent::MouseInput { state, button, .. },
|
||||||
..
|
..
|
||||||
} => {
|
} => {
|
||||||
if let (Some(shape), Some(camera)) = (&processed_shape, &camera)
|
if let (Some(shape), Some(camera)) = (&shape, &camera) {
|
||||||
{
|
|
||||||
let focus_point = camera.focus_point(
|
let focus_point = camera.focus_point(
|
||||||
&window,
|
&window,
|
||||||
input_handler.cursor(),
|
input_handler.cursor(),
|
||||||
@ -209,9 +208,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
let delta_t = now.duration_since(previous_time);
|
let delta_t = now.duration_since(previous_time);
|
||||||
previous_time = now;
|
previous_time = now;
|
||||||
|
|
||||||
if let (Some(shape), Some(camera)) =
|
if let (Some(shape), Some(camera)) = (&shape, &mut camera) {
|
||||||
(&processed_shape, &mut camera)
|
|
||||||
{
|
|
||||||
input_handler.update(
|
input_handler.update(
|
||||||
delta_t.as_secs_f64(),
|
delta_t.as_secs_f64(),
|
||||||
now,
|
now,
|
||||||
@ -224,9 +221,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
window.inner().request_redraw();
|
window.inner().request_redraw();
|
||||||
}
|
}
|
||||||
Event::RedrawRequested(_) => {
|
Event::RedrawRequested(_) => {
|
||||||
if let (Some(shape), Some(camera)) =
|
if let (Some(shape), Some(camera)) = (&shape, &mut camera) {
|
||||||
(&processed_shape, &mut camera)
|
|
||||||
{
|
|
||||||
camera.update_planes(&shape.aabb);
|
camera.update_planes(&shape.aabb);
|
||||||
|
|
||||||
match renderer.draw(camera, &draw_config) {
|
match renderer.draw(camera, &draw_config) {
|
||||||
|
Loading…
Reference in New Issue
Block a user