Engine API Reference - v2.23.0-beta.7
    Preparing search index...

    Class HierarchyView

    A tree view over a GraphNode hierarchy. Rows are keyed by node and reconciled in place on every refresh, so the expansion state, the selection and the scroll position survive the scene changing underneath. Collapsed subtrees are not materialized, which keeps large scenes cheap.

    Index
    container: HTMLElement

    The element the tree is rendered into.

    entityCount: number = 0

    The number of entities in the hierarchy as of the last refresh.

    filter: string = ''

    Case-insensitive name filter. Nodes that match, and their ancestors, stay visible.

    nodeCount: number = 0

    The number of nodes in the hierarchy as of the last refresh.

    onSelect: (node: GraphNode | null) => void

    Called with the newly selected node, or null when the selection is cleared.

    onToggle: ((node: GraphNode) => void) | undefined

    Called after a node's enabled flag was flipped from its checkbox.

    root: GraphNode | null = null

    The root of the rendered hierarchy.

    selected: GraphNode | null = null

    The selected node.

    • Decides which nodes get no enabled checkbox. Defaults to none.

      Parameters

      Returns boolean

    • Synchronizes the rendered tree with the hierarchy.

      Returns void

    • Selects a node, expanding its ancestors and scrolling it into view.

      Parameters

      • node: GraphNode | null

        The node, or null to clear the selection.

      Returns void

    • Replaces the hierarchy being shown.

      Parameters

      Returns void

    • Toggles the expansion of a node.

      Parameters

      • node: GraphNode

        The node.

      • Optionalrecursive: boolean = false

        Apply the new state to the whole subtree.

      Returns void