MaterialUtils
A module containing useful utility methods to work with Verge3D materials.
Methods
- name — material name.
- color — material diffuse color.
- opacity — material opacity.
- profile — material profile, specifies which nodes will be used to compose the node graph. One of
"blender"
, "max"
, "maya"
.
Generate node-based diffuse (lambert) material with the given color
and opacity
params.
- name — material name.
- envTex — texture used for environment lighting.
- bkgTexOrColor — texture or color used for background.
Create node-based material which can be used for environment lighting and scene background.
- profile — material profile, specifies which nodes will be used to compose the node graph. One of
"blender"
, "max"
, "maya"
.
- params — (optional) additional material properties.
Generate node-based standard PBR material with the given set of parameters:
- color
- Material base color. Default is
'white'
.
- opacity
- Material opacity value. Default is
1.0
(opaque).
- metalness
- Material metalness value. Default is
0
(non-metallic).
- roughness
- Material roughness value. Default is
1
.
- emissive
- Material emissive color. Default is
'black'
.
- emissiveIntensity
- Material emissive color intensity. Default is
1
.
Dispose all textures found in the given material.
Source
For more info on how to obtain the source code of this module see this page.