Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete buffer limit check #310

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions lib/writeGltf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)}`;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obj2gltf",
"version": "3.1.6",
"version": "3.1.7",
"description": "Convert OBJ model format to glTF",
"license": "Apache-2.0",
"contributors": [
Expand Down Expand Up @@ -72,4 +72,4 @@
"bin": {
"obj2gltf": "./bin/obj2gltf.js"
}
}
}