Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>glb-compressorNew to Visual Studio Code? Get it now.
glb-compressor

glb-compressor

Bhushan Wagh

|
3 installs
| (0) | Free
VS Code extension for optimizing and compressing GLB files using gltf-transform.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GLB Compressor for VS Code

A powerful VS Code extension for optimizing and compressing GLB files. This extension acts as a convenient wrapper around the gltf-transform CLI tool, bringing advanced 3D model optimization directly into your editor.

Features

  • Draco Compression: Significantly reduce geometry size.
  • KTX2 Texture Compression: Optimize textures for runtime performance using Basis Universal (ETC1S/UASTC).
  • Advanced Optimization GUI: Fine-tune specific optimization passes:
    • Geometry: Weld vertices, simplify meshes (with ratio control).
    • Textures: Resize, convert formats (WebP, JPEG).
    • Scene Graph: Dedup, prune unused items, flatten hierarchy, join meshes.
    • Instancing: Auto-generate GPU instances and palette textures.

Requirements and Installation

This extension is a wrapper around the gltf-transform CLI and KTX-Software tools. You must have both installed on your system for the compression commands to work.

1. Install gltf-transform CLI

The core transformations are handled by gltf-transform. Install it globally using npm:

npm install --global @gltf-transform/cli

2. Install KTX-Software Tools (for KTX Compression)

The commands for KTX Texture Compression (KTX Compress GLB and Draco and KTX Compress GLB) require the toktx tool from the KTX-Software suite

  • Download the latest release for your platform (macOS/Windows) from the KTX-Software GitHub Releases.

  • The release package contains the necessary executables. You will need to ensure the toktx executable is placed into a directory that is included in your system's PATH environment variable (e.g., /usr/local/bin or similar on macOS/Linux, or adding the directory to PATH on Windows).

Usage

Right-click on any .glb file in the VS Code Explorer to see the available commands:

  1. Compress GLB (Draco + KTX): Applies standard Draco and KTX2 compression.
  2. Compress GLB (Draco): Geometry compression only.
  3. Compress GLB (KTX): Texture compression only.
  4. Compress GLB (Advanced...): Opens a configuration panel for detailed control.

Configuration

If gltf-transform is not in your system PATH, you can specify its location in VS Code Settings:

  • glb-compressor.cliPath: Absolute path to the gltf-transform executable (default: gltf-transform).

Requirements

  • VS Code 1.70.0 or newer.
  • Node.js installed (for the CLI tool).
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft