MCPcopy Create free account
hub / github.com/PerroEngine/Perro / has_2d

Function has_2d

perro_editor/res/scripts/scene/editor_scene.rs:11–16  ·  view source on GitHub ↗
(doc: &SceneDoc)

Source from the content-addressed store, hash-verified

9}
10
11pub fn has_2d(doc: &SceneDoc) -> bool {
12 doc.scene
13 .nodes
14 .iter()
15 .any(|node| node.data.node_type.is_a(perro_scene::NodeType::Node2D))
16}
17
18pub fn has_type(doc: &SceneDoc, ty: perro_scene::NodeType) -> bool {
19 doc.scene.nodes.iter().any(|node| node.data.node_type == ty)

Callers 1

load_preview_sceneFunction · 0.85

Calls 2

anyMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected