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 _baseColor

_baseColor: Float32Array = new Float32Array(4)

Private Optional _baseColorTexture

_baseColorTexture: PIXI.Texture

Private Optional _debugMode

Private Optional _emissiveTexture

_emissiveTexture: PIXI.Texture

Private _instancingEnabled

_instancingEnabled: boolean = false

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 _renderSortType

_renderSortType: MaterialRenderSortType = MaterialRenderSortType.opaque

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: Color = new Color(1, 1, 1, 1)

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

Draw mode used to render a mesh.

emissive

emissive: Color = new Color(0, 0, 0, 0)

The emissive color of the material.

exposure

exposure: number = 3

The exposure (brightness) of the material.

metallic

metallic: number = 1

The metalness of the material.

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<Resource>
  • 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<Resource>
  • set emissiveTexture(value: Texture | undefined): void

isInstancingSupported

  • get isInstancingSupported(): boolean

lightingEnvironment

metallicRoughnessTexture

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

normalTexture

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

occlusionTexture

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

renderSortType

shadowCastingLight

unlit

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

Methods

createInstance

  • createInstance(): InstancedStandardMaterial

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(props?: {}): { create: any }

Generated using TypeDoc