To auto-guess the default type for array of arrays though, we need the buffer.target to be set and fixed.
That implies replacing opts.target with buffer.target in updateBuffer as well. Which is not really a problem since we're not reassigning buffer.target anyway and assume once created, the target will remain unchanged.
Replacing: https://github.com/pex-gl/pex-context/blob/e27e6c260b25a0286065647ed3ccea488e6f2f14/buffer.js#L52
Failing use case: updating a buffer back and forth between array of arrays and a typed array. If the previously set typed array has a different type than the defaults for array of arrays, type will be wrong as it will not be set: https://github.com/pex-gl/pex-context/blob/e27e6c260b25a0286065647ed3ccea488e6f2f14/buffer.js#L56-L63
To auto-guess the default type for array of arrays though, we need the buffer.target to be set and fixed. That implies replacing opts.target with buffer.target in updateBuffer as well. Which is not really a problem since we're not reassigning
buffer.target
anyway and assume once created, the target will remain unchanged.