[page:Material] →

Lambert网格材质([name])

一种非光泽表面的材质,没有镜面高光。

该材质使用基于非物理的[link:https://en.wikipedia.org/wiki/Lambertian_reflectance Lambertian]模型来计算反射率。 这可以很好地模拟一些表面(例如未经处理的木材或石材),但不能模拟具有镜面高光的光泽表面(例如涂漆木材)。

使用[link:https://en.wikipedia.org/wiki/Gouraud_shading Gouraud]着色模型计算着色。这将计算每个顶点的着色 (即在[link:https://en.wikipedia.org/wiki/Shader#Vertex_shaders vertex shader]中)并在多边形的面上插入结果。

由于反射率和光照模型的简单性,[page:MeshPhongMaterial],[page:MeshStandardMaterial]或者[page:MeshPhysicalMaterial] 上使用这种材质时会以一些图形精度为代价,得到更高的性能。

构造函数(Constructor)

[name]( [param:Object parameters] )

[page:Object parameters] - (可选)用于定义材质外观的对象,具有一个或多个属性。 材质的任何属性都可以从此处传入(包括从[page:Material]继承的任何属性)。

属性[page:Hexadecimal color]例外,其可以作为十六进制字符串传递,默认情况下为 *0xffffff*(白色),内部调用[page:Color.set](color)。

属性(Properties)

共有属性请参见其基类[page:Material]。

[property:Texture alphaMap]

alpha贴图是一张灰度纹理,用于控制整个表面的不透明度。(黑色:完全透明;白色:完全不透明)。 默认值为null。

仅使用纹理的颜色,忽略alpha通道(如果存在)。 对于RGB和RGBA纹理,[page:WebGLRenderer WebGL]渲染器在采样此纹理时将使用绿色通道, 因为在DXT压缩和未压缩RGB 565格式中为绿色提供了额外的精度。 Luminance-only以及luminance/alpha纹理也仍然有效。

[property:Texture aoMap]

该纹理的红色通道用作环境遮挡贴图。默认值为null。aoMap需要第二组UV。

[property:Float aoMapIntensity]

环境遮挡效果的强度。默认值为1。零是不遮挡效果。

[property:Color color]

材质的颜色([page:Color]),默认值为白色 (0xffffff)。

[property:Integer combine]

如何将表面颜色的结果与环境贴图(如果有)结合起来。

选项为[page:Materials THREE.Multiply](默认值),[page:Materials THREE.MixOperation], [page:Materials THREE.AddOperation]。如果选择多个,则使用[page:.reflectivity]在两种颜色之间进行混合。

[property:Color emissive]

材质的放射(光)颜色,基本上是不受其他光照影响的固有颜色。默认为黑色。

[property:Texture emissiveMap]

设置放射(发光)贴图。默认值为null。放射贴图颜色由放射颜色和强度所调节。 如果你有一个放射贴图,请务必将放射颜色设置为黑色以外的其他颜色。

[property:Float emissiveIntensity]

放射光强度。调节发光颜色。默认为1。

[property:Texture envMap]

环境贴图。默认值为null。

[property:Texture lightMap]

光照贴图。默认值为null。lightMap需要第二组UV。

[property:Float lightMapIntensity]

烘焙光的强度。默认值为1。

[property:Texture map]

颜色贴图。默认为null。

[property:Float reflectivity]

环境贴图对表面的影响程度; 见[page:.combine]。默认值为1,有效范围介于0(无反射)和1(完全反射)之间。

[property:Float refractionRatio]

空气的折射率(IOR)(约为1)除以材质的折射率。它与环境映射模式[page:Textures THREE.CubeRefractionMapping] 和[page:Textures THREE.EquirectangularRefractionMapping]一起使用。 The index of refraction (IOR) of air (approximately 1) divided by the index of refraction of the material. It is used with environment mapping mode [page:Textures THREE.CubeRefractionMapping]. 折射率不应超过1。默认值为*0.98*。

[property:Texture specularMap]

材质使用的高光贴图。默认值为null。

[property:Boolean wireframe]

将几何体渲染为线框。默认值为*false*(即渲染为平面多边形)。

[property:String wireframeLinecap]

定义线两端的外观。可选值为 'butt','round' 和 'square'。默认为'round'。

该属性对应[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]属性, 并且会被[page:WebGLRenderer WebGL]渲染器忽略。

[property:String wireframeLinejoin]

定义线连接节点的样式。可选值为 'round', 'bevel' 和 'miter'。默认值为 'round'。

该属性对应[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]属性, 并且会被[page:WebGLRenderer WebGL]渲染器忽略。

[property:Float wireframeLinewidth]

控制线框宽度。默认值为1。

由于[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]与 大多数平台上[page:WebGLRenderer WebGL]渲染器的限制,无论如何设置该值,线宽始终为1。

方法(Methods)

共有方法请参见其基类[page:Material]。

源码(Source)

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]