Creating a Data3DTexture without the Data

I’ve been working on a project that loads a video into a 3DTexture:


I was initialising the texture by creating a typed array.

const u8 = new Uint8Array(x * y * depth * 4)
const texture = new THREE.Data3DTexture(u8, x, y, depth)

But I don’t actually need access to it because I’m using copyTextureToTexture3D to update the texture, so instead I’ve been initialising the texture with null:

const texture = new THREE.Data3DTexture(null, x, y, depth)

This seems to work fine, but it throws WebGL: INVALID_OPERATION: texSubImage3D: no bound PIXEL_UNPACK_BUFFER when it first renders.

I’m wondering:

  1. is this bad?
  2. is there a way to create a Data3DTexture without using a u8Array?