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 @@ + + +
+ +
+ 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]. +
+ +
+ // Instantiate a exporter
+ const exporter = new DRACOExporter();
+
+ // Parse the input and generate the DRACO encoded output
+ const binaryData = exporter.parse( mesh, options );
+
+
+ + [example:misc_exporter_draco] +
+ ++ Creates a new [name]. +
+ +
+ [page:Mesh object] | [page:Points object] — Mesh or Points to encode.
+ [page:Options options] — Optional export options
+
+ [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 */