Options
All
  • Public
  • Public/Protected
  • All
Menu

System plugin to the renderer to manage WebGL state machines.

memberof

PIXI

Hierarchy

Index

Constructors

constructor

Properties

Protected _blendEq

_blendEq: boolean

blendMode

blendMode: BLEND_MODES

Protected blendModes

blendModes: number[][]

Protected Readonly checks

checks: ((system: StateSystem, state: State) => void)[]

Protected defaultState

defaultState: State

Protected gl

Protected Readonly map

map: ((value: boolean) => void)[]

polygonOffset

polygonOffset: number

renderer

renderer: Renderer

stateId

stateId: number

Methods

contextChange

  • Parameters

    Returns void

destroy

  • destroy(): void
  • Generic destroy methods to be overridden by the subclass

    Returns void

forceState

  • forceState(state: State): void
  • Sets the state, when previous state is unknown

    Parameters

    • state: State

      The state to set

    Returns void

reset

  • reset(): void
  • Resets all the logic and disables the vaos

    Returns void

set

  • set(state: State): void
  • Sets the current state

    Parameters

    • state: State

      The state to set.

    Returns void

setBlend

  • setBlend(value: boolean): void
  • Enables or disabled blending.

    Parameters

    • value: boolean

      Turn on or off webgl blending.

    Returns void

setBlendMode

  • setBlendMode(value: number): void
  • Sets the blend mode.

    Parameters

    • value: number

      The blend mode to set to.

    Returns void

setCullFace

  • setCullFace(value: boolean): void
  • Sets whether to enable or disable cull face.

    Parameters

    • value: boolean

      Turn on or off webgl cull face.

    Returns void

setDepthMask

  • setDepthMask(value: boolean): void
  • Sets whether to enable or disable depth mask.

    Parameters

    • value: boolean

      Turn on or off webgl depth mask.

    Returns void

setDepthTest

  • setDepthTest(value: boolean): void
  • Sets whether to enable or disable depth test.

    Parameters

    • value: boolean

      Turn on or off webgl depth testing.

    Returns void

setFrontFace

  • setFrontFace(value: boolean): void
  • Sets the gl front face.

    Parameters

    • value: boolean

      true is clockwise and false is counter-clockwise

    Returns void

setOffset

  • setOffset(value: boolean): void
  • Enables or disable polygon offset fill

    Parameters

    • value: boolean

      Turn on or off webgl polygon offset testing.

    Returns void

setPolygonOffset

  • setPolygonOffset(value: number, scale: number): void
  • Sets the polygon offset.

    Parameters

    • value: number

      the polygon offset

    • scale: number

      the polygon offset scale

    Returns void

updateCheck

  • updateCheck(func: (system: StateSystem, state: State) => void, value: boolean): 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: StateSystem, state: State) => void

      the checking function to add or remove

    • value: boolean

      should the check function be added or removed.

    Returns void

Static Private checkBlendMode

  • A private little wrapper function that we call to check the blend mode.

    static

    Parameters

    • system: StateSystem
    • state: State

      the state that the blendMode will pulled from

    Returns void

Static Private checkPolygonOffset

  • A private little wrapper function that we call to check the polygon offset.

    static

    Parameters

    • system: StateSystem
    • state: State

      the state that the blendMode will pulled from

    Returns void

Generated using TypeDoc