HTML Encoding and Default Values⤴
<Material
ambientIntensity='0.2'
diffuseColor='0.8,0.8,0.8'
emissiveColor='0,0,0'
metadata='X3DMetadataObject'
shininess='0.2'
specularColor='0,0,0'
transparency='0'
></Material>
Fields⤴
These are the X3D / X3DOM fields of this node. Values should usually be received / set as strings via
DOM functions (i.e., using
setAttribute("myFieldName", "myFieldValue")
and
getAttribute("myFieldName")
).
Name | Type | Default Value | Range | Inheritance | Standard | Description |
---|---|---|---|---|---|---|
ambientIntensity | SFFloat | 0.2 | [0, 1] | X3DMaterialNode | The ambientIntensity field specifies how much ambient light from light sources this surface shall reflect. Ambient light is omnidirectional and depends only on the number of light sources, not their positions with respect to the surface. Ambient colour is calculated as ambientIntensity × diffuseColor. | |
diffuseColor | SFColor | 0.8,0.8,0.8 | X3DMaterialNode | The diffuseColor field reflects all X3D light sources depending on the angle of the surface with respect to the light source. The more directly the surface faces the light, the more diffuse light reflects. The emissiveColor field models "glowing" objects. This can be useful for displaying pre-lit models (where the light energy of the room is computed explicitly), or for displaying scientific data. | ||
emissiveColor | SFColor | 0,0,0 | X3DMaterialNode | The emissiveColor field models "glowing" objects. This can be useful for displaying pre-lit models (where the light energy of the room is computed explicitly), or for displaying scientific data. | ||
metadata | SFNode | X3DMetadataObject | Core/X3DNode | Field to add metadata information | ||
shininess | SFFloat | 0.2 | [0, 1] | X3DMaterialNode | The specularColor and shininess fields determine the specular highlights (e.g., the shiny spots on an apple). When the angle from the light to the surface is close to the angle from the surface to the viewer, the specularColor is added to the diffuse and ambient colour calculations. Lower shininess values produce soft glows, while higher values result in sharper, smaller highlights. | |
specularColor | SFColor | 0,0,0 | X3DMaterialNode | The specularColor and shininess fields determine the specular highlights (e.g., the shiny spots on an apple). When the angle from the light to the surface is close to the angle from the surface to the viewer, the specularColor is added to the diffuse and ambient colour calculations. Lower shininess values produce soft glows, while higher values result in sharper, smaller highlights. | ||
transparency | SFFloat | 0 | [0, 1] | X3DMaterialNode | The transparency field specifies how "clear" an object is, with 1.0 being completely transparent, and 0.0 completely opaque. |