WanaPlan

API Docs for: 2.7.0
Show:

wnp.StandardMaterial

Extends BABYLON.StandardMaterial
Module: Materials
Parent Module: Wanaplan

Summary

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

Syntax

wnp.StandardMaterial

(
  • name
  • scene
)

Summary

Parameters:

  • name String

    A name.

  • scene BABYLON.Scene

    The scene.

Methods

_batchedBind

Syntax

_batchedBind

() private

Summary

_isReady

Syntax

_isReady

(
  • defines
  • optionalDefines
  • engine
  • mesh
)
private

Summary

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

Syntax

_mandatoryBind

(
  • world
  • mesh
)
private

Summary

Bind the mandatory things.

Parameters:

  • world BABYLON.Matrix

    The world Matrix.

  • mesh BABYLON.mesh

    The mesh.

_preBind

Syntax

_preBind

() private

Summary

bind

Syntax

bind

(
  • world
  • mesh
)
private

Summary

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

Syntax

bindAlpha

() private

Summary

Bind alpha transparency to the GPU.

bindBump

Syntax

bindBump

() private

Summary

Bind bump informations and texture to the GPU.

bindColor

Syntax

bindColor

() private

Summary

Bind the diffuse color to the GPU.

bindDiffuse

Syntax

bindDiffuse

() private

Summary

Bind diffuse informations and texture to the GPU.

bindEnv

Syntax

bindEnv

() private

Summary

Bind envirronement informations and texture to the GPU.

bindLights

Syntax

bindLights

() private

Summary

Bind lights informations to the GPU.

bindShadows

Syntax

bindShadows

(
  • world
  • mesh
)
private

Summary

Bind shadows informations to the GPU.

Parameters:

  • world BABYLON.Matrix

    The world Matrix.

  • mesh BABYLON.mesh

    The mesh.

bindView

Syntax

bindView

() private

Summary

Bind the camera informations to the GPU.

clone

Syntax

clone

(
  • name
)

Summary

Clones the material.

Parameters:

isReady

Syntax

isReady

(
  • mesh
)
private

Summary

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

Syntax

setBaseColor

(
  • color
)

Summary

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

Syntax

unbind

() private

Summary

Unbind the Important value of the material.

Properties

addColor

Syntax

addColor

BABYLON.Color3 private

Summary

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

Default: null

isDefault

Syntax

isDefault

Boolean

Summary

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