Skip to main content

DracoLoader

logo

The DracoLoader decodes a mesh or point cloud (maps of attributes) using DRACO compression.

LoaderCharacteristic
File Extension.drc
File TypeBinary
File FormatDraco
Data FormatMesh
Supported APIsparse

Features:

  • Supports meshes and point clouds.
  • Supports custom attributes.
  • Extracts metadata dictionaries, both for the full mesh and for each attribute.
  • Supports all Draco metadata field types, including Int32Array.
  • Loads draco decoders dynamically from CDN (can optionally be bundled).
  • Ability to prevent decompression of specific attributes (returns quantization or octahedron transform parameters).

Usage

import {DracoLoader} from '@loaders.gl/draco';
import {load} from '@loaders.gl/core';

const data = await load(url, DracoLoader, options);

Options

OptionTypeDefaultDescription

Dependencies

Draco libraries by default are loaded from CDN, but can be bundled and injected. See [modules/draco/docs] for details.