feat: root node
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
pub mod root;
|
||||
pub mod core;
|
||||
pub mod data;
|
||||
pub mod field;
|
||||
|
||||
11
src/nodes/root.rs
Normal file
11
src/nodes/root.rs
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user