Add f64 testbed

This commit is contained in:
Sébastien Crozet
2022-01-23 16:48:24 +01:00
parent ca635674fc
commit 31e7d95ff9
9 changed files with 313 additions and 11 deletions

View File

@@ -362,7 +362,7 @@ impl TestbedApp {
vsync: true,
..Default::default()
})
.insert_resource(ClearColor(Color::rgb(0.85, 0.85, 0.85)))
.insert_resource(ClearColor(Color::rgb(0.15, 0.15, 0.15)))
.insert_resource(Msaa { samples: 4 })
.insert_resource(WgpuOptions {
// Required for wireframes.
@@ -536,6 +536,14 @@ impl<'a, 'b, 'c, 'd, 'e, 'f> Testbed<'a, 'b, 'c, 'd, 'e, 'f> {
}
}
pub fn set_graphics_shift(&mut self, shift: Vector<Real>) {
if !self.state.camera_locked {
if let Some(graphics) = &mut self.graphics {
graphics.graphics.gfx_shift = shift;
}
}
}
#[cfg(feature = "dim2")]
pub fn look_at(&mut self, at: Point2<f32>, zoom: f32) {
if !self.state.camera_locked {