You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
3.1 KiB
HTML
84 lines
3.1 KiB
HTML
2 months ago
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
|
<base href="../../../" />
|
||
|
<script src="page.js"></script>
|
||
|
<link type="text/css" rel="stylesheet" href="page.css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
[page:Loader] →
|
||
|
|
||
|
<h1>[name]</h1>
|
||
|
|
||
|
<p class="desc">
|
||
|
A 3D LUT loader that supports the .cube file format.<br />
|
||
|
Based on the following reference:
|
||
|
</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>[link:https://wwwimages2.adobe.com/content/dam/acom/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf]</li>
|
||
|
</ul>
|
||
|
|
||
|
<h2>Import</h2>
|
||
|
|
||
|
<p>
|
||
|
[name] is an add-on, and must be imported explicitly.
|
||
|
See [link:#manual/introduction/Installation Installation / Addons].
|
||
|
</p>
|
||
|
|
||
|
<code>
|
||
|
import { LUTCubeLoader } from 'three/addons/loaders/LUTCubeLoader.js';
|
||
|
</code>
|
||
|
|
||
|
<h2>Constructor</h2>
|
||
|
|
||
|
<h3>[name]( [param:LoadingManager manager] )</h3>
|
||
|
<p>
|
||
|
[page:LoadingManager manager] — The LoadingManager to use. Defaults to [page:DefaultLoadingManager DefaultLoadingManager]<br />
|
||
|
</p>
|
||
|
<p>
|
||
|
Creates a new [name].
|
||
|
</p>
|
||
|
|
||
|
<h2>Properties</h2>
|
||
|
<p>See the base [page:Loader] class for common properties.</p>
|
||
|
|
||
|
<h2>Methods</h2>
|
||
|
<p>See the base [page:Loader] class for common methods.</p>
|
||
|
|
||
|
<h3>[method:undefined load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
|
||
|
<p>
|
||
|
[page:String url] — A string containing the path/URL of the `.cube` file.<br />
|
||
|
[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 />
|
||
|
[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 />
|
||
|
[page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br />
|
||
|
</p>
|
||
|
<p>
|
||
|
Begin loading from url and return the loaded LUT.
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:Object parse]( [param:String input] )</h3>
|
||
|
<p>
|
||
|
[page:String input] — The cube data string.<br />
|
||
|
</p>
|
||
|
<p>
|
||
|
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].
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:this setType]( [param:Number type] )</h3>
|
||
|
<p>
|
||
|
[page:Number type] - The texture type. See the [page:Textures texture constants] page for details.<br />
|
||
|
</p>
|
||
|
<p>
|
||
|
Sets the desired texture type. Only [page:Textures THREE.UnsignedByteType] and [page:Textures THREE.FloatType] are supported. The default is [page:Textures THREE.UnsignedByteType].
|
||
|
</p>
|
||
|
|
||
|
<h2>Source</h2>
|
||
|
|
||
|
<p>
|
||
|
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/[name].js examples/jsm/loaders/[name].js]
|
||
|
</p>
|
||
|
</body>
|
||
|
</html>
|