diff --git a/src/javascript/webgl-rendering-context.js b/src/javascript/webgl-rendering-context.js index 0319be5e..3656acd1 100644 --- a/src/javascript/webgl-rendering-context.js +++ b/src/javascript/webgl-rendering-context.js @@ -1304,7 +1304,7 @@ class WebGLRenderingContext extends NativeWebGLRenderingContext { if (typeof data === 'object') { let u8Data = null - if (isTypedArray(data)) { + if (isTypedArray(data) || data instanceof DataView) { u8Data = unpackTypedArray(data) } else if (data instanceof ArrayBuffer) { u8Data = new Uint8Array(data) @@ -1386,7 +1386,7 @@ class WebGLRenderingContext extends NativeWebGLRenderingContext { } let u8Data = null - if (isTypedArray(data)) { + if (isTypedArray(data) || data instanceof DataView) { u8Data = unpackTypedArray(data) } else if (data instanceof ArrayBuffer) { u8Data = new Uint8Array(data)