diff --git a/docs/examples/en/exporters/DRACOExporter.html b/docs/examples/en/exporters/DRACOExporter.html new file mode 100644 index 00000000000000..60c15a554b1b83 --- /dev/null +++ b/docs/examples/en/exporters/DRACOExporter.html @@ -0,0 +1,74 @@ + + + + + + + + + +

[name]

+ +

+ An exporter to compress geometry with the Draco library.

+ [link:https://google.github.io/draco/ Draco] is an open source library for compressing and + decompressing 3D meshes and point clouds. Compressed geometry can be significantly smaller, + at the cost of additional decoding time on the client device. +

+ +

+ Standalone Draco files have a `.drc` extension, and contain vertex positions, + normals, colors, and other attributes. Draco files *do not* contain materials, + textures, animation, or node hierarchies – to use these features, embed Draco geometry + inside of a glTF file. A normal glTF file can be converted to a Draco-compressed glTF file + using [link:https://github.com/AnalyticalGraphicsInc/gltf-pipeline glTF-Pipeline]. +

+ +

Code Example

+ + + // Instantiate a exporter + const exporter = new DRACOExporter(); + + // Parse the input and generate the DRACO encoded output + const binaryData = exporter.parse( mesh, options ); + + +

Examples

+ +

+ [example:misc_exporter_draco] +

+ +

Constructor

+ +

[name]()

+

+ Creates a new [name]. +

+ +

Methods

+ +

[method:Int8Array parse]( [param:Mesh object] | [param:Points object], [param:Object options] )

+ +

+ [page:Mesh object] | [page:Points object] — Mesh or Points to encode.
+ [page:Options options] — Optional export options
+

+

+ +

Source

+ +

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/DRACOExporter.js examples/jsm/exporters/DRACOExporter.js] +

+ + diff --git a/docs/list.json b/docs/list.json index 476b28c59471bb..dddbb8715d68aa 100644 --- a/docs/list.json +++ b/docs/list.json @@ -392,6 +392,7 @@ "Exporters": { "ColladaExporter": "examples/en/exporters/ColladaExporter", + "DRACOExporter": "examples/en/exporters/DRACOExporter", "EXRExporter": "examples/en/exporters/EXRExporter", "GLTFExporter": "examples/en/exporters/GLTFExporter", "OBJExporter": "examples/en/exporters/OBJExporter", diff --git a/examples/jsm/exporters/DRACOExporter.js b/examples/jsm/exporters/DRACOExporter.js index 669aa8f19ea7c9..c214bbdbfc1442 100644 --- a/examples/jsm/exporters/DRACOExporter.js +++ b/examples/jsm/exporters/DRACOExporter.js @@ -10,6 +10,7 @@ * - quantization, indicates the presision of each type of data stored in the draco file in the order (POSITION, NORMAL, COLOR, TEX_COORD, GENERIC) * - exportUvs * - exportNormals + * - exportColor */ /* global DracoEncoderModule */