Skip to content

Commit

Permalink
Draco v1.5.3 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfinegan authored Jul 7, 2022
1 parent cfa0547 commit 1af95a2
Show file tree
Hide file tree
Showing 110 changed files with 4,118 additions and 1,927 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.obj eol=lf
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -544,14 +544,18 @@ if(DRACO_TRANSCODER_SUPPORTED)
"${draco_src_root}/material/material_library.h")

list(APPEND draco_mesh_sources
"${draco_src_root}/mesh/mesh_connected_components.cc"
"${draco_src_root}/mesh/mesh_connected_components.h"
"${draco_src_root}/mesh/mesh_splitter.cc"
"${draco_src_root}/mesh/mesh_splitter.h"
"${draco_src_root}/mesh/mesh_utils.cc"
"${draco_src_root}/mesh/mesh_utils.h")

list(APPEND draco_scene_sources
"${draco_src_root}/scene/light.h"
"${draco_src_root}/scene/instance_array.cc"
"${draco_src_root}/scene/instance_array.h"
"${draco_src_root}/scene/light.cc"
"${draco_src_root}/scene/light.h"
"${draco_src_root}/scene/mesh_group.h"
"${draco_src_root}/scene/scene.cc"
"${draco_src_root}/scene/scene.h"
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ delays can result in transient errors that can be difficult to diagnose when
new Draco releases are launched. To avoid the issue pin your sites to a
versioned release.

### Version 1.5.3 release:
* Using the versioned www.gstatic.com WASM and Javascript decoders continues
to be recommended. To use v1.5.3, use this URL:
* https://www.gstatic.com/draco/versioned/decoders/1.5.3/*
* Bug fixes.

### Version 1.5.2 release
* This is the same as v1.5.1 with the following two bug fixes:
* Fixes DRACO_TRANSCODER_SUPPORTED enabled builds.
Expand Down
2 changes: 1 addition & 1 deletion cmake/draco_build_definitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ macro(draco_set_build_definitions)
# passed to libtool.
#
# We set DRACO_SOVERSION = [c-a].a.r
set(LT_CURRENT 4)
set(LT_CURRENT 5)
set(LT_REVISION 0)
set(LT_AGE 0)
math(EXPR DRACO_SOVERSION_MAJOR "${LT_CURRENT} - ${LT_AGE}")
Expand Down
2 changes: 2 additions & 0 deletions cmake/draco_tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ list(
"${draco_src_root}/core/draco_test_utils.h"
"${draco_src_root}/core/math_utils_test.cc"
"${draco_src_root}/core/quantization_utils_test.cc"
"${draco_src_root}/core/status.cc"
"${draco_src_root}/core/status_test.cc"
"${draco_src_root}/core/vector_d_test.cc"
"${draco_src_root}/io/file_reader_test_common.h"
Expand Down Expand Up @@ -83,6 +84,7 @@ if(DRACO_TRANSCODER_SUPPORTED)
"${draco_src_root}/io/texture_io_test.cc"
"${draco_src_root}/material/material_library_test.cc"
"${draco_src_root}/material/material_test.cc"
"${draco_src_root}/scene/instance_array_test.cc"
"${draco_src_root}/scene/light_test.cc"
"${draco_src_root}/scene/mesh_group_test.cc"
"${draco_src_root}/scene/scene_test.cc"
Expand Down
18 changes: 9 additions & 9 deletions javascript/draco_decoder.js

Large diffs are not rendered by default.

Binary file modified javascript/draco_decoder.wasm
Binary file not shown.
16 changes: 8 additions & 8 deletions javascript/draco_decoder_gltf.js

Large diffs are not rendered by default.

Binary file modified javascript/draco_decoder_gltf.wasm
Binary file not shown.
20 changes: 10 additions & 10 deletions javascript/draco_encoder.js

Large diffs are not rendered by default.

Binary file modified javascript/draco_encoder.wasm
Binary file not shown.
168 changes: 85 additions & 83 deletions javascript/draco_encoder_wrapper.js

Large diffs are not rendered by default.

208 changes: 105 additions & 103 deletions javascript/draco_wasm_wrapper.js

Large diffs are not rendered by default.

207 changes: 104 additions & 103 deletions javascript/draco_wasm_wrapper_gltf.js

Large diffs are not rendered by default.

66 changes: 37 additions & 29 deletions javascript/example/README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,59 @@
Example
===========
# Example

Quick Start
-----------
To start using Draco, you could try the example `webgl_loader_draco.html`.
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.
## Quick Start

To start using Draco, you could try the example `webgl_loader_draco.html`. 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/.
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".

(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 a
bunny rendered by threejs using Draco loader.

(3) Load javascript/example/webgl_loader_draco.html. You should be able to see
a bunny rendered by threejs using Draco loader.
## Advanced Example

Advanced Example
---------------------
To use more advanced features of Draco loader, please look at the example `webgl_loader_draco_advanced.html`.
In this example, you could:
To use more advanced features of Draco loader, please look at the example
`webgl_loader_draco_advanced.html`. In this example, you could:

(1) Switch between Javascript decoder and WebAssembly decoder if it's supported by the browser.
1. Switch between Javascript decoder and WebAssembly decoder if it's supported
by the browser.

(2) Load your own encoded Draco file (.drc) by clicking on "Choose File" and select a file.
2. Load your own encoded Draco file (.drc) by clicking on "Choose File" and
select a file.

Static Loading Javascript Decoder
---------------------------------
## Static Loading Javascript Decoder

In the previous examples, `DRACOLoader.js` will dynamically load Javascript decoder or
WASM decoder depending on the support of the browser. To avoid dynamically loading the decoder, e.g. to use with JS bundler like webpack, you could directly include `draco_decoder.js` and set the decoder type to `js`. For example:
In the previous examples, `DRACOLoader.js` will dynamically load Javascript
decoder or WASM decoder depending on the support of the browser. To avoid
dynamically loading the decoder, e.g. to use with JS bundler like webpack, you
could directly include `draco_decoder.js` and set the decoder type to `js`. For
example:

Include Javascript decoder:
~~~~~ html

```html
<script src="../draco_decoder.js"></script>
~~~~~
```

Create DracoLoader by setting the decoder type:
~~~~~ js

```js
// (Optional) Change decoder source directory (defaults to
// 'https://www.gstatic.com/draco/versioned/decoders/1.4.1/'). It is recommended to always
// pull your Draco JavaScript and WASM decoders from this URL. Users will
// benefit from having the Draco decoder in cache as more sites start using
// 'https://www.gstatic.com/draco/versioned/decoders/1.4.1/'). It is recommended
// to always pull your Draco JavaScript and WASM decoders from this URL. Users
// will benefit from having the Draco decoder in cache as more sites start using
// the static URL.
THREE.DRACOLoader.setDecoderPath('./path/to/decoder/');

// (Optional) Force non-WebAssembly JS decoder (without this line, WebAssembly is the default if supported).
// (Optional) Force non-WebAssembly JS decoder (without this line, WebAssembly
// is the default if supported).
THREE.DRACOLoader.setDecoderConfig({type: 'js'});

// (Optional) Pre-fetch decoder source files (defaults to load on demand).
Expand All @@ -61,4 +69,4 @@ dracoLoader.load( 'model.drc', function ( geometry ) {
THREE.DRACOLoader.releaseDecoderModule();

} );
~~~~~
```
2 changes: 1 addition & 1 deletion javascript/npm/draco3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
News
=======

Check out the [README](https://github.com/google/draco/blob/1.5.2/README.md)
Check out the [README](https://github.com/google/draco/blob/1.5.3/README.md)
file for news about this release.

Description
Expand Down
Binary file modified javascript/npm/draco3d/draco_decoder.wasm
Binary file not shown.
Loading

0 comments on commit 1af95a2

Please sign in to comment.