files/en-us/web/api/webgl2renderingcontext/copytexsubimage3d/index.md
{{APIRef("WebGL")}}{{AvailableInWorkers}}
The copyTexSubImage3D() method of the {{domxref("WebGL2RenderingContext")}} interface of the WebGL API copies pixels from the current {{domxref("WebGLFramebuffer")}} into a 3D texture sub-image.
copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height)
target
gl.TEXTURE_3D: A three-dimensional texture.gl.TEXTURE_2D_ARRAY: A two-dimensional array texture.level
xoffset
yoffset
zoffset
x
y
width
height
None ({{jsxref("undefined")}}).
gl.copyTexSubImage3D(gl.TEXTURE_3D, 0, 0, 0, 0, 0, 0, 16, 16);
{{Specifications}}
{{Compat}}