UniformsUtils.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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. <h1>[name]</h1>
  12. <p class="desc">Uniform工具. 支持uniform变量的合并和克隆</p>
  13. <h2>方法</h2>
  14. <h3>[method:Object clone]( [param:Object src] )</h3>
  15. <p>
  16. src -- An object representing uniform definitions.<br /><br />
  17. Clones the given uniform definitions by performing a deep-copy. That means if
  18. the [page:Uniform.value value] of a uniform refers to an object like a [page:Vector3]
  19. or [page:Texture], the cloned uniform will refer to a new object reference.
  20. </p>
  21. <h3>[method:Object merge]( [param:Array uniforms] )</h3>
  22. <p>
  23. uniforms -- An array of objects containing uniform definitions.<br /><br />
  24. Merges the given uniform definitions into a single object. Since the method
  25. internally uses [page:.clone](), it performs a deep-copy when producing the
  26. merged uniform definitions.
  27. <h2>源码</h2>
  28. <p>
  29. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  30. </p>
  31. </body>
  32. </html>