Options
All
  • Public
  • Public/Protected
  • All
Menu

Slightly opinionated default shader for PixiJS 2D objects.

memberof

PIXI

Hierarchy

  • MeshMaterial
  • Shader
    • MeshMaterial

Index

Constructors

constructor

Properties

Private _alpha

_alpha: any

Private _colorDirty

_colorDirty: any

Private _tint

_tint: any

_tintRGB

_tintRGB: number

batchable

batchable: boolean

pluginName

pluginName: string

program

program: Program

uniformGroup

uniformGroup: UniformGroup

Readonly uvMatrix

uvMatrix: TextureMatrix

Accessors

alpha

  • get alpha(): number
  • set alpha(value: number): void
  • This gets automatically set by the object using this.

    Returns number

  • This gets automatically set by the object using this.

    default

    1

    member

    {number}

    Parameters

    • value: number

    Returns void

texture

  • Reference to the texture being rendered.

    member

    {PIXI.Texture}

    Returns Texture<Resource>

  • Reference to the texture being rendered.

    Parameters

    Returns void

tint

  • get tint(): number
  • set tint(value: number): void
  • Multiply tint for the material.

    Returns number

  • Multiply tint for the material.

    member

    {number}

    default

    0xFFFFFF

    Parameters

    • value: number

    Returns void

uniforms

  • get uniforms(): Dict<any>
  • Shader uniform values, shortcut for uniformGroup.uniforms

    readonly
    member

    {object}

    Returns Dict<any>

Methods

checkUniformExists

  • checkUniformExists(name: string, group: UniformGroup): boolean

destroy

  • destroy(): void
  • Returns void

update

  • update(): void
  • Gets called automatically by the Mesh. Intended to be overridden for custom MeshMaterial objects.

    Returns void

Static from

  • from(vertexSrc?: string, fragmentSrc?: string, uniforms?: Dict<any>): Shader
  • A short hand function to create a shader based of a vertex and fragment shader

    Parameters

    • Optional vertexSrc: string
    • Optional fragmentSrc: string
    • Optional uniforms: Dict<any>

    Returns Shader

    an shiny new Pixi shader!

Generated using TypeDoc