TIFFLoader.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>TIFFLoader - 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. <p class="inheritance" translate="no"><a href="Loader.html">Loader</a> → <a href="DataTextureLoader.html">DataTextureLoader</a> → </p>
  13. <h1 translate="no">TIFFLoader</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A loader for the TIFF texture format.</p></div>
  17. <h2>Code Example</h2>
  18. <div translate="no"><pre><code class="language-js">const loader = new TIFFLoader();
  19. const texture = await loader.loadAsync( 'textures/tiff/crate_lzw.tif' );
  20. texture.colorSpace = THREE.SRGBColorSpace;
  21. </code></pre></div>
  22. </header>
  23. <article>
  24. <h2 class="subsection-title">Import</h2>
  25. <p><span translate="no">TIFFLoader</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  26. <pre><code class="language-js">import { TIFFLoader } from 'three/addons/loaders/TIFFLoader.js';</code></pre>
  27. <div class="container-overview">
  28. <h2>Constructor</h2>
  29. <h3 class="name name-method" id="TIFFLoader" translate="no">new <a href="#TIFFLoader">TIFFLoader</a><span class="signature">( manager : <span class="param-type">LoadingManager</span> )</span> </h3>
  30. <div class="method">
  31. <div class="description">
  32. <p>Constructs a new TIFF loader.</p>
  33. </div>
  34. <table class="params">
  35. <tbody>
  36. <tr>
  37. <td class="name"><code>manager</code></td>
  38. <td class="description last"><p>The loading manager.</p></td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. </div>
  44. <h2 class="subsection-title">Methods</h2>
  45. <h3 class="name name-method" id="parse" translate="no">.<a href="#parse">parse</a><span class="signature">( buffer : <span class="param-type">ArrayBuffer</span> )</span><span class="type-signature"> : <a href="DataTextureLoader.html#~TexData">DataTextureLoader~TexData</a></span> </h3>
  46. <div class="method">
  47. <div class="description">
  48. <p>Parses the given TIFF texture data.</p>
  49. </div>
  50. <table class="params">
  51. <tbody>
  52. <tr>
  53. <td class="name"><code>buffer</code></td>
  54. <td class="description last"><p>The raw texture data.</p></td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. <dl class="details">
  59. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="DataTextureLoader.html#parse">DataTextureLoader#parse</a></dt>
  60. </dl>
  61. <dl class="details">
  62. <dt class="tag-returns"><strong>Returns:</strong> An object representing the parsed texture data.</dt>
  63. </dl>
  64. </div>
  65. <h2 class="subsection-title">Source</h2>
  66. <p>
  67. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/TIFFLoader.js" target="_blank" rel="noopener" translate="no">examples/jsm/loaders/TIFFLoader.js</a>
  68. </p>
  69. </article>
  70. </section>
  71. <script src="../scripts/linenumber.js"></script>
  72. <script src="../scripts/page.js"></script>
  73. </body>
  74. </html>
粤ICP备19079148号