1
0

LUTCubeLoader.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Loader] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. A 3D LUT loader that supports the .cube file format.<br />
  14. Based on the following reference:
  15. </p>
  16. <ul>
  17. <li>[link:https://wwwimages2.adobe.com/content/dam/acom/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf]</li>
  18. </ul>
  19. <h2>Import</h2>
  20. <p>
  21. [name] is an add-on, and must be imported explicitly.
  22. See [link:#manual/introduction/Installation Installation / Addons].
  23. </p>
  24. <code>
  25. import { LUTCubeLoader } from 'three/addons/loaders/LUTCubeLoader.js';
  26. </code>
  27. <h2>Constructor</h2>
  28. <h3>[name]( [param:LoadingManager manager] )</h3>
  29. <p>
  30. [page:LoadingManager manager] — The LoadingManager to use. Defaults to [page:DefaultLoadingManager DefaultLoadingManager]<br />
  31. </p>
  32. <p>
  33. Creates a new [name].
  34. </p>
  35. <h2>Properties</h2>
  36. <p>See the base [page:Loader] class for common properties.</p>
  37. <h2>Methods</h2>
  38. <p>See the base [page:Loader] class for common methods.</p>
  39. <h3>[method:undefined load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
  40. <p>
  41. [page:String url] — A string containing the path/URL of the `.cube` file.<br />
  42. [page:Function onLoad] — (optional) A function to be called after the loading is successfully completed. The function receives the result of the [page:Function parse] method.<br />
  43. [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
  44. [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br />
  45. </p>
  46. <p>
  47. Begin loading from url and return the loaded LUT.
  48. </p>
  49. <h3>[method:Object parse]( [param:String input] )</h3>
  50. <p>
  51. [page:String input] — The cube data string.<br />
  52. </p>
  53. <p>
  54. Parse a cube data string and fire [page:Function onLoad] callback when complete. The argument to [page:Function onLoad] will be an [page:Object object] containing the following LUT data: [page:String .title], [page:Number .size], [page:Vector3 .domainMin], [page:Vector3 .domainMax], [page:DataTexture .texture] and [page:Data3DTexture .texture3D].
  55. </p>
  56. <h3>[method:this setType]( [param:Number type] )</h3>
  57. <p>
  58. [page:Number type] - The texture type. See the [page:Textures texture constants] page for details.<br />
  59. </p>
  60. <p>
  61. Sets the desired texture type. Only [page:Textures THREE.UnsignedByteType] and [page:Textures THREE.FloatType] are supported. The default is [page:Textures THREE.UnsignedByteType].
  62. </p>
  63. <h2>Source</h2>
  64. <p>
  65. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/[name].js examples/jsm/loaders/[name].js]
  66. </p>
  67. </body>
  68. </html>