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

Properties

Private _alphaMode

_alphaMode: StandardMaterialAlphaMode = StandardMaterialAlphaMode.opaque

Private Optional _baseColorTexture

_baseColorTexture: PIXI.Texture

Private Optional _debugMode

Private Optional _emissiveTexture

_emissiveTexture: PIXI.Texture

Private Optional _lightingEnvironment

_lightingEnvironment: LightingEnvironment

Private Optional _lightsCount

_lightsCount: undefined | number

Private Optional _metallicRoughnessTexture

_metallicRoughnessTexture: PIXI.Texture

Private Optional _normalTexture

_normalTexture: PIXI.Texture

Private Optional _occlusionTexture

_occlusionTexture: PIXI.Texture

Protected Optional _shader

_shader: MeshShader

Private Optional _shadowCastingLight

_shadowCastingLight: ShadowCastingLight

Private _skinUniforms

_skinUniforms: StandardMaterialSkinUniforms = new StandardMaterialSkinUniforms()

Private _unlit

_unlit: boolean = false

alphaCutoff

alphaCutoff: number = 0.5

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

baseColor

baseColor: number[] = [1, 1, 1, 1]

The base color of the material. Array containing RGBA values.

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 = PIXI.DRAW_MODES.TRIANGLES

Draw mode used to render a mesh.

emissive

emissive: number[] = [0, 0, 0]

The emissive color of the material. Array containing RGB values.

exposure

exposure: number = 3

The exposure (brightness) of the material.

metallic

metallic: number = 1

The metalness of the material.

renderType

renderType: MaterialRenderType = MaterialRenderType.opaque

Render type used to render a mesh. This will determine in which order the material is being rendered compared to other materials.

roughness

roughness: number = 1

The roughness of the material.

state

state: State & { clockwiseFrontFace: false; culling: true; depthTest: true } = Object.assign(new PIXI.State(), {culling: true, clockwiseFrontFace: false, depthTest: true})

State used to render a mesh.

Accessors

alphaMode

baseColorTexture

  • get baseColorTexture(): undefined | Texture
  • set baseColorTexture(value: Texture | undefined): void

blendMode

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

debugMode

doubleSided

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

emissiveTexture

  • get emissiveTexture(): undefined | Texture
  • set emissiveTexture(value: Texture | undefined): void

lightingEnvironment

metallicRoughnessTexture

  • get metallicRoughnessTexture(): undefined | Texture
  • set metallicRoughnessTexture(value: Texture | undefined): void

normalTexture

  • get normalTexture(): undefined | Texture
  • set normalTexture(value: Texture | undefined): void

occlusionTexture

  • get occlusionTexture(): undefined | Texture
  • set occlusionTexture(value: Texture | undefined): void

shadowCastingLight

unlit

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

Methods

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

Static factory

  • factory(properties?: {}): { create: any }

Generated using TypeDoc