Figler.Scene.Graph.Nodes (figler v0.1.0-beta.1)

Copy Markdown View Source

Graph node mutation helpers.

Summary

Functions

Adds child to parent if not already present.

Adds already-ordered children to parent in one append.

Removes all direct children under a parent in one batch.

Inserts or replaces a node and keeps type/name indexes current.

Rebuilds type/name lookup indexes from current graph nodes.

Removes a subtree rooted at guid.

Removes multiple subtrees in one batch.

Returns subtree GUIDs in descendants-first order.

Functions

child(graph, parent, child)

Adds child to parent if not already present.

children(graph, parent, children)

Adds already-ordered children to parent in one append.

clear_children(graph, parent_guid, opts \\ [])

Removes all direct children under a parent in one batch.

put(graph, guid, node, seed \\ nil)

Inserts or replaces a node and keeps type/name indexes current.

reindex(graph)

Rebuilds type/name lookup indexes from current graph nodes.

remove(graph, guid, opts \\ [])

Removes a subtree rooted at guid.

remove_many(graph, root_guids, opts \\ [])

Removes multiple subtrees in one batch.

subtree(graph, guid)

Returns subtree GUIDs in descendants-first order.