| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>DataTextureLoader - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <p class="inheritance" translate="no"><a href="Loader.html">Loader</a> → </p>
- <h1 translate="no">DataTextureLoader</h1>
- <section>
- <header>
- <div class="class-description"><p>Abstract base class for loading binary texture formats RGBE, EXR or TGA.
- Textures are internally loaded via <a href="FileLoader.html">FileLoader</a>.</p>
- <p>Derived classes have to implement the <code>parse()</code> method which holds the parsing
- for the respective format.</p></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="DataTextureLoader" translate="no">new <a href="#DataTextureLoader">DataTextureLoader</a><span class="signature">( manager : <span class="param-type"><a href="LoadingManager.html">LoadingManager</a></span> )</span> <span class="type-signature">(abstract) </span></h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new data texture loader.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>manager</strong>
- </td>
- <td class="description last">
- <p>The loading manager.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <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"><a href="global.html#onProgressCallback">onProgressCallback</a></span>, onError : <span class="param-type"><a href="global.html#onErrorCallback">onErrorCallback</a></span> )</span><span class="type-signature"> : <a href="DataTexture.html">DataTexture</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Starts loading from the given URL and passes the loaded data texture
- to the <code>onLoad()</code> callback. The method also returns a new texture object which can
- directly be used for material creation. If you do it this way, the texture
- may pop up in your scene once the respective loading process is finished.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>url</strong>
- </td>
- <td class="description last">
- <p>The path/URL of the file to be loaded. This can also be a data URI.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>onLoad</strong>
- </td>
- <td class="description last">
- <p>Executed when the loading process has been finished.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>onProgress</strong>
- </td>
- <td class="description last">
- <p>Executed while the loading is in progress.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>onError</strong>
- </td>
- <td class="description last">
- <p>Executed when errors occur.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Loader.html#load">Loader#load</a></dt>
- </dl>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The data texture.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Type Definitions</h2>
- <div class="member">
- <h3 class="name" id="~TexData" translate="no">.<a href="#~TexData">TexData</a> </h3>
- <div class="description">
- <p>Represents the result object type of the <code>parse()</code> method.</p>
- </div>
- <table class="props">
- <tbody>
- <tr>
- <td class="name">
- <strong>image</strong>
- <br>
- <span class="param-type">Object</span>
- </td>
- <td class="description last">
- <p>An object holding width, height and the texture data.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>width</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The width of the base mip.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>height</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The width of the base mip.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>data</strong>
- <br>
- <span class="param-type">TypedArray</span>
- </td>
- <td class="description last">
- <p>The texture data.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>format</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The texture format.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>type</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The texture type.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>flipY</strong>
- <br>
- <span class="param-type">boolean</span>
- </td>
- <td class="description last">
- <p>If set to <code>true</code>, the texture is flipped along the vertical axis when uploaded to the GPU.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>wrapS</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The wrapS value.</p>
- <p>Default is <code>ClampToEdgeWrapping</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>wrapT</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The wrapT value.</p>
- <p>Default is <code>ClampToEdgeWrapping</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>anisotropy</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The anisotropy value.</p>
- <p>Default is <code>1</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>generateMipmaps</strong>
- <br>
- <span class="param-type">boolean</span>
- </td>
- <td class="description last">
- <p>Whether to generate mipmaps or not.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>colorSpace</strong>
- <br>
- <span class="param-type">string</span>
- </td>
- <td class="description last">
- <p>The color space.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>magFilter</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The mag filter.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>minFilter</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The min filter.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>mipmaps</strong>
- <br>
- <span class="param-type">Array.<Object></span>
- </td>
- <td class="description last">
- <p>The mipmaps.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/loaders/DataTextureLoader.js" translate="no" target="_blank" rel="noopener">src/loaders/DataTextureLoader.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|