MeshPhysicalMaterial.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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; [page:MeshStandardMaterial] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. An extension of the [page:MeshStandardMaterial] that allows for greater control over reflectivity.<br /><br />
  15. Note that for best results you should always specify an [page:.envMap environment map] when using this material.
  16. </p>
  17. <iframe id="scene" src="scenes/material-browser.html#MeshPhysicalMaterial"></iframe>
  18. <script>
  19. // iOS iframe auto-resize workaround
  20. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  21. var scene = document.getElementById( 'scene' );
  22. scene.style.width = getComputedStyle( scene ).width;
  23. scene.style.height = getComputedStyle( scene ).height;
  24. scene.setAttribute( 'scrolling', 'no' );
  25. }
  26. </script>
  27. <h2>Examples</h2>
  28. <p>
  29. [example:webgl_materials_variations_physical materials / variations / physical]<br />
  30. [example:webgl_materials_physical_clearcoat materials / physical / clearcoat]<br />
  31. [example:webgl_materials_physical_reflectivity materials / physical / reflectivity]<br />
  32. [example:webgl_materials_physical_transparency materials / physical / transparency]
  33. </p>
  34. <h2>Constructor</h2>
  35. <h3>[name]( [param:Object parameters] )</h3>
  36. <p>
  37. [page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
  38. Any property of the material (including any property inherited from [page:Material] and [page:MeshStandardMaterial]) can be passed in here.<br /><br />
  39. The exception is the property [page:Hexadecimal color], which can be passed in as a hexadecimal
  40. string and is *0xffffff* (white) by default. [page:Color.set]( color ) is called internally.
  41. </p>
  42. <h2>Properties</h2>
  43. <p>See the base [page:Material] and [page:MeshStandardMaterial] classes for common properties.</p>
  44. <h3>[property:Float clearcoat]</h3>
  45. <p>
  46. Represents the thickness of the clear coat layer, from *0.0* to *1.0*. You can use clear coat related properties to enable multilayer
  47. materials that have a thin translucent layer over the base layer. Typical examples for this model are car paints or acrylic.
  48. Default is *0.0*.
  49. </p>
  50. <h3>[property:Float clearcoatNormalMap]</h3>
  51. <p>Can be used to enable independent normals for the clear coat layer. Default is *null*.</p>
  52. <h3>[property:Vector2 clearcoatNormalScale]</h3>
  53. <p>How much [page:.clearcoatNormalMap] affects the clear coat layer, from *(0,0)* to *(1,1)*. Default is *(1,1)*.</p>
  54. <h3>[property:Float clearcoatRoughness]</h3>
  55. <p>Roughness of the clear coat layer, from *0.0* to *1.0*. Default is *0.0*.</p>
  56. <h3>[property:Object defines]</h3>
  57. <p>An object of the form:
  58. <code>
  59. {
  60. 'STANDARD': ''
  61. 'PHYSICAL': '',
  62. };
  63. </code>
  64. This is used by the [page:WebGLRenderer] for selecting shaders.
  65. </p>
  66. <h3>[property:Float reflectivity]</h3>
  67. <p>
  68. Degree of reflectivity, from *0.0* to *1.0*. Default is *0.5*.<br />
  69. This models the reflectivity of non-metallic materials. It has no effect when [page:MeshStandardMaterial.metalness metalness] is *1.0*
  70. </p>
  71. <h3>[property:Float transparency]</h3>
  72. <p>
  73. Degree of transparency, from *0.0* to *1.0*. Default is *0.0*.<br />
  74. Thin, transparent or semitransparent, plastic or glass materials remain largely reflective even if they are mostly transparent.
  75. The transparency property can be used to model these materials.<br />
  76. When transparency is non-zero, [page:Material.opacity opacity] should be set to *1*.
  77. </p>
  78. <h2>Methods</h2>
  79. <p>See the base [page:Material] and [page:MeshStandardMaterial] classes for common methods.</p>
  80. <h2>Source</h2>
  81. <p>
  82. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  83. </p>
  84. </body>
  85. </html>