API Docs for: 2.7.3
Show:

wnp.StandardMaterial Class

Extends BABYLON.StandardMaterial
Module: Materials
Parent Module: Wanaplan

Abstract class for Materials.
N.B : This class is derived from BABYLON.StandardMaterial.
Check the Babylon SOKRATE documentation for more information about materials.

Constructor

wnp.StandardMaterial

(
  • name
  • scene
)

Parameters:

  • name String

    A name.

  • scene BABYLON.Scene

    The scene.

Methods

_batchedBind

() private

_isReady

(
  • defines
  • optionalDefines
  • engine
  • mesh
)
private

Checks if the material is ready. (If all textures and attributes are loaded correctly)

Parameters:

  • defines String[]

    The basic defines of the shader.

  • optionalDefines String[]

    The optional defines of your custom shader.

  • engine BABYLON.engine

    The engine of babylon.

  • mesh BABYLON.Mesh

    The mesh where the material is set on.

_mandatoryBind

(
  • world
  • mesh
)
private

Bind the mandatory things.

Parameters:

  • world BABYLON.Matrix

    The world Matrix.

  • mesh BABYLON.mesh

    The mesh.

_preBind

() private

bind

(
  • world
  • mesh
)
private

Bind the Important value of the material. Send the property of the material on the GPU for the shaders.

Parameters:

  • world BABYLON.Matrix

    The world Matrix.

  • mesh BABYLON.mesh

    The mesh.

bindAlpha

() private

Bind alpha transparency to the GPU.

bindBump

() private

Bind bump informations and texture to the GPU.

bindColor

() private

Bind the diffuse color to the GPU.

bindDiffuse

() private

Bind diffuse informations and texture to the GPU.

bindEnv

() private

Bind envirronement informations and texture to the GPU.

bindLights

() private

Bind lights informations to the GPU.

bindShadows

(
  • world
  • mesh
)
private

Bind shadows informations to the GPU.

Parameters:

  • world BABYLON.Matrix

    The world Matrix.

  • mesh BABYLON.mesh

    The mesh.

bindView

() private

Bind the camera informations to the GPU.

clone

(
  • name
)

Clones the material.

Parameters:

isReady

(
  • mesh
)
private

Checks if the material is ready. (If all textures and attributes are loaded correctly)

Parameters:

  • mesh BABYLON.Mesh

    The mesh where the material is set on.

setBaseColor

(
  • color
)

Sets the base color of the material. This method has different behaviours depending on the child class implementation.

Parameters:

  • color BABYLON.Color3

    The color.

unbind

() private

Unbind the Important value of the material.

Properties

addColor

BABYLON.Color3 private

Whenever a textured material is colorable (i.e. colorable tiles), this property stores the blent color.

Default: null

isDefault

Boolean

Flag which indicates if the material has been applied by the engine or by the user.
/!\ WARNING : If set to true, in order to save storage, the material will NOT be serialized.

Default: true