From 18ba56b3e2c21dd3c737ca6e341cde0ccfc21117 Mon Sep 17 00:00:00 2001 From: Fu Zhen Date: Sat, 30 Sep 2023 12:27:58 +0800 Subject: [PATCH] respect buffer's original dimension when updating reglBuffer data --- lib/buffer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/buffer.js b/lib/buffer.js index ebc9c5fe..f7c2c4fa 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -225,7 +225,7 @@ module.exports = function wrapBufferState (gl, stats, config, destroyBuffer) { var data = null var byteLength = 0 var dtype = 0 - var dimension = 1 + var dimension = buffer && buffer.dimension || 1 if (Array.isArray(options) || isTypedArray(options) || isNDArrayLike(options) ||