LUT3dlLoader.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LUT3dlLoader - 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> → </p>
  13. <h1 translate="no">LUT3dlLoader</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A loader for the 3DL LUT format.</p>
  17. <p>References:</p>
  18. <ul>
  19. <li><a href="http://download.autodesk.com/us/systemdocs/help/2011/lustre/index.html?url=./files/WSc4e151a45a3b785a24c3d9a411df9298473-7ffd.htm,topicNumber=d0e9492">3D LUTs</a></li>
  20. <li><a href="https://community.foundry.com/discuss/topic/103636/format-spec-for-3dl?mode=Post&amp;postID=895258">Format Spec for .3dl</a></li>
  21. </ul></div>
  22. <h2>Code Example</h2>
  23. <div translate="no"><pre><code class="language-js">const loader = new LUT3dlLoader();
  24. const map = loader.loadAsync( 'luts/Presetpro-Cinematic.3dl' );
  25. </code></pre></div>
  26. </header>
  27. <article>
  28. <h2 class="subsection-title">Import</h2>
  29. <p><span translate="no">LUT3dlLoader</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  30. <pre><code class="language-js">import { LUT3dlLoader } from 'three/addons/loaders/LUT3dlLoader.js';</code></pre>
  31. <div class="container-overview">
  32. <h2>Constructor</h2>
  33. <h3 class="name name-method" id="LUT3dlLoader" translate="no">new <a href="#LUT3dlLoader">LUT3dlLoader</a><span class="signature">( manager : <span class="param-type">LoadingManager</span> )</span> </h3>
  34. <div class="method">
  35. <div class="description">
  36. <p>Constructs a new 3DL LUT loader.</p>
  37. </div>
  38. <table class="params">
  39. <tbody>
  40. <tr>
  41. <td class="name"><code>manager</code></td>
  42. <td class="description last"><p>The loading manager.</p></td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. <h2 class="subsection-title">Classes</h2>
  49. <dl>
  50. <dt><a href="LUT3dlLoader.html">LUT3dlLoader</a></dt>
  51. <dd></dd>
  52. </dl>
  53. <h2 class="subsection-title">Properties</h2>
  54. <div class="member">
  55. <h3 class="name" id="type" translate="no">.<a href="#type">type</a><span class="type-signature"> : <a href="global.html#UnsignedByteType">UnsignedByteType</a> | <a href="global.html#FloatType">FloatType</a></span> </h3>
  56. <div class="description">
  57. <p>The texture type.<br/>Default is <code>UnsignedByteType</code>.</p>
  58. </div>
  59. </div>
  60. <h2 class="subsection-title">Methods</h2>
  61. <h3 class="name name-method" id="load" translate="no">.<a href="#load">load</a><span class="signature">( url : <span class="param-type">string</span>, onLoad : <span class="param-type">function</span>, onProgress : <span class="param-type">onProgressCallback</span>, onError : <span class="param-type">onErrorCallback</span> )</span> </h3>
  62. <div class="method">
  63. <div class="description">
  64. <p>Starts loading from the given URL and passes the loaded 3DL LUT asset
  65. to the <code>onLoad()</code> callback.</p>
  66. </div>
  67. <table class="params">
  68. <tbody>
  69. <tr>
  70. <td class="name"><code>url</code></td>
  71. <td class="description last"><p>The path/URL of the file to be loaded. This can also be a data URI.</p></td>
  72. </tr>
  73. <tr>
  74. <td class="name"><code>onLoad</code></td>
  75. <td class="description last"><p>Executed when the loading process has been finished.</p></td>
  76. </tr>
  77. <tr>
  78. <td class="name"><code>onProgress</code></td>
  79. <td class="description last"><p>Executed while the loading is in progress.</p></td>
  80. </tr>
  81. <tr>
  82. <td class="name"><code>onError</code></td>
  83. <td class="description last"><p>Executed when errors occur.</p></td>
  84. </tr>
  85. </tbody>
  86. </table>
  87. <dl class="details">
  88. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Loader.html#load">Loader#load</a></dt>
  89. </dl>
  90. </div>
  91. <h3 class="name name-method" id="parse" translate="no">.<a href="#parse">parse</a><span class="signature">( input : <span class="param-type">string</span> )</span><span class="type-signature"> : Object</span> </h3>
  92. <div class="method">
  93. <div class="description">
  94. <p>Parses the given 3DL LUT data and returns the resulting 3D data texture.</p>
  95. </div>
  96. <table class="params">
  97. <tbody>
  98. <tr>
  99. <td class="name"><code>input</code></td>
  100. <td class="description last"><p>The raw 3DL LUT data as a string.</p></td>
  101. </tr>
  102. </tbody>
  103. </table>
  104. <dl class="details">
  105. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Loader.html#parse">Loader#parse</a></dt>
  106. </dl>
  107. <dl class="details">
  108. <dt class="tag-returns"><strong>Returns:</strong> The parsed 3DL LUT.</dt>
  109. </dl>
  110. </div>
  111. <h3 class="name name-method" id="setType" translate="no">.<a href="#setType">setType</a><span class="signature">( type : <span class="param-type">UnsignedByteType | FloatType</span> )</span><span class="type-signature"> : <a href="LUT3dlLoader.html">LUT3dlLoader</a></span> </h3>
  112. <div class="method">
  113. <div class="description">
  114. <p>Sets the texture type.</p>
  115. </div>
  116. <table class="params">
  117. <tbody>
  118. <tr>
  119. <td class="name"><code>type</code></td>
  120. <td class="description last"><p>The texture type to set.</p></td>
  121. </tr>
  122. </tbody>
  123. </table>
  124. <dl class="details">
  125. <dt class="tag-returns"><strong>Returns:</strong> A reference to this loader.</dt>
  126. </dl>
  127. </div>
  128. <h2 class="subsection-title">Source</h2>
  129. <p>
  130. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/LUT3dlLoader.js" target="_blank" rel="noopener" translate="no">examples/jsm/loaders/LUT3dlLoader.js</a>
  131. </p>
  132. </article>
  133. </section>
  134. <script src="../scripts/linenumber.js"></script>
  135. <script src="../scripts/page.js"></script>
  136. </body>
  137. </html>
粤ICP备19079148号