wnp.GlassMaterial Class
A material to represent objects made of glass. Has an env map, and is transparent.
Constructor
Item Index
Methods
Methods
_batchedBind
()
private
_isReady
(
private
-
defines
-
optionalDefines
-
engine
-
mesh
Checks if the material is ready.
(If all textures and attributes are loaded correctly)
_mandatoryBind
(
private
-
world
-
mesh
Bind the mandatory things.
Parameters:
-
world
BABYLON.MatrixThe world Matrix. -
mesh
BABYLON.meshThe mesh.
_preBind
()
private
bind
(
private
-
world
-
mesh
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
()
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
(
private
-
world
-
mesh
Bind shadows informations to the GPU.
Parameters:
-
world
BABYLON.MatrixThe world Matrix. -
mesh
BABYLON.meshThe mesh.
bindView
()
private
Bind the camera informations to the GPU.
isReady
(
private
-
mesh
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
(
-
color
Sets the base color of the material. This method has different behaviours
depending on the child class implementation.
Parameters:
-
color
BABYLON.Color3The 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