how to get a thumbnail #547
-
I want generate a thumbnail in node by this SDK, have any good idea? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! The gltf-transform library is for reading/editing/writing glTF files and doesn't really deal with rendering1. You'll need a renderer for that. Because node.js is a server-side platform it isn't particularly rich in rendering libraries, but you can spawn headless Blender instances or things like that if needed. I'd start with this project: https://github.com/Shopify/screenshot-glb 1 There is also the |
Beta Was this translation helpful? Give feedback.
Hi! The gltf-transform library is for reading/editing/writing glTF files and doesn't really deal with rendering1. You'll need a renderer for that. Because node.js is a server-side platform it isn't particularly rich in rendering libraries, but you can spawn headless Blender instances or things like that if needed.
I'd start with this project: https://github.com/Shopify/screenshot-glb
1 There is also the
@gltf-transform/view
module, which could connect with three.js to render glTF files, but (1) running three.js in Node.js isn't trivial, and (2) three.js can already load glTF files so you don't really need gltf-transform for that workflow.