Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draco js module build instructions #6672

Merged
merged 4 commits into from
Jun 13, 2018
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Documentation/Contributors/DracoModuleManagement/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Updating the Draco JavaScript Decoder Module

We use a custom build of the [Draco](https://github.com/google/draco) decoder JavaScript module to allow for IE11 compatibility.


1. Download and install a make tool.
* Preferably, use Linux or [the Linux Subsystem for Windows 10](https://docs.microsoft.com/en-us/windows/wsl/install-win10) and `make` to build.
* Optionally, [MSYS2](http://www.msys2.org/). Follow installation instructions and add the path to MSYS2's usr/bin to your `PATH`. For example, if the path is `C:\msys64\usr\bin`, run `PATH=%PATH%;C:\msys64\usr\bin`.
2. Clone or download the [Draco release](https://github.com/google/draco/releases).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, one comment. If you clone Draco from git, you'll get master and not an official release, right? We should probably always include an official release in Cesium

3. [Download and install Emscripten](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html)
4. In a seperate directory, follow the [CMake JavaScript Encoder/Decoder Instructions](https://github.com/google/draco#javascript-encoderdecoder). When running cmake, specify `"Unix Makefiles"` as the target, and including the flag `-DIE_COMPATIBLE=true`, ie.
```terminal
cmake ..\path\to\draco -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="absolute\path\emscripten\cmake\Modules\Platforms\Emscripten.cmake" -DIE_COMPATIBLE=true
```
5. In that directory, build with `make -j`.
6. Copy the output `draco_decoder.js` file to the `Source\ThirdParty\Workers` directory.