module-GeometryCompressionUtils.html 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>GeometryCompressionUtils - 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">GeometryCompressionUtils</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <h2 class="subsection-title">Import</h2>
  18. <p><span translate="no">GeometryCompressionUtils</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
  19. <pre><code class="language-js">import * as GeometryCompressionUtils from 'three/addons/utils/GeometryCompressionUtils.js';</code></pre>
  20. <div class="container-overview">
  21. </div>
  22. <h2 class="subsection-title">Methods</h2>
  23. <h3 class="name name-method" id="~compressNormals" translate="no">.<a href="#~compressNormals">compressNormals</a><span class="signature">( geometry : <span class="param-type"><a href="BufferGeometry.html">BufferGeometry</a></span>, encodeMethod : <span class="param-type">'DEFAULT' | 'OCT1Byte' | 'OCT2Byte' | 'ANGLES'</span> )</span> <span class="type-signature">(inner) </span></h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Compressed the given geometry's <code>normal</code> attribute by the selected encode method.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name">
  32. <strong>geometry</strong>
  33. </td>
  34. <td class="description last">
  35. <p>The geometry whose normals should be compressed.</p>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td class="name">
  40. <strong>encodeMethod</strong>
  41. </td>
  42. <td class="description last">
  43. <p>The compression method.</p>
  44. </td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. </div>
  49. <h3 class="name name-method" id="~compressPositions" translate="no">.<a href="#~compressPositions">compressPositions</a><span class="signature">( geometry : <span class="param-type"><a href="BufferGeometry.html">BufferGeometry</a></span> )</span> <span class="type-signature">(inner) </span></h3>
  50. <div class="method">
  51. <div class="description">
  52. <p>Compressed the given geometry's <code>position</code> attribute.</p>
  53. </div>
  54. <table class="params">
  55. <tbody>
  56. <tr>
  57. <td class="name">
  58. <strong>geometry</strong>
  59. </td>
  60. <td class="description last">
  61. <p>The geometry whose position values should be compressed.</p>
  62. </td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. </div>
  67. <h3 class="name name-method" id="~compressUvs" translate="no">.<a href="#~compressUvs">compressUvs</a><span class="signature">( geometry : <span class="param-type"><a href="BufferGeometry.html">BufferGeometry</a></span> )</span> <span class="type-signature">(inner) </span></h3>
  68. <div class="method">
  69. <div class="description">
  70. <p>Compressed the given geometry's <code>uv</code> attribute.</p>
  71. </div>
  72. <table class="params">
  73. <tbody>
  74. <tr>
  75. <td class="name">
  76. <strong>geometry</strong>
  77. </td>
  78. <td class="description last">
  79. <p>The geometry whose texture coordinates should be compressed.</p>
  80. </td>
  81. </tr>
  82. </tbody>
  83. </table>
  84. </div>
  85. <h2 class="subsection-title">Source</h2>
  86. <p>
  87. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/GeometryCompressionUtils.js" translate="no" target="_blank" rel="noopener">examples/jsm/utils/GeometryCompressionUtils.js</a>
  88. </p>
  89. </article>
  90. </section>
  91. <script src="../scripts/linenumber.js"></script>
  92. <script src="../scripts/page.js"></script>
  93. </body>
  94. </html>
粤ICP备19079148号