This is the official Hubs Glb tools based on glTF Transform tools which provides fast, reproducible, and lossless control of the low-level details in a 3D model. The API automatically manages array indices and byte offsets, which would otherwise require careful management when editing files.
- Clone the repository
git clone https://github.com/Hubs-Foundation/hubs-glb-tools
- Download & Install ktx tools from the official repository
- Change your directory to the cloned folder
cd hubs-glb-tools
, and then runnpm install
with a node version of 18.18
- Start the tool by running
npm run dist
- And in the new terminal instance run the command to generate a new output.glb
node --no-experimental-fetch bin/cli.js optimize /Users/.../hubs-glb-tools/input.glb /Users/.../output.glb
Note:
- It needs absolute glb file's path as the input & output
- the --no-experimental-fetch is required for node versions greater than 18.18
cd hubs-glb-tools
, and then runnpm install
with a node version of 18.18