MeshLambertMaterial.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Material] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">A material for non-shiny (Lambertian) surfaces, evaluated per vertex.</div>
  14. <iframe src='scenes/material-browser.html#MeshLambertMaterial'></iframe>
  15. <h2>Constructor</h2>
  16. <h3>[name]([page:Object parameters])</h3>
  17. <div>
  18. parameters -- parameters is an object with one or more properties defining the material's appearance.
  19. </div>
  20. <div>
  21. color — Line color in hexadecimal. Default is 0xffffff.<br />
  22. map — Sets the texture map. Default is null <br />
  23. specularMap — Set specular map. Default is null.<br />
  24. alphaMap — Set alpha map. Default is null.<br />
  25. envMap — Set env map. Default is null.<br />
  26. fog — Define whether the material color is affected by global fog settings. Default is false.<br />
  27. shading — How the triangles of a curved surface are rendered. Default is [page:Materials THREE.SmoothShading].<br/>
  28. wireframe — Render geometry as wireframe. Default is false (i.e. render as smooth shaded).<br/>
  29. wireframeLinewidth — Controls wireframe thickness. Default is 1.<br/>
  30. wireframeLinecap — Define appearance of line ends. Default is 'round'.<br />
  31. wireframeLinejoin — Define appearance of line joints. Default is 'round'.<br />
  32. vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.<br />
  33. skinning — Define whether the material uses skinning. Default is false.<br />
  34. morphTargets — Define whether the material uses morphTargets. Default is false.<br/>
  35. </div>
  36. <h2>Properties</h2>
  37. <div>See the base [page:Material] class for common parameters.</div>
  38. <h3>[property:Color color]</h3>
  39. <div>
  40. Diffuse color of the material. Default is white.<br />
  41. </div>
  42. <h3>[property:Color emissive]</h3>
  43. <div>
  44. Emissive (light) color of the material, essentially a solid color unaffected by other lighting. Default is black.<br />
  45. </div>
  46. <h3>[property:Texture map]</h3>
  47. <div>Set color texture map. Default is null.</div>
  48. <h3>[property:Texture specularMap]</h3>
  49. <div>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.</div>
  50. <h3>[property:Texture alphaMap]</h3>
  51. <div>The alpha map is a grayscale texture that controls the opacity across the surface (black: fully transparent; white: fully opaque). Default is null.</div>
  52. <div>Only the color of the texture is used, ignoring the alpha channel if one exists. For RGB and RGBA textures, the [page:WebGLRenderer 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.</div>
  53. <h3>[property:TextureCube envMap]</h3>
  54. <div>Set env map. Default is null.</div>
  55. <h3>[property:Integer combine]</h3>
  56. <div>How to combine the result of the surface's color with the environment map, if any.</div>
  57. <div>Options are [page:Textures THREE.Multiply] (default), [page:Textures THREE.MixOperation], [page:Textures THREE.AddOperation]. If mix is chosen, the reflectivity is used to blend between the two colors.</div>
  58. <h3>[property:Float reflectivity]</h3>
  59. <div>How much the environment map affects the surface; also see "combine".</div>
  60. <h3>[property:Float refractionRatio]</h3>
  61. <div>The index of refraction for an environment map using [page:Textures THREE.CubeRefractionMapping]. Default is *0.98*.</div>
  62. <h3>[property:Boolean fog]</h3>
  63. <div>Define whether the material color is affected by global fog settings. Default is *true*.</div>
  64. <div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
  65. <h3>[property:Integer shading]</h3>
  66. <div>How the triangles of a curved surface are rendered: as a smooth surface, as flat separate facets, or no shading at all.</div>
  67. <div>Options are [page:Materials THREE.SmoothShading] (default), [page:Materials THREE.FlatShading].</div>
  68. <h3>[property:Boolean wireframe]</h3>
  69. <div>Whether the triangles' edges are displayed instead of surfaces. Default is *false*.</div>
  70. <h3>[property:Float wireframeLinewidth]</h3>
  71. <div>Line thickness for wireframe mode. Default is *1.0*.</div>
  72. <div>Due to limitations in the <a href="https://code.google.com/p/angleproject/" target="_blank">ANGLE layer</a>, on Windows platforms linewidth will always be 1 regardless of the set value.</div>
  73. <h3>[property:String wireframeLinecap]</h3>
  74. <div>Define appearance of line ends. Possible values are "butt", "round" and "square". Default is 'round'.</div>
  75. <div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
  76. <h3>[property:String wireframeLinejoin]</h3>
  77. <div>Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.</div>
  78. <div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
  79. <h3>[property:Integer vertexColors]</h3>
  80. <div>Define how the vertices gets colored. Possible values are THREE.NoColors, THREE.FaceColors and THREE.VertexColors. Default is THREE.NoColors.</div>
  81. <div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
  82. <h3>[property:Boolean skinning]</h3>
  83. <div>Define whether the material uses skinning. Default is *false*.</div>
  84. <h3>[property:Boolean morphTargets]</h3>
  85. <div>Define whether the material uses morphTargets. Default is *false*.</div>
  86. <h3>[property:boolean morphNormals]</h3>
  87. <div>
  88. Defines whether the material uses morphNormals. Set as true to pass morphNormal attributes from the [page:Geometry]
  89. to the shader. Default is *false*.
  90. </div>
  91. <h2>Methods</h2>
  92. <h2>Source</h2>
  93. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  94. </body>
  95. </html>