PokéRogue
    Preparing search index...

    The SubmitterQuad RenderNode submits data for rendering a single Image-like GameObject. It uses a BatchHandler to render the image as part of a batch.

    This node receives the drawing context, game object, and parent matrix. It also receives the texturer, tinter, and transformer nodes from the node that invoked it. This allows the behavior to be configured by setting the appropriate nodes on the GameObject for individual tweaks, or on the invoking Renderer node for global changes.

    Hierarchy (View Summary)

    Index
    batchHandler: string

    The key of the RenderNode used to render data.

    defaultConfig: SubmitterQuadConfig

    The default configuration for this RenderNode.

    The manager that owns this RenderNode.

    name: string

    The name of the RenderNode.

    • By default this is an empty method hook that you can override and use in your own custom render nodes.

      This method is called at the start of the run method. Don't forget to call it in your custom method.

      Parameters

      Returns void

    • By default this is an empty method hook that you can override and use in your own custom render nodes.

      This method is called at the end of the run method. Don't forget to call it in your custom method.

      Parameters

      Returns void

    • Processes the given GameObject and submits quad vertex data to the appropriate batch handler for rendering. This method invokes the texturer, transformer, and optional tinter nodes in sequence to compute texture coordinates, transformed vertex positions, and tint colors. If no tinter node is provided, Image-style tinting is read directly from the GameObject. It then calls setRenderOptions to resolve lighting and smooth pixel art settings before passing all assembled data to the batch handler.

      Parameters

      • drawingContext: DrawingContext

        The current drawing context.

      • gameObject: GameObject

        The GameObject being rendered.

      • parentMatrix: TransformMatrix

        The parent matrix of the GameObject.

      • element: object | undefined

        The specific element within the game object. This is used for objects that consist of multiple quads.

      • texturerNode: RenderNode

        The texturer node used to texture the GameObject. You may pass a TexturerImage node or an object containing equivalent data without a run method.

      • transformerNode: Object | RenderNode

        The transformer node used to transform the GameObject. You may pass a transformer node or an object with a quad property.

      • OptionaltinterNode: RenderNode | Omit<RenderNode, "run">

        The tinter node used to tint the GameObject. You may pass a tinter node or an object containing equivalent data without a run method. If omitted, Image-style tinting will be used.

      • OptionalnormalMap: WebGLTextureWrapper

        The normal map texture to use for lighting. If omitted, the normal map texture of the GameObject will be used, or the default normal map texture of the renderer.

      • OptionalnormalMapRotation: number

        The rotation of the normal map texture. If omitted, the rotation of the GameObject will be used.

      Returns void

    • Enables or disables debug reporting for this node.

      When enabled, the run method is replaced with a wrapper that pushes the node's name onto the manager's debug stack before execution and pops it afterwards, allowing the renderer to track which nodes are active. The original run implementation is preserved in _run.

      When disabled, the original run method is restored and _run is cleared.

      Parameters

      • debug: boolean

        Whether to report debug information.

      Returns void

    • Resolves and stores render options for the current GameObject into _renderOptions before it is submitted to the batch handler. This includes determining the correct normal map texture and rotation for lighting (falling back to the game object's base texture data source, then the renderer's default normal texture), resolving self-shadow settings (falling back to the global game configuration if not set on the object), and determining the smooth pixel art setting from either the base texture or the global game configuration. If the GameObject has no lighting component, the lighting option is set to null.

      Parameters

      • gameObject: GameObject

        The GameObject being rendered.

      • OptionalnormalMap: WebGLTextureWrapper

        The normal map texture to use for lighting. If omitted, it will be resolved from the game object's base texture data source or the renderer's default normal texture.

      • OptionalnormalMapRotation: number

        The rotation of the normal map texture, in radians. If omitted or NaN, it will be resolved from the game object's rotation or its world transform matrix if it belongs to a container.

      Returns void