Browse Source

DRACOLoader: Move Draco libs and add readme.

Don McCurdy 7 năm trước cách đây
mục cha
commit
13664bf02c

+ 32 - 0
examples/js/libs/draco/README.md

@@ -0,0 +1,32 @@
+# Draco 3D Data Compression
+
+Draco is an open-source library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
+
+[Website](https://google.github.io/draco/) | [GitHub](https://github.com/google/draco)
+
+## Contents
+
+This folder contains three utilities:
+
+* `draco_decoder.js` — Emscripten-compiled decoder, compatible with any modern browser.
+* `draco_decoder.wasm` — WebAssembly decoder, compatible with newer browsers and devices.
+* `draco_wasm_wrapper.js` — JavaScript wrapper for the WASM decoder.
+
+Each file is provided in two variations:
+
+* **Default:** Latest stable builds, tracking the project's [master branch](https://github.com/google/draco).
+* **glTF:** Builds targeted by the [glTF mesh compression extension](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression), tracking the [corresponding Draco branch](https://github.com/google/draco/tree/gltf_2.0_draco_extension).
+
+Either variation may be used with `THREE.DRACOLoader`:
+
+```js
+THREE.DRACOLoader.setDecoderPath('path/to/decoders/');
+THREE.DRACOLoader.setDecoderConfig({type: 'js'}); // (Optional) Override detection of WASM support.
+var dracoLoader = new THREE.DRACOLoader();
+```
+
+Further [documentation on GitHub](https://github.com/google/draco/tree/master/javascript/example#static-loading-javascript-decoder).
+
+## License
+
+[Apache License 2.0](https://github.com/google/draco/blob/master/LICENSE)

+ 0 - 0
examples/js/loaders/draco/draco_decoder.js → examples/js/libs/draco/draco_decoder.js


+ 0 - 0
examples/js/loaders/draco/draco_decoder.wasm → examples/js/libs/draco/draco_decoder.wasm


+ 0 - 0
examples/js/loaders/draco/draco_wasm_wrapper.js → examples/js/libs/draco/draco_wasm_wrapper.js


+ 0 - 0
examples/js/loaders/draco/gltf/draco_decoder.js → examples/js/libs/draco/gltf/draco_decoder.js


+ 0 - 0
examples/js/loaders/draco/gltf/draco_decoder.wasm → examples/js/libs/draco/gltf/draco_decoder.wasm


+ 0 - 0
examples/js/loaders/draco/gltf/draco_wasm_wrapper.js → examples/js/libs/draco/gltf/draco_wasm_wrapper.js


+ 0 - 0
examples/js/loaders/draco/DRACOLoader.js → examples/js/loaders/DRACOLoader.js