| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>DataArrayTexture - 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="EventDispatcher.html">EventDispatcher</a> → <a href="Texture.html">Texture</a> → </p>
- <h1 translate="no">DataArrayTexture</h1>
- <section>
- <header>
- <div class="class-description"><p>Creates an array of textures directly from raw buffer data.</p></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="DataArrayTexture" translate="no">new <a href="#DataArrayTexture">DataArrayTexture</a><span class="signature">( data : <span class="param-type">TypedArray</span>, width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, depth : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new data array texture.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>data</strong>
- </td>
- <td class="description last">
- <p>The buffer data.</p>
- <p>Default is <code>null</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>width</strong>
- </td>
- <td class="description last">
- <p>The width of the texture.</p>
- <p>Default is <code>1</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>height</strong>
- </td>
- <td class="description last">
- <p>The height of the texture.</p>
- <p>Default is <code>1</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>depth</strong>
- </td>
- <td class="description last">
- <p>The depth of the texture.</p>
- <p>Default is <code>1</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="flipY" translate="no">.<a href="#flipY">flipY</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>If set to <code>true</code>, the texture is flipped along the vertical axis when
- uploaded to the GPU.</p>
- <p>Overwritten and set to <code>false</code> by default.</p>
- <p>Default is <code>false</code>.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#flipY">Texture#flipY</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="generateMipmaps" translate="no">.<a href="#generateMipmaps">generateMipmaps</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Whether to generate mipmaps (if possible) for a texture.</p>
- <p>Overwritten and set to <code>false</code> by default.</p>
- <p>Default is <code>false</code>.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#generateMipmaps">Texture#generateMipmaps</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="image" translate="no">.<a href="#image">image</a><span class="type-signature"> : Object</span> </h3>
- <div class="description">
- <p>The image definition of a data texture.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#image">Texture#image</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="isDataArrayTexture" translate="no">.<a href="#isDataArrayTexture">isDataArrayTexture</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
- <div class="description">
- <p>This flag can be used for type testing.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="layerUpdates" translate="no">.<a href="#layerUpdates">layerUpdates</a><span class="type-signature"> : Set.<number></span> </h3>
- <div class="description">
- <p>A set of all layers which need to be updated in the texture.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="magFilter" translate="no">.<a href="#magFilter">magFilter</a><span class="type-signature"> : <a href="global.html#NearestFilter">NearestFilter</a> | <a href="global.html#NearestMipmapNearestFilter">NearestMipmapNearestFilter</a> | <a href="global.html#NearestMipmapLinearFilter">NearestMipmapLinearFilter</a> | <a href="global.html#LinearFilter">LinearFilter</a> | <a href="global.html#LinearMipmapNearestFilter">LinearMipmapNearestFilter</a> | <a href="global.html#LinearMipmapLinearFilter">LinearMipmapLinearFilter</a></span> </h3>
- <div class="description">
- <p>How the texture is sampled when a texel covers more than one pixel.</p>
- <p>Overwritten and set to <code>NearestFilter</code> by default.</p>
- <p>Default is <code>NearestFilter</code>.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#magFilter">Texture#magFilter</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="minFilter" translate="no">.<a href="#minFilter">minFilter</a><span class="type-signature"> : <a href="global.html#NearestFilter">NearestFilter</a> | <a href="global.html#NearestMipmapNearestFilter">NearestMipmapNearestFilter</a> | <a href="global.html#NearestMipmapLinearFilter">NearestMipmapLinearFilter</a> | <a href="global.html#LinearFilter">LinearFilter</a> | <a href="global.html#LinearMipmapNearestFilter">LinearMipmapNearestFilter</a> | <a href="global.html#LinearMipmapLinearFilter">LinearMipmapLinearFilter</a></span> </h3>
- <div class="description">
- <p>How the texture is sampled when a texel covers less than one pixel.</p>
- <p>Overwritten and set to <code>NearestFilter</code> by default.</p>
- <p>Default is <code>NearestFilter</code>.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#minFilter">Texture#minFilter</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="unpackAlignment" translate="no">.<a href="#unpackAlignment">unpackAlignment</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Specifies the alignment requirements for the start of each pixel row in memory.</p>
- <p>Overwritten and set to <code>1</code> by default.</p>
- <p>Default is <code>1</code>.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#unpackAlignment">Texture#unpackAlignment</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="wrapR" translate="no">.<a href="#wrapR">wrapR</a><span class="type-signature"> : <a href="global.html#RepeatWrapping">RepeatWrapping</a> | <a href="global.html#ClampToEdgeWrapping">ClampToEdgeWrapping</a> | <a href="global.html#MirroredRepeatWrapping">MirroredRepeatWrapping</a></span> </h3>
- <div class="description">
- <p>This defines how the texture is wrapped in the depth and corresponds to
- <em>W</em> in UVW mapping.</p>
- <p>Default is <code>ClampToEdgeWrapping</code>.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="addLayerUpdate" translate="no">.<a href="#addLayerUpdate">addLayerUpdate</a><span class="signature">( layerIndex : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Describes that a specific layer of the texture needs to be updated.
- Normally when <a href="Texture.html#needsUpdate">Texture#needsUpdate</a> is set to <code>true</code>, the
- entire data texture array is sent to the GPU. Marking specific
- layers will only transmit subsets of all mipmaps associated with a
- specific depth in the array which is often much more performant.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>layerIndex</strong>
- </td>
- <td class="description last">
- <p>The layer index that should be updated.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="clearLayerUpdates" translate="no">.<a href="#clearLayerUpdates">clearLayerUpdates</a><span class="signature">()</span> </h3>
- <div class="method">
- <div class="description">
- <p>Resets the layer updates registry.</p>
- </div>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/DataArrayTexture.js" translate="no" target="_blank" rel="noopener">src/textures/DataArrayTexture.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|