tirbofish/dropbear · commit
d8ab63e6f99d2592bb6df1b23e8d456e055eb3ee
spewed something that resembled a component tree. i mean, it sorta works?
a lot of changed need to be made, such as a proper ID, and implementing SerializableComponent for everything else + some proper plugin work. otherwise, it is pretty nice.
Signature present but could not be verified.
Unverified
@@ -77,6 +77,7 @@ typetag = "0.2" syn = { version = "2.0", features = ["full"] } quote = "1.0" egui_ltreeview = { version = "0.6", features = ["doc"] } +dyn-hash = "1.0" [workspace.dependencies.image] version = "0.25" @@ -8,3 +8,7 @@ readme = "README.md" [dependencies] typetag.workspace = true +hecs.workspace = true +log.workspace = true +dyn-hash.workspace = true +anyhow.workspace = true @@ -0,0 +1,99 @@ +use std::any::TypeId; +use std::collections::HashMap; +use anyhow::Result; +use hecs::{Entity, EntityBuilder, World}; +use crate::{ + ComponentConverter, + ComponentDeserializer, + CustomConverter, + CustomDeserializer, + DirectConverter, + DirectDeserializer, + SerializableComponent, +}; + +#[derive(Default)] +pub struct ComponentRegistry { + converters: HashMap<TypeId, Box<dyn ComponentConverter>>, + deserializers: HashMap<TypeId, Box<dyn ComponentDeserializer>>, +}
Large diffs are not rendered by default. Showing the first 50 of 1297 lines. Show full diff