gameforge - v0.1.12
    Preparing search index...

    Class MeshMaterial

    Slightly opinionated default shader for PixiJS 2D objects.

    PIXI

    Hierarchy (View Summary)

    • MeshMaterial
    • Shader
      • MeshMaterial
    Index

    Constructors

    Properties

    _tintRGB: number
    batchable: boolean

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

    true
    
    disposeRunner: Runner
    pluginName: string

    Renderer plugin for batching.

    'batch'
    
    program: Program

    Program that the shader uses.

    uniformGroup: UniformGroup
    uvMatrix: TextureMatrix

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

    Accessors

    • get alpha(): number

      Returns number

    • set alpha(value: number): void

      This gets automatically set by the object using this.

      Parameters

      • value: number

      Returns void

      1
      
    • get texture(): Texture

      Reference to the texture being rendered.

      Returns Texture

    • set texture(value: Texture): void

      Parameters

      Returns void

    • get tint(): ColorSource

      Returns ColorSource

    • set tint(value: ColorSource): void

      Multiply tint for the material.

      Parameters

      Returns void

      0xFFFFFF
      
    • get uniforms(): Dict<any>

      Shader uniform values, shortcut for uniformGroup.uniforms.

      Returns Dict<any>

    Methods

    • 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

      • OptionalvertexSrc: string

        The source of the vertex shader.

      • OptionalfragmentSrc: string

        The source of the fragment shader.

      • Optionaluniforms: Dict<any>

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

      Returns Shader

      A shiny new PixiJS shader!