mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-30 03:50:14 -05:00
Remove buffer length limit
This commit is contained in:
parent
ce0c36e281
commit
378bdc22c4
@ -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",
|
||||
)}`;
|
||||
|
Loading…
Reference in New Issue
Block a user