Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion inox2d/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ pub mod drawables;

use crate::math::transform::TransformOffset;

#[derive(Clone, Copy, Hash, Eq, PartialEq)]
#[derive(Clone, Copy, Hash, Eq, PartialEq, Debug)]
#[repr(transparent)]
pub struct InoxNodeUuid(pub(crate) u32);

impl Into<u32> for InoxNodeUuid {
fn into(self) -> u32 {
self.0
}
}

pub struct InoxNode {
pub uuid: InoxNodeUuid,
pub name: String,
Expand Down
16 changes: 16 additions & 0 deletions inox2d/src/puppet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,20 @@ impl Puppet {
render_ctx.update(&self.nodes, &mut self.node_comps);
}
}

pub fn physics(&self) -> &PuppetPhysics {
&self.physics
}

pub fn nodes(&self) -> &InoxNodeTree {
&self.nodes
}

pub fn world(&self) -> &World {
&self.node_comps
}

pub fn params(&self) -> &HashMap<String, Param> {
&self.params
}
}
Loading