Hosanna UI API v1.30.2-next
    Preparing search index...

    Interface INodePool

    Interface for a node pool that manages reusable SceneGraph nodes.

    interface INodePool {
        cleanupRetainedNodesForParent(parent: ISGNNode): void;
        get<T extends ISGNNode>(
            componentType: string,
            initialState?: IStyleDictionary,
        ): T;
        getPoolCounts(): INodePoolCounts;
        hydratePristineDefaultsFromLoadedConfig(): void;
        prepopulate(componentType: string, count: number): void;
        release(node: ISGNNode, removeFromParent?: boolean): void;
    }

    Implemented by

    Index

    Methods

    • Removes retained-parent nodes that were released for a specific parent.

      Parameters

      • parent: ISGNNode

        Parent whose retained released nodes should be detached.

      Returns void

    • Retrieves a node of the specified component type from the pool, optionally applying an initial state.

      Type Parameters

      Parameters

      • componentType: string

        The type of node to retrieve.

      • OptionalinitialState: IStyleDictionary

        Optional initial state to apply to the node.

      Returns T

    • Applies loaded app-config pristine overrides to already-captured subtype snapshots and keeps the updated snapshots cached.

      Returns void

    • Prepopulates the pool with a specified number of nodes of the given component type.

      Parameters

      • componentType: string

        The type of node to prepopulate.

      • count: number

        The number of nodes to create.

      Returns void

    • Releases a node back into the pool for reuse.

      Parameters

      • node: ISGNNode

        The node to release.

      • OptionalremoveFromParent: boolean

      Returns void