MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / create

Function create

native/watchos/src/scene.rs:172–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170// ============================================================
171
172pub fn create() -> u32 {
173 with(|inner| {
174 // Reuse a freed slot if one exists.
175 for (i, slot) in inner.nodes.iter_mut().enumerate().skip(1) {
176 if slot.is_none() {
177 *slot = Some(Node::empty());
178 return i as u32;
179 }
180 }
181 inner.nodes.push(Some(Node::empty()));
182 (inner.nodes.len() - 1) as u32
183 })
184}
185
186pub fn destroy(handle: u32) {
187 with(|inner| {

Callers 7

bloom_scene_create_nodeFunction · 0.85
attach_meshFunction · 0.85
spawn_node_subtreeFunction · 0.85
storeFunction · 0.85
newMethod · 0.85
mainFunction · 0.85
save_imageFunction · 0.85

Calls 3

withFunction · 0.85
iter_mutMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected