Skip to content

Commit 991ff01

Browse files
authored
Merge branch 'main' into fix-javascript-example
2 parents e525937 + 4e12ab2 commit 991ff01

142 files changed

Lines changed: 5603 additions & 1736 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: "bundler"
6+
directory: "/docs"
7+
schedule:
8+
interval: "monthly"
9+
groups:
10+
doc-gems-security:
11+
applies-to: "security-updates"
12+
patterns:
13+
- "*"
14+
commit-message:
15+
include: "scope"

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ on:
33
# Run on all pull requests.
44

55
push:
6-
# Run on merges/pushes to master.
6+
# Run on merges/pushes to main.
77
branches:
8-
- master
8+
- main
99

1010
schedule:
1111
# Run nightly, at midnight.

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# the License.
1414

1515
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
16+
if(DRACO_TRANSCODER_SUPPORTED)
17+
set(CMAKE_CXX_STANDARD 17)
18+
endif()
1619
project(draco C CXX)
1720

1821
if(NOT CMAKE_BUILD_TYPE)
@@ -479,10 +482,14 @@ list(
479482
"${draco_src_root}/metadata/geometry_metadata.h"
480483
"${draco_src_root}/metadata/metadata.cc"
481484
"${draco_src_root}/metadata/metadata.h"
485+
"${draco_src_root}/metadata/property_attribute.cc"
486+
"${draco_src_root}/metadata/property_attribute.h"
482487
"${draco_src_root}/metadata/property_table.cc"
483488
"${draco_src_root}/metadata/property_table.h"
484489
"${draco_src_root}/metadata/structural_metadata.cc"
485-
"${draco_src_root}/metadata/structural_metadata.h")
490+
"${draco_src_root}/metadata/structural_metadata.h"
491+
"${draco_src_root}/metadata/structural_metadata_schema.cc"
492+
"${draco_src_root}/metadata/structural_metadata_schema.h")
486493

487494
list(APPEND draco_metadata_enc_sources
488495
"${draco_src_root}/metadata/metadata_encoder.cc"

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<img width="350px" src="docs/artwork/draco3d-vert.svg" />
33
</p>
44

5-
[![draco-ci](https://github.com/google/draco/workflows/draco-ci/badge.svg?branch=master)](https://github.com/google/draco/actions/workflows/ci.yml)
5+
[![draco-ci](https://github.com/google/draco/workflows/draco-ci/badge.svg?branch=main)](https://github.com/google/draco/actions/workflows/ci.yml)
66

77
News
88
=======
@@ -14,6 +14,14 @@ delays can result in transient errors that can be difficult to diagnose when
1414
new Draco releases are launched. To avoid the issue pin your sites to a
1515
versioned release.
1616

17+
### Version 1.5.7 release:
18+
* Using the versioned www.gstatic.com WASM and Javascript decoders continues
19+
to be recommended. To use v1.5.7, use this URL:
20+
* https://www.gstatic.com/draco/versioned/decoders/1.5.7/*
21+
* Added support for normalized attributes to Emscripten encoder API.
22+
* Bug fixes.
23+
* Security fixes.
24+
1725
### Version 1.5.6 release:
1826
* Using the versioned www.gstatic.com WASM and Javascript decoders continues
1927
to be recommended. To use v1.5.6, use this URL:
@@ -603,6 +611,6 @@ References
603611
[meshes]: https://en.wikipedia.org/wiki/Polygon_mesh
604612
[point clouds]: https://en.wikipedia.org/wiki/Point_cloud
605613
[Bunny]: https://graphics.stanford.edu/data/3Dscanrep/
606-
[CONTRIBUTING]: https://raw.githubusercontent.com/google/draco/master/CONTRIBUTING.md
614+
[CONTRIBUTING]: https://raw.githubusercontent.com/google/draco/main/CONTRIBUTING.md
607615

608616
Bunny model from Stanford's graphic department <https://graphics.stanford.edu/data/3Dscanrep/>

cmake/draco_build_definitions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ macro(draco_set_build_definitions)
5656
# passed to libtool.
5757
#
5858
# We set DRACO_SOVERSION = [c-a].a.r
59-
set(LT_CURRENT 8)
59+
set(LT_CURRENT 9)
6060
set(LT_REVISION 0)
6161
set(LT_AGE 0)
6262
math(EXPR DRACO_SOVERSION_MAJOR "${LT_CURRENT} - ${LT_AGE}")

cmake/draco_install.cmake

Lines changed: 86 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -23,99 +23,101 @@ include(GNUInstallDirs)
2323
# Sets up the draco install targets. Must be called after the static library
2424
# target is created.
2525
macro(draco_setup_install_target)
26-
set(bin_path "${CMAKE_INSTALL_BINDIR}")
27-
set(data_path "${CMAKE_INSTALL_DATAROOTDIR}")
28-
set(includes_path "${CMAKE_INSTALL_INCLUDEDIR}")
29-
set(libs_path "${CMAKE_INSTALL_LIBDIR}")
30-
31-
foreach(file ${draco_sources})
32-
if(file MATCHES "h$")
33-
list(APPEND draco_api_includes ${file})
26+
if(DRACO_INSTALL)
27+
set(bin_path "${CMAKE_INSTALL_BINDIR}")
28+
set(data_path "${CMAKE_INSTALL_DATAROOTDIR}")
29+
set(includes_path "${CMAKE_INSTALL_INCLUDEDIR}")
30+
set(libs_path "${CMAKE_INSTALL_LIBDIR}")
31+
32+
foreach(file ${draco_sources})
33+
if(file MATCHES "h$")
34+
list(APPEND draco_api_includes ${file})
35+
endif()
36+
endforeach()
37+
38+
list(REMOVE_DUPLICATES draco_api_includes)
39+
40+
# Strip $draco_src_root from the file paths: we need to install relative to
41+
# $include_directory.
42+
list(TRANSFORM draco_api_includes REPLACE "${draco_src_root}/" "")
43+
44+
foreach(draco_api_include ${draco_api_includes})
45+
get_filename_component(file_directory ${draco_api_include} DIRECTORY)
46+
set(target_directory "${includes_path}/draco/${file_directory}")
47+
install(FILES ${draco_src_root}/${draco_api_include}
48+
DESTINATION "${target_directory}")
49+
endforeach()
50+
51+
install(FILES "${draco_build}/draco/draco_features.h"
52+
DESTINATION "${includes_path}/draco/")
53+
54+
install(TARGETS draco_decoder DESTINATION "${bin_path}")
55+
install(TARGETS draco_encoder DESTINATION "${bin_path}")
56+
57+
if(DRACO_TRANSCODER_SUPPORTED)
58+
install(TARGETS draco_transcoder DESTINATION "${bin_path}")
3459
endif()
35-
endforeach()
3660

37-
list(REMOVE_DUPLICATES draco_api_includes)
61+
if(MSVC)
62+
install(
63+
TARGETS draco
64+
EXPORT dracoExport
65+
RUNTIME DESTINATION "${bin_path}"
66+
ARCHIVE DESTINATION "${libs_path}"
67+
LIBRARY DESTINATION "${libs_path}")
68+
else()
69+
install(
70+
TARGETS draco_static
71+
EXPORT dracoExport
72+
DESTINATION "${libs_path}")
73+
74+
if(BUILD_SHARED_LIBS)
75+
install(
76+
TARGETS draco_shared
77+
EXPORT dracoExport
78+
RUNTIME DESTINATION "${bin_path}"
79+
ARCHIVE DESTINATION "${libs_path}"
80+
LIBRARY DESTINATION "${libs_path}")
81+
endif()
82+
endif()
3883

39-
# Strip $draco_src_root from the file paths: we need to install relative to
40-
# $include_directory.
41-
list(TRANSFORM draco_api_includes REPLACE "${draco_src_root}/" "")
84+
if(DRACO_UNITY_PLUGIN)
85+
install(TARGETS dracodec_unity DESTINATION "${libs_path}")
86+
endif()
4287

43-
foreach(draco_api_include ${draco_api_includes})
44-
get_filename_component(file_directory ${draco_api_include} DIRECTORY)
45-
set(target_directory "${includes_path}/draco/${file_directory}")
46-
install(FILES ${draco_src_root}/${draco_api_include}
47-
DESTINATION "${target_directory}")
48-
endforeach()
88+
if(DRACO_MAYA_PLUGIN)
89+
install(TARGETS draco_maya_wrapper DESTINATION "${libs_path}")
90+
endif()
4991

50-
install(FILES "${draco_build}/draco/draco_features.h"
51-
DESTINATION "${includes_path}/draco/")
92+
# pkg-config: draco.pc
93+
configure_file("${draco_root}/cmake/draco.pc.template"
94+
"${draco_build}/draco.pc" @ONLY NEWLINE_STYLE UNIX)
95+
install(FILES "${draco_build}/draco.pc" DESTINATION "${libs_path}/pkgconfig")
5296

53-
install(TARGETS draco_decoder DESTINATION "${bin_path}")
54-
install(TARGETS draco_encoder DESTINATION "${bin_path}")
97+
# CMake config: draco-config.cmake
98+
configure_package_config_file(
99+
"${draco_root}/cmake/draco-config.cmake.template"
100+
"${draco_build}/draco-config.cmake"
101+
INSTALL_DESTINATION "${data_path}/cmake/draco")
55102

56-
if(DRACO_TRANSCODER_SUPPORTED)
57-
install(TARGETS draco_transcoder DESTINATION "${bin_path}")
58-
endif()
103+
write_basic_package_version_file(
104+
"${draco_build}/draco-config-version.cmake"
105+
VERSION ${DRACO_VERSION}
106+
COMPATIBILITY AnyNewerVersion)
59107

60-
if(MSVC)
61-
install(
62-
TARGETS draco
108+
export(
63109
EXPORT dracoExport
64-
RUNTIME DESTINATION "${bin_path}"
65-
ARCHIVE DESTINATION "${libs_path}"
66-
LIBRARY DESTINATION "${libs_path}")
67-
else()
110+
NAMESPACE draco::
111+
FILE "${draco_build}/draco-targets.cmake")
112+
68113
install(
69-
TARGETS draco_static
70114
EXPORT dracoExport
71-
DESTINATION "${libs_path}")
72-
73-
if(BUILD_SHARED_LIBS)
74-
install(
75-
TARGETS draco_shared
76-
EXPORT dracoExport
77-
RUNTIME DESTINATION "${bin_path}"
78-
ARCHIVE DESTINATION "${libs_path}"
79-
LIBRARY DESTINATION "${libs_path}")
80-
endif()
81-
endif()
82-
83-
if(DRACO_UNITY_PLUGIN)
84-
install(TARGETS dracodec_unity DESTINATION "${libs_path}")
85-
endif()
86-
87-
if(DRACO_MAYA_PLUGIN)
88-
install(TARGETS draco_maya_wrapper DESTINATION "${libs_path}")
89-
endif()
90-
91-
# pkg-config: draco.pc
92-
configure_file("${draco_root}/cmake/draco.pc.template"
93-
"${draco_build}/draco.pc" @ONLY NEWLINE_STYLE UNIX)
94-
install(FILES "${draco_build}/draco.pc" DESTINATION "${libs_path}/pkgconfig")
95-
96-
# CMake config: draco-config.cmake
97-
configure_package_config_file(
98-
"${draco_root}/cmake/draco-config.cmake.template"
99-
"${draco_build}/draco-config.cmake"
100-
INSTALL_DESTINATION "${data_path}/cmake/draco")
101-
102-
write_basic_package_version_file(
103-
"${draco_build}/draco-config-version.cmake"
104-
VERSION ${DRACO_VERSION}
105-
COMPATIBILITY AnyNewerVersion)
106-
107-
export(
108-
EXPORT dracoExport
109-
NAMESPACE draco::
110-
FILE "${draco_build}/draco-targets.cmake")
111-
112-
install(
113-
EXPORT dracoExport
114-
NAMESPACE draco::
115-
FILE draco-targets.cmake
116-
DESTINATION "${data_path}/cmake/draco")
117-
118-
install(FILES "${draco_build}/draco-config.cmake"
119-
"${draco_build}/draco-config-version.cmake"
120-
DESTINATION "${data_path}/cmake/draco")
115+
NAMESPACE draco::
116+
FILE draco-targets.cmake
117+
DESTINATION "${data_path}/cmake/draco")
118+
119+
install(FILES "${draco_build}/draco-config.cmake"
120+
"${draco_build}/draco-config-version.cmake"
121+
DESTINATION "${data_path}/cmake/draco")
122+
endif(DRACO_INSTALL)
121123
endmacro()

cmake/draco_options.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ macro(draco_set_default_options)
131131
NAME DRACO_DEBUG_COMPILER_WARNINGS
132132
HELPSTRING "Turn on more warnings."
133133
VALUE OFF)
134+
draco_option(
135+
NAME DRACO_INSTALL
136+
HELPSTRING "Enable installation."
137+
VALUE ON)
134138
draco_check_deprecated_options()
135139
endmacro()
136140

cmake/draco_tests.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ if(DRACO_TRANSCODER_SUPPORTED)
8989
"${draco_src_root}/io/texture_io_test.cc"
9090
"${draco_src_root}/material/material_library_test.cc"
9191
"${draco_src_root}/material/material_test.cc"
92+
"${draco_src_root}/metadata/property_attribute_test.cc"
9293
"${draco_src_root}/metadata/property_table_test.cc"
9394
"${draco_src_root}/metadata/structural_metadata_test.cc"
95+
"${draco_src_root}/metadata/structural_metadata_schema_test.cc"
9496
"${draco_src_root}/scene/instance_array_test.cc"
9597
"${draco_src_root}/scene/light_test.cc"
9698
"${draco_src_root}/scene/mesh_group_test.cc"

docs/.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.1
1+
2.5.0

0 commit comments

Comments
 (0)