explaingit

google/draco

7,265C++Audience · developerComplexity · 3/5Setup · moderate

TLDR

A Google library for compressing 3D model files, meshes and point clouds, so they download faster and use less storage, usable from C++, JavaScript, and WebAssembly with integrations for glTF, Unity, and Maya.

Mindmap

mindmap
  root((Draco))
    What it does
      3D file compression
      Faster downloads
      Smaller storage
    Data types
      Meshes
      Point clouds
    Interfaces
      C++ library
      JavaScript
      WebAssembly
    Integrations
      glTF format
      Unity
      Maya
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Compress 3D model files for your website so they load faster and consume less bandwidth for visitors.

USE CASE 2

Integrate Draco decompression into a browser-based 3D viewer using the JavaScript and WebAssembly decoder hosted on Google's CDN.

USE CASE 3

Reduce the size of glTF assets in a Unity game or web AR/VR project using the provided Unity plugin.

USE CASE 4

Encode point cloud data captured by a 3D scanner into a compact Draco file for efficient storage or transmission.

Tech stack

C++JavaScriptWebAssembly

Getting it running

Difficulty · moderate Time to first run · 30min

In plain English

Draco is a library from Google for compressing and decompressing 3D geometric data. When you have a 3D model, such as a character in a video game or a product shown on a shopping website, the raw file describing every point and triangle in that shape can be quite large. Draco reduces the size of those files significantly, which means faster downloads, less storage space, and quicker loading times for 3D content on the web or in apps. The library works with two types of 3D data: meshes, which are the connected surfaces that define the outer shape of an object, and point clouds, which are collections of individual points in three-dimensional space often captured by 3D scanners. For meshes it reduces file size by encoding the positions and surface details with controlled precision. Some quality is traded for smaller size, but the degree of compression is adjustable. Draco integrates with glTF, which is a widely used file format for 3D models on the web. Many 3D tools and game engines already have Draco support built in or available as a plugin, including Unity and Maya. For web applications, Google hosts the decoder files on a public CDN so a website can load 3D content without bundling the decoder itself. The library can be used from C++ directly, or through JavaScript and WebAssembly bindings for browser-based projects. There are also command-line tools for encoding and transcoding files. Plugins for Unity and other platforms are provided alongside the core library. This is a developer-facing tool. Non-technical users benefit from it indirectly whenever a website or application loads 3D models faster than it otherwise would. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
How do I use the Draco command-line encoder to compress a .obj 3D mesh file, and then decode it back using the command-line decoder?
Prompt 2
Show me how to load a Draco-compressed glTF model in a Three.js web application using the DRACOLoader and the decoder files from Google's CDN.
Prompt 3
How do I integrate Draco compression into my Unity project to reduce the file size of my 3D assets at export time?
Prompt 4
I have point cloud data from a 3D scanner. Show me the C++ code to encode it with Draco and the JavaScript code to decode it in a browser with WebAssembly.
Open on GitHub → Explain another repo

← google on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.