1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:Texture] →
<h1>[name]</h1>
<p class="desc">Creates a three-dimensional texture. This type of texture can only be used with a WebGL 2 rendering context.</p>
<h2>Constructor</h2>
<h3>[name]( [param:TypedArray data], [param:Number width], [param:Number height], [param:Number depth] )</h3>
<p>
[page:Object data] -- data of the texture.<br />
[page:Number width] -- width of the texture.<br />
[page:Number height] -- height of the texture.<br />
[page:Number depth] -- depth of the texture.
</p>
<h2>Example</h2>
<div>[example:webgl2_materials_texture3d WebGL2 / materials / texture3d]</div>
<div>[example:webgl2_materials_texture2darray WebGL2 / materials / texture2darray]</div>
<h2>Properties</h2>
<p>
See the base [page:Texture Texture] class for common properties.
</p>
<h3>[property:number wrapR]</h3>
<p>
This defines how the texture is wrapped in the depth direction.<br />
The default is [page:Textures THREE.ClampToEdgeWrapping], where the edge is clamped to the outer edge texels.
The other two choices are [page:Textures THREE.RepeatWrapping] and [page:Textures THREE.MirroredRepeatWrapping].
See the [page:Textures texture constants] page for details.
</p>
<h2>Methods</h2>
<p>
See the base [page:Texture Texture] class for common methods.
</p>
<h2>Source</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
|