From 378bdc22c4290df8fce515bdfc1c57ff9d07123e Mon Sep 17 00:00:00 2001 From: Oksana Tunik Date: Wed, 28 Aug 2024 08:52:07 +1000 Subject: [PATCH] Remove buffer length limit --- lib/writeGltf.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/writeGltf.js b/lib/writeGltf.js index 22ad3ad..6afb680 100644 --- a/lib/writeGltf.js +++ b/lib/writeGltf.js @@ -162,13 +162,6 @@ function writeEmbeddedBuffer(gltf) { const buffer = gltf.buffers[0]; const source = buffer.extras._obj2gltf.source; - // Buffers larger than ~192MB cannot be base64 encoded due to a NodeJS limitation. Source: https://github.com/nodejs/node/issues/4266 - if (source.length > 201326580) { - throw new RuntimeError( - "Buffer is too large to embed in the glTF. Use the --separate flag instead.", - ); - } - buffer.uri = `data:application/octet-stream;base64,${source.toString( "base64", )}`;