feat: root node

This commit is contained in:
Nova
2022-06-16 14:18:00 -04:00
parent 31797e35c4
commit 34d95067dd
3 changed files with 14 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
pub mod root;
pub mod core;
pub mod data;
pub mod field;

11
src/nodes/root.rs Normal file
View File

@@ -0,0 +1,11 @@
use super::core::Node;
use super::spatial::Spatial;
use crate::core::client::Client;
use glam::Mat4;
use std::sync::Arc;
pub fn create_root(client: &Arc<Client>) {
let node = Node::create("", "", false);
let node = client.scenegraph.add_node(node);
let _ = Spatial::add_to(&node, None, Mat4::IDENTITY);
}