PokéRogue
    Preparing search index...

    RenderNodeManager

    Index
    currentBatchDrawingContext: DrawingContext | null

    The drawing context of the current batch. This is stored here because the batch node is stateless.

    currentBatchNode: RenderNode | null

    The RenderNode which is currently being filled. This is stored so that it can be completed when another type of render is run.

    currentDebugNode: DebugGraphNode | null

    The current node in the debug graph. This is used when debug is enabled.

    debug: boolean

    Whether nodes should record their run method for debugging. This should be set via setDebug.

    debugGraph: DebugGraphNode | null

    The debug graph of nodes that have been run. This is used when debug is enabled.

    maxParallelTextureUnits: number

    The maximum number of texture units to use as choices in a batch. Batches can bind several textures and select one of them per instance, allowing for larger batches. However, some mobile devices degrade performance when using multiple texture units. So if the game config option autoMobileTextures is enabled and the device is not a desktop, this will be set to 1. Otherwise, it will be set to the renderer's maxTextures.

    Some shaders may require more than one texture unit, so the actual limit on texture units per batch is maxTextures.

    This value can be changed at runtime via setMaxParallelTextureUnits.

    renderer: WebGLRenderer

    The renderer that owns this manager.

    • Add a node to the manager.

      Parameters

      • name: string

        The name of the node.

      • node: RenderNode

        The node to add.

      Returns void

    • Add a constructor for a node to the manager. This will allow the node to be constructed when getNode is called.

      Parameters

      • name: string

        The name of the node.

      • constructor: Function

        The constructor for the node.

      Returns void

    • Format the current debug graph as an indented string.undefined

      Returns string

      The formatted debug graph.

    • Finish rendering the current batch. This should be called when starting a new rendering task.

      Returns void

    • Get a node from the manager.

      If the node does not exist, and a constructor is available, it will be constructed and added to the manager, then returned.

      Parameters

      • name: string

        The name of the node.

      Returns RenderNode | null

      The node, or null if it does not exist.

    • Check if a node exists in the manager.

      If a node is not constructed, but a constructor is available, it will be considered to exist. Set constructed to true to require that the node has already been constructed.

      Parameters

      • name: string

        The name of the node.

      • Optionalconstructed: boolean

        Whether the node must be constructed to be considered to exist. Default false.

      Returns boolean

      Whether the node exists.

    • Pop the last recorded RenderNode from the debug graph.

      Returns void

    • Record a newly run RenderNode in the debug graph.

      Parameters

      • name: string

        The name of the node.

      Returns void

    • Set the current batch node. If a batch node is already in progress, it will be completed before the new node is set.

      Parameters

      • node: BatchHandler | undefined

        The node to set, or null to clear the current node.

      • OptionaldrawingContext: DrawingContext

        The drawing context. Only used if node is defined.

      Returns void

    • Set whether nodes should record their run method for debugging. This will set the debug property on all nodes, reset the debug graph, and record a single frame of the graph before disabling debug.

      Parameters

      • value: boolean

        Whether nodes should record their run method for debugging.

      Returns void

    • Set maxParallelTextureUnits to a new value. This will be clamped to the range [1, renderer.maxTextures].

      This can be useful for providing the user with a way to adjust the performance of the game at runtime.

      Parameters

      • Optionalvalue: number

        The new value for maxParallelTextureUnits. Must be a number; it will be clamped to the range [1, renderer.maxTextures].

      Returns void

    • Start a standalone render (SAR), which is not part of a batch. This will trigger batch completion if a batch is in progress.

      Returns void