gameforge - v0.2.1
    Preparing search index...

    Class BatchSystem

    System plugin to the renderer to manage batching.

    PIXI

    Implements

    Index
    • Parameters

      • renderer: Renderer

        The renderer this System works for.

      Returns BatchSystem

    currentRenderer: ObjectRenderer

    The currently active ObjectRenderer.

    emptyRenderer: ObjectRenderer

    An empty renderer.

    • Assigns batch locations to textures in array based on boundTextures state. All textures in texArray should have _batchEnabled = _batchId, and their count should be less than maxTextures.

      Parameters

      • texArray: BatchTextureArray

        textures to bound

      • boundTextures: BaseTexture<Resource, IAutoDetectOptions>[]

        current state of bound textures

      • batchId: number

        marker for _batchEnabled param of textures in texArray

      • maxTextures: number

        number of texture locations to manipulate

      Returns void

    • Handy function for batch renderers: copies bound textures in first maxTextures locations to array sets actual _batchLocation for them

      Parameters

      Returns void

    • This should be called if you wish to do some custom rendering It will basically render anything that may be batched up such as sprites

      Returns void

    • Reset the system to an empty renderer

      Returns void

    • Changes the current renderer to the one given in parameter

      Parameters

      Returns void