# `PhiaUiDesign.Canvas.Scene`
[🔗](https://github.com/charlenopires/PhiaUI/blob/v0.1.17/lib/phiaui_design/canvas/scene.ex#L1)

ETS-backed scene graph for the design canvas.

Each scene is an ETS table containing Node structs keyed by their ID.
A special `:root` entry tracks the top-level node IDs.

# `scene_id`

```elixir
@type scene_id() :: reference()
```

# `all_nodes`

Get all nodes as a flat list

# `components_used`

Get all unique component names used in the scene

# `count`

Count total nodes in the scene

# `delete_node`

Delete a node from the scene

# `destroy`

Destroy the scene (delete ETS table)

# `find_nodes`

Find nodes matching a predicate function

# `get_node`

Get a node by ID

# `get_root_children`

Get root-level children IDs

# `hooks_needed`

Get all JS hooks needed by components in the scene

# `insert`

Insert a node into the scene

# `insert_component`

Insert a PhiaUI component into the scene

# `insert_element`

Insert an HTML element into the scene

# `move_node`

Move a node to a new parent at a given index

# `new`

Create a new empty scene

# `to_tree`

Build the scene as a tree structure (nested maps)

# `update_attrs`

Update a node's component attrs

# `update_node`

Update a node's attributes

---

*Consult [api-reference.md](api-reference.md) for complete listing*
