Import
DRACOExporter is an addon, and must be imported explicitly, see Installation#Addons.
import { DRACOExporter } from 'three/addons/exporters/DRACOExporter.js';
Properties
.MESH_EDGEBREAKER_ENCODING : number (constant)
Edgebreaker encoding.
Default is 1.
.MESH_SEQUENTIAL_ENCODING : number (constant)
Sequential encoding.
Default is 0.
Methods
.parse( object : Mesh | Points, options : DRACOExporter~Options ) : Int8Array
Parses the given mesh or point cloud and generates the Draco output.
| object |
The mesh or point cloud to export. |
| options |
The export options. |
- Returns: The exported Draco.
Type Definitions
.Options
Export options of DRACOExporter.
|
decodeSpeed
number |
Indicates how to tune the encoder regarding decode speed (0 gives better speed but worst quality). Default is |
|
encodeSpeed
number |
Indicates how to tune the encoder parameters (0 gives better speed but worst quality). Default is |
|
encoderMethod
number |
Either sequential (very little compression) or Edgebreaker. Edgebreaker traverses the triangles of the mesh in a deterministic, spiral-like way which provides most of the benefits of this data format. Default is |
|
quantization
Array.<number> |
Indicates the precision of each type of data stored in the draco file in the order (POSITION, NORMAL, COLOR, TEX_COORD, GENERIC). Default is |
|
exportUvs
boolean |
Whether to export UVs or not. Default is |
|
exportNormals
boolean |
Whether to export normals or not. Default is |
|
exportColor
boolean |
Whether to export colors or not. Default is |