Skip to content

Instantly share code, notes, and snippets.

@hrithikwins
Last active August 19, 2024 18:34
Show Gist options
  • Save hrithikwins/1b7e09e7a49c9513da126c6a27d43dea to your computer and use it in GitHub Desktop.
Save hrithikwins/1b7e09e7a49c9513da126c6a27d43dea to your computer and use it in GitHub Desktop.
Readme for hubs glb tools

Hubs Glb Tools

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.

Installation

  1. Clone the repository git clone https://github.com/Hubs-Foundation/hubs-glb-tools
  2. Download & Install ktx tools from the official repository
  3. Change your directory to the cloned folder cd hubs-glb-tools, and then run npm install with a node version of 18.18

Usage Instructions

  1. Start the tool by running npm run dist
  2. 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:

  1. It needs absolute glb file's path as the input & output
  2. the --no-experimental-fetch is required for node versions greater than 18.18
@hrithikwins
Copy link
Author

  1. Change your directory to the cloned folder cd hubs-glb-tools, and then run npm install with a node version of 18.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment