added a fullscreen keyboard system and evaluated if the tracker work accordingly
This commit is contained in:
parent
c73726ddc0
commit
c862972f80
2 changed files with 12 additions and 4 deletions
|
@ -9,6 +9,8 @@ use crate::scene::*;
|
|||
use crate::utils::*;
|
||||
use crate::viewer::*;
|
||||
use crate::tracker::*;
|
||||
use crate::console::*;
|
||||
|
||||
|
||||
use bevy::{prelude::*, window::PresentMode, render::camera::CameraProjectionPlugin};
|
||||
use offaxis::{offaxis_camera_setup, OffAxisProjection};
|
||||
|
@ -21,6 +23,7 @@ mod utils;
|
|||
mod viewer;
|
||||
mod projection;
|
||||
mod tracker;
|
||||
mod console;
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
|
@ -53,6 +56,7 @@ fn main() {
|
|||
.add_plugin(CameraProjectionPlugin::<OffAxisProjection>::default())
|
||||
.add_system(simulate_viewer)
|
||||
.add_system(apply_viewer_to_projections)
|
||||
.add_system(toggle_fullscreeen)
|
||||
.run();
|
||||
}
|
||||
|
||||
|
|
|
@ -64,10 +64,12 @@ impl Tracker {
|
|||
write_cookie(&mut stream, CookieData::from(MAGIC_DATA)).unwrap();
|
||||
let cookie_buf = read_cookie(&mut stream).unwrap();
|
||||
|
||||
// let mut cookie_buf = Bytes::from(&cookie_buf[..]);
|
||||
let mut cookie_buf = Bytes::from(&cookie_buf[..]);
|
||||
|
||||
CookieData::unbuffer_ref(&mut cookie_buf)
|
||||
.and_then(|msg| check_ver_nonfile_compatible(msg.version))
|
||||
.unwrap();
|
||||
|
||||
// CookieData::unbuffer_ref(&mut cookie_buf)
|
||||
// .and_then(|msg| check_ver_nonfile_compatible(msg.version)).unwrap();
|
||||
|
||||
Tracker { stream }
|
||||
}
|
||||
|
@ -113,11 +115,13 @@ impl Tracker {
|
|||
}
|
||||
|
||||
pub fn setup_tracker(mut commands: Commands) {
|
||||
commands.spawn(Tracker::from_info("127.0.0.1", 3883));
|
||||
// commands.spawn(Tracker::from_info("127.0.0.1", 3883));
|
||||
commands.spawn(Tracker::from_info("212.201.64.122", 3883));
|
||||
}
|
||||
|
||||
pub fn update_tracker(mut query: Query<&mut Tracker>) {
|
||||
for mut tracker in query.iter_mut() {
|
||||
|
||||
tracker.update();
|
||||
|
||||
// tracker.connection.poll_endpoints();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue