gl.texImage3D(
gl.TEXTURE_3D,
0, // level
gl.RGBA, // internalFormat
1, // width
1, // height
1, // depth
0, // border
gl.RGBA, // format
gl.UNSIGNED_BYTE, // type
new Uint8Array([0xff, 0x00, 0x00, 0x00]),
); // dataWebGL2RenderingContext: texImage3D() method / notebook
WebGL2RenderingContext: texImage3D() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.