Material

MeshLambertMaterial

A material for non-shiny (Lambertian) surfaces, evaluated per vertex.

Constructor

MeshLambertMaterial( parameters )

parameters -- parameters is an object with one or more properties defining the material's appearance.
color — Line color in hexadecimal. Default is 0xffffff.
map — Sets the texture map. Default is null
lightMap — Set light map. Default is null.
lightMapIntensity — Set light map intensity. Default is 1.
aoMap — Set ao map. Default is null.
aoMapIntensity — Set ao map intensity. Default is 1.
emissive - Set emissive color. Default is 0x000000.
emissiveMap — Set emissive map. Default is null.
emissiveIntensity — Set emissive map intensity. Default is 1.
specularMap — Set specular map. Default is null.
alphaMap — Set alpha map. Default is null.
envMap — Set env map. Default is null.
combine — Set combine operation. Default is THREE.MultiplyOperation.
reflectivity — Set reflectivity. Default is 1.
refractionRatio — Set refraction ratio. Default is 0.98.
fog — Define whether the material color is affected by global fog settings. Default is false.
wireframe — Render geometry as wireframe. Default is false (i.e. render as smooth shaded).
wireframeLinewidth — Controls wireframe thickness. Default is 1.
wireframeLinecap — Define appearance of line ends. Default is 'round'.
wireframeLinejoin — Define appearance of line joints. Default is 'round'.
vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.
skinning — Define whether the material uses skinning. Default is false.
morphTargets — Define whether the material uses morphTargets. Default is false.
morphNormals — Define whether the material uses morphNormals. Default is false.

Properties

See the base Material class for common properties.

.color

Diffuse color of the material. Default is white.

.map

Set color texture map. Default is null.

.lightMap

Set light map. Default is null. The lightMap requires a second set of UVs.

.lightMapIntensity

TODO

.aoMap

Set ambient occlusion map. Default is null. The aoMap requires a second set of UVs.

.aoMapIntensity

TODO

.emissive

Emissive (light) color of the material, essentially a solid color unaffected by other lighting. Default is black.

.emissiveMap

Set emisssive (glow) map. Default is null. The emissive map color is modulated by the emissive color and the emissive intensity. If you have an emissive map, be sure to set the emissive color to something other than black.

.emissiveIntensity

Intensity of the emissive light. Modulates the emissive color. Default is 1.

.specularMap

Since this material does not have a specular component, the specular value affects only how much of the environment map affects the surface. Default is null.

.alphaMap

The alpha map is a grayscale texture that controls the opacity across the surface (black: fully transparent; white: fully opaque). Default is null.
Only the color of the texture is used, ignoring the alpha channel if one exists. For RGB and RGBA textures, the WebGL renderer will use the green channel when sampling this texture due to the extra bit of precision provided for green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and luminance/alpha textures will also still work as expected.

.envMap

Set env map. Default is null.

.combine

How to combine the result of the surface's color with the environment map, if any.
Options are THREE.Multiply (default), THREE.MixOperation, THREE.AddOperation. If mix is chosen, the reflectivity is used to blend between the two colors.

.reflectivity

How much the environment map affects the surface; also see "combine".

.refractionRatio

The index of refraction for an environment map using THREE.CubeRefractionMapping. Default is 0.98.

.fog

Define whether the material color is affected by global fog settings. Default is true.
This setting might not have any effect when used with certain renderers. For example, it is ignored with the Canvas renderer, but does work with the WebGL renderer.

.wireframe

Whether the triangles' edges are displayed instead of surfaces. Default is false.

.wireframeLinewidth

Line thickness for wireframe mode. Default is 1.0.
Due to limitations in the ANGLE layer, on Windows platforms linewidth will always be 1 regardless of the set value.

.wireframeLinecap

Define appearance of line ends. Possible values are "butt", "round" and "square". Default is 'round'.
This setting might not have any effect when used with certain renderers. For example, it is ignored with the WebGL renderer, but does work with the Canvas renderer.

.wireframeLinejoin

Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.
This setting might not have any effect when used with certain renderers. For example, it is ignored with the WebGL renderer, but does work with the Canvas renderer.

.vertexColors

Define how the vertices gets colored. Possible values are THREE.NoColors, THREE.FaceColors and THREE.VertexColors. Default is THREE.NoColors.
This setting might not have any effect when used with certain renderers. For example, it is ignored with the Canvas renderer, but does work with the WebGL renderer.

.skinning

Define whether the material uses skinning. Default is false.

.morphTargets

Define whether the material uses morphTargets. Default is false.

.morphNormals

Defines whether the material uses morphNormals. Set as true to pass morphNormal attributes from the Geometry to the shader. Default is false.

Methods

Source

src/materials/MeshLambertMaterial.js
Edit