Options
All
  • Public
  • Public/Protected
  • All
Menu

Materials are used to render a mesh with a specific visual appearance.

Hierarchy

Index

Constructors

constructor

Properties

Protected _renderSortType

_renderSortType: MaterialRenderSortType = MaterialRenderSortType.opaque

Protected Optional _shader

_shader?: MeshShader

drawMode

drawMode: DRAW_MODES = DRAW_MODES.TRIANGLES

Draw mode used to render a mesh.

renderSortType

renderSortType: MaterialRenderSortType = MaterialRenderSortType.opaque

Sort type used to render a mesh. Transparent materials will be rendered after opaque materials.

state

state: State & { clockwiseFrontFace: boolean; culling: boolean; depthTest: boolean } = ...

State used to render a mesh.

Accessors

blendMode

  • get blendMode(): BLEND_MODES
  • set blendMode(value: BLEND_MODES): void

depthMask

  • get depthMask(): boolean
  • set depthMask(value: boolean): void
  • Value indicating if writing into the depth buffer is enabled or disabled. Depth mask feature is only available in PixiJS 6.0+ and won't have any effects in previous versions.

    Returns boolean

  • Value indicating if writing into the depth buffer is enabled or disabled. Depth mask feature is only available in PixiJS 6.0+ and won't have any effects in previous versions.

    Parameters

    • value: boolean

    Returns void

doubleSided

  • get doubleSided(): boolean
  • set doubleSided(value: boolean): void
  • Value indicating if the material is double sided. When set to true, the culling state will be set to false.

    Returns boolean

  • Value indicating if the material is double sided. When set to true, the culling state will be set to false.

    Parameters

    • value: boolean

    Returns void

isInstancingSupported

  • get isInstancingSupported(): boolean

Methods

createInstance

  • createInstance(): unknown

Abstract createShader

  • Creates a shader used to render the specified mesh.

    Parameters

    • mesh: Mesh3D

      The mesh to create the shader for.

    • renderer: Renderer

      The renderer to use.

    Returns undefined | MeshShader

destroy

  • destroy(): void

render

  • render(mesh: Mesh3D, renderer: Renderer): void

Optional Abstract updateUniforms

Generated using TypeDoc