CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.7k stars 305 forks source link

Remove buffer data uri size limitation #178

Closed lilleyse closed 5 years ago

lilleyse commented 5 years ago

Partial fix for https://github.com/AnalyticalGraphicsInc/obj2gltf/issues/59.

writeGltf no longer hardcodes a limit to the string size. If someone is running with Node 8 or below and tries writing a large glTF it will still throw an error, but if running Node 9 or above it should now work.

According to https://stackoverflow.com/questions/44533966/v8-node-js-increase-max-allowed-string-length Node still has a string limit of ~1GB, so this doesn't completely fix https://github.com/AnalyticalGraphicsInc/obj2gltf/issues/59 but it makes it less likely to happen.

lilleyse commented 5 years ago

Time to figure out what's going wrong with https://github.com/AnalyticalGraphicsInc/obj2gltf/issues/177.

lilleyse commented 5 years ago

@mramato this PR isn't quite ready. The stream approach isn't working yet but it might be fixable.

lilleyse commented 5 years ago

Closing for now. May open again once it's more complete.