BufferGeometryUtils.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. <h1>[name]</h1>
  12. <p class="desc">
  13. A class containing utility functions for [page:BufferGeometry BufferGeometry] instances.<br /><br />
  14. </p>
  15. <h2>Methods</h2>
  16. <h3>[method:null computeTangents]( [param:BufferGeometry geometry] )</h3>
  17. <p>
  18. geometry -- A [page:BufferGeometry BufferGeometry] instance, which must have index, position, normal, and uv attributes.<br /><br />
  19. Calculates and adds tangent attribute to a geometry.<br /><br />
  20. </p>
  21. <h3>[method:BufferGeometry mergeBufferGeometries]( [param:Array geometries], [param:Boolean useGroups] )</h3>
  22. <p>
  23. geometries -- Array of [page:BufferGeometry BufferGeometry] instances.<br />
  24. useGroups -- Whether groups should be generated for the merged geometry or not.<br /><br />
  25. Merges a set of geometries into a single instance. All geometries must have compatible attributes.
  26. If merge does not succeed, the method returns null.<br /><br />
  27. </p>
  28. <h3>[method:BufferAttribute mergeBufferAttributes]( [param:Array attributes] )</h3>
  29. <p>
  30. attributes -- Array of [page:BufferAttribute BufferAttribute] instances.<br /><br />
  31. Merges a set of attributes into a single instance. All attributes must have compatible properties
  32. and types, and [page:InterleavedBufferAttribute InterleavedBufferAttributes] are not supported. If merge does not succeed, the method
  33. returns null.
  34. </p>
  35. <h3>[method:InterleavedBufferAttribute interleaveAttributes]( [param:Array attributes] )</h3>
  36. <p>
  37. attributes -- Array of [page:BufferAttribute BufferAttribute] instances.<br /><br />
  38. Interleaves a set of attributes and returns a new array of corresponding attributes that share
  39. a single InterleavedBuffer instance. All attributes must have compatible types. If merge does not
  40. succeed, the method returns null.
  41. </p>
  42. <h3>[method:Number estimateBytesUsed]( [param:BufferGeometry geometry] )</h3>
  43. <p>
  44. geometry -- Instance of [page:BufferGeometry BufferGeometry] to estimate the memory use of.<br /><br />
  45. Returns the amount of bytes used by all attributes to represent the geometry.
  46. </p>
  47. <h3>[method:BufferGeometry mergeVertices]( [param:BufferGeometry geometry], [param:Number tolerance] )</h3>
  48. <p>
  49. geometry -- Instance of [page:BufferGeometry BufferGeometry] to merge the vertices of.<br />
  50. tolerance -- The maximum allowable difference between vertex attributes to merge. Defaults to 1e-4.<br /><br />
  51. Returns a new [page:BufferGeometry BufferGeometry] with vertices for which all similar vertex attributes
  52. (within tolerance) are merged.
  53. </p>
  54. <h2>Source</h2>
  55. <p>
  56. [link:https://github.com/mrdoob/three.js/blob/master/examples/js/utils/BufferGeometryUtils.js examples/js/utils/BufferGeometryUtils.js]
  57. </p>
  58. </body>
  59. </html>