Skip to content

phasmatic3d/glTF-Compressor

 
 

Repository files navigation

glTF-Compressor

This is the official Khronos glTF 2.0 image compression project using WebGL: glTF-Compressor

Table of Contents

Version

Image compression using KTX 2, JPEG, PNG and WebP.

Credits

Developed by Phasmatic. Supported by the Khronos Group. Original code based on the former glTF-Sample Viewer project.

Features

On top of existing glTF Sample Viewer features, this project adds functionality for:

  • EXT_texture_webp
  • Images preview
  • 3D mesh comparison (original/compressed images)
  • 2D image comparison (original/compressed images) with zoom operation
  • KTX 2 encoding
  • JPEG encoding
  • PNG encoding
  • WebP encoding
  • Model export (gltf, gltf-embedded, glb)

Setup

For local usage and debugging, please follow these instructions:

  1. Make sure Git LFS is installed.

  2. Checkout the main branch

  3. Pull the submodules for the required glTF sample models and environments git submodule update --init --recursive

Web App

You can find an example application for the glTF-Compressor in the app_web subdirectory of the glTF-Compressor repository. A live demo can be found at https://github.khronos.org/glTF-Compressor-Release/.

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

now you can access glTF-Compressor with Chrome or Firefox at the URL http://localhost:8000

About

To store the source code for the glTF-Compressor project

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 84.9%
  • GLSL 8.9%
  • HTML 5.3%
  • SCSS 0.9%