• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..12-Oct-2021-

README.mdH A D12-Oct-20212.6 KiB6342

package.jsonH A D12-Oct-2021543 2221

README.md

1
2<p align="center">
3<img src="https://github.com/google/draco/raw/master/docs/DracoLogo.jpeg" />
4</p>
5
6Description - glTF Draco Mesh Compression Extension
7===================================================
8
9
10[Draco] is a library for compressing and decompressing 3D geometric [meshes] and [point clouds]. It is intended to improve the storage and transmission of 3D graphics.
11The [GL Transmission Format (glTF)](https://github.com/KhronosGroup/glTF) is an API-neutral runtime asset delivery format. glTF bridges the gap between 3D content creation tools and modern 3D applications by providing an efficient, extensible, interoperable format for the transmission and loading of 3D content.
12
13This package is a build for encoding/decoding [Draco mesh compression extension](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression) in glTF specification. It could be used to compress the meshes in glTF assets or to decode the buffer data that belongs to a Draco mesh compression extension. For more detail, please read the extension spec.
14
15Draco github glTF branch URL: https://github.com/google/draco/tree/gltf_2.0_draco_extension
16
17News
18=======
19
20Check out the [README](https://github.com/google/draco/blob/1.4.3/README.md)
21file for news about this release.
22
23NPM Package
24===========
25
26The code shows a simple example of using Draco encoder and decoder with Node.js.
27`draco_encoder_node.js` and `draco_decoder_node.js` are modified Javascript
28encoding/decoding files that are compatible with Node.js.
29`draco_nodejs_example.js` has the example code for usage.
30Here we use a Draco file as an example, but when it's used with glTF assets, the
31Draco file should be instead some buffer data contained in the binary data.
32
33How to run the code:
34
35(1) Install draco3dgltf package :
36
37~~~~~ bash
38$ npm install draco3dgltf
39~~~~~
40
41(2) Run example code to test:
42
43~~~~~ bash
44$ cp node_modules/draco3dgltf/draco_nodejs_example.js .
45$ cp node_modules/draco3dgltf/bunny.drc .
46$ node draco_nodejs_example.js
47~~~~~
48
49The code loads the [Bunny] model, it will first decode to a mesh
50and then encode it with different settings.
51
52glTF Extension
53==============
54
55The above example shows how to decode compressed data from a binary file. To use with glTF assets. The decoder should be applied to the data of the `bufferView` that belongs to a Draco extension. Please see the spec for detailed instruction on loading/exporting Draco extension.
56
57References
58==========
59[Draco]: https://github.com/google/draco
60[Bunny]: https://graphics.stanford.edu/data/3Dscanrep/
61
62Bunny model from Stanford's graphic department <https://graphics.stanford.edu/data/3Dscanrep/>
63