wnp.StandardMaterial
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
StringA name.
-
scene
BABYLON.SceneThe scene.
Item Index
Methods
Methods
_batchedBind
Syntax
_batchedBind
()
private
Summary
_isReady
Syntax
_isReady
-
defines
-
optionalDefines
-
engine
-
mesh
Summary
Checks if the material is ready. (If all textures and attributes are loaded correctly)
_mandatoryBind
Syntax
_mandatoryBind
-
world
-
mesh
Summary
Bind the mandatory things.
Parameters:
-
world
BABYLON.MatrixThe world Matrix.
-
mesh
BABYLON.meshThe mesh.
_preBind
Syntax
_preBind
()
private
Summary
bind
Syntax
bind
-
world
-
mesh
Summary
Bind the Important value of the material. Send the property of the material on the GPU for the shaders.
Parameters:
-
world
BABYLON.MatrixThe world Matrix.
-
mesh
BABYLON.meshThe 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
Summary
Bind shadows informations to the GPU.
Parameters:
-
world
BABYLON.MatrixThe world Matrix.
-
mesh
BABYLON.meshThe mesh.
bindView
Syntax
bindView
()
private
Summary
Bind the camera informations to the GPU.
isReady
Syntax
isReady
-
mesh
Summary
Checks if the material is ready. (If all textures and attributes are loaded correctly)
Parameters:
-
mesh
BABYLON.MeshThe 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.Color3The 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