MeshBasicMaterial.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  6. <script src="../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../page.css" />
  8. </head>
  9. <body>
  10. [page:Material] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">A material for drawing geometries in a simple shaded (flat or wireframe) way.</div>
  13. <div class="desc">The default will render as flat polygons. To draw the mesh as wireframe, simply set the 'wireframe' property to true.</div>
  14. <h2>Constructor</h2>
  15. <h3>[name]( [page:Object parameters] )</h3>
  16. <div>parameters is an object with one or more properties defining the material's appearance.</div>
  17. <div>
  18. color — geometry color in hexadecimal. Default is 0xffffff.<br />
  19. wireframe — render geometry as wireframe. Default is false.<br />
  20. wireframeLinewidth — Line thickness. Default is 1.<br />
  21. wireframeLinecap — Define appearance of line ends. Default is 'round'.<br />
  22. wireframeLinejoin — Define appearance of line joints. Default is 'round'.<br />
  23. shading — Define shading type. Default is THREE.SmoothShading.<br />
  24. vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.<br />
  25. fog — Define whether the material color is affected by global fog settings. Default is true.<br />
  26. lightMap — Set light map. Default is null.<br />
  27. specularMap — Set specular map. Default is null.<br />
  28. envMap — Set env map. Default is null.<br />
  29. skinning — Define whether the material uses skinning. Default is false.<br />
  30. morphTargets — Define whether the material uses morphTargets. Default is false.
  31. </div>
  32. <h2>Properties</h2>
  33. <h3>.[page:Integer color]</h3>
  34. <div>Sets the color of the geometry. Default is 0xffffff.</div>
  35. <h3>.[page:Boolean wireframe]</h3>
  36. <div>Render geometry as wireframe. Default is false (i.e. render as flat polygons).</div>
  37. <h3>.[page:Float wireframeLinewidth]</h3>
  38. <div>Controls wireframe thickness. Default is 1.</div>
  39. <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>
  40. <h3>.[page:String wireframeLinecap]</h3>
  41. <div>Define appearance of line ends. Possible values are "butt", "round" and "square". Default is 'round'.</div>
  42. <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>
  43. <h3>.[page:String wireframeLinejoin]</h3>
  44. <div>Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.</div>
  45. <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>
  46. <h3>.[page:String shading]</h3>
  47. <div>Define shading type. Default is THREE.SmoothShading.</div>
  48. <h3>.[page:Integer vertexColors]</h3>
  49. <div>Define how the vertices gets colored. Possible values are THREE.NoColors, THREE.FaceColors and THREE.VertexColors. Default is THREE.NoColors.</div>
  50. <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>
  51. <h3>.[page:Boolean fog]</h3>
  52. <div>Define whether the material color is affected by global fog settings.</div>
  53. <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>
  54. <h3>.[page:Texture lightMap]</h3>
  55. <div>Set light map. Default is null.</div>
  56. <h3>.[page:Texture specularMap]</h3>
  57. <div>Set specular map. Default is null.</div>
  58. <h3>.[page:TextureCube envMap]</h3>
  59. <div>Set env map. Default is null.</div>
  60. <h3>.[page:Boolean skinning]</h3>
  61. <div>Define whether the material uses skinning. Default is false.</div>
  62. <h3>.[page:Boolean morphTargets]</h3>
  63. <div>Define whether the material uses morphTargets. Default is false.</div>
  64. <h3>.[page:Texture map]</h3>
  65. <div>
  66. Sets the texture map. Default is null.
  67. </div>
  68. <h3>.[page:number combine]</h3>
  69. <div>
  70. How to combine the result of the surface's color with the environment map, if any.
  71. </div>
  72. <h3>.[page:number reflectivity]</h3>
  73. <div>
  74. How much the environment map affects the surface; also see "combine".
  75. </div>
  76. <h3>.[page:number refractionRatio]</h3>
  77. <div>
  78. The index of refraction for an environment map using [page:Textures THREE.CubeRefractionMapping]. Default is *0.98*.
  79. </div>
  80. <h2>Methods</h2>
  81. <h2>Source</h2>
  82. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  83. </body>
  84. </html>