add module system and move sensor into core with it

This commit is contained in:
2025-09-24 16:11:39 -04:00
parent 2adf7a43a1
commit 26c248dcba
13 changed files with 515 additions and 342 deletions

View File

@@ -1,9 +1,9 @@
use std::ops::{Index, IndexMut};
use crate::{
layout::{SenseShape, UiRegion},
layout::UiRegion,
render::{Primitive, PrimitiveHandle, Primitives},
util::{HashMap, Id},
util::Id,
};
struct LayerNode {
@@ -26,10 +26,10 @@ pub struct Layers {
vec: Vec<LayerNode>,
}
/// TODO: this can be replaced with Primitives itself atm
#[derive(Default)]
pub struct Layer {
pub primitives: Primitives,
pub sensors: HashMap<Id, SenseShape>,
}
impl Layers {