Slightly opinionated default shader for PixiJS 2D objects.

Memberof

PIXI

Hierarchy (view full)

  • MeshMaterial
  • Shader
    • MeshMaterial

Constructors

Properties

_tintRGB: number
batchable: boolean

true if shader can be batch with the renderer's batch system.

Default

true
disposeRunner: Runner<any, any[]>
pluginName: string

Renderer plugin for batching.

Default

'batch'
program: Program

Program that the shader uses.

uniformGroup: UniformGroup<Dict<any>>
uvMatrix: TextureMatrix

TextureMatrix instance for this Mesh, used to track Texture changes.

Accessors

  • get alpha(): number
  • Returns number

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

    Parameters

    • value: number

    Returns void

    Default

    1
    
  • get texture(): Texture<Resource>
  • Reference to the texture being rendered.

    Returns Texture<Resource>

  • set texture(value): void
  • Parameters

    Returns void

  • get tint(): ColorSource
  • Returns ColorSource

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

    Parameters

    Returns void

    Default

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

    Returns Dict<any>

Methods

  • Parameters

    Returns boolean

  • Returns void

  • Gets called automatically by the Mesh. Intended to be overridden for custom PIXI.MeshMaterial objects.

    Returns void

  • A short hand function to create a shader based of a vertex and fragment shader.

    Parameters

    • Optional vertexSrc: string

      The source of the vertex shader.

    • Optional fragmentSrc: string

      The source of the fragment shader.

    • Optional uniforms: Dict<any>

      Custom uniforms to use to augment the built-in ones.

    Returns Shader

    A shiny new PixiJS shader!

Generated using TypeDoc