This is the official Khronos glTF 2.0 image and geometry compression project using WebGL: glTF-Compressor
Link to the live glTF-Compressor
Texture compression using KTX2, JPEG, PNG and WebP.
Geometry compression using DRACO, MeshOpt and MeshQuantization.
Developed by Phasmatic. Supported by the Khronos Group. Original code based on the glTF-Sample Viewer project.
On top of existing glTF Sample Viewer features, this project adds functionality for:
- 3D mesh comparison (original/compressed images and geometry)
- 2D image comparison (original/compressed images) with zoom operation
- JPEG texture compression
- PNG texture compression
- KTX2 texture compression via KHR_texture_basisu
- WebP texture compression via EXT_texture_webp
- Model compression via EXT_meshopt_compression
- Model compression via KHR_draco_mesh_compression
- Model compression via KHR_mesh_quantization
- Model export with textures (glTF, glTF-embedded, GLB)
For local usage and debugging, please follow these instructions:
-
Make sure Git LFS is installed.
-
Checkout the
main
branch -
Pull the submodules for the required glTF Sample Assets and environments
git submodule update --init --recursive
You can find an example application for the glTF-Compressor in the app_web subdirectory of the glTF-Compressor repository. The live app can be found here: glTF-Compressor.
Running a local version
Open a terminal window in the repository root an run the following commands
cd app_web
npm install
npm run dev
The glTF-Compressor can be accessed live with Chrome or Firefox at the URL [glTF-Compressor](https://github.khronos.org/glTF-Compressor-Release/)