refactor: node aspect drawable

This commit is contained in:
Nova
2023-02-08 21:06:24 -05:00
parent 4620e0ca09
commit 40e7c6cd20
6 changed files with 51 additions and 40 deletions

View File

@@ -2,6 +2,12 @@ pub mod lines;
pub mod model;
pub mod text;
use self::{
lines::Lines,
model::{Model, ModelNode},
text::Text,
};
use super::Node;
use crate::core::client::Client;
use color_eyre::eyre::Result;
@@ -21,6 +27,13 @@ pub fn create_interface(client: &Arc<Client>) -> Result<()> {
node.add_to_scenegraph().map(|_| ())
}
pub enum Drawable {
Lines(Arc<Lines>),
Model(Arc<Model>),
ModelNode(Arc<ModelNode>),
Text(Arc<Text>),
}
#[instrument(level = "debug", skip(sk))]
pub fn draw(sk: &StereoKitDraw) {
lines::draw_all(sk);