pixi.js
    Preparing search index...

    Class StateAdvanced

    This is a WebGL state, and is is passed to GlStateSystem.

    Each mesh rendered may require WebGL to be in a different state. For example you may want different blend mode or to enable polygon offsets

    Index

    Constructors

    Properties

    data: number

    The data is a unique number based on the states settings. This lets us quickly compare states with a single number rather than looking at all the individual settings.

    default2d: State = ...

    Accessors

    • get blend(): boolean

      Activates blending of the computed fragment color values.

      Returns boolean

      true
      
    • set blend(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get blendMode(): BLEND_MODES

      The blend mode to be applied when this state is set. Apply a value of normal to reset the blend mode. Setting this mode to anything other than NO_BLEND will automatically switch blending on.

      Returns BLEND_MODES

      'normal'
      
    • set blendMode(value: BLEND_MODES): void

      Parameters

      Returns void

    • get clockwiseFrontFace(): boolean

      Specifies whether or not front or back-facing polygons can be culled.

      Returns boolean

      false
      
    • set clockwiseFrontFace(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get culling(): boolean

      Activates culling of polygons.

      Returns boolean

      false
      
    • set culling(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get cullMode(): CULL_MODES

      Returns CULL_MODES

    • set cullMode(value: CULL_MODES): void

      The culling settings for this state none - No culling back - Back face culling front - Front face culling

      Parameters

      Returns void

    • get depthMask(): boolean

      Enables or disables writing to the depth buffer.

      Returns boolean

      true
      
    • set depthMask(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get depthTest(): boolean

      Activates depth comparisons and updates to the depth buffer.

      Returns boolean

      false
      
    • set depthTest(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get offsets(): boolean

      Activates adding an offset to depth values of polygon's fragments

      Returns boolean

      false
      
    • set offsets(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get polygonOffset(): number

      The polygon offset. Setting this property to anything other than 0 will automatically enable polygon offset fill.

      Returns number

      0
      
    • set polygonOffset(value: number): void

      Parameters

      • value: number

      Returns void

    Methods

    • Returns string

    • A quickly getting an instance of a State that is configured for 2d rendering.

      Returns State

      a new State with values set for 2d rendering