-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump version 0.2.1. and make a releae
- Loading branch information
1 parent
0762f96
commit 8022e5a
Showing
17 changed files
with
240 additions
and
178 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,28 @@ | ||
[package] | ||
name = "joko_core" | ||
version = "0.1.0" | ||
version = "0.2.1" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
cap-directories = { version = "*" } | ||
cap-std = { workspace = true } | ||
tracing = { workspace = true } | ||
tracing-subscriber = { version = "0.3", features = [ | ||
"env-filter", | ||
"time", | ||
] } # for ErrorLayer | ||
tracing-appender = { version = "*" } | ||
miette = { workspace = true } | ||
|
||
egui = { workspace = true, features = ["serde"] } | ||
egui_extras = { workspace = true } | ||
|
||
ringbuffer = { workspace = true } | ||
rayon = { workspace = true } | ||
serde = { workspace = true } | ||
serde_json = { workspace = true } | ||
indexmap = { workspace = true } | ||
rfd = { workspace = true } | ||
glam = { workspace = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
pub fn add(left: usize, right: usize) -> usize { | ||
left + right | ||
} | ||
pub mod manager; | ||
/* | ||
each manager must have | ||
1. a main thread struct | ||
2. an off thread struct | ||
3. commands that they send/receive | ||
4. a public api for other managers to access | ||
#[cfg(test)] | ||
mod tests { | ||
use super::*; | ||
|
||
#[test] | ||
fn it_works() { | ||
let result = add(2, 2); | ||
assert_eq!(result, 4); | ||
} | ||
} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod theme; | ||
pub mod trace; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "joko_marker_format" | ||
version = "0.1.0" | ||
version = "0.2.1" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
use egui_window_glfw_passthrough::GlfwBackend; | ||
|
||
pub struct WindowStatistics { | ||
pub fps_last_reset: f64, | ||
pub frame_count: u32, | ||
pub total_frame_count: u32, | ||
pub average_fps: u32, | ||
} | ||
|
||
impl WindowStatistics { | ||
pub fn new(current_time: f64) -> Self { | ||
Self { | ||
fps_last_reset: current_time, | ||
frame_count: 0, | ||
total_frame_count: 0, | ||
average_fps: 0, | ||
} | ||
} | ||
|
||
pub fn tick(&mut self, current_time: f64) { | ||
self.total_frame_count += 1; | ||
self.frame_count += 1; | ||
if current_time - self.fps_last_reset > 1.0 { | ||
self.average_fps = self.frame_count; | ||
self.frame_count = 0; | ||
self.fps_last_reset = current_time; | ||
} | ||
} | ||
|
||
pub fn gui(&mut self, etx: &egui::Context, wb: &mut GlfwBackend, open: &mut bool) { | ||
egui::Window::new("Window Manager") | ||
.open(open) | ||
.show(etx, |ui| { | ||
egui::Grid::new("frame details") | ||
.num_columns(2) | ||
.show(ui, |ui| { | ||
ui.label("fps"); | ||
ui.label(&format!("{}", self.average_fps)); | ||
ui.end_row(); | ||
ui.label("frame count"); | ||
ui.label(&format!("{}", self.total_frame_count)); | ||
ui.end_row(); | ||
ui.label("jokolay pos"); | ||
ui.label(&format!( | ||
"x: {}; y: {}", | ||
wb.window_position[0], wb.window_position[1] | ||
)); | ||
ui.end_row(); | ||
ui.label("jokolay size"); | ||
ui.label(&format!( | ||
"width: {}, height: {}", | ||
wb.framebuffer_size_physical[0], wb.framebuffer_size_physical[1] | ||
)); | ||
ui.end_row(); | ||
ui.label("decorations (borders)"); | ||
let is_decorated = wb.window.is_decorated(); | ||
let mut result = is_decorated; | ||
if ui | ||
.checkbox( | ||
&mut result, | ||
if is_decorated { | ||
"borders visible" | ||
} else { | ||
"borders hidden" | ||
}, | ||
) | ||
.changed() | ||
{ | ||
wb.window.set_decorated(result); | ||
} | ||
ui.end_row(); | ||
}); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters