diff --git a/notes/Home.txt b/notes/Home.txt index 6e76caaa..e9a93e92 100644 --- a/notes/Home.txt +++ b/notes/Home.txt @@ -10,14 +10,16 @@ Creation-Date: 2020-02-03T22:11:42-08:00 TODO: [X] Text rendering is mocked. [?] Pathfinder vulkan backend implementation - * Kinda big meh on this. It's very much oneshot based - and not incredibly compatible with vulkano... - [ ] Investigate lyon maybe - [X] Currently using local copies of a few libraries: + * Kinda big meh on this. It's very much oneshot based + and not incredibly compatible with vulkano... + [ ] Investigate lyon maybe + [ ] Event system + [ ] HTML like layout scripts + [x] Currently using local copies of a few libraries: [x] shade_runner ( not gonna happen, my fork has diverged too far ) [ ] Make a toolpath - [X] Read from GPU? - [ ] Figure out a way to vectorize the simple edge + [X] Read from GPU? + [ ] Figure out a way to vectorize the simple edge -------------------- diff --git a/notes/layout-scripts.txt b/notes/layout-scripts.txt new file mode 100644 index 00000000..17a273eb --- /dev/null +++ b/notes/layout-scripts.txt @@ -0,0 +1,90 @@ +Content-Type: text/x-zim-wiki +Wiki-Format: zim 0.4 +Creation-Date: 2020-10-06T22:33:37-07:00 + +====== layout-scripts ====== +Created Tuesday 06 October 2020 + +===== Keywords ===== + +***table will need some description of it's requested elements*** +**Actually I think this could just be done in the parser. Emitting warnings if names dont match** + +elem table { +} + +**elem is a keyword specifying that the next token will implement some type of rendering behaviour in this case, it is a table.** + +elem table : globalTableFormatting { + meta tableFormatting { + } +} + +meta globalTableFormatting : { +} + +**meta is a keyword specifying that the next token will contain some subset of the data that an elem that needs to render.** + + +===== Nesting ===== + +**There is no way around a tree structure in the markup.** + +elem table { + meta tableFormatting { + color: Black, + } + elem tr { + elem tc { + text: "testText1" + } + elem tc { + text: "testText2" + } + } +} + +**But I think I can strongly type the nesting structure, e.g** + +struct Table { + fn addChild(child: TableRow) +} +elem!(table, Table) + +struct TableRow { + fn addChild(child: TableColumn) +} +elem!(table, TableRow) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/event_system.rs b/src/event_system.rs index e56b59d0..21b450db 100644 --- a/src/event_system.rs +++ b/src/event_system.rs @@ -26,7 +26,6 @@ pub struct EventSystem; impl<'a> System<'a> for EventSystem { type SystemData = ( Entities<'a>, - WriteStorage<'a, Position>, WriteStorage<'a, Evented>, Write<'a, PersistentState>, Write<'a, VkProcessor>, @@ -35,21 +34,19 @@ impl<'a> System<'a> for EventSystem { fn run(&mut self, ( entity, - mut position_list, mut evented_list, mut state, mut vk_processor, event_stack ): Self::SystemData) { - for (position, evented) in (&mut position_list, &evented_list).join() { + for (evented) in (&evented_list).join() { for event in &*event_stack { match event { TrEvent::WindowEvent { window_id, event } => { match event { TrWindowEvent::MouseInput { device_id, state, button, modifiers } => { if *state == ElementState::Pressed { - position.x += 100.0; } }, _ => {} diff --git a/src/main.rs b/src/main.rs index 3bc97b87..6638e334 100644 --- a/src/main.rs +++ b/src/main.rs @@ -148,7 +148,7 @@ pub fn main() { compu_frame: CompuFrame::new((0, 0)), }); - + /* let mut g = Graph::new(); let mut matrix : Vec>> = vec![vec![NodeIndex::new(1); 20]; 20]; @@ -158,7 +158,7 @@ pub fn main() { } } - + for x in 0..20 { for y in 0..20 { @@ -176,10 +176,7 @@ pub fn main() { (c, e, 1), (e, f, 1), (d, e, 1), - ]); - - - + ]);*/ // and the thing that renders it world.create_entity()