[page:Texture] →


Creates a three-dimensional texture. This type of texture can only be used with a WebGL 2 rendering context.


[name]( [param:TypedArray data], [param:Number width], [param:Number height], [param:Number depth] )

[page:Object data] -- data of the texture.
[page:Number width] -- width of the texture.
[page:Number height] -- height of the texture.
[page:Number depth] -- depth of the texture.


[example:webgl2_materials_texture3d WebGL2 / materials / texture3d]


See the base [page:Texture Texture] class for common properties.

[property:number wrapR]

This defines how the texture is wrapped in the depth direction.
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.


See the base [page:Texture Texture] class for common methods.


[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]