module-UVsDebug.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>UVsDebug - 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">UVsDebug</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <h2 class="subsection-title">Import</h2>
  18. <p><span translate="no">UVsDebug</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 { UVsDebug } from 'three/addons/utils/UVsDebug.js';</code></pre>
  20. <div class="container-overview">
  21. </div>
  22. <h2 class="subsection-title">Methods</h2>
  23. <h3 class="name name-method" id="~UVsDebug" translate="no">.<a href="#~UVsDebug">UVsDebug</a><span class="signature">( geometry : <span class="param-type"><a href="BufferGeometry.html">BufferGeometry</a></span>, size : <span class="param-type">number</span> )</span><span class="type-signature"> : HTMLCanvasElement</span> <span class="type-signature">(inner) </span></h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Function for &quot;unwrapping&quot; and debugging three.js geometries UV mapping.</p>
  27. <pre><code class="language-js">document.body.appendChild( UVsDebug( new THREE.SphereGeometry() ) );
  28. </code></pre>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name">
  34. <strong>geometry</strong>
  35. </td>
  36. <td class="description last">
  37. <p>The geometry whose uv coordinates should be inspected.</p>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td class="name">
  42. <strong>size</strong>
  43. </td>
  44. <td class="description last">
  45. <p>The size of the debug canvas.</p>
  46. <p>Default is <code>1024</code>.</p>
  47. </td>
  48. </tr>
  49. </tbody>
  50. </table>
  51. <dl class="details">
  52. <dt class="tag-returns"><strong>Returns:</strong> A canvas element with visualized uv coordinates.</dt>
  53. </dl>
  54. </div>
  55. <h2 class="subsection-title">Source</h2>
  56. <p>
  57. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/UVsDebug.js" translate="no" target="_blank" rel="noopener">examples/jsm/utils/UVsDebug.js</a>
  58. </p>
  59. </article>
  60. </section>
  61. <script src="../scripts/linenumber.js"></script>
  62. <script src="../scripts/page.js"></script>
  63. </body>
  64. </html>
粤ICP备19079148号