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

Im using gltf-pipline after getting a gltf buffer from threejs-node-exporter but no compression is done. #606

Open
ylin6 opened this issue Oct 23, 2021 · 1 comment

Comments

@ylin6
Copy link

ylin6 commented Oct 23, 2021

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?

@ylin6
Copy link
Author

ylin6 commented Oct 29, 2021

Ahhhh, solutions was calling JSON.parse on the output, which is a buffer, of threejs-nodejs-exporters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant