module-UniformsUtils.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>UniformsUtils - 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. <h1 translate="no">UniformsUtils</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <div class="container-overview">
  18. <div class="description"><p>Provides utility functions for managing uniforms.</p></div>
  19. </div>
  20. <h2 class="subsection-title">Static Methods</h2>
  21. <h3 class="name name-method" id=".cloneUniforms" translate="no">.<a href="#.cloneUniforms">cloneUniforms</a><span class="signature">( src : <span class="param-type">Object</span> )</span><span class="type-signature"> : Object</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Clones the given uniform definitions by performing a deep-copy. That means
  25. if the value of a uniform refers to an object like a Vector3 or Texture,
  26. the cloned uniform will refer to a new object reference.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name"><code>src</code></td>
  32. <td class="description last"><p>An object representing uniform definitions.</p></td>
  33. </tr>
  34. </tbody>
  35. </table>
  36. <dl class="details">
  37. <dt class="tag-returns"><strong>Returns:</strong> The cloned uniforms.</dt>
  38. </dl>
  39. </div>
  40. <h3 class="name name-method" id=".mergeUniforms" translate="no">.<a href="#.mergeUniforms">mergeUniforms</a><span class="signature">( uniforms : <span class="param-type">Array</span> )</span><span class="type-signature"> : Object</span> </h3>
  41. <div class="method">
  42. <div class="description">
  43. <p>Merges the given uniform definitions into a single object. Since the
  44. method internally uses cloneUniforms(), it performs a deep-copy when
  45. producing the merged uniform definitions.</p>
  46. </div>
  47. <table class="params">
  48. <tbody>
  49. <tr>
  50. <td class="name"><code>uniforms</code></td>
  51. <td class="description last"><p>An array of objects containing uniform definitions.</p></td>
  52. </tr>
  53. </tbody>
  54. </table>
  55. <dl class="details">
  56. <dt class="tag-returns"><strong>Returns:</strong> The merged uniforms.</dt>
  57. </dl>
  58. </div>
  59. <h2 class="subsection-title">Source</h2>
  60. <p>
  61. <a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/shaders/UniformsUtils.js" target="_blank" rel="noopener" translate="no">src/renderers/shaders/UniformsUtils.js</a>
  62. </p>
  63. </article>
  64. </section>
  65. <script src="../scripts/linenumber.js"></script>
  66. <script src="../scripts/page.js"></script>
  67. </body>
  68. </html>
粤ICP备19079148号