MeshPhysicalNodeMaterial.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>MeshPhysicalNodeMaterial - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Material.html">Material</a> → <a href="NodeMaterial.html">NodeMaterial</a> → <a href="MeshStandardNodeMaterial.html">MeshStandardNodeMaterial</a> → </p>
  13. <h1 translate="no">MeshPhysicalNodeMaterial</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Node material version of <a href="MeshPhysicalMaterial.html">MeshPhysicalMaterial</a>.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="MeshPhysicalNodeMaterial" translate="no">new <a href="#MeshPhysicalNodeMaterial">MeshPhysicalNodeMaterial</a><span class="signature">( parameters : <span class="param-type">Object</span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new mesh physical node material.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name">
  30. <strong>parameters</strong>
  31. </td>
  32. <td class="description last">
  33. <p>The configuration parameter.</p>
  34. </td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. </div>
  39. </div>
  40. <h2 class="subsection-title">Properties</h2>
  41. <div class="member">
  42. <h3 class="name" id="anisotropyNode" translate="no">.<a href="#anisotropyNode">anisotropyNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  43. <div class="description">
  44. <p>The anisotropy of physical materials is by default inferred from the
  45. <code>anisotropy</code> property. This node property allows to overwrite the default
  46. and define the anisotropy with a node instead.</p>
  47. <p>If you don't want to overwrite the anisotropy but modify the existing
  48. value instead, use <a href="TSL.html#materialAnisotropy">materialAnisotropy</a>.</p>
  49. <p>Default is <code>null</code>.</p>
  50. </div>
  51. </div>
  52. <div class="member">
  53. <h3 class="name" id="attenuationColorNode" translate="no">.<a href="#attenuationColorNode">attenuationColorNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  54. <div class="description">
  55. <p>The attenuation color of physical materials is by default inferred from the
  56. <code>attenuationColor</code> property. This node property allows to overwrite the default
  57. and define the attenuation color with a node instead.</p>
  58. <p>If you don't want to overwrite the attenuation color but modify the existing
  59. value instead, use <a href="TSL.html#materialAttenuationColor">materialAttenuationColor</a>.</p>
  60. <p>Default is <code>null</code>.</p>
  61. </div>
  62. </div>
  63. <div class="member">
  64. <h3 class="name" id="attenuationDistanceNode" translate="no">.<a href="#attenuationDistanceNode">attenuationDistanceNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  65. <div class="description">
  66. <p>The attenuation distance of physical materials is by default inferred from the
  67. <code>attenuationDistance</code> property. This node property allows to overwrite the default
  68. and define the attenuation distance with a node instead.</p>
  69. <p>If you don't want to overwrite the attenuation distance but modify the existing
  70. value instead, use <a href="TSL.html#materialAttenuationDistance">materialAttenuationDistance</a>.</p>
  71. <p>Default is <code>null</code>.</p>
  72. </div>
  73. </div>
  74. <div class="member">
  75. <h3 class="name" id="clearcoatNode" translate="no">.<a href="#clearcoatNode">clearcoatNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  76. <div class="description">
  77. <p>The clearcoat of physical materials is by default inferred from the <code>clearcoat</code>
  78. and <code>clearcoatMap</code> properties. This node property allows to overwrite the default
  79. and define the clearcoat with a node instead.</p>
  80. <p>If you don't want to overwrite the clearcoat but modify the existing
  81. value instead, use <a href="TSL.html#materialClearcoat">materialClearcoat</a>.</p>
  82. <p>Default is <code>null</code>.</p>
  83. </div>
  84. </div>
  85. <div class="member">
  86. <h3 class="name" id="clearcoatNormalNode" translate="no">.<a href="#clearcoatNormalNode">clearcoatNormalNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  87. <div class="description">
  88. <p>The clearcoat normal of physical materials is by default inferred from the <code>clearcoatNormalMap</code>
  89. property. This node property allows to overwrite the default
  90. and define the clearcoat normal with a node instead.</p>
  91. <p>If you don't want to overwrite the clearcoat normal but modify the existing
  92. value instead, use <a href="TSL.html#materialClearcoatNormal">materialClearcoatNormal</a>.</p>
  93. <p>Default is <code>null</code>.</p>
  94. </div>
  95. </div>
  96. <div class="member">
  97. <h3 class="name" id="clearcoatRoughnessNode" translate="no">.<a href="#clearcoatRoughnessNode">clearcoatRoughnessNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  98. <div class="description">
  99. <p>The clearcoat roughness of physical materials is by default inferred from the <code>clearcoatRoughness</code>
  100. and <code>clearcoatRoughnessMap</code> properties. This node property allows to overwrite the default
  101. and define the clearcoat roughness with a node instead.</p>
  102. <p>If you don't want to overwrite the clearcoat roughness but modify the existing
  103. value instead, use <a href="TSL.html#materialClearcoatRoughness">materialClearcoatRoughness</a>.</p>
  104. <p>Default is <code>null</code>.</p>
  105. </div>
  106. </div>
  107. <div class="member">
  108. <h3 class="name" id="dispersionNode" translate="no">.<a href="#dispersionNode">dispersionNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  109. <div class="description">
  110. <p>The dispersion of physical materials is by default inferred from the
  111. <code>dispersion</code> property. This node property allows to overwrite the default
  112. and define the dispersion with a node instead.</p>
  113. <p>If you don't want to overwrite the dispersion but modify the existing
  114. value instead, use <a href="TSL.html#materialDispersion">materialDispersion</a>.</p>
  115. <p>Default is <code>null</code>.</p>
  116. </div>
  117. </div>
  118. <div class="member">
  119. <h3 class="name" id="iorNode" translate="no">.<a href="#iorNode">iorNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  120. <div class="description">
  121. <p>The ior of physical materials is by default inferred from the <code>ior</code>
  122. property. This node property allows to overwrite the default
  123. and define the ior with a node instead.</p>
  124. <p>If you don't want to overwrite the ior but modify the existing
  125. value instead, use <a href="TSL.html#materialIOR">materialIOR</a>.</p>
  126. <p>Default is <code>null</code>.</p>
  127. </div>
  128. </div>
  129. <div class="member">
  130. <h3 class="name" id="iridescenceIORNode" translate="no">.<a href="#iridescenceIORNode">iridescenceIORNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  131. <div class="description">
  132. <p>The iridescence IOR of physical materials is by default inferred from the <code>iridescenceIOR</code>
  133. property. This node property allows to overwrite the default
  134. and define the iridescence IOR with a node instead.</p>
  135. <p>If you don't want to overwrite the iridescence IOR but modify the existing
  136. value instead, use <a href="TSL.html#materialIridescenceIOR">materialIridescenceIOR</a>.</p>
  137. <p>Default is <code>null</code>.</p>
  138. </div>
  139. </div>
  140. <div class="member">
  141. <h3 class="name" id="iridescenceNode" translate="no">.<a href="#iridescenceNode">iridescenceNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  142. <div class="description">
  143. <p>The iridescence of physical materials is by default inferred from the <code>iridescence</code>
  144. property. This node property allows to overwrite the default
  145. and define the iridescence with a node instead.</p>
  146. <p>If you don't want to overwrite the iridescence but modify the existing
  147. value instead, use <a href="TSL.html#materialIridescence">materialIridescence</a>.</p>
  148. <p>Default is <code>null</code>.</p>
  149. </div>
  150. </div>
  151. <div class="member">
  152. <h3 class="name" id="iridescenceThicknessNode" translate="no">.<a href="#iridescenceThicknessNode">iridescenceThicknessNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  153. <div class="description">
  154. <p>The iridescence thickness of physical materials is by default inferred from the <code>iridescenceThicknessRange</code>
  155. and <code>iridescenceThicknessMap</code> properties. This node property allows to overwrite the default
  156. and define the iridescence thickness with a node instead.</p>
  157. <p>If you don't want to overwrite the iridescence thickness but modify the existing
  158. value instead, use <a href="TSL.html#materialIridescenceThickness">materialIridescenceThickness</a>.</p>
  159. <p>Default is <code>null</code>.</p>
  160. </div>
  161. </div>
  162. <div class="member">
  163. <h3 class="name" id="isMeshPhysicalNodeMaterial" translate="no">.<a href="#isMeshPhysicalNodeMaterial">isMeshPhysicalNodeMaterial</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  164. <div class="description">
  165. <p>This flag can be used for type testing.</p>
  166. <p>Default is <code>true</code>.</p>
  167. </div>
  168. </div>
  169. <div class="member">
  170. <h3 class="name" id="sheenNode" translate="no">.<a href="#sheenNode">sheenNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  171. <div class="description">
  172. <p>The sheen of physical materials is by default inferred from the <code>sheen</code>, <code>sheenColor</code>
  173. and <code>sheenColorMap</code> properties. This node property allows to overwrite the default
  174. and define the sheen with a node instead.</p>
  175. <p>If you don't want to overwrite the sheen but modify the existing
  176. value instead, use <a href="TSL.html#materialSheen">materialSheen</a>.</p>
  177. <p>Default is <code>null</code>.</p>
  178. </div>
  179. </div>
  180. <div class="member">
  181. <h3 class="name" id="sheenRoughnessNode" translate="no">.<a href="#sheenRoughnessNode">sheenRoughnessNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  182. <div class="description">
  183. <p>The sheen roughness of physical materials is by default inferred from the <code>sheenRoughness</code> and
  184. <code>sheenRoughnessMap</code> properties. This node property allows to overwrite the default
  185. and define the sheen roughness with a node instead.</p>
  186. <p>If you don't want to overwrite the sheen roughness but modify the existing
  187. value instead, use <a href="TSL.html#materialSheenRoughness">materialSheenRoughness</a>.</p>
  188. <p>Default is <code>null</code>.</p>
  189. </div>
  190. </div>
  191. <div class="member">
  192. <h3 class="name" id="specularColorNode" translate="no">.<a href="#specularColorNode">specularColorNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  193. <div class="description">
  194. <p>The specular color of physical materials is by default inferred from the <code>specularColor</code>
  195. and <code>specularColorMap</code> properties. This node property allows to overwrite the default
  196. and define the specular color with a node instead.</p>
  197. <p>If you don't want to overwrite the specular color but modify the existing
  198. value instead, use <a href="TSL.html#materialSpecularColor">materialSpecularColor</a>.</p>
  199. <p>Default is <code>null</code>.</p>
  200. </div>
  201. </div>
  202. <div class="member">
  203. <h3 class="name" id="specularIntensityNode" translate="no">.<a href="#specularIntensityNode">specularIntensityNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  204. <div class="description">
  205. <p>The specular intensity of physical materials is by default inferred from the <code>specularIntensity</code>
  206. and <code>specularIntensityMap</code> properties. This node property allows to overwrite the default
  207. and define the specular intensity with a node instead.</p>
  208. <p>If you don't want to overwrite the specular intensity but modify the existing
  209. value instead, use <a href="TSL.html#materialSpecularIntensity">materialSpecularIntensity</a>.</p>
  210. <p>Default is <code>null</code>.</p>
  211. </div>
  212. </div>
  213. <div class="member">
  214. <h3 class="name" id="thicknessNode" translate="no">.<a href="#thicknessNode">thicknessNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  215. <div class="description">
  216. <p>The thickness of physical materials is by default inferred from the <code>thickness</code> and
  217. <code>thicknessMap</code> properties. This node property allows to overwrite the default
  218. and define the thickness with a node instead.</p>
  219. <p>If you don't want to overwrite the thickness but modify the existing
  220. value instead, use <a href="TSL.html#materialThickness">materialThickness</a>.</p>
  221. <p>Default is <code>null</code>.</p>
  222. </div>
  223. </div>
  224. <div class="member">
  225. <h3 class="name" id="transmissionNode" translate="no">.<a href="#transmissionNode">transmissionNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  226. <div class="description">
  227. <p>The transmission of physical materials is by default inferred from the <code>transmission</code> and
  228. <code>transmissionMap</code> properties. This node property allows to overwrite the default
  229. and define the transmission with a node instead.</p>
  230. <p>If you don't want to overwrite the transmission but modify the existing
  231. value instead, use <a href="TSL.html#materialTransmission">materialTransmission</a>.</p>
  232. <p>Default is <code>null</code>.</p>
  233. </div>
  234. </div>
  235. <div class="member">
  236. <h3 class="name" id="useAnisotropy" translate="no">.<a href="#useAnisotropy">useAnisotropy</a><span class="type-signature"> : boolean</span> </h3>
  237. <div class="description">
  238. <p>Whether the lighting model should use anisotropy or not.</p>
  239. <p>Default is <code>true</code>.</p>
  240. </div>
  241. </div>
  242. <div class="member">
  243. <h3 class="name" id="useClearcoat" translate="no">.<a href="#useClearcoat">useClearcoat</a><span class="type-signature"> : boolean</span> </h3>
  244. <div class="description">
  245. <p>Whether the lighting model should use clearcoat or not.</p>
  246. <p>Default is <code>true</code>.</p>
  247. </div>
  248. </div>
  249. <div class="member">
  250. <h3 class="name" id="useDispersion" translate="no">.<a href="#useDispersion">useDispersion</a><span class="type-signature"> : boolean</span> </h3>
  251. <div class="description">
  252. <p>Whether the lighting model should use dispersion or not.</p>
  253. <p>Default is <code>true</code>.</p>
  254. </div>
  255. </div>
  256. <div class="member">
  257. <h3 class="name" id="useIridescence" translate="no">.<a href="#useIridescence">useIridescence</a><span class="type-signature"> : boolean</span> </h3>
  258. <div class="description">
  259. <p>Whether the lighting model should use iridescence or not.</p>
  260. <p>Default is <code>true</code>.</p>
  261. </div>
  262. </div>
  263. <div class="member">
  264. <h3 class="name" id="useSheen" translate="no">.<a href="#useSheen">useSheen</a><span class="type-signature"> : boolean</span> </h3>
  265. <div class="description">
  266. <p>Whether the lighting model should use sheen or not.</p>
  267. <p>Default is <code>true</code>.</p>
  268. </div>
  269. </div>
  270. <div class="member">
  271. <h3 class="name" id="useTransmission" translate="no">.<a href="#useTransmission">useTransmission</a><span class="type-signature"> : boolean</span> </h3>
  272. <div class="description">
  273. <p>Whether the lighting model should use transmission or not.</p>
  274. <p>Default is <code>true</code>.</p>
  275. </div>
  276. </div>
  277. <h2 class="subsection-title">Methods</h2>
  278. <h3 class="name name-method" id="setupClearcoatNormal" translate="no">.<a href="#setupClearcoatNormal">setupClearcoatNormal</a><span class="signature">()</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  279. <div class="method">
  280. <div class="description">
  281. <p>Setups the clearcoat normal node.</p>
  282. </div>
  283. <dl class="details">
  284. <dt class="tag-returns"><strong>Returns:</strong> The clearcoat normal.</dt>
  285. </dl>
  286. </div>
  287. <h3 class="name name-method" id="setupLightingModel" translate="no">.<a href="#setupLightingModel">setupLightingModel</a><span class="signature">()</span><span class="type-signature"> : <a href="PhysicalLightingModel.html">PhysicalLightingModel</a></span> </h3>
  288. <div class="method">
  289. <div class="description">
  290. <p>Setups the lighting model.</p>
  291. </div>
  292. <dl class="details">
  293. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="MeshStandardNodeMaterial.html#setupLightingModel">MeshStandardNodeMaterial#setupLightingModel</a></dt>
  294. </dl>
  295. <dl class="details">
  296. <dt class="tag-returns"><strong>Returns:</strong> The lighting model.</dt>
  297. </dl>
  298. </div>
  299. <h3 class="name name-method" id="setupSpecular" translate="no">.<a href="#setupSpecular">setupSpecular</a><span class="signature">()</span> </h3>
  300. <div class="method">
  301. <div class="description">
  302. <p>Setups the specular related node variables.</p>
  303. </div>
  304. <dl class="details">
  305. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="MeshStandardNodeMaterial.html#setupSpecular">MeshStandardNodeMaterial#setupSpecular</a></dt>
  306. </dl>
  307. </div>
  308. <h3 class="name name-method" id="setupVariants" translate="no">.<a href="#setupVariants">setupVariants</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span> </h3>
  309. <div class="method">
  310. <div class="description">
  311. <p>Setups the physical specific node variables.</p>
  312. </div>
  313. <table class="params">
  314. <tbody>
  315. <tr>
  316. <td class="name">
  317. <strong>builder</strong>
  318. </td>
  319. <td class="description last">
  320. <p>The current node builder.</p>
  321. </td>
  322. </tr>
  323. </tbody>
  324. </table>
  325. <dl class="details">
  326. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="MeshStandardNodeMaterial.html#setupVariants">MeshStandardNodeMaterial#setupVariants</a></dt>
  327. </dl>
  328. </div>
  329. <h2 class="subsection-title">Source</h2>
  330. <p>
  331. <a href="https://github.com/mrdoob/three.js/blob/master/src/materials/nodes/MeshPhysicalNodeMaterial.js" translate="no" target="_blank" rel="noopener">src/materials/nodes/MeshPhysicalNodeMaterial.js</a>
  332. </p>
  333. </article>
  334. </section>
  335. <script src="../scripts/linenumber.js"></script>
  336. <script src="../scripts/page.js"></script>
  337. </body>
  338. </html>
粤ICP备19079148号