StandardMaterial

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

alpha

alpha: number

Gets the alpha value of the material

alphaCutOff

alphaCutOff: number

Defines the alpha limits in alpha test mode

alphaMode

alphaMode: number

Gets the value of the alpha mode

ambientColor

ambientColor: Color3

ambientTexture

ambientTexture: Nullable<BaseTexture>

animations

animations: Array<Animation>

Stores the animations for the material

backFaceCulling

backFaceCulling: boolean

Gets the back-face culling state

bumpTexture

bumpTexture: Nullable<BaseTexture>

cameraColorCurves

cameraColorCurves: Nullable<ColorCurves>

The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT). They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects. These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image; corresponding to low luminance, medium luminance, and high luminance areas respectively.

cameraColorCurvesEnabled

cameraColorCurvesEnabled: boolean

Sets wether the color curves effect is enabled.

cameraColorGradingEnabled

cameraColorGradingEnabled: boolean

Gets wether the color grading effect is enabled.

cameraColorGradingTexture

cameraColorGradingTexture: Nullable<BaseTexture>

Sets the Color Grading 2D Lookup Texture.

cameraContrast

cameraContrast: number

Sets The camera contrast used on this material.

cameraExposure

cameraExposure: number

The camera exposure used on this material. This property is here and not in the camera to allow controlling exposure without full screen post process. This corresponds to a photographic exposure.

cameraToneMappingEnabled

cameraToneMappingEnabled: boolean

Sets wether tonemapping is enabled or not

checkReadyOnEveryCall

checkReadyOnEveryCall: boolean

Specifies if the ready state should be checked on each call

checkReadyOnlyOnce

checkReadyOnlyOnce: boolean

Specifies if the ready state should be checked once

customShaderNameResolve

customShaderNameResolve: function

Type declaration

    • (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines): string
    • Parameters

      • shaderName: string
      • uniforms: string[]
      • uniformBuffers: string[]
      • samplers: string[]
      • defines: StandardMaterialDefines

      Returns string

diffuseColor

diffuseColor: Color3

diffuseFresnelParameters

diffuseFresnelParameters: FresnelParameters

diffuseTexture

diffuseTexture: Nullable<BaseTexture>

disableDepthWrite

disableDepthWrite: boolean

Specifies if depth writing should be disabled

disableLighting

disableLighting: boolean

doNotSerialize

doNotSerialize: boolean

Specifies if the material should be serialized

emissiveColor

emissiveColor: Color3

emissiveFresnelParameters

emissiveFresnelParameters: FresnelParameters

emissiveTexture

emissiveTexture: Nullable<BaseTexture>

fillMode

fillMode: number

Sets the material fill mode

fogEnabled

fogEnabled: boolean

Gets the value of the fog enabled state

forceDepthWrite

forceDepthWrite: boolean

Specifies if depth writing should be forced

getRenderTargetTextures

getRenderTargetTextures: function

Callback triggered to get the render target textures

hasRenderTargetTextures

hasRenderTargetTextures: boolean

Gets a boolean indicating that current material needs to register RTT

id

id: string

The ID of the material

imageProcessingConfiguration

imageProcessingConfiguration: ImageProcessingConfiguration

Sets the Default image processing configuration used either in the this material.

If sets to null, the scene one is in use.

indexOfRefraction

indexOfRefraction: number

invertNormalMapX

invertNormalMapX: boolean

invertNormalMapY

invertNormalMapY: boolean

invertRefractionY

invertRefractionY: boolean

isFrozen

isFrozen: boolean

Specifies if updates for the material been locked

lightmapTexture

lightmapTexture: Nullable<BaseTexture>

linkEmissiveWithDiffuse

linkEmissiveWithDiffuse: boolean

maxSimultaneousLights

maxSimultaneousLights: number

name

name: string

The name of the material

needDepthPrePass

needDepthPrePass: boolean

Gets the depth pre-pass value

onBind

onBind: function

Called during a bind event

Type declaration

onBindObservable

onBindObservable: Observable<AbstractMesh>

An event triggered when the material is bound

onCompiled

onCompiled: function

Callback triggered when the material is compiled

Type declaration

    • Parameters

      Returns void

onDispose

onDispose: function

Called during a dispose event

Type declaration

    • (): void
    • Returns void

onDisposeObservable

onDisposeObservable: Observable<Material>

An event triggered when the material is disposed

onError

onError: function

Callback triggered when an error occurs

Type declaration

    • (effect: Effect, errors: string): void
    • Parameters

      • effect: Effect
      • errors: string

      Returns void

onUnBindObservable

onUnBindObservable: Observable<Material>

An event triggered when the material is unbound

opacityFresnelParameters

opacityFresnelParameters: FresnelParameters

opacityTexture

opacityTexture: Nullable<BaseTexture>

parallaxScaleBias

parallaxScaleBias: number

pointSize

pointSize: number

Stores the size of points

pointsCloud

pointsCloud: boolean

Sets the state of point cloud mode

reflectionFresnelParameters

reflectionFresnelParameters: FresnelParameters

reflectionTexture

reflectionTexture: Nullable<BaseTexture>

refractionFresnelParameters

refractionFresnelParameters: FresnelParameters

refractionTexture

refractionTexture: Nullable<BaseTexture>

roughness

roughness: number

separateCullingPass

separateCullingPass: boolean

Specifies if there should be a separate pass for culling

sideOrientation

sideOrientation: number

Stores the value for side orientation

specularColor

specularColor: Color3

specularPower

specularPower: number

specularTexture

specularTexture: Nullable<BaseTexture>

state

state: string

The state of the material

storeEffectOnSubMeshes

storeEffectOnSubMeshes: boolean

Specifies if the effect should be stored on sub meshes

twoSidedLighting

twoSidedLighting: boolean

uniqueId

uniqueId: number

Gets or sets the unique id of the material

useAlphaFromDiffuseTexture

useAlphaFromDiffuseTexture: boolean

useEmissiveAsIllumination

useEmissiveAsIllumination: boolean

useGlossinessFromSpecularMapAlpha

useGlossinessFromSpecularMapAlpha: boolean

useLightmapAsShadowmap

useLightmapAsShadowmap: boolean

useLogarithmicDepth

useLogarithmicDepth: boolean

useObjectSpaceNormalMap

useObjectSpaceNormalMap: boolean

Allows using an object space normal map (instead of tangent space).

useParallax

useParallax: boolean

useParallaxOcclusion

useParallaxOcclusion: boolean

useReflectionFresnelFromSpecular

useReflectionFresnelFromSpecular: boolean

useReflectionOverAlpha

useReflectionOverAlpha: boolean

useSpecularOverAlpha

useSpecularOverAlpha: boolean

wireframe

wireframe: boolean

Sets the state of wireframe mode

zOffset

zOffset: number

Stores the z offset value

Static AllDirtyFlag

AllDirtyFlag: number

The all dirty flag value

Static AmbientTextureEnabled

AmbientTextureEnabled: boolean

Static AttributesDirtyFlag

AttributesDirtyFlag: number

The dirty attribute flag value

Static BumpTextureEnabled

BumpTextureEnabled: boolean

Static ClockWiseSideOrientation

ClockWiseSideOrientation: number

Returns the clock-wise side orientation

Static ColorGradingTextureEnabled

ColorGradingTextureEnabled: boolean

Static CounterClockWiseSideOrientation

CounterClockWiseSideOrientation: number

Returns the counter clock-wise side orientation

Static DiffuseTextureEnabled

DiffuseTextureEnabled: boolean

Static EmissiveTextureEnabled

EmissiveTextureEnabled: boolean

Static FresnelDirtyFlag

FresnelDirtyFlag: number

The dirty fresnel flag value

Static FresnelEnabled

FresnelEnabled: boolean

Static LightDirtyFlag

LightDirtyFlag: number

The dirty light flag value

Static LightmapTextureEnabled

LightmapTextureEnabled: boolean

Static LineListDrawMode

LineListDrawMode: number

Returns the line list draw mode

Static LineLoopDrawMode

LineLoopDrawMode: number

Returns the line loop draw mode

Static LineStripDrawMode

LineStripDrawMode: number

Returns the line strip draw mode

Static MiscDirtyFlag

MiscDirtyFlag: number

The dirty misc flag value

Static OpacityTextureEnabled

OpacityTextureEnabled: boolean

Static PointFillMode

PointFillMode: number

Returns the point fill mode

Static PointListDrawMode

PointListDrawMode: number

Returns the point list draw mode

Static ReflectionTextureEnabled

ReflectionTextureEnabled: boolean

Static RefractionTextureEnabled

RefractionTextureEnabled: boolean

Static SpecularTextureEnabled

SpecularTextureEnabled: boolean

Static TextureDirtyFlag

TextureDirtyFlag: number

The dirty texture flag value

Static TriangleFanDrawMode

TriangleFanDrawMode: number

Returns the triangle fan draw mode

Static TriangleFillMode

TriangleFillMode: number

Returns the triangle fill mode

Static TriangleStripDrawMode

TriangleStripDrawMode: number

Returns the triangle strip draw mode

Static WireFrameFillMode

WireFrameFillMode: number

Returns the wireframe mode

Methods

bind

bindForSubMesh

bindOnlyNormalMatrix

  • bindOnlyNormalMatrix(normalMatrix: Matrix): void

bindOnlyWorldMatrix

  • bindOnlyWorldMatrix(world: Matrix): void

bindSceneUniformBuffer

  • Binds the scene's uniform buffer to the effect.

    Parameters

    • effect: Effect

      defines the effect to bind to the scene uniform buffer

    • sceneUbo: UniformBuffer

      defines the uniform buffer storing scene data

    Returns void

bindView

  • bindView(effect: Effect): void
  • Binds the view matrix to the effect

    Parameters

    • effect: Effect

      defines the effect to bind the view matrix to

    Returns void

bindViewProjection

  • bindViewProjection(effect: Effect): void
  • Binds the view projection matrix to the effect

    Parameters

    • effect: Effect

      defines the effect to bind the view projection matrix to

    Returns void

buildUniformLayout

  • buildUniformLayout(): void
  • Returns void

clone

dispose

  • dispose(forceDisposeEffect?: boolean, forceDisposeTextures?: boolean): void
  • Parameters

    • Optional forceDisposeEffect: boolean
    • Optional forceDisposeTextures: boolean

    Returns void

forceCompilation

  • forceCompilation(mesh: AbstractMesh, onCompiled?: function, options?: Partial<object>): void
  • Force shader compilation

    Parameters

    • mesh: AbstractMesh

      defines the mesh associated with this material

    • Optional onCompiled: function

      defines a function to execute once the material is compiled

    • Optional options: Partial<object>

      defines the options to configure the compilation

    Returns void

forceCompilationAsync

  • forceCompilationAsync(mesh: AbstractMesh, options?: Partial<object>): Promise<void>
  • Force shader compilation

    Parameters

    • mesh: AbstractMesh

      defines the mesh that will use this material

    • Optional options: Partial<object>

      defines additional options for compiling the shaders

    Returns Promise<void>

    a promise that resolves when the compilation completes

freeze

  • freeze(): void
  • Locks updates for the material

    Returns void

getActiveTextures

getAlphaTestTexture

getAnimatables

getBindedMeshes

getClassName

  • getClassName(): string

getEffect

getScene

hasTexture

isReady

  • isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean

isReadyForSubMesh

markAsDirty

  • markAsDirty(flag: number): void
  • Marks a define in the material to indicate that it needs to be re-computed

    Parameters

    • flag: number

      defines a flag used to determine which parts of the material have to be marked as dirty

    Returns void

markDirty

  • markDirty(): void
  • Marks the material to indicate that it needs to be re-calculated

    Returns void

needAlphaBlending

  • needAlphaBlending(): boolean

needAlphaBlendingForMesh

  • Specifies if the mesh will require alpha blending

    Parameters

    Returns boolean

    a boolean specifying if alpha blending is needed for the mesh

needAlphaTesting

  • needAlphaTesting(): boolean

serialize

  • serialize(): any

toString

  • toString(fullDetails?: boolean): string
  • Returns a string representation of the current material

    Parameters

    • Optional fullDetails: boolean

      defines a boolean indicating which levels of logging is desired

    Returns string

    a string with material information

unbind

  • unbind(): void

unfreeze

  • unfreeze(): void
  • Unlocks updates for the material

    Returns void

Static Parse

Static ParseMultiMaterial

  • Creates a MultiMaterial from parsed MultiMaterial data.

    Parameters

    • parsedMultiMaterial: any

      defines parsed MultiMaterial data.

    • scene: Scene

      defines the hosting scene

    Returns MultiMaterial

    a new MultiMaterial

Generated using TypeDoc