System plugin to the renderer to manage WebGL state machines.

Memberof

PIXI

Implements

Constructors

  • Returns StateSystem

Properties

blendMode: -1 | BLEND_MODES

Blend mode

Default

PIXI.BLEND_MODES.NONE
@readonly
polygonOffset: number

Polygon offset

stateId: number

State ID

Methods

  • Parameters

    Returns void

  • Sets the state, when previous state is unknown.

    Parameters

    • state: State

      The state to set

    Returns void

  • Resets all the logic and disables the VAOs.

    Returns void

  • Sets the current state

    Parameters

    • state: State

      The state to set.

    Returns void

  • Sets whether to enable or disable blending.

    Parameters

    • value: boolean

      Turn on or off WebGl blending.

    Returns void

  • Sets the blend mode.

    Parameters

    • value: number

      The blend mode to set to.

    Returns void

  • Sets whether to enable or disable cull face.

    Parameters

    • value: boolean

      Turn on or off webgl cull face.

    Returns void

  • Sets whether to enable or disable depth mask.

    Parameters

    • value: boolean

      Turn on or off webgl depth mask.

    Returns void

  • Sets whether to enable or disable depth test.

    Parameters

    • value: boolean

      Turn on or off webgl depth testing.

    Returns void

  • Sets the gl front face.

    Parameters

    • value: boolean

      true is clockwise and false is counter-clockwise

    Returns void

  • Sets whether to enable or disable polygon offset fill.

    Parameters

    • value: boolean

      Turn on or off webgl polygon offset testing.

    Returns void

  • Sets the polygon offset.

    Parameters

    • value: number

      the polygon offset

    • scale: number

      the polygon offset scale

    Returns void

  • Checks to see which updates should be checked based on which settings have been activated.

    For example, if blend is enabled then we should check the blend modes each time the state is changed or if polygon fill is activated then we need to check if the polygon offset changes. The idea is that we only check what we have too.

    Parameters

    • func: ((system, state) => void)

      the checking function to add or remove

        • (system, state): void
        • Parameters

          Returns void

    • value: boolean

      should the check function be added or removed.

    Returns void

Generated using TypeDoc