Im using gltf-pipline after getting a gltf buffer from threejs-node-exporter but no compression is done.
ylin6 opened this issue · comments
Yucheng Lin commented
I'm exporting a model from ThreeJS in node using https://www.npmjs.com/package/@injectit/threejs-nodejs-exporters
and then running that through gltf-pipeline in node. However, I am not seeing a decrease in size from the outputted file and the stats log:
Statistics after:
Total byte length of all buffers: 0 bytes
Images: 0
Draw calls: 0
Rendered primitives (e.g., triangles): 0
Nodes: 0
Meshes: 0
Materials: 0
Animations: 0
External requests (not data uris): 0
However, if I save the output from threejs-nodejs-exporter and run that saved file with the gltf-pipeline cli tool, i get a much smaller file.
These are the options im passing in:
const options = {
dracoOptions: {
compressionLevel: 7,
},
stats: true,
};
Any ideas why?
Yucheng Lin commented
Ahhhh, solutions was calling JSON.parse on the output, which is a buffer, of threejs-nodejs-exporters