Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StandardMaterial

The standard material is using Physically-Based Rendering (PBR) which makes it suitable to represent a wide range of different surfaces. It's the default material when loading models from file.

Hierarchy

Index

Constructors

constructor

Properties

Protected _renderSortType

_renderSortType: MaterialRenderSortType = MaterialRenderSortType.opaque

Protected Optional _shader

_shader?: MeshShader

alphaCutoff

alphaCutoff: number = 0.5

The cutoff threshold when alpha mode is set to "mask".

baseColor

baseColor: Color = ...

The base color of the material.

Optional camera

camera?: Camera

The camera used when rendering a mesh. If this value is not set, the main camera will be used by default.

drawMode

drawMode: DRAW_MODES = DRAW_MODES.TRIANGLES

Draw mode used to render a mesh.

emissive

emissive: Color = ...

The emissive color of the material.

exposure

exposure: number = 1

The exposure (brightness) of the material.

metallic

metallic: number = 1

The metalness of the material.

renderSortType

renderSortType: MaterialRenderSortType = MaterialRenderSortType.opaque

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

roughness

roughness: number = 1

The roughness of the material.

state

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

State used to render a mesh.

Accessors

alphaMode

baseColorTexture

blendMode

  • get blendMode(): BLEND_MODES
  • set blendMode(value: BLEND_MODES): void
  • Blend mode used to render a mesh.

    Returns BLEND_MODES

  • Blend mode used to render a mesh.

    Parameters

    • value: BLEND_MODES

    Returns void

debugMode

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

emissiveTexture

isInstancingSupported

  • get isInstancingSupported(): boolean

lightingEnvironment

metallicRoughnessTexture

normalTexture

occlusionTexture

shadowCastingLight

unlit

  • get unlit(): boolean
  • set unlit(value: boolean): void

Methods

createInstance

createShader

  • createShader(mesh: Mesh3D, renderer: Renderer): undefined | StandardShader

destroy

  • destroy(): void

invalidateShader

  • invalidateShader(): void

render

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

updateUniforms

  • updateUniforms(mesh: Mesh3D, shader: Shader): void

Static create

Generated using TypeDoc