MeshPhysicalMaterial.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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"> [page:MeshStandardMaterial]的扩展,能够更好地控制反射率。<br /><br />
  14. 请注意,为了获得最佳效果,您在使用此材质时应始终指定环境贴图。
  15. </p>
  16. <iframe id="scene" src="scenes/material-browser.html#MeshPhysicalMaterial"></iframe>
  17. <script>
  18. // iOS iframe auto-resize workaround
  19. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  20. var scene = document.getElementById( 'scene' );
  21. scene.style.width = getComputedStyle( scene ).width;
  22. scene.style.height = getComputedStyle( scene ).height;
  23. scene.setAttribute( 'scrolling', 'no' );
  24. }
  25. </script>
  26. <h2>例子(Examples)</h2>
  27. [example:webgl_materials_variations_physical materials / variations / physical]<br />
  28. [example:webgl_materials_reflectivity materials / reflectivity]
  29. <h2>构造函数(Constructor)</h2>
  30. <h3>[name]( [param:Object parameters] )</h3>
  31. <p> [page:Object parameters] - (可选)用于定义材质外观的对象,具有一个或多个属性。
  32. 材质的任何属性都可以从此处传入(包括从[page:Material]继承的任何属性)<br /><br />
  33. 属性[page:Hexadecimal color]例外,其可以作为十六进制字符串传递,默认情况下为 *0xffffff*(白色),内部调用[page:Color.set](color)。
  34. </p>
  35. <h2>属性(Properties)</h2>
  36. <p>共有属性请参见其基类[page:Material]。</p>
  37. <h3>[property:Float clearcoat]</h3>
  38. <p>
  39. Clearcoat级别,从*0.0*到*1.0*。默认值为*0.0*。
  40. </p>
  41. <h3>[property:Float clearcoatRoughness]</h3>
  42. <p> clearcoat看起来的粗糙程度,从*0.0*到*1.0*。默认值为*0.0*。</p>
  43. <h3>[property:Object defines]</h3>
  44. <p> 如下形式的对象:
  45. <code>
  46. {
  47. 'STANDARD': ''
  48. 'PHYSICAL': '',
  49. };
  50. </code>
  51. [page:WebGLRenderer]使用它来选择shaders。
  52. </p>
  53. <h3>[property:Float reflectivity]</h3>
  54. <p> 反射度,从*0.0*到*1.0*。默认值为*0.5*。<br />
  55. 这模拟了非金属材质的反射率。当[page:MeshStandardMaterial]为*1.0*时,此属性无效。
  56. </p>
  57. <h2>方法(Methods)</h2>
  58. <p>共有方法请参见其基类[page:Material] 和[page:MeshStandardMaterial]。</p>
  59. <h2>源码(Source)</h2>
  60. <p>
  61. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  62. </p>
  63. </body>
  64. </html>