DracoWriter
The DracoWriter
encodes a mesh or point cloud using Draco compression.
Loader | Characteristic |
---|---|
File Format | Draco |
Data Format | Mesh |
File Extension | .drc |
File Type | Binary |
Support API | encode |
Support​
See Draco docs.
Usage​
import {DracoWriter} from '@loaders.gl/draco';
import {encode} from '@loaders.gl/core';
const data = encode(url, DracoWriter, options);
Options​
Option | Type | Default | Description |
---|---|---|---|
draco.pointcloud | Boolean | false | Whether to compress as point cloud (GL.POINTS) |
draco.speed | Number | Speed vs Quality, see Draco documentation | |
draco.method | String | Compression method, see Draco documentation | |
draco.quantization | [Number, Number] | Quantization parameters, see Draco documentation |
Dependencies​
Draco libraries by default are loaded from CDN, but can be bundled and injected. See [modules/draco/docs] for details.