mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-06-04 11:25:44 +08:00

The latest version of Draco brings a number of new compression enhancements for even smaller models: - Improved compression - Up to 40% better compression of normals - Up to 5% better compression for models with multiple attributes - Faster decode speeds - 30% faster decoding for models with multiple attributes for lower compression levels 4 and below - Note: Decreases compression by 10%. - Encoding of metadata to .obj (e.g. Draco can preserve material or sub-object names) - Security fixes
The code shows a simple example of integration of threejs and draco javascript or WebAssembly decoder. From the example, you should be able to load an encoded draco mesh file and visualize it through threejs's fancy 3D tools. How to run the example code: (1) Clone this project to a working directory, e.g. draco/. (2) From the project's root directory, start a local http server. E.g, with Python, you could run "python -m SimpleHTTPServer". (3) Load javascript/example/webgl_loader_draco.html. You should be able to see an empty scene rendered by threejs. (4) Click "Choose File" to select a draco encoded file (.drc) and you should be able to see the model. e.g. bunny.drc. This is model encoded using Draco default compression. The original ply is located here "testdata/bun_zipper.ply".