refactor(idl): create_inteface macro

This commit is contained in:
Nova
2024-02-04 09:55:39 -05:00
parent f8fab6bf5a
commit ed28914f86
31 changed files with 73 additions and 50 deletions

View File

@@ -39,7 +39,8 @@ pub struct PlaySpace {
}
impl PlaySpace {
pub fn new() -> Result<Self> {
let node = Node::create(&INTERNAL_CLIENT, "", &nanoid!(), false).add_to_scenegraph()?;
let node = Node::create_parent_name(&INTERNAL_CLIENT, "", &nanoid!(), false)
.add_to_scenegraph()?;
let spatial = Spatial::add_to(&node, None, Mat4::IDENTITY, false)?;
let field = BoxField::add_to(&node, [0.0; 3].into())?;
@@ -60,7 +61,9 @@ impl PlaySpace {
pose.orientation,
pose.position,
));
let Field::Box(box_field) = self.field.as_ref() else {return};
let Field::Box(box_field) = self.field.as_ref() else {
return;
};
box_field.set_size(
[
sk.world_get_bounds_size().x,