module-UniformsUtils.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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">
  32. <strong>src</strong>
  33. </td>
  34. <td class="description last">
  35. <p>An object representing uniform definitions.</p>
  36. </td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. <dl class="details">
  41. <dt class="tag-returns"><strong>Returns:</strong> The cloned uniforms.</dt>
  42. </dl>
  43. </div>
  44. <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>
  45. <div class="method">
  46. <div class="description">
  47. <p>Merges the given uniform definitions into a single object. Since the
  48. method internally uses cloneUniforms(), it performs a deep-copy when
  49. producing the merged uniform definitions.</p>
  50. </div>
  51. <table class="params">
  52. <tbody>
  53. <tr>
  54. <td class="name">
  55. <strong>uniforms</strong>
  56. </td>
  57. <td class="description last">
  58. <p>An array of objects containing uniform definitions.</p>
  59. </td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. <dl class="details">
  64. <dt class="tag-returns"><strong>Returns:</strong> The merged uniforms.</dt>
  65. </dl>
  66. </div>
  67. <h2 class="subsection-title">Source</h2>
  68. <p>
  69. <a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/shaders/UniformsUtils.js" translate="no" target="_blank" rel="noopener">src/renderers/shaders/UniformsUtils.js</a>
  70. </p>
  71. </article>
  72. </section>
  73. <script src="../scripts/linenumber.js"></script>
  74. <script src="../scripts/page.js"></script>
  75. </body>
  76. </html>
粤ICP备19079148号