Draco v1.4.0

This commit is contained in:
Tom Finegan 2020-12-01 13:01:33 -08:00
parent 894c953cf9
commit 8a979f79a5
186 changed files with 7014 additions and 3234 deletions

View File

@ -7,6 +7,10 @@ _**Contents**_
* [Debugging and Optimization](#debugging-and-optimization)
* [Googletest Integration](#googletest-integration)
* [Javascript Encoder/Decoder](#javascript-encoderdecoder)
* [WebAssembly Decoder](#webassembly-decoder)
* [WebAssembly Mesh Only Decoder](#webassembly-mesh-only-decoder)
* [WebAssembly Point Cloud Only Decoder](#webassembly-point-cloud-only-decoder)
* [iOS Builds](#ios-builds)
* [Android Studio Project Integration](#android-studio-project-integration)
* [Native Android Builds](#native-android-builds)
* [vcpkg](#vcpkg)
@ -52,16 +56,16 @@ Windows
-------
On a Windows box you would run the following command to generate Visual Studio
2017 projects:
2019 projects:
~~~~~ bash
C:\Users\nobody> cmake ../ -G "Visual Studio 15 2017"
C:\Users\nobody> cmake ../ -G "Visual Studio 16 2019" -A Win32
~~~~~
To generate 64-bit Windows Visual Studio 2017 projects:
To generate 64-bit Windows Visual Studio 2019 projects:
~~~~~ bash
C:\Users\nobody> cmake ../ -G "Visual Studio 15 2017 Win64"
C:\Users\nobody> cmake ../ -G "Visual Studio 16 2019" -A x64
~~~~~
@ -85,49 +89,42 @@ $ cmake ../
A makefile using release (optimized) flags is produced like this:
~~~~~ bash
$ cmake ../ -DCMAKE_BUILD_TYPE=release
$ cmake ../ -DCMAKE_BUILD_TYPE=Release
~~~~~
A release build with debug info can be produced as well:
~~~~~ bash
$ cmake ../ -DCMAKE_BUILD_TYPE=relwithdebinfo
$ cmake ../ -DCMAKE_BUILD_TYPE=RelWithDebInfo
~~~~~
And your standard debug build will be produced using:
~~~~~ bash
$ cmake ../ -DCMAKE_BUILD_TYPE=debug
$ cmake ../ -DCMAKE_BUILD_TYPE=Debug
~~~~~
To enable the use of sanitizers when the compiler in use supports them, set the
sanitizer type when running CMake:
~~~~~ bash
$ cmake ../ -DSANITIZE=address
$ cmake ../ -DDRACO_SANITIZE=address
~~~~~
Googletest Integration
----------------------
Draco includes testing support built using Googletest. To enable Googletest unit
test support the ENABLE_TESTS cmake variable must be turned on at cmake
test support the DRACO_TESTS cmake variable must be turned on at cmake
generation time:
~~~~~ bash
$ cmake ../ -DENABLE_TESTS=ON
$ cmake ../ -DDRACO_TESTS=ON
~~~~~
When cmake is used as shown in the above example the Draco cmake file assumes
that the Googletest source directory is a sibling of the Draco repository. To
change the location to something else use the GTEST_SOURCE_DIR cmake variable:
~~~~~ bash
$ cmake ../ -DENABLE_TESTS=ON -DGTEST_SOURCE_DIR=path/to/googletest
~~~~~
To run the tests just execute `draco_tests` from your toolchain's build output
directory.
When cmake is used as shown in the above example the googletest directory must
be a sibling of the Draco repository root directory. To run the tests execute
`draco_tests` from your build output directory.
WebAssembly Decoder
-------------------
@ -144,7 +141,7 @@ $ export EMSCRIPTEN=/path/to/emscripten/tools/parent
# Emscripten.cmake can be found within your Emscripten installation directory,
# it should be the subdir: cmake/Modules/Platform/Emscripten.cmake
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DENABLE_WASM=ON
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DDRACO_WASM=ON
# Build the WebAssembly decoder.
$ make
@ -160,7 +157,7 @@ WebAssembly Mesh Only Decoder
~~~~~ bash
# cmake command line for mesh only WebAssembly decoder.
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DENABLE_WASM=ON -DENABLE_POINT_CLOUD_COMPRESSION=OFF
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DDRACO_WASM=ON -DDRACO_POINT_CLOUD_COMPRESSION=OFF
~~~~~
@ -170,7 +167,7 @@ WebAssembly Point Cloud Only Decoder
~~~~~ bash
# cmake command line for point cloud only WebAssembly decoder.
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DENABLE_WASM=ON -DENABLE_MESH_COMPRESSION=OFF
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DDRACO_WASM=ON -DDRACO_MESH_COMPRESSION=OFF
~~~~~
@ -199,8 +196,7 @@ $ make
iOS Builds
---------------------
To build Draco for different iOS architectures and simulators for iphone and the simulators
These are the basic commands needed to build Draco for iOS targets.
~~~~~ bash
#arm64
@ -220,7 +216,8 @@ $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/i386-ios.cmake
$ make
~~~~~~
After building the tools they can be merged into fat lib and used in Iphone applications.
After building for each target the libraries can be merged into a single
universal/fat library using lipo, and then used in iOS applications.
Native Android Builds
@ -230,24 +227,13 @@ It's sometimes useful to build Draco command line tools and run them directly on
Android devices via adb.
~~~~~ bash
# All targets require CMAKE_ANDROID_NDK. It must be set in the environment.
$ export CMAKE_ANDROID_NDK=path/to/ndk
# arm
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/armv7-android-ndk-libcpp.cmake
# This example is for armeabi-v7a.
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/android.cmake \
-DDRACO_ANDROID_NDK_PATH=path/to/ndk -DANDROID_ABI=armeabi-v7a
$ make
# arm64
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/arm64-android-ndk-libcpp.cmake
$ make
# x86
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/x86-android-ndk-libcpp.cmake
$ make
# x86_64
$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/x86_64-android-ndk-libcpp.cmake
$ make
# See the android.cmake toolchain file for additional ANDROID_ABI options and
# other configurable Android variables.
~~~~~
After building the tools they can be moved to an android device via the use of
@ -300,7 +286,8 @@ To add Draco to your project:
vcpkg
---------------------
You can download and install Draco using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
You can download and install Draco using the
[vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
@ -308,4 +295,7 @@ You can download and install Draco using the [vcpkg](https://github.com/Microsof
./vcpkg integrate install
vcpkg install draco
The Draco port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
The Draco port in vcpkg is kept up to date by Microsoft team members and
community contributors. If the version is out of date, please
[create an issue or pull request](https://github.com/Microsoft/vcpkg) on the
vcpkg repository.

106
CMAKE.md Normal file
View File

@ -0,0 +1,106 @@
# CMake Build System Overview
[TOC]
This document provides a general layout of the Draco CMake build system.
## Core Build System Files
These files are listed in order of interest to maintainers of the build system.
- `CMakeLists.txt` is the main driver of the build system. It's responsible
for defining targets and source lists, surfacing build system options, and
tying the components of the build system together.
- `cmake/draco_build_definitions.cmake` defines the macro
`draco_set_build_definitions()`, which is called from `CMakeLists.txt` to
configure include paths, compiler and linker flags, library settings,
platform speficic configuration, and other build system settings that
depend on optional build configurations.
- `cmake/draco_targets.cmake` defines the macros `draco_add_library()` and
`draco_add_executable()` which are used to create all targets in the CMake
build. These macros attempt to behave in a manner that loosely mirrors the
blaze `cc_library()` and `cc_binary()` commands. Note that
`draco_add_executable()` is also used for tests.
- `cmake/draco_emscripten.cmake` handles Emscripten SDK integration. It
defines several Emscripten specific macros that are required to build the
Emscripten specific targets defined in `CMakeLists.txt`.
- `cmake/draco_flags.cmake` defines macros related to compiler and linker
flags. Testing macros, macros for isolating flags to specific source files,
and the main flag configuration function for the library are defined here.
- `cmake/draco_options.cmake` defines macros that control optional features
of draco, and help track draco library and build system options.
- `cmake/draco_install.cmake` defines the draco install target.
- `cmake/draco_cpu_detection.cmake` determines the optimization types to
enable based on target system processor as reported by CMake.
- `cmake/draco_intrinsics.cmake` manages flags for source files that use
intrinsics. It handles detection of whether flags are necessary, and the
application of the flags to the sources that need them when they are
required.
## Helper and Utility Files
- `.cmake-format.py` Defines coding style for cmake-format.
- `cmake/draco_helpers.cmake` defines utility macros.
- `cmake/draco_sanitizer.cmake` defines the `draco_configure_sanitizer()`
macro, which implements support for `DRACO_SANITIZE`. It handles the
compiler and linker flags necessary for using sanitizers like asan and msan.
- `cmake/draco_variables.cmake` defines macros for tracking and control of
draco build system variables.
## Toolchain Files
These files help facilitate cross compiling of draco for various targets.
- `cmake/toolchains/aarch64-linux-gnu.cmake` provides cross compilation
support for arm64 targets.
- `cmake/toolchains/android.cmake` provides cross compilation support for
Android targets.
- `cmake/toolchains/arm-linux-gnueabihf.cmake` provides cross compilation
support for armv7 targets.
- `cmake/toolchains/arm64-ios.cmake`, `cmake/toolchains/armv7-ios.cmake`,
and `cmake/toolchains/armv7s-ios.cmake` provide support for iOS.
- `cmake/toolchains/arm64-linux-gcc.cmake` and
`cmake/toolchains/armv7-linux-gcc.cmake` are deprecated, but remain for
compatibility. `cmake/toolchains/android.cmake` should be used instead.
- `cmake/toolchains/arm64-android-ndk-libcpp.cmake`,
`cmake/toolchains/armv7-android-ndk-libcpp.cmake`,
`cmake/toolchains/x86-android-ndk-libcpp.cmake`, and
`cmake/toolchains/x86_64-android-ndk-libcpp.cmake` are deprecated, but
remain for compatibility. `cmake/toolchains/android.cmake` should be used
instead.
- `cmake/toolchains/i386-ios.cmake` and `cmake/toolchains/x86_64-ios.cmake`
provide support for the iOS simulator.
- `cmake/toolchains/android-ndk-common.cmake` and
`cmake/toolchains/arm-ios-common.cmake` are support files used by other
toolchain files.
## Template Files
These files are inputs to the CMake build and are used to generate inputs to the
build system output by CMake.
- `cmake/draco-config.cmake.template` is used to produce
draco-config.cmake. draco-config.cmake can be used by CMake to find draco
when another CMake project depends on draco.
- `cmake/draco.pc.template` is used to produce draco's pkg-config file.
Some build systems use pkg-config to configure include and library paths
when they depend upon third party libraries like draco.

File diff suppressed because it is too large Load Diff

54
LICENSE
View File

@ -1,4 +1,3 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@ -199,4 +198,55 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
--------------------------------------------------------------------------------
Files: docs/assets/js/ASCIIMathML.js
Copyright (c) 2014 Peter Jipsen and other ASCIIMathML.js contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
--------------------------------------------------------------------------------
Files: docs/assets/css/pygments/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org>

View File

@ -5,6 +5,32 @@
News
=======
### Version 1.4.0 release
* WASM and JavaScript decoders are hosted from a static URL.
* It is recommended to always pull your Draco WASM and JavaScript decoders from this URL:
* https://www.gstatic.com/draco/v1/decoders/*
* Replace * with the files to load. E.g.
* https://www.gstatic.com/draco/v1/decoders/draco_decoder_gltf.wasm
* Users will benefit from having the Draco decoder in cache as more sites start using the static URL
* Changed npm modules to use WASM, which increased performance by ~200%.
* Updated Emscripten to 2.0.
* This causes the Draco codec modules to return a promise instead of the module directly.
* Please see the example code on how to handle the promise.
* Changed NORMAL quantization default to 8.
* Added new array API to decoder and deprecated DecoderBuffer.
* See PR https://github.com/google/draco/issues/513 for more information.
* Changed WASM/JavaScript behavior of catching exceptions.
* See issue https://github.com/google/draco/issues/629 for more information.
* Code cleanup.
* Emscripten builds now disable NODEJS_CATCH_EXIT and NODEJS_CATCH_REJECTION.
* Authors of a CLI tool might want to add their own error handlers.
* Added Maya plugin builds.
* Unity plugin builds updated.
* Builds are now stored as archives.
* Added iOS build.
* Unity users may want to look into https://github.com/atteneder/DracoUnity.
* Bug fixes.
### Version 1.3.6 release
* WASM and JavaScript decoders are now hosted from a static URL
* It is recommended to always pull your Draco WASM and JavaScript decoders from this URL:

View File

@ -0,0 +1,2 @@
set(DRACO_INCLUDE_DIRS "@DRACO_INCLUDE_DIRS@")
set(DRACO_LIBRARIES "draco")

11
cmake/draco.pc.template Normal file
View File

@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: @PROJECT_NAME@
Description: Draco geometry de(com)pression library.
Version: @DRACO_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -ldraco
Libs.private: @CMAKE_THREAD_LIBS_INIT@

View File

@ -0,0 +1,117 @@
if(DRACO_CMAKE_DRACO_BUILD_DEFINITIONS_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_BUILD_DEFINITIONS_CMAKE_
set(DRACO_CMAKE_DRACO_BUILD_DEFINITIONS_CMAKE_ 1)
# Utility for controlling the main draco library dependency. This changes in
# shared builds, and when an optional target requires a shared library build.
macro(set_draco_target)
if(MSVC OR WIN32)
set(draco_dependency draco)
set(draco_plugin_dependency ${draco_dependency})
else()
if(BUILD_SHARED_LIBS)
set(draco_dependency draco_shared)
else()
set(draco_dependency draco_static)
endif()
set(draco_plugin_dependency draco_static)
endif()
if(BUILD_SHARED_LIBS)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
endmacro()
# Configures flags and sets build system globals.
macro(draco_set_build_definitions)
string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type_lowercase)
if(build_type_lowercase MATCHES "rel" AND DRACO_FAST)
if(MSVC)
list(APPEND draco_msvc_cxx_flags "/Ox")
else()
list(APPEND draco_base_cxx_flags "-O3")
endif()
endif()
draco_load_version_info()
set(DRACO_SOVERSION 1)
list(APPEND draco_include_paths "${draco_root}" "${draco_root}/src"
"${draco_build}")
if(DRACO_ABSL)
list(APPEND draco_include_path "${draco_root}/third_party/abseil-cpp")
endif()
list(APPEND draco_gtest_include_paths
"${draco_root}/../googletest/googlemock/include"
"${draco_root}/../googletest/googlemock"
"${draco_root}/../googletest/googletest/include"
"${draco_root}/../googletest/googletest")
list(APPEND draco_test_include_paths ${draco_include_paths}
${draco_gtest_include_paths})
list(APPEND draco_defines "DRACO_CMAKE=1"
"DRACO_FLAGS_SRCDIR=\"${draco_root}\""
"DRACO_FLAGS_TMPDIR=\"/tmp\"")
if(MSVC OR WIN32)
list(APPEND draco_defines "_CRT_SECURE_NO_DEPRECATE=1" "NOMINMAX=1")
if(BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
endif()
endif()
if(ANDROID)
if(CMAKE_ANDROID_ARCH_ABI STREQUAL "armeabi-v7a")
set(CMAKE_ANDROID_ARM_MODE ON)
endif()
endif()
set_draco_target()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6")
# Quiet warnings in copy-list-initialization where {} elision has always
# been allowed.
list(APPEND draco_clang_cxx_flags "-Wno-missing-braces")
endif()
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "7")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7")
# Quiet gcc 6 vs 7 abi warnings:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728
list(APPEND draco_base_cxx_flags "-Wno-psabi")
list(APPEND ABSL_GCC_FLAGS "-Wno-psabi")
endif()
endif()
endif()
# Source file names ending in these suffixes will have the appropriate
# compiler flags added to their compile commands to enable intrinsics.
set(draco_neon_source_file_suffix "neon.cc")
set(draco_sse4_source_file_suffix "sse4.cc")
if((${CMAKE_CXX_COMPILER_ID}
STREQUAL
"GNU"
AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 5)
OR (${CMAKE_CXX_COMPILER_ID}
STREQUAL
"Clang"
AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4))
message(
WARNING "GNU/GCC < v5 or Clang/LLVM < v4, ENABLING COMPATIBILITY MODE.")
draco_enable_feature(FEATURE "DRACO_OLD_GCC")
endif()
if(EMSCRIPTEN)
draco_check_emscripten_environment()
draco_get_required_emscripten_flags(FLAG_LIST_VAR draco_base_cxx_flags)
endif()
endmacro()

View File

@ -0,0 +1,28 @@
if(DRACO_CMAKE_DRACO_CPU_DETECTION_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_CPU_DETECTION_CMAKE_
set(DRACO_CMAKE_DRACO_CPU_DETECTION_CMAKE_ 1)
# Detect optimizations available for the current target CPU.
macro(draco_optimization_detect)
if(DRACO_ENABLE_OPTIMIZATIONS)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" cpu_lowercase)
if(cpu_lowercase MATCHES "^arm|^aarch64")
set(draco_have_neon ON)
elseif(cpu_lowercase MATCHES "^x86|amd64")
set(draco_have_sse4 ON)
endif()
endif()
if(draco_have_neon AND DRACO_ENABLE_NEON)
list(APPEND draco_defines "DRACO_ENABLE_NEON=1")
else()
list(APPEND draco_defines "DRACO_ENABLE_NEON=0")
endif()
if(draco_have_sse4 AND DRACO_ENABLE_SSE4_1)
list(APPEND draco_defines "DRACO_ENABLE_SSE4_1=1")
else()
list(APPEND draco_defines "DRACO_ENABLE_SSE4_1=0")
endif()
endmacro()

View File

@ -0,0 +1,185 @@
if(DRACO_CMAKE_DRACO_EMSCRIPTEN_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_EMSCRIPTEN_CMAKE_
# Checks environment for Emscripten prerequisites.
macro(draco_check_emscripten_environment)
if(NOT PYTHONINTERP_FOUND)
message(
FATAL_ERROR
"Python required for Emscripten builds, but cmake cannot find it.")
endif()
if(NOT EXISTS "$ENV{EMSCRIPTEN}")
message(
FATAL_ERROR
"The EMSCRIPTEN environment variable must be set. See README.md.")
endif()
endmacro()
# Obtains the required Emscripten flags for Draco targets.
macro(draco_get_required_emscripten_flags)
set(em_FLAG_LIST_VAR)
set(em_flags)
set(em_single_arg_opts FLAG_LIST_VAR)
set(em_multi_arg_opts)
cmake_parse_arguments(em "${em_flags}" "${em_single_arg_opts}"
"${em_multi_arg_opts}" ${ARGN})
if(NOT em_FLAG_LIST_VAR)
message(FATAL "draco_get_required_emscripten_flags: FLAG_LIST_VAR required")
endif()
if(DRACO_JS_GLUE)
unset(required_flags)
list(APPEND ${em_FLAG_LIST_VAR} "-sALLOW_MEMORY_GROWTH=1")
list(APPEND ${em_FLAG_LIST_VAR} "-Wno-almost-asm")
list(APPEND ${em_FLAG_LIST_VAR} "--memory-init-file" "0")
list(APPEND ${em_FLAG_LIST_VAR} "-fno-omit-frame-pointer")
list(APPEND ${em_FLAG_LIST_VAR} "-sMODULARIZE=1")
list(APPEND ${em_FLAG_LIST_VAR} "-sNO_FILESYSTEM=1")
list(APPEND ${em_FLAG_LIST_VAR} "-sEXPORTED_RUNTIME_METHODS=[]")
list(APPEND ${em_FLAG_LIST_VAR} "-sPRECISE_F32=1")
list(APPEND ${em_FLAG_LIST_VAR} "-sNODEJS_CATCH_EXIT=0")
list(APPEND ${em_FLAG_LIST_VAR} "-sNODEJS_CATCH_REJECTION=0")
if(DRACO_FAST)
list(APPEND ${em_FLAG_LIST_VAR} "--llvm-lto" "1")
endif()
if(DRACO_WASM)
list(APPEND ${em_FLAG_LIST_VAR} "-sWASM=1")
else()
list(APPEND ${em_FLAG_LIST_VAR} "-sWASM=0")
endif()
if(DRACO_IE_COMPATIBLE)
list(APPEND ${em_FLAG_LIST_VAR} "-sLEGACY_VM_SUPPORT=1")
endif()
endif()
endmacro()
# Macro for generating C++ glue code from IDL for Emscripten targets. Executes
# python to generate the C++ binding, and establishes dendency: $OUTPUT_PATH.cpp
# on $INPUT_IDL.
macro(draco_generate_emscripten_glue)
set(glue_flags)
set(glue_single_arg_opts INPUT_IDL OUTPUT_PATH)
set(glue_multi_arg_opts)
cmake_parse_arguments(glue "${glue_flags}" "${glue_single_arg_opts}"
"${glue_multi_arg_opts}" ${ARGN})
if(DRACO_VERBOSE GREATER 1)
message("--------- draco_generate_emscripten_glue -----------\n"
"glue_INPUT_IDL=${glue_INPUT_IDL}\n"
"glue_OUTPUT_PATH=${glue_OUTPUT_PATH}\n" ]
"----------------------------------------------------\n")
endif()
if(NOT glue_INPUT_IDL OR NOT glue_OUTPUT_PATH)
message(
FATAL_ERROR
"draco_generate_emscripten_glue: INPUT_IDL and OUTPUT_PATH required.")
endif()
# Generate the glue source.
execute_process(COMMAND ${PYTHON_EXECUTABLE}
$ENV{EMSCRIPTEN}/tools/webidl_binder.py
${glue_INPUT_IDL} ${glue_OUTPUT_PATH})
if(NOT EXISTS "${glue_OUTPUT_PATH}.cpp")
message(FATAL_ERROR "JS glue generation failed for ${glue_INPUT_IDL}.")
endif()
# Create a dependency so that it regenerated on edits.
add_custom_command(OUTPUT "${glue_OUTPUT_PATH}.cpp"
COMMAND ${PYTHON_EXECUTABLE}
$ENV{EMSCRIPTEN}/tools/webidl_binder.py
${glue_INPUT_IDL} ${glue_OUTPUT_PATH}
DEPENDS ${draco_js_dec_idl}
COMMENT "Generating ${glue_OUTPUT_PATH}.cpp."
WORKING_DIRECTORY ${draco_build}
VERBATIM)
endmacro()
# Wrapper for draco_add_executable() that handles the extra work necessary for
# emscripten targets when generating JS glue:
#
# ~~~
# - Set source level dependency on the C++ binding.
# - Pre/Post link emscripten magic.
#
# Required args:
# - GLUE_PATH: Base path for glue file. Used to generate .cpp and .js files.
# - PRE_LINK_JS_SOURCES: em_link_pre_js() source files.
# - POST_LINK_JS_SOURCES: em_link_post_js() source files.
# Optional args:
# - FEATURES:
# ~~~
macro(draco_add_emscripten_executable)
unset(emexe_NAME)
unset(emexe_FEATURES)
unset(emexe_SOURCES)
unset(emexe_DEFINES)
unset(emexe_INCLUDES)
unset(emexe_LINK_FLAGS)
set(optional_args)
set(single_value_args NAME GLUE_PATH)
set(multi_value_args SOURCES DEFINES FEATURES INCLUDES LINK_FLAGS
PRE_LINK_JS_SOURCES POST_LINK_JS_SOURCES)
cmake_parse_arguments(emexe "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(NOT
(emexe_GLUE_PATH
AND emexe_POST_LINK_JS_SOURCES
AND emexe_PRE_LINK_JS_SOURCES))
message(FATAL
"draco_add_emscripten_executable: GLUE_PATH PRE_LINK_JS_SOURCES "
"POST_LINK_JS_SOURCES args required.")
endif()
if(DRACO_VERBOSE GREATER 1)
message("--------- draco_add_emscripten_executable ---------\n"
"emexe_NAME=${emexe_NAME}\n"
"emexe_SOURCES=${emexe_SOURCES}\n"
"emexe_DEFINES=${emexe_DEFINES}\n"
"emexe_INCLUDES=${emexe_INCLUDES}\n"
"emexe_LINK_FLAGS=${emexe_LINK_FLAGS}\n"
"emexe_GLUE_PATH=${emexe_GLUE_PATH}\n"
"emexe_FEATURES=${emexe_FEATURES}\n"
"emexe_PRE_LINK_JS_SOURCES=${emexe_PRE_LINK_JS_SOURCES}\n"
"emexe_POST_LINK_JS_SOURCES=${emexe_POST_LINK_JS_SOURCES}\n"
"----------------------------------------------------\n")
endif()
# The Emscripten linker needs the C++ flags in addition to whatever has been
# passed in with the target.
list(APPEND emexe_LINK_FLAGS ${DRACO_CXX_FLAGS})
if(DRACO_GLTF)
draco_add_executable(NAME
${emexe_NAME}
OUTPUT_NAME
${emexe_NAME}_gltf
SOURCES
${emexe_SOURCES}
DEFINES
${emexe_DEFINES}
INCLUDES
${emexe_INCLUDES}
LINK_FLAGS
${emexe_LINK_FLAGS})
else()
draco_add_executable(NAME ${emexe_NAME} SOURCES ${emexe_SOURCES} DEFINES
${emexe_DEFINES} INCLUDES ${emexe_INCLUDES} LINK_FLAGS
${emexe_LINK_FLAGS})
endif()
foreach(feature ${emexe_FEATURES})
draco_enable_feature(FEATURE ${feature} TARGETS ${emexe_NAME})
endforeach()
set_property(SOURCE ${emexe_SOURCES}
APPEND
PROPERTY OBJECT_DEPENDS "${emexe_GLUE_PATH}.cpp")
em_link_pre_js(${emexe_NAME} ${emexe_PRE_LINK_JS_SOURCES})
em_link_post_js(${emexe_NAME} "${emexe_GLUE_PATH}.js"
${emexe_POST_LINK_JS_SOURCES})
endmacro()

238
cmake/draco_flags.cmake Normal file
View File

@ -0,0 +1,238 @@
if(DRACO_CMAKE_DRACO_FLAGS_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_FLAGS_CMAKE_
set(DRACO_CMAKE_DRACO_FLAGS_CMAKE_ 1)
include(CheckCXXCompilerFlag)
include(CheckCXXSourceCompiles)
# Adds compiler flags specified by FLAGS to the sources specified by SOURCES:
#
# draco_set_compiler_flags_for_sources(SOURCES <sources> FLAGS <flags>)
macro(draco_set_compiler_flags_for_sources)
unset(compiler_SOURCES)
unset(compiler_FLAGS)
unset(optional_args)
unset(single_value_args)
set(multi_value_args SOURCES FLAGS)
cmake_parse_arguments(compiler "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(NOT (compiler_SOURCES AND compiler_FLAGS))
draco_die("draco_set_compiler_flags_for_sources: SOURCES and "
"FLAGS required.")
endif()
set_source_files_properties(${compiler_SOURCES} PROPERTIES COMPILE_FLAGS
${compiler_FLAGS})
if(DRACO_VERBOSE GREATER 1)
foreach(source ${compiler_SOURCES})
foreach(flag ${compiler_FLAGS})
message("draco_set_compiler_flags_for_sources: source:${source} "
"flag:${flag}")
endforeach()
endforeach()
endif()
endmacro()
# Tests compiler flags stored in list(s) specified by FLAG_LIST_VAR_NAMES, adds
# flags to $DRACO_CXX_FLAGS when tests pass. Terminates configuration if
# FLAG_REQUIRED is specified and any flag check fails.
#
# ~~~
# draco_test_cxx_flag(<FLAG_LIST_VAR_NAMES <flag list variable(s)>>
# [FLAG_REQUIRED])
# ~~~
macro(draco_test_cxx_flag)
unset(cxx_test_FLAG_LIST_VAR_NAMES)
unset(cxx_test_FLAG_REQUIRED)
unset(single_value_args)
set(optional_args FLAG_REQUIRED)
set(multi_value_args FLAG_LIST_VAR_NAMES)
cmake_parse_arguments(cxx_test "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(NOT cxx_test_FLAG_LIST_VAR_NAMES)
draco_die("draco_test_cxx_flag: FLAG_LIST_VAR_NAMES required")
endif()
unset(cxx_flags)
foreach(list_var ${cxx_test_FLAG_LIST_VAR_NAMES})
if(DRACO_VERBOSE)
message("draco_test_cxx_flag: adding ${list_var} to cxx_flags")
endif()
list(APPEND cxx_flags ${${list_var}})
endforeach()
if(DRACO_VERBOSE)
message("CXX test: all flags: ${cxx_flags}")
endif()
unset(all_cxx_flags)
list(APPEND all_cxx_flags ${DRACO_CXX_FLAGS} ${cxx_flags})
# Turn off output from check_cxx_source_compiles. Print status directly
# instead since the logging messages from check_cxx_source_compiles can be
# quite confusing.
set(CMAKE_REQUIRED_QUIET TRUE)
# Run the actual compile test.
unset(draco_all_cxx_flags_pass CACHE)
message("--- Running combined CXX flags test, flags: ${all_cxx_flags}")
check_cxx_compiler_flag("${all_cxx_flags}" draco_all_cxx_flags_pass)
if(cxx_test_FLAG_REQUIRED AND NOT draco_all_cxx_flags_pass)
draco_die("Flag test failed for required flag(s): "
"${all_cxx_flags} and FLAG_REQUIRED specified.")
endif()
if(draco_all_cxx_flags_pass)
# Test passed: update the global flag list used by the draco target creation
# wrappers.
set(DRACO_CXX_FLAGS ${cxx_flags})
list(REMOVE_DUPLICATES DRACO_CXX_FLAGS)
if(DRACO_VERBOSE)
message("DRACO_CXX_FLAGS=${DRACO_CXX_FLAGS}")
endif()
message("--- Passed combined CXX flags test")
else()
message("--- Failed combined CXX flags test, testing flags individually.")
if(cxx_flags)
message("--- Testing flags from $cxx_flags: " "${cxx_flags}")
foreach(cxx_flag ${cxx_flags})
# Since 3.17.0 check_cxx_compiler_flag() sets a normal variable at
# parent scope while check_cxx_source_compiles() continues to set an
# internal cache variable, so we unset both to avoid the failure /
# success state persisting between checks. This has been fixed in newer
# CMake releases, but 3.17 is pretty common: we will need this to avoid
# weird build breakages while the fix propagates.
unset(cxx_flag_test_passed)
unset(cxx_flag_test_passed CACHE)
message("--- Testing flag: ${cxx_flag}")
check_cxx_compiler_flag("${cxx_flag}" cxx_flag_test_passed)
if(cxx_flag_test_passed)
message("--- Passed test for ${cxx_flag}")
else()
list(REMOVE_ITEM cxx_flags ${cxx_flag})
message("--- Failed test for ${cxx_flag}, flag removed.")
endif()
endforeach()
set(DRACO_CXX_FLAGS ${cxx_flags})
endif()
endif()
if(DRACO_CXX_FLAGS)
list(REMOVE_DUPLICATES DRACO_CXX_FLAGS)
endif()
endmacro()
# Tests executable linker flags stored in list specified by FLAG_LIST_VAR_NAME,
# adds flags to $DRACO_EXE_LINKER_FLAGS when test passes. Terminates
# configuration when flag check fails. draco_set_cxx_flags() must be called
# before calling this macro because it assumes $DRACO_CXX_FLAGS contains only
# valid CXX flags.
#
# draco_test_exe_linker_flag(<FLAG_LIST_VAR_NAME <flag list variable)>)
macro(draco_test_exe_linker_flag)
unset(link_FLAG_LIST_VAR_NAME)
unset(optional_args)
unset(multi_value_args)
set(single_value_args FLAG_LIST_VAR_NAME)
cmake_parse_arguments(link "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(NOT link_FLAG_LIST_VAR_NAME)
draco_die("draco_test_link_flag: FLAG_LIST_VAR_NAME required")
endif()
draco_set_and_stringify(DEST linker_flags SOURCE_VARS
${link_FLAG_LIST_VAR_NAME})
if(DRACO_VERBOSE)
message("EXE LINKER test: all flags: ${linker_flags}")
endif()
# Tests of $DRACO_CXX_FLAGS have already passed. Include them with the linker
# test.
draco_set_and_stringify(DEST CMAKE_REQUIRED_FLAGS SOURCE_VARS DRACO_CXX_FLAGS)
# Cache the global exe linker flags.
if(CMAKE_EXE_LINKER_FLAGS)
set(cached_CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
draco_set_and_stringify(DEST CMAKE_EXE_LINKER_FLAGS SOURCE ${linker_flags})
endif()
draco_set_and_stringify(DEST CMAKE_EXE_LINKER_FLAGS SOURCE ${linker_flags}
${CMAKE_EXE_LINKER_FLAGS})
# Turn off output from check_cxx_source_compiles. Print status directly
# instead since the logging messages from check_cxx_source_compiles can be
# quite confusing.
set(CMAKE_REQUIRED_QUIET TRUE)
message("--- Running EXE LINKER test for flags: ${linker_flags}")
unset(linker_flag_test_passed CACHE)
set(draco_cxx_main "\nint main() { return 0; }")
check_cxx_source_compiles("${draco_cxx_main}" linker_flag_test_passed)
if(NOT linker_flag_test_passed)
draco_die("EXE LINKER test failed.")
endif()
message("--- Passed EXE LINKER flag test.")
# Restore cached global exe linker flags.
if(cached_CMAKE_EXE_LINKER_FLAGS)
set(CMAKE_EXE_LINKER_FLAGS ${cached_CMAKE_EXE_LINKER_FLAGS})
else()
unset(CMAKE_EXE_LINKER_FLAGS)
endif()
endmacro()
# Runs the draco compiler tests. This macro builds up the list of list var(s)
# that is passed to draco_test_cxx_flag().
#
# Note: draco_set_build_definitions() must be called before this macro.
macro(draco_set_cxx_flags)
unset(cxx_flag_lists)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
list(APPEND cxx_flag_lists draco_base_cxx_flags)
endif()
# Append clang flags after the base set to allow -Wno* overrides to take
# effect. Some of the base flags may enable a large set of warnings, e.g.,
# -Wall.
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
list(APPEND cxx_flag_lists draco_clang_cxx_flags)
endif()
if(MSVC)
list(APPEND cxx_flag_lists draco_msvc_cxx_flags)
endif()
draco_set_and_stringify(DEST cxx_flags SOURCE_VARS ${cxx_flag_lists})
if(DRACO_VERBOSE)
message("draco_set_cxx_flags: internal CXX flags: ${cxx_flags}")
endif()
if(DRACO_CXX_FLAGS)
list(APPEND cxx_flag_lists DRACO_CXX_FLAGS)
if(DRACO_VERBOSE)
message("draco_set_cxx_flags: user CXX flags: ${DRACO_CXX_FLAGS}")
endif()
endif()
draco_set_and_stringify(DEST cxx_flags SOURCE_VARS ${cxx_flag_lists})
if(cxx_flags)
draco_test_cxx_flag(FLAG_LIST_VAR_NAMES ${cxx_flag_lists})
endif()
endmacro()

110
cmake/draco_helpers.cmake Normal file
View File

@ -0,0 +1,110 @@
if(DRACO_CMAKE_DRACO_HELPERS_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_HELPERS_CMAKE_
set(DRACO_CMAKE_DRACO_HELPERS_CMAKE_ 1)
# Kills build generation using message(FATAL_ERROR) and outputs all data passed
# to the console via use of $ARGN.
macro(draco_die)
message(FATAL_ERROR ${ARGN})
endmacro()
# Converts semi-colon delimited list variable(s) to string. Output is written to
# variable supplied via the DEST parameter. Input is from an expanded variable
# referenced by SOURCE and/or variable(s) referenced by SOURCE_VARS.
macro(draco_set_and_stringify)
set(optional_args)
set(single_value_args DEST SOURCE_VAR)
set(multi_value_args SOURCE SOURCE_VARS)
cmake_parse_arguments(sas "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(NOT sas_DEST OR NOT (sas_SOURCE OR sas_SOURCE_VARS))
draco_die("draco_set_and_stringify: DEST and at least one of SOURCE "
"SOURCE_VARS required.")
endif()
unset(${sas_DEST})
if(sas_SOURCE)
# $sas_SOURCE is one or more expanded variables, just copy the values to
# $sas_DEST.
set(${sas_DEST} "${sas_SOURCE}")
endif()
if(sas_SOURCE_VARS)
# $sas_SOURCE_VARS is one or more variable names. Each iteration expands a
# variable and appends it to $sas_DEST.
foreach(source_var ${sas_SOURCE_VARS})
set(${sas_DEST} "${${sas_DEST}} ${${source_var}}")
endforeach()
# Because $sas_DEST can be empty when entering this scope leading whitespace
# can be introduced to $sas_DEST on the first iteration of the above loop.
# Remove it:
string(STRIP "${${sas_DEST}}" ${sas_DEST})
endif()
# Lists in CMake are simply semicolon delimited strings, so stringification is
# just a find and replace of the semicolon.
string(REPLACE ";" " " ${sas_DEST} "${${sas_DEST}}")
if(DRACO_VERBOSE GREATER 1)
message("draco_set_and_stringify: ${sas_DEST}=${${sas_DEST}}")
endif()
endmacro()
# Creates a dummy source file in $DRACO_GENERATED_SOURCES_DIRECTORY and adds it
# to the specified target. Optionally adds its path to a list variable.
#
# draco_create_dummy_source_file(<TARGET <target> BASENAME <basename of file>>
# [LISTVAR <list variable>])
macro(draco_create_dummy_source_file)
set(optional_args)
set(single_value_args TARGET BASENAME LISTVAR)
set(multi_value_args)
cmake_parse_arguments(cdsf "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(NOT cdsf_TARGET OR NOT cdsf_BASENAME)
draco_die("draco_create_dummy_source_file: TARGET and BASENAME required.")
endif()
if(NOT DRACO_GENERATED_SOURCES_DIRECTORY)
set(DRACO_GENERATED_SOURCES_DIRECTORY "${draco_build}/gen_src")
endif()
set(dummy_source_dir "${DRACO_GENERATED_SOURCES_DIRECTORY}")
set(dummy_source_file
"${dummy_source_dir}/draco_${cdsf_TARGET}_${cdsf_BASENAME}.cc")
set(dummy_source_code
"// Generated file. DO NOT EDIT!\n"
"// C++ source file created for target ${cdsf_TARGET}.\n"
"void draco_${cdsf_TARGET}_${cdsf_BASENAME}_dummy_function(void)\;\n"
"void draco_${cdsf_TARGET}_${cdsf_BASENAME}_dummy_function(void) {}\n")
file(WRITE "${dummy_source_file}" ${dummy_source_code})
target_sources(${cdsf_TARGET} PRIVATE ${dummy_source_file})
if(cdsf_LISTVAR)
list(APPEND ${cdsf_LISTVAR} "${dummy_source_file}")
endif()
endmacro()
# Loads the version string from $draco_source/draco/version.h and sets
# $DRACO_VERSION.
macro(draco_load_version_info)
file(STRINGS "${draco_src_root}/core/draco_version.h" version_file_strings)
foreach(str ${version_file_strings})
if(str MATCHES "char kDracoVersion")
string(FIND "${str}" "\"" open_quote_pos)
string(FIND "${str}" ";" semicolon_pos)
math(EXPR open_quote_pos "${open_quote_pos} + 1")
math(EXPR close_quote_pos "${semicolon_pos} - 1")
math(EXPR version_string_length "${close_quote_pos} - ${open_quote_pos}")
string(SUBSTRING "${str}" ${open_quote_pos} ${version_string_length}
DRACO_VERSION)
break()
endif()
endforeach()
endmacro()

79
cmake/draco_install.cmake Normal file
View File

@ -0,0 +1,79 @@
if(DRACO_CMAKE_DRACO_INSTALL_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_INSTALL_CMAKE_
set(DRACO_CMAKE_DRACO_INSTALL_CMAKE_ 1)
# Sets up the draco install targets. Must be called after the static library
# target is created.
macro(draco_setup_install_target)
include(GNUInstallDirs)
# pkg-config: draco.pc
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
set(libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
set(draco_lib_name "draco")
configure_file("${draco_root}/cmake/draco.pc.template"
"${draco_build}/draco.pc" @ONLY NEWLINE_STYLE UNIX)
install(FILES "${draco_build}/draco.pc"
DESTINATION "${prefix}/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
# CMake config: draco-config.cmake
set(DRACO_INCLUDE_DIRS "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
configure_file("${draco_root}/cmake/draco-config.cmake.template"
"${draco_build}/draco-config.cmake" @ONLY NEWLINE_STYLE UNIX)
install(
FILES "${draco_build}/draco-config.cmake"
DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/cmake")
foreach(file ${draco_sources})
if(file MATCHES "h$")
list(APPEND draco_api_includes ${file})
endif()
endforeach()
# Strip $draco_src_root from the file paths: we need to install relative to
# $include_directory.
list(TRANSFORM draco_api_includes REPLACE "${draco_src_root}/" "")
set(include_directory "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
foreach(draco_api_include ${draco_api_includes})
get_filename_component(file_directory ${draco_api_include} DIRECTORY)
set(target_directory "${include_directory}/draco/${file_directory}")
install(FILES ${draco_src_root}/${draco_api_include}
DESTINATION "${target_directory}")
endforeach()
install(
FILES "${draco_build}/draco/draco_features.h"
DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/draco/")
install(TARGETS draco_decoder DESTINATION
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
install(TARGETS draco_encoder DESTINATION
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
if(WIN32)
install(TARGETS draco DESTINATION
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
else()
install(TARGETS draco_static DESTINATION
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
if(BUILD_SHARED_LIBS)
install(TARGETS draco_shared DESTINATION
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()
endif()
if(DRACO_UNITY_PLUGIN)
install(TARGETS dracodec_unity DESTINATION
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()
if(DRACO_MAYA_PLUGIN)
install(TARGETS draco_maya_wrapper DESTINATION
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()
endmacro()

View File

@ -0,0 +1,96 @@
if(DRACO_CMAKE_DRACO_INTRINSICS_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_INTRINSICS_CMAKE_
set(DRACO_CMAKE_DRACO_INTRINSICS_CMAKE_ 1)
# Returns the compiler flag for the SIMD intrinsics suffix specified by the
# SUFFIX argument via the variable specified by the VARIABLE argument:
# draco_get_intrinsics_flag_for_suffix(SUFFIX <suffix> VARIABLE <var name>)
macro(draco_get_intrinsics_flag_for_suffix)
unset(intrinsics_SUFFIX)
unset(intrinsics_VARIABLE)
unset(optional_args)
unset(multi_value_args)
set(single_value_args SUFFIX VARIABLE)
cmake_parse_arguments(intrinsics "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(NOT (intrinsics_SUFFIX AND intrinsics_VARIABLE))
message(FATAL_ERROR "draco_get_intrinsics_flag_for_suffix: SUFFIX and "
"VARIABLE required.")
endif()
if(intrinsics_SUFFIX MATCHES "neon")
if(NOT MSVC)
set(${intrinsics_VARIABLE} "${DRACO_NEON_INTRINSICS_FLAG}")
endif()
elseif(intrinsics_SUFFIX MATCHES "sse4")
if(NOT MSVC)
set(${intrinsics_VARIABLE} "-msse4.1")
endif()
else()
message(FATAL_ERROR "draco_get_intrinsics_flag_for_suffix: Unknown "
"instrinics suffix: ${intrinsics_SUFFIX}")
endif()
if(DRACO_VERBOSE GREATER 1)
message("draco_get_intrinsics_flag_for_suffix: "
"suffix:${intrinsics_SUFFIX} flag:${${intrinsics_VARIABLE}}")
endif()
endmacro()
# Processes source files specified by SOURCES and adds intrinsics flags as
# necessary: draco_process_intrinsics_sources(SOURCES <sources>)
#
# Detects requirement for intrinsics flags using source file name suffix.
# Currently supports only SSE4.1.
macro(draco_process_intrinsics_sources)
unset(arg_TARGET)
unset(arg_SOURCES)
unset(optional_args)
set(single_value_args TARGET)
set(multi_value_args SOURCES)
cmake_parse_arguments(arg "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(NOT (arg_TARGET AND arg_SOURCES))
message(FATAL_ERROR "draco_process_intrinsics_sources: TARGET and "
"SOURCES required.")
endif()
if(DRACO_ENABLE_SSE4_1 AND draco_have_sse4)
unset(sse4_sources)
list(APPEND sse4_sources ${arg_SOURCES})
list(FILTER sse4_sources INCLUDE REGEX
"${draco_sse4_source_file_suffix}$")
if(sse4_sources)
unset(sse4_flags)
draco_get_intrinsics_flag_for_suffix(SUFFIX
${draco_sse4_source_file_suffix}
VARIABLE sse4_flags)
if(sse4_flags)
draco_set_compiler_flags_for_sources(SOURCES ${sse4_sources} FLAGS
${sse4_flags})
endif()
endif()
endif()
if(DRACO_ENABLE_NEON AND draco_have_neon)
unset(neon_sources)
list(APPEND neon_sources ${arg_SOURCES})
list(FILTER neon_sources INCLUDE REGEX
"${draco_neon_source_file_suffix}$")
if(neon_sources AND DRACO_NEON_INTRINSICS_FLAG)
unset(neon_flags)
draco_get_intrinsics_flag_for_suffix(SUFFIX
${draco_neon_source_file_suffix}
VARIABLE neon_flags)
if(neon_flags)
draco_set_compiler_flags_for_sources(SOURCES ${neon_sources} FLAGS
${neon_flags})
endif()
endif()
endif()
endmacro()

239
cmake/draco_options.cmake Normal file
View File

@ -0,0 +1,239 @@
if(DRACO_CMAKE_DRACO_OPTIONS_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_OPTIONS_CMAKE_
set(DRACO_CMAKE_DRACO_OPTIONS_CMAKE_)
set(draco_features_file_name "${draco_build}/draco/draco_features.h")
set(draco_features_list)
# Simple wrapper for CMake's builtin option command that tracks draco's build
# options in the list variable $draco_options.
macro(draco_option)
unset(option_NAME)
unset(option_HELPSTRING)
unset(option_VALUE)
unset(optional_args)
unset(multi_value_args)
set(single_value_args NAME HELPSTRING VALUE)
cmake_parse_arguments(option "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(NOT (option_NAME AND option_HELPSTRING AND DEFINED option_VALUE))
message(FATAL_ERROR "draco_option: NAME HELPSTRING and VALUE required.")
endif()
option(${option_NAME} ${option_HELPSTRING} ${option_VALUE})
if(DRACO_VERBOSE GREATER 2)
message("--------- draco_option ---------\n" "option_NAME=${option_NAME}\n"
"option_HELPSTRING=${option_HELPSTRING}\n"
"option_VALUE=${option_VALUE}\n"
"------------------------------------------\n")
endif()
list(APPEND draco_options ${option_NAME})
list(REMOVE_DUPLICATES draco_options)
endmacro()
# Dumps the $draco_options list via CMake message command.
macro(draco_dump_options)
foreach(option_name ${draco_options})
message("${option_name}: ${${option_name}}")
endforeach()
endmacro()
# Set default options.
macro(draco_set_default_options)
draco_option(NAME DRACO_FAST HELPSTRING "Try to build faster libs." VALUE OFF)
draco_option(NAME DRACO_JS_GLUE HELPSTRING
"Enable JS Glue and JS targets when using Emscripten." VALUE ON)
draco_option(NAME DRACO_IE_COMPATIBLE HELPSTRING
"Enable support for older IE builds when using Emscripten." VALUE
OFF)
draco_option(NAME DRACO_MESH_COMPRESSION HELPSTRING "Enable mesh compression."
VALUE ON)
draco_option(NAME DRACO_POINT_CLOUD_COMPRESSION HELPSTRING
"Enable point cloud compression." VALUE ON)
draco_option(NAME DRACO_PREDICTIVE_EDGEBREAKER HELPSTRING
"Enable predictive edgebreaker." VALUE ON)
draco_option(NAME DRACO_STANDARD_EDGEBREAKER HELPSTRING
"Enable stand edgebreaker." VALUE ON)
draco_option(NAME DRACO_BACKWARDS_COMPATIBILITY HELPSTRING
"Enable backwards compatibility." VALUE ON)
draco_option(NAME DRACO_DECODER_ATTRIBUTE_DEDUPLICATION HELPSTRING
"Enable attribute deduping." VALUE OFF)
draco_option(NAME DRACO_TESTS HELPSTRING "Enables tests." VALUE OFF)
draco_option(NAME DRACO_WASM HELPSTRING "Enables WASM support." VALUE OFF)
draco_option(NAME DRACO_UNITY_PLUGIN HELPSTRING
"Build plugin library for Unity." VALUE OFF)
draco_option(NAME DRACO_ANIMATION_ENCODING HELPSTRING "Enable animation."
VALUE OFF)
draco_option(NAME DRACO_GLTF HELPSTRING "Support GLTF." VALUE OFF)
draco_option(NAME DRACO_MAYA_PLUGIN HELPSTRING
"Build plugin library for Maya." VALUE OFF)
draco_check_deprecated_options()
endmacro()
# Warns when a deprecated option is used and sets the option that replaced it.
macro(draco_handle_deprecated_option)
unset(option_OLDNAME)
unset(option_NEWNAME)
unset(optional_args)
unset(multi_value_args)
set(single_value_args OLDNAME NEWNAME)
cmake_parse_arguments(option "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if("${${option_OLDNAME}}")
message(WARNING "${option_OLDNAME} is deprecated. Use ${option_NEWNAME}.")
set(${option_NEWNAME} ${${option_OLDNAME}})
endif()
endmacro()
# Checks for use of deprecated options.
macro(draco_check_deprecated_options)
draco_handle_deprecated_option(OLDNAME ENABLE_EXTRA_SPEED NEWNAME DRACO_FAST)
draco_handle_deprecated_option(OLDNAME ENABLE_JS_GLUE NEWNAME DRACO_JS_GLUE)
draco_handle_deprecated_option(OLDNAME ENABLE_MESH_COMPRESSION NEWNAME
DRACO_MESH_COMPRESSION)
draco_handle_deprecated_option(OLDNAME ENABLE_POINT_CLOUD_COMPRESSION NEWNAME
DRACO_POINT_CLOUD_COMPRESSION)
draco_handle_deprecated_option(OLDNAME ENABLE_PREDICTIVE_EDGEBREAKER NEWNAME
DRACO_PREDICTIVE_EDGEBREAKER)
draco_handle_deprecated_option(OLDNAME ENABLE_STANDARD_EDGEBREAKER NEWNAME
DRACO_STANDARD_EDGEBREAKER)
draco_handle_deprecated_option(OLDNAME ENABLE_BACKWARDS_COMPATIBILITY NEWNAME
DRACO_BACKWARDS_COMPATIBILITY)
draco_handle_deprecated_option(OLDNAME ENABLE_DECODER_ATTRIBUTE_DEDUPLICATION
NEWNAME DRACO_DECODER_ATTRIBUTE_DEDUPLICATION)
draco_handle_deprecated_option(OLDNAME ENABLE_TESTS NEWNAME DRACO_TESTS)
draco_handle_deprecated_option(OLDNAME ENABLE_WASM NEWNAME DRACO_WASM)
draco_handle_deprecated_option(OLDNAME BUILD_UNITY_PLUGIN NEWNAME
DRACO_UNITY_PLUGIN)
draco_handle_deprecated_option(OLDNAME BUILD_ANIMATION_ENCODING NEWNAME
DRACO_ANIMATION_ENCODING)
draco_handle_deprecated_option(OLDNAME BUILD_FOR_GLTF NEWNAME DRACO_GLTF)
draco_handle_deprecated_option(OLDNAME BUILD_MAYA_PLUGIN NEWNAME
DRACO_MAYA_PLUGIN)
draco_handle_deprecated_option(OLDNAME BUILD_USD_PLUGIN NEWNAME
BUILD_SHARED_LIBS)
endmacro()
# Macro for setting Draco features based on user configuration. Features enabled
# by this macro are Draco global.
macro(draco_set_optional_features)
if(DRACO_GLTF)
# Override settings when building for GLTF.
draco_enable_feature(FEATURE "DRACO_MESH_COMPRESSION_SUPPORTED")
draco_enable_feature(FEATURE "DRACO_NORMAL_ENCODING_SUPPORTED")
draco_enable_feature(FEATURE "DRACO_STANDARD_EDGEBREAKER_SUPPORTED")
else()
if(DRACO_POINT_CLOUD_COMPRESSION)
draco_enable_feature(FEATURE "DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED")
endif()
if(DRACO_MESH_COMPRESSION)
draco_enable_feature(FEATURE "DRACO_MESH_COMPRESSION_SUPPORTED")
draco_enable_feature(FEATURE "DRACO_NORMAL_ENCODING_SUPPORTED")
if(DRACO_STANDARD_EDGEBREAKER)
draco_enable_feature(FEATURE "DRACO_STANDARD_EDGEBREAKER_SUPPORTED")
endif()
if(DRACO_PREDICTIVE_EDGEBREAKER)
draco_enable_feature(FEATURE "DRACO_PREDICTIVE_EDGEBREAKER_SUPPORTED")
endif()
endif()
if(DRACO_BACKWARDS_COMPATIBILITY)
draco_enable_feature(FEATURE "DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED")
endif()
if(NOT EMSCRIPTEN)
# For now, enable deduplication for both encoder and decoder.
# TODO(ostava): Support for disabling attribute deduplication for the C++
# decoder is planned in future releases.
draco_enable_feature(FEATURE
DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED)
draco_enable_feature(FEATURE
DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED)
endif()
endif()
if(DRACO_UNITY_PLUGIN)
draco_enable_feature(FEATURE "DRACO_UNITY_PLUGIN")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
if(DRACO_MAYA_PLUGIN)
draco_enable_feature(FEATURE "DRACO_MAYA_PLUGIN")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
endmacro()
# Macro that handles tracking of Draco preprocessor symbols for the purpose of
# producing draco_features.h.
#
# ~~~
# draco_enable_feature(FEATURE <feature_name> [TARGETS <target_name>])
# ~~~
#
# FEATURE is required. It should be a Draco preprocessor symbol. TARGETS is
# optional. It can be one or more draco targets.
#
# When the TARGETS argument is not present the preproc symbol is added to
# draco_features.h. When it is draco_features.h is unchanged, and
# target_compile_options() is called for each target specified.
macro(draco_enable_feature)
set(def_flags)
set(def_single_arg_opts FEATURE)
set(def_multi_arg_opts TARGETS)
cmake_parse_arguments(DEF "${def_flags}" "${def_single_arg_opts}"
"${def_multi_arg_opts}" ${ARGN})
if("${DEF_FEATURE}" STREQUAL "")
message(FATAL_ERROR "Empty FEATURE passed to draco_enable_feature().")
endif()
# Do nothing/return early if $DEF_FEATURE is already in the list.
list(FIND draco_features_list ${DEF_FEATURE} df_index)
if(NOT df_index EQUAL -1)
return()
endif()
list(LENGTH DEF_TARGETS df_targets_list_length)
if(${df_targets_list_length} EQUAL 0)
list(APPEND draco_features_list ${DEF_FEATURE})
else()
foreach(target ${DEF_TARGETS})
target_compile_definitions(${target} PRIVATE ${DEF_FEATURE})
endforeach()
endif()
endmacro()
# Function for generating draco_features.h.
function(draco_generate_features_h)
file(WRITE "${draco_features_file_name}.new"
"// GENERATED FILE -- DO NOT EDIT\n\n" "#ifndef DRACO_FEATURES_H_\n"
"#define DRACO_FEATURES_H_\n\n")
foreach(feature ${draco_features_list})
file(APPEND "${draco_features_file_name}.new" "#define ${feature}\n")
endforeach()
file(APPEND "${draco_features_file_name}.new"
"\n#endif // DRACO_FEATURES_H_")
# Will replace ${draco_features_file_name} only if the file content has
# changed. This prevents forced Draco rebuilds after CMake runs.
configure_file("${draco_features_file_name}.new"
"${draco_features_file_name}")
file(REMOVE "${draco_features_file_name}.new")
endfunction()
# Sets default options for the build and processes user controlled options to
# compute enabled features.
macro(draco_setup_options)
draco_set_default_options()
draco_set_optional_features()
endmacro()

View File

@ -0,0 +1,32 @@
if(DRACO_CMAKE_DRACO_SANITIZER_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_SANITIZER_CMAKE_
set(DRACO_CMAKE_DRACO_SANITIZER_CMAKE_ 1)
# Handles the details of enabling sanitizers.
macro(draco_configure_sanitizer)
if(DRACO_SANITIZE AND NOT MSVC)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(DRACO_SANITIZE MATCHES "cfi")
list(APPEND DRACO_CXX_FLAGS "-flto" "-fno-sanitize-trap=cfi")
list(APPEND DRACO_EXE_LINKER_FLAGS "-flto" "-fno-sanitize-trap=cfi"
"-fuse-ld=gold")
endif()
if(${CMAKE_SIZEOF_VOID_P} EQUAL 4
AND DRACO_SANITIZE MATCHES "integer|undefined")
list(APPEND DRACO_EXE_LINKER_FLAGS "--rtlib=compiler-rt" "-lgcc_s")
endif()
endif()
list(APPEND DRACO_CXX_FLAGS "-fsanitize=${DRACO_SANITIZE}")
list(APPEND DRACO_EXE_LINKER_FLAGS "-fsanitize=${DRACO_SANITIZE}")
# Make sanitizer callstacks accurate.
list(APPEND DRACO_CXX_FLAGS "-fno-omit-frame-pointer"
"-fno-optimize-sibling-calls")
draco_test_cxx_flag(FLAG_LIST_VAR_NAMES DRACO_CXX_FLAGS FLAG_REQUIRED)
draco_test_exe_linker_flag(FLAG_LIST_VAR_NAME DRACO_EXE_LINKER_FLAGS)
endif()
endmacro()

345
cmake/draco_targets.cmake Normal file
View File

@ -0,0 +1,345 @@
if(DRACO_CMAKE_DRACO_TARGETS_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_TARGETS_CMAKE_
set(DRACO_CMAKE_DRACO_TARGETS_CMAKE_ 1)
# Resets list variables used to track draco targets.
macro(draco_reset_target_lists)
unset(draco_targets)
unset(draco_exe_targets)
unset(draco_lib_targets)
unset(draco_objlib_targets)
unset(draco_module_targets)
unset(draco_sources)
unset(draco_test_targets)
endmacro()
# Creates an executable target. The target name is passed as a parameter to the
# NAME argument, and the sources passed as a parameter to the SOURCES argument:
# draco_add_executable(NAME <name> SOURCES <sources> [optional args])
#
# Optional args:
# cmake-format: off
# - OUTPUT_NAME: Override output file basename. Target basename defaults to
# NAME.
# - TEST: Flag. Presence means treat executable as a test.
# - DEFINES: List of preprocessor macro definitions.
# - INCLUDES: list of include directories for the target.
# - COMPILE_FLAGS: list of compiler flags for the target.
# - LINK_FLAGS: List of linker flags for the target.
# - OBJLIB_DEPS: List of CMake object library target dependencies.
# - LIB_DEPS: List of CMake library dependencies.
# cmake-format: on
#
# Sources passed to this macro are added to $draco_test_sources when TEST is
# specified. Otherwise sources are added to $draco_sources.
#
# Targets passed to this macro are always added to the $draco_targets list. When
# TEST is specified targets are also added to the $draco_test_targets list.
# Otherwise targets are added to $draco_exe_targets.
macro(draco_add_executable)
unset(exe_TEST)
unset(exe_TEST_DEFINES_MAIN)
unset(exe_NAME)
unset(exe_OUTPUT_NAME)
unset(exe_SOURCES)
unset(exe_DEFINES)
unset(exe_INCLUDES)
unset(exe_COMPILE_FLAGS)
unset(exe_LINK_FLAGS)
unset(exe_OBJLIB_DEPS)
unset(exe_LIB_DEPS)
set(optional_args TEST)
set(single_value_args NAME OUTPUT_NAME)
set(multi_value_args SOURCES DEFINES INCLUDES COMPILE_FLAGS LINK_FLAGS
OBJLIB_DEPS LIB_DEPS)
cmake_parse_arguments(exe "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(DRACO_VERBOSE GREATER 1)
message("--------- draco_add_executable ---------\n"
"exe_TEST=${exe_TEST}\n"
"exe_TEST_DEFINES_MAIN=${exe_TEST_DEFINES_MAIN}\n"
"exe_NAME=${exe_NAME}\n"
"exe_OUTPUT_NAME=${exe_OUTPUT_NAME}\n"
"exe_SOURCES=${exe_SOURCES}\n"
"exe_DEFINES=${exe_DEFINES}\n"
"exe_INCLUDES=${exe_INCLUDES}\n"
"exe_COMPILE_FLAGS=${exe_COMPILE_FLAGS}\n"
"exe_LINK_FLAGS=${exe_LINK_FLAGS}\n"
"exe_OBJLIB_DEPS=${exe_OBJLIB_DEPS}\n"
"exe_LIB_DEPS=${exe_LIB_DEPS}\n"
"------------------------------------------\n")
endif()
if(NOT (exe_NAME AND exe_SOURCES))
message(FATAL_ERROR "draco_add_executable: NAME and SOURCES required.")
endif()
list(APPEND draco_targets ${exe_NAME})
if(exe_TEST)
list(APPEND draco_test_targets ${exe_NAME})
list(APPEND draco_test_sources ${exe_SOURCES})
else()
list(APPEND draco_exe_targets ${exe_NAME})
list(APPEND draco_sources ${exe_SOURCES})
endif()
add_executable(${exe_NAME} ${exe_SOURCES})
if(exe_OUTPUT_NAME)
set_target_properties(${exe_NAME} PROPERTIES OUTPUT_NAME ${exe_OUTPUT_NAME})
endif()
draco_process_intrinsics_sources(TARGET ${exe_NAME} SOURCES ${exe_SOURCES})
if(exe_DEFINES)
target_compile_definitions(${exe_NAME} PRIVATE ${exe_DEFINES})
endif()
if(exe_INCLUDES)
target_include_directories(${exe_NAME} PRIVATE ${exe_INCLUDES})
endif()
if(exe_COMPILE_FLAGS OR DRACO_CXX_FLAGS)
target_compile_options(${exe_NAME}
PRIVATE ${exe_COMPILE_FLAGS} ${DRACO_CXX_FLAGS})
endif()
if(exe_LINK_FLAGS OR DRACO_EXE_LINKER_FLAGS)
if(${CMAKE_VERSION} VERSION_LESS "3.13")
set(link_flags ${exe_LINK_FLAGS} ${DRACO_EXE_LINKER_FLAGS})
set_target_properties(${exe_NAME}
PROPERTIES LINK_FLAGS ${exe_LINK_FLAGS}
${DRACO_EXE_LINKER_FLAGS})
else()
target_link_options(${exe_NAME} PRIVATE ${exe_LINK_FLAGS}
${DRACO_EXE_LINKER_FLAGS})
endif()
endif()
if(exe_OBJLIB_DEPS)
foreach(objlib_dep ${exe_OBJLIB_DEPS})
target_sources(${exe_NAME} PRIVATE $<TARGET_OBJECTS:${objlib_dep}>)
endforeach()
endif()
if(CMAKE_THREAD_LIBS_INIT)
list(APPEND exe_LIB_DEPS ${CMAKE_THREAD_LIBS_INIT})
endif()
if(BUILD_SHARED_LIBS AND (MSVC OR WIN32))
target_compile_definitions(${lib_NAME} PRIVATE "DRACO_BUILDING_DLL=0")
endif()
if(exe_LIB_DEPS)
unset(exe_static)
if("${CMAKE_EXE_LINKER_FLAGS} ${DRACO_EXE_LINKER_FLAGS}" MATCHES "static")
set(exe_static ON)
endif()
if(exe_static AND CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
# Third party dependencies can introduce dependencies on system and test
# libraries. Since the target created here is an executable, and CMake
# does not provide a method of controlling order of link dependencies,
# wrap all of the dependencies of this target in start/end group flags to
# ensure that dependencies of third party targets can be resolved when
# those dependencies happen to be resolved by dependencies of the current
# target.
list(INSERT exe_LIB_DEPS 0 -Wl,--start-group)
list(APPEND exe_LIB_DEPS -Wl,--end-group)
endif()
target_link_libraries(${exe_NAME} PRIVATE ${exe_LIB_DEPS})
endif()
endmacro()
# Creates a library target of the specified type. The target name is passed as a
# parameter to the NAME argument, the type as a parameter to the TYPE argument,
# and the sources passed as a parameter to the SOURCES argument:
# draco_add_library(NAME <name> TYPE <type> SOURCES <sources> [optional args])
#
# Optional args:
# cmake-format: off
# - OUTPUT_NAME: Override output file basename. Target basename defaults to
# NAME. OUTPUT_NAME is ignored when BUILD_SHARED_LIBS is enabled and CMake
# is generating a build for which MSVC or WIN32 are true. This is to avoid
# output basename collisions with DLL import libraries.
# - TEST: Flag. Presence means treat library as a test.
# - DEFINES: List of preprocessor macro definitions.
# - INCLUDES: list of include directories for the target.
# - COMPILE_FLAGS: list of compiler flags for the target.
# - LINK_FLAGS: List of linker flags for the target.
# - OBJLIB_DEPS: List of CMake object library target dependencies.
# - LIB_DEPS: List of CMake library dependencies.
# - PUBLIC_INCLUDES: List of include paths to export to dependents.
# cmake-format: on
#
# Sources passed to the macro are added to the lists tracking draco sources:
# cmake-format: off
# - When TEST is specified sources are added to $draco_test_sources.
# - Otherwise sources are added to $draco_sources.
# cmake-format: on
#
# Targets passed to this macro are added to the lists tracking draco targets:
# cmake-format: off
# - Targets are always added to $draco_targets.
# - When the TEST flag is specified, targets are added to
# $draco_test_targets.
# - When TEST is not specified:
# - Libraries of type SHARED are added to $draco_dylib_targets.
# - Libraries of type OBJECT are added to $draco_objlib_targets.
# - Libraries of type STATIC are added to $draco_lib_targets.
# cmake-format: on
macro(draco_add_library)
unset(lib_TEST)
unset(lib_NAME)
unset(lib_OUTPUT_NAME)
unset(lib_TYPE)
unset(lib_SOURCES)
unset(lib_DEFINES)
unset(lib_INCLUDES)
unset(lib_COMPILE_FLAGS)
unset(lib_LINK_FLAGS)
unset(lib_OBJLIB_DEPS)
unset(lib_LIB_DEPS)
unset(lib_PUBLIC_INCLUDES)
unset(lib_TARGET_PROPERTIES)
set(optional_args TEST)
set(single_value_args NAME OUTPUT_NAME TYPE)
set(multi_value_args SOURCES DEFINES INCLUDES COMPILE_FLAGS LINK_FLAGS
OBJLIB_DEPS LIB_DEPS PUBLIC_INCLUDES TARGET_PROPERTIES)
cmake_parse_arguments(lib "${optional_args}" "${single_value_args}"
"${multi_value_args}" ${ARGN})
if(DRACO_VERBOSE GREATER 1)
message("--------- draco_add_library ---------\n"
"lib_TEST=${lib_TEST}\n"
"lib_NAME=${lib_NAME}\n"
"lib_OUTPUT_NAME=${lib_OUTPUT_NAME}\n"
"lib_TYPE=${lib_TYPE}\n"
"lib_SOURCES=${lib_SOURCES}\n"
"lib_DEFINES=${lib_DEFINES}\n"
"lib_INCLUDES=${lib_INCLUDES}\n"
"lib_COMPILE_FLAGS=${lib_COMPILE_FLAGS}\n"
"lib_LINK_FLAGS=${lib_LINK_FLAGS}\n"
"lib_OBJLIB_DEPS=${lib_OBJLIB_DEPS}\n"
"lib_LIB_DEPS=${lib_LIB_DEPS}\n"
"lib_PUBLIC_INCLUDES=${lib_PUBLIC_INCLUDES}\n"
"---------------------------------------\n")
endif()
if(NOT (lib_NAME AND lib_TYPE))
message(FATAL_ERROR "draco_add_library: NAME and TYPE required.")
endif()
list(APPEND draco_targets ${lib_NAME})
if(lib_TEST)
list(APPEND draco_test_targets ${lib_NAME})
list(APPEND draco_test_sources ${lib_SOURCES})
else()
list(APPEND draco_sources ${lib_SOURCES})
if(lib_TYPE STREQUAL MODULE)
list(APPEND draco_module_targets ${lib_NAME})
elseif(lib_TYPE STREQUAL OBJECT)
list(APPEND draco_objlib_targets ${lib_NAME})
elseif(lib_TYPE STREQUAL SHARED)
list(APPEND draco_dylib_targets ${lib_NAME})
elseif(lib_TYPE STREQUAL STATIC)
list(APPEND draco_lib_targets ${lib_NAME})
else()
message(WARNING "draco_add_library: Unhandled type: ${lib_TYPE}")
endif()
endif()
add_library(${lib_NAME} ${lib_TYPE} ${lib_SOURCES})
if(lib_SOURCES)
draco_process_intrinsics_sources(TARGET ${lib_NAME} SOURCES ${lib_SOURCES})
endif()
if(lib_OUTPUT_NAME)
if(NOT (BUILD_SHARED_LIBS AND (MSVC OR WIN32)))
set_target_properties(${lib_NAME}
PROPERTIES OUTPUT_NAME ${lib_OUTPUT_NAME})
endif()
endif()
if(lib_DEFINES)
target_compile_definitions(${lib_NAME} PRIVATE ${lib_DEFINES})
endif()
if(lib_INCLUDES)
target_include_directories(${lib_NAME} PRIVATE ${lib_INCLUDES})
endif()
if(lib_PUBLIC_INCLUDES)
target_include_directories(${lib_NAME} PUBLIC ${lib_PUBLIC_INCLUDES})
endif()
if(lib_COMPILE_FLAGS OR DRACO_CXX_FLAGS)
target_compile_options(${lib_NAME}
PRIVATE ${lib_COMPILE_FLAGS} ${DRACO_CXX_FLAGS})
endif()
if(lib_LINK_FLAGS)
set_target_properties(${lib_NAME} PROPERTIES LINK_FLAGS ${lib_LINK_FLAGS})
endif()
if(lib_OBJLIB_DEPS)
foreach(objlib_dep ${lib_OBJLIB_DEPS})
target_sources(${lib_NAME} PRIVATE $<TARGET_OBJECTS:${objlib_dep}>)
endforeach()
endif()
if(lib_LIB_DEPS)
if(lib_TYPE STREQUAL STATIC)
set(link_type PUBLIC)
else()
set(link_type PRIVATE)
if(lib_TYPE STREQUAL SHARED AND CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
# The draco shared object uses the static draco as input to turn it into
# a shared object. Include everything from the static library in the
# shared object.
if(APPLE)
list(INSERT lib_LIB_DEPS 0 -Wl,-force_load)
else()
list(INSERT lib_LIB_DEPS 0 -Wl,--whole-archive)
list(APPEND lib_LIB_DEPS -Wl,--no-whole-archive)
endif()
endif()
endif()
target_link_libraries(${lib_NAME} ${link_type} ${lib_LIB_DEPS})
endif()
if(NOT MSVC AND lib_NAME MATCHES "^lib")
# Non-MSVC generators prepend lib to static lib target file names. Libdraco
# already includes lib in its name. Avoid naming output files liblib*.
set_target_properties(${lib_NAME} PROPERTIES PREFIX "")
endif()
if(lib_TYPE STREQUAL SHARED AND NOT MSVC)
set_target_properties(${lib_NAME} PROPERTIES SOVERSION ${DRACO_SOVERSION})
endif()
if(BUILD_SHARED_LIBS AND (MSVC OR WIN32))
if(lib_TYPE STREQUAL SHARED)
target_compile_definitions(${lib_NAME} PRIVATE "DRACO_BUILDING_DLL=1")
else()
target_compile_definitions(${lib_NAME} PRIVATE "DRACO_BUILDING_DLL=0")
endif()
endif()
# Determine if $lib_NAME is a header only target.
set(sources_list ${lib_SOURCES})
list(FILTER sources_list INCLUDE REGEX cc$)
if(NOT sources_list)
if(NOT XCODE)
# This is a header only target. Tell CMake the link language.
set_target_properties(${lib_NAME} PROPERTIES LINKER_LANGUAGE CXX)
else()
# The Xcode generator ignores LINKER_LANGUAGE. Add a dummy cc file.
draco_create_dummy_source_file(TARGET ${lib_NAME} BASENAME ${lib_NAME})
endif()
endif()
endmacro()

View File

@ -10,88 +10,124 @@ set(draco_factory_test_sources
"${draco_src_root}/io/file_reader_factory_test.cc"
"${draco_src_root}/io/file_writer_factory_test.cc")
set(
draco_test_sources
"${draco_src_root}/animation/keyframe_animation_encoding_test.cc"
"${draco_src_root}/animation/keyframe_animation_test.cc"
"${draco_src_root}/attributes/point_attribute_test.cc"
"${draco_src_root}/compression/attributes/point_d_vector_test.cc"
"${draco_src_root}/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_canonicalized_transform_test.cc"
"${draco_src_root}/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_transform_test.cc"
"${draco_src_root}/compression/attributes/sequential_integer_attribute_encoding_test.cc"
"${draco_src_root}/compression/bit_coders/rans_coding_test.cc"
"${draco_src_root}/compression/decode_test.cc"
"${draco_src_root}/compression/encode_test.cc"
"${draco_src_root}/compression/entropy/shannon_entropy_test.cc"
"${draco_src_root}/compression/entropy/symbol_coding_test.cc"
"${draco_src_root}/compression/mesh/mesh_edgebreaker_encoding_test.cc"
"${draco_src_root}/compression/mesh/mesh_encoder_test.cc"
"${draco_src_root}/compression/point_cloud/point_cloud_kd_tree_encoding_test.cc"
"${draco_src_root}/compression/point_cloud/point_cloud_sequential_encoding_test.cc"
"${draco_src_root}/core/buffer_bit_coding_test.cc"
"${draco_src_root}/core/draco_test_base.h"
"${draco_src_root}/core/draco_test_utils.cc"
"${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_test.cc"
"${draco_src_root}/core/vector_d_test.cc"
"${draco_src_root}/io/file_reader_test_common.h"
"${draco_src_root}/io/file_utils_test.cc"
"${draco_src_root}/io/stdio_file_reader_test.cc"
"${draco_src_root}/io/stdio_file_writer_test.cc"
"${draco_src_root}/io/obj_decoder_test.cc"
"${draco_src_root}/io/obj_encoder_test.cc"
"${draco_src_root}/io/ply_decoder_test.cc"
"${draco_src_root}/io/ply_reader_test.cc"
"${draco_src_root}/io/point_cloud_io_test.cc"
"${draco_src_root}/mesh/mesh_are_equivalent_test.cc"
"${draco_src_root}/mesh/mesh_cleanup_test.cc"
"${draco_src_root}/mesh/triangle_soup_mesh_builder_test.cc"
"${draco_src_root}/metadata/metadata_encoder_test.cc"
"${draco_src_root}/metadata/metadata_test.cc"
"${draco_src_root}/point_cloud/point_cloud_builder_test.cc"
"${draco_src_root}/point_cloud/point_cloud_test.cc")
list(
APPEND
draco_test_sources
"${draco_src_root}/animation/keyframe_animation_encoding_test.cc"
"${draco_src_root}/animation/keyframe_animation_test.cc"
"${draco_src_root}/attributes/point_attribute_test.cc"
"${draco_src_root}/compression/attributes/point_d_vector_test.cc"
"${draco_src_root}/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_canonicalized_transform_test.cc"
"${draco_src_root}/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_transform_test.cc"
"${draco_src_root}/compression/attributes/sequential_integer_attribute_encoding_test.cc"
"${draco_src_root}/compression/bit_coders/rans_coding_test.cc"
"${draco_src_root}/compression/decode_test.cc"
"${draco_src_root}/compression/encode_test.cc"
"${draco_src_root}/compression/entropy/shannon_entropy_test.cc"
"${draco_src_root}/compression/entropy/symbol_coding_test.cc"
"${draco_src_root}/compression/mesh/mesh_edgebreaker_encoding_test.cc"
"${draco_src_root}/compression/mesh/mesh_encoder_test.cc"
"${draco_src_root}/compression/point_cloud/point_cloud_kd_tree_encoding_test.cc"
"${draco_src_root}/compression/point_cloud/point_cloud_sequential_encoding_test.cc"
"${draco_src_root}/core/buffer_bit_coding_test.cc"
"${draco_src_root}/core/draco_test_base.h"
"${draco_src_root}/core/draco_test_utils.cc"
"${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_test.cc"
"${draco_src_root}/core/vector_d_test.cc"
"${draco_src_root}/io/file_reader_test_common.h"
"${draco_src_root}/io/file_utils_test.cc"
"${draco_src_root}/io/stdio_file_reader_test.cc"
"${draco_src_root}/io/stdio_file_writer_test.cc"
"${draco_src_root}/io/obj_decoder_test.cc"
"${draco_src_root}/io/obj_encoder_test.cc"
"${draco_src_root}/io/ply_decoder_test.cc"
"${draco_src_root}/io/ply_reader_test.cc"
"${draco_src_root}/io/point_cloud_io_test.cc"
"${draco_src_root}/mesh/mesh_are_equivalent_test.cc"
"${draco_src_root}/mesh/mesh_cleanup_test.cc"
"${draco_src_root}/mesh/triangle_soup_mesh_builder_test.cc"
"${draco_src_root}/metadata/metadata_encoder_test.cc"
"${draco_src_root}/metadata/metadata_test.cc"
"${draco_src_root}/point_cloud/point_cloud_builder_test.cc"
"${draco_src_root}/point_cloud/point_cloud_test.cc")
list(APPEND draco_gtest_all
"${draco_root}/../googletest/googletest/src/gtest-all.cc")
list(APPEND draco_gtest_main
"${draco_root}/../googletest/googletest/src/gtest_main.cc")
macro(draco_setup_test_targets)
if(ENABLE_TESTS)
# Googletest defaults.
set(GTEST_SOURCE_DIR
"${draco_root}/../googletest"
CACHE STRING "Path to googletest source directory")
set(gtest_all "${GTEST_SOURCE_DIR}/googletest/src/gtest-all.cc")
set(gtest_main "${GTEST_SOURCE_DIR}/googletest/src/gtest_main.cc")
set(draco_gtest_sources "${gtest_all}" "${gtest_main}")
# Confirm Googletest is where expected.
if(EXISTS "${gtest_all}" AND EXISTS "${gtest_main}")
set(DRACO_TEST_DATA_DIR "${draco_root}/testdata")
if(NOT DRACO_TEST_TEMP_DIR)
set(DRACO_TEST_TEMP_DIR "${draco_build_dir}/draco_test_temp")
file(MAKE_DIRECTORY "${DRACO_TEST_TEMP_DIR}")
endif()
# Sets DRACO_TEST_DATA_DIR and DRACO_TEST_TEMP_DIR.
configure_file("${draco_root}/cmake/draco_test_config.h.cmake"
"${draco_build_dir}/testing/draco_test_config.h")
# Create Googletest target and update configuration.
add_library(draco_gtest STATIC ${draco_gtest_sources})
target_compile_definitions(draco_gtest PUBLIC GTEST_HAS_PTHREAD=0)
include_directories("${GTEST_SOURCE_DIR}/googlemock/include"
"${GTEST_SOURCE_DIR}/googletest/include"
"${GTEST_SOURCE_DIR}/googletest")
# Create the test targets.
add_executable(draco_tests ${draco_test_sources})
target_link_libraries(draco_tests draco draco_gtest)
add_executable(draco_factory_tests ${draco_factory_test_sources})
target_link_libraries(draco_factory_tests draco draco_gtest)
else()
set(ENABLE_TESTS OFF)
message("Tests disabled: Google test sources not found in "
"${GTEST_SOURCE_DIR}.")
if(DRACO_TESTS)
if(NOT (EXISTS ${draco_gtest_all} AND EXISTS ${draco_gtest_main}))
message(FATAL "googletest must be a sibling directory of ${draco_root}.")
endif()
list(APPEND draco_test_defines GTEST_HAS_PTHREAD=0)
draco_add_library(TEST
NAME
draco_gtest
TYPE
STATIC
SOURCES
${draco_gtest_all}
DEFINES
${draco_defines}
${draco_test_defines}
INCLUDES
${draco_test_include_paths})
draco_add_library(TEST
NAME
draco_gtest_main
TYPE
STATIC
SOURCES
${draco_gtest_main}
DEFINES
${draco_defines}
${draco_test_defines}
INCLUDES
${draco_test_include_paths})
set(DRACO_TEST_DATA_DIR "${draco_root}/testdata")
set(DRACO_TEST_TEMP_DIR "${draco_build}/draco_test_temp")
file(MAKE_DIRECTORY "${DRACO_TEST_TEMP_DIR}")
# Sets DRACO_TEST_DATA_DIR and DRACO_TEST_TEMP_DIR.
configure_file("${draco_root}/cmake/draco_test_config.h.cmake"
"${draco_build}/testing/draco_test_config.h")
# Create the test targets.
draco_add_executable(NAME
draco_tests
SOURCES
${draco_test_sources}
DEFINES
${draco_defines}
${draco_test_defines}
INCLUDES
${draco_test_include_paths}
LIB_DEPS
draco_static
draco_gtest
draco_gtest_main)
draco_add_executable(NAME
draco_factory_tests
SOURCES
${draco_factory_test_sources}
DEFINES
${draco_defines}
${draco_test_defines}
INCLUDES
${draco_test_include_paths}
LIB_DEPS
draco_static
draco_gtest
draco_gtest_main)
endif()
endmacro()

View File

@ -0,0 +1,64 @@
if(DRACO_CMAKE_DRACO_VARIABLES_CMAKE_)
return()
endif() # DRACO_CMAKE_DRACO_VARIABLES_CMAKE_
set(DRACO_CMAKE_DRACO_VARIABLES_CMAKE_ 1)
# Halts generation when $variable_name does not refer to a directory that
# exists.
macro(draco_variable_must_be_directory variable_name)
if("${variable_name}" STREQUAL "")
message(
FATAL_ERROR
"Empty variable_name passed to draco_variable_must_be_directory.")
endif()
if("${${variable_name}}" STREQUAL "")
message(
FATAL_ERROR
"Empty variable ${variable_name} is required to build draco.")
endif()
if(NOT IS_DIRECTORY "${${variable_name}}")
message(
FATAL_ERROR
"${variable_name}, which is ${${variable_name}}, does not refer to a\n"
"directory.")
endif()
endmacro()
# Adds $var_name to the tracked variables list.
macro(draco_track_configuration_variable var_name)
if(DRACO_VERBOSE GREATER 2)
message("---- draco_track_configuration_variable ----\n"
"var_name=${var_name}\n"
"----------------------------------------------\n")
endif()
list(APPEND draco_configuration_variables ${var_name})
list(REMOVE_DUPLICATES draco_configuration_variables)
endmacro()
# Logs current C++ and executable linker flags via the CMake message command.
macro(draco_dump_cmake_flag_variables)
unset(flag_variables)
list(APPEND flag_variables "CMAKE_CXX_FLAGS_INIT" "CMAKE_CXX_FLAGS"
"CMAKE_EXE_LINKER_FLAGS_INIT" "CMAKE_EXE_LINKER_FLAGS")
if(CMAKE_BUILD_TYPE)
list(APPEND flag_variables "CMAKE_BUILD_TYPE"
"CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}_INIT"
"CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}"
"CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE}_INIT"
"CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE}")
endif()
foreach(flag_variable ${flag_variables})
message("${flag_variable}:${${flag_variable}}")
endforeach()
endmacro()
# Dumps the variables tracked in $draco_configuration_variables via the CMake
# message command.
macro(draco_dump_tracked_configuration_variables)
foreach(config_variable ${draco_configuration_variables})
message("${config_variable}:${${config_variable}}")
endforeach()
endmacro()

View File

@ -0,0 +1,14 @@
if(DRACO_CMAKE_TOOLCHAINS_AARCH64_LINUX_GNU_CMAKE_)
return()
endif() # DRACO_CMAKE_TOOLCHAINS_AARCH64_LINUX_GNU_CMAKE_
set(DRACO_CMAKE_TOOLCHAINS_AARCH64_LINUX_GNU_CMAKE_ 1)
set(CMAKE_SYSTEM_NAME "Linux")
if("${CROSS}" STREQUAL "")
set(CROSS aarch64-linux-gnu-)
endif()
set(CMAKE_CXX_COMPILER ${CROSS}g++)
set(CMAKE_CXX_FLAGS_INIT "-march=armv8-a")
set(CMAKE_SYSTEM_PROCESSOR "aarch64")

View File

@ -3,9 +3,21 @@ if(DRACO_CMAKE_TOOLCHAINS_ANDROID_NDK_COMMON_CMAKE_)
endif()
set(DRACO_CMAKE_TOOLCHAINS_ANDROID_NDK_COMMON_CMAKE_ 1)
include("${CMAKE_CURRENT_LIST_DIR}/../util.cmake")
# Toolchain files do not have access to cached variables:
# https://gitlab.kitware.com/cmake/cmake/issues/16170. Set an intermediate
# environment variable when loaded the first time.
if(DRACO_ANDROID_NDK_PATH)
set(ENV{DRACO_ANDROID_NDK_PATH} "${DRACO_ANDROID_NDK_PATH}")
else()
set(DRACO_ANDROID_NDK_PATH "$ENV{DRACO_ANDROID_NDK_PATH}")
endif()
require_variable(CMAKE_ANDROID_NDK)
set(CMAKE_SYSTEM_NAME Android)
set_variable_if_unset(CMAKE_ANDROID_STL_TYPE c++_static)
set_variable_if_unset(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang)
if(NOT CMAKE_ANDROID_STL_TYPE)
set(CMAKE_ANDROID_STL_TYPE c++_static)
endif()
if(NOT CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION)
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang)
endif()

View File

@ -0,0 +1,39 @@
if(DRACO_CMAKE_TOOLCHAINS_ANDROID_CMAKE_)
return()
endif() # DRACO_CMAKE_TOOLCHAINS_ANDROID_CMAKE_
# Additional ANDROID_* settings are available, see:
# https://developer.android.com/ndk/guides/cmake#variables
if(NOT ANDROID_PLATFORM)
set(ANDROID_PLATFORM android-21)
endif()
# Choose target architecture with:
#
# -DANDROID_ABI={armeabi-v7a,armeabi-v7a with NEON,arm64-v8a,x86,x86_64}
if(NOT ANDROID_ABI)
set(ANDROID_ABI arm64-v8a)
endif()
# Force arm mode for 32-bit targets (instead of the default thumb) to improve
# performance.
if(NOT ANDROID_ARM_MODE)
set(ANDROID_ARM_MODE arm)
endif()
# Toolchain files do not have access to cached variables:
# https://gitlab.kitware.com/cmake/cmake/issues/16170. Set an intermediate
# environment variable when loaded the first time.
if(DRACO_ANDROID_NDK_PATH)
set(ENV{DRACO_ANDROID_NDK_PATH} "${DRACO_ANDROID_NDK_PATH}")
else()
set(DRACO_ANDROID_NDK_PATH "$ENV{DRACO_ANDROID_NDK_PATH}")
endif()
if(NOT DRACO_ANDROID_NDK_PATH)
message(FATAL_ERROR "DRACO_ANDROID_NDK_PATH not set.")
return()
endif()
include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")

View File

@ -0,0 +1,15 @@
if(DRACO_CMAKE_TOOLCHAINS_ARM_LINUX_GNUEABIHF_CMAKE_)
return()
endif() # DRACO_CMAKE_TOOLCHAINS_ARM_LINUX_GNUEABIHF_CMAKE_
set(DRACO_CMAKE_TOOLCHAINS_ARM_LINUX_GNUEABIHF_CMAKE_ 1)
set(CMAKE_SYSTEM_NAME "Linux")
if("${CROSS}" STREQUAL "")
set(CROSS arm-linux-gnueabihf-)
endif()
set(CMAKE_CXX_COMPILER ${CROSS}g++)
set(CMAKE_CXX_FLAGS_INIT "-march=armv7-a -marm")
set(CMAKE_SYSTEM_PROCESSOR "armv7")
set(DRACO_NEON_INTRINSICS_FLAG "-mfpu=neon")

View File

@ -3,10 +3,14 @@ if(DRACO_CMAKE_TOOLCHAINS_ARM64_ANDROID_NDK_LIBCPP_CMAKE_)
endif()
set(DRACO_CMAKE_TOOLCHAINS_ARM64_ANDROID_NDK_LIBCPP_CMAKE_ 1)
include("${CMAKE_CURRENT_LIST_DIR}/../util.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake")
set_variable_if_unset(ANDROID_PLATFORM android-21)
set_variable_if_unset(ANDROID_ABI arm64-v8a)
if(NOT ANDROID_PLATFORM)
set(ANROID_PLATFORM android-21)
endif()
include("${CMAKE_ANDROID_NDK}/build/cmake/android.toolchain.cmake")
if(NOT ANDROID_ABI)
set(ANDROID_ABI arm64-v8a)
endif()
include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")

View File

@ -3,10 +3,14 @@ if(DRACO_CMAKE_TOOLCHAINS_ARMV7_ANDROID_NDK_LIBCPP_CMAKE_)
endif()
set(DRACO_CMAKE_TOOLCHAINS_ARMV7_ANDROID_NDK_LIBCPP_CMAKE_ 1)
include("${CMAKE_CURRENT_LIST_DIR}/../util.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake")
set_variable_if_unset(ANDROID_PLATFORM android-18)
set_variable_if_unset(ANDROID_ABI armeabi-v7a)
if(NOT ANDROID_PLATFORM)
set(ANDROID_PLATFORM android-18)
endif()
include("${CMAKE_ANDROID_NDK}/build/cmake/android.toolchain.cmake")
if(NOT ANDROID_ABI)
set(ANDROID_ABI armeabi-v7a)
endif()
include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")

View File

@ -3,10 +3,14 @@ if(DRACO_CMAKE_TOOLCHAINS_X86_ANDROID_NDK_LIBCPP_CMAKE_)
endif()
set(DRACO_CMAKE_TOOLCHAINS_X86_ANDROID_NDK_LIBCPP_CMAKE_ 1)
include("${CMAKE_CURRENT_LIST_DIR}/../util.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake")
set_variable_if_unset(ANDROID_PLATFORM android-18)
set_variable_if_unset(ANDROID_ABI x86)
if(NOT ANDROID_PLATFORM)
set(ANDROID_PLATFORM android-18)
endif()
include("${CMAKE_ANDROID_NDK}/build/cmake/android.toolchain.cmake")
if(NOT ANDROID_ABI)
set(ANDROID_ABI x86)
endif()
include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")

View File

@ -3,10 +3,14 @@ if(DRACO_CMAKE_TOOLCHAINS_X86_64_ANDROID_NDK_LIBCPP_CMAKE_)
endif()
set(DRACO_CMAKE_TOOLCHAINS_X86_64_ANDROID_NDK_LIBCPP_CMAKE_ 1)
include("${CMAKE_CURRENT_LIST_DIR}/../util.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake")
set_variable_if_unset(ANDROID_PLATFORM android-21)
set_variable_if_unset(ANDROID_ABI x86_64)
if(NOT ANDROID_PLATFORM)
set(ANDROID_PLATFORM android-21)
endif()
include("${CMAKE_ANDROID_NDK}/build/cmake/android.toolchain.cmake")
if(NOT ANDROID_ABI)
set(ANDROID_ABI x86_64)
endif()
include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")

View File

@ -16,8 +16,8 @@
title: Draco 3D Data Compression
email: webmaster@webmproject.org
description: >
Description here
description: >
Draco 3D Data Compression
baseurl: "/draco"
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: webm

View File

@ -86,7 +86,7 @@
<div class="jumbotron">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<img class="img-responsive center-block jumbo-logo" src="artwork/draco3d-vert-360x274.png">
<img class="img-responsive center-block jumbo-logo" src="artwork/draco3d-vert-360x274.png" alt="">
</div>
<div class="col-xs-12 col-sm-8 col-md-9 text-center">
<p>Draco is an open-source library for compressing and decompressing 3D
@ -164,4 +164,4 @@
<script src="{{ 'assets/js/ie10-viewport-bug-workaround.js' | relative_url }}"></script>
{% include analytics.html%}
</body>
</html>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
_{{ page.version }}_
_{{ page.version }}_
_{{ page.version_date }}_

View File

@ -205,7 +205,7 @@ DecodeHeader() {
~~~~~
{:.draco-syntax}</code></pre>
... **will render as:**
... **will render as:**
~~~~~

View File

@ -288,7 +288,3 @@
* prediction_degree_
* Array of current degree prediction for each vertex
* constrained_multi_num_flags

265
docs/unity/UNITY.md Normal file
View File

@ -0,0 +1,265 @@
# Draco Unity Integration Guide
This document walks through the process of building Draco for Unity, and
creating a Unity project that uses Draco to decode a .drc file.
[TOC]
## Building Draco for Unity
All of the steps here assume that you're familiar with running build tools for
the target of your choice, and that you have your system configured correctly to
use those build tools.
Basic prerequisites for these builds:
- All platforms require CMake.
- For Android: a recent NDK.
- For iOS and MacOS: a recent Xcode release.
- For Windows: a recent Visual Studio release.
### Android
These instructions are armeabi-v7a and arm64-v8a Android builds.
#### armv7
``` bash
$ cd path/to/draco
$ export CMAKE_ANDROID_NDK=path/to/ndk
$ mkdir armeabi-v7a && cd armeabi-v7a
$ cmake ../ \
-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/armv7-android-ndk-libcpp.cmake \
-DDRACO_UNITY_PLUGIN=ON
$ make -j
```
#### arm64
``` bash
$ cd path/to/draco
$ export CMAKE_ANDROID_NDK=path/to/ndk
$ mkdir arm64-v8a && cd arm64-v8a
$ cmake ../ \
-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/arm64-android-ndk-libcpp.cmake \
-DDRACO_UNITY_PLUGIN=ON
$ make -j
```
### iOS
These instructions build unsigned Draco targets and produce a fat libdraco.a
that includes Draco support for armv7, armv7s, and arm64 iOS.
``` bash
$ cmake path/to/draco -G Xcode \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_ARCHITECTURES=armv7\;armv7s\;arm64 \
-DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.0 \
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO \
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="" \
-DDRACO_UNITY_PLUGIN=1
$ xcodebuild
# Build outputs are the Release-iphoneos directory.
```
### MacOS
``` bash
$ cd path/to/draco
$ mkdir build_unity_xcode
$ cd build_unity_xcode
$ cmake .. -G Xcode \
-DDRACO_UNITY_PLUGIN=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CONFIGURATION_TYPES=Release
$ xcodebuild
# Build outputs are in the Release directory.
```
### Windows
These instructions use Visual Studio 16 2019. Configuration for older versions
of Visual Studio is different. Consult CMake documentation for information on
configuring for your version of Visual Studio.
#### Win32
``` bash
$ cd path/to/draco
$ mkdir build_unity_win32
$ cd build_unity_win32
$ cmake ../ -G "Visual Studio 16 2019" -A Win32 -DDRACO_UNITY_PLUGIN=ON
$ cmake --build . --config Release --target install -- /M:36
# Build outputs are in the Release directory.
```
#### Win64
``` bash
$ cd path/to/draco
$ mkdir build_unity_win64
$ cd build_unity_win64
$ cmake ../ -G "Visual Studio 16 2019" -A x64 -DDRACO_UNITY_PLUGIN=ON
$ cmake --build . --config Release --target install -- /M:36
# Build outputs are in the Release directory.
```
## Testing Draco in Unity
### 1. Create the Project
Open Unity Hub and create a new project. Name it DracoDemo.
The following two images are taken from Unity Hub for Windows, but the steps are
the same on other platforms.
![Open Unity Hub](images/new_project_windows_1.png "Unity Hub")
Click “New” Button, which opens create new project dialog box
![Create new Unity project](images/new_project_windows_2.png "Create Project")
Click the `Create` button to create the project.
***TIP***: The shell commands in the next step are much less tedious if you
create the project in a sibling directory of the Draco repository.
### 2. Copy in the Draco files
Run these commands in the shell of your choice to place Draco files where Unity
can load them.
``` bash
# These commands assume you created the project in a sibling directory of the
# Draco repository. If your project is stored elsewhere you'll need to use
# absolute paths.
$ cd path/to/draco
$ mkdir -p ../DracoDemo/Assets/Plugins
$ cp unity/Plugin/dracodec_unity.dll ../DracoDemo/Assets/Plugins/
$ cp unity/DracoMeshLoader.cs ../DracoDemo/Assets/
$ cp unity/DracoDecodingObject.cs ../DracoDemo/Assets/
$ mkdir -p ../DracoDemo/Assets/Resources
$ cp javascript/example/models/bunny.drc \
../DracoDemo/Assets/Resources/bunny.drc.bytes
```
### 3. Connect the Draco decoder in Unity
##### A. Allow unsafe code in the player settings
The image examples here are from Windows. The MacOS version of Unity differs
in appearance, but the field names and values remain the same.
![Open project settings](images/allow_unsafe_windows_1.png "Edit -> Project Settings (Windows)")
![Allow unsafe code](images/allow_unsafe_windows_2.png "Allow unsafe code (Windows)")
##### B. Add Draco to the Unity project
The first step is to create an empty game object. Here's what that looks like on
Windows. The MacOS version of Unity is very similar.
![Create empty game object](images/create_empty_game_object_windows.png "GameObject -> Create Empty")
![Empty Unity project](images/unity_empty.png "Empty Unity project")
##### C. Attach the DracoDecodingObject.cs script to the game object.
Do one of the following:
* Drag the script asset to a GameObject in the hierarchy panel, or
* Drag it to the inspector of the GameObject that is currently selected.
![Attach decode script to game object](images/attach_draco_decode_object.png "Game object inspector")
##### D. Reposition the camera
Change Main Cameras position to 0,0,-1.
![Set camera position](images/set_camera_position.png "Camera positioning")
##### E. Add a Mesh Filter component to the GameObject
![Add component](images/add_component.png "Add component")
![Add mesh filter](images/add_mesh_filter_component.png "Add mesh")
![Mesh filter added](images/mesh_filter_added.png "Mesh filter added")
##### F. Add a Mesh Renderer component to the GameObject
![Add component](images/add_component.png "Add component")
![Add mesh renderer](images/add_mesh_renderer_component.png "Add mesh renderer")
![Mesh renderer added](images/mesh_renderer_added.png "Mesh renderer added")
##### G. Play your project
The integration basics are completed, and you should see a pink bunny when you
play the project.
![Pink bunny](images/pink_bunny.png "Pink bunny")
### 5. Add Materials to Your Mesh
##### A. Pick a Material for the Mesh Renderer.
![Add material](images/add_material.png "Add material")
##### B. Select a material.
![Select material](images/select_material.png "Select material")
![Default material](images/default_material.png "Default material")
##### C. Play your project
Play it again: you should see a black bunny now.
***Don't panic***: Newer versions of Unity have lighting by default. Your bunny might
already look like the lighted version in the next step.
![Black bunny](images/black_bunny.png "Black bunny")
### 6. Add a light
In the most recent Unity releases this step isn't necessary because scenes have
a light by default, but this is how to do that if your Unity installation is
older or behaves differently.
##### A. Add and position the light
![Add light](images/add_light.png "Add light")
![Light Position](images/light_position.png "Light Position")
##### B. Play your project
Play it again: you should see a lit bunny now.
![Lit bunny](images/lit_bunny.png "Lit bunny")
“Play” your project. You should see a lit bunny.
### 7. Extras
Rotate your bunny.
Add the following code to `DracoDecodingObject.cs`:
``` c#
void Update() {
transform.Rotate(0, 30 * Time.deltaTime, 0);
}
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -1,104 +1,125 @@
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(f){var m=0;return function(){return m<f.length?{done:!1,value:f[m++]}:{done:!0}}};$jscomp.arrayIterator=function(f){return{next:$jscomp.arrayIteratorImpl(f)}};$jscomp.makeIterator=function(f){var m="undefined"!=typeof Symbol&&Symbol.iterator&&f[Symbol.iterator];return m?m.call(f):$jscomp.arrayIterator(f)};
$jscomp.getGlobal=function(f){return"undefined"!=typeof window&&window===f?f:"undefined"!=typeof global&&null!=global?global:f};$jscomp.global=$jscomp.getGlobal(this);$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(f,m,v){f!=Array.prototype&&f!=Object.prototype&&(f[m]=v.value)};
$jscomp.polyfill=function(f,m,v,t){if(m){v=$jscomp.global;f=f.split(".");for(t=0;t<f.length-1;t++){var h=f[t];h in v||(v[h]={});v=v[h]}f=f[f.length-1];t=v[f];m=m(t);m!=t&&null!=m&&$jscomp.defineProperty(v,f,{configurable:!0,writable:!0,value:m})}};$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.polyfill("Promise",function(f){function m(){this.batch_=null}function v(e){return e instanceof h?e:new h(function(l,f){l(e)})}if(f&&!$jscomp.FORCE_POLYFILL_PROMISE)return f;m.prototype.asyncExecute=function(e){if(null==this.batch_){this.batch_=[];var l=this;this.asyncExecuteFunction(function(){l.executeBatch_()})}this.batch_.push(e)};var t=$jscomp.global.setTimeout;m.prototype.asyncExecuteFunction=function(e){t(e,0)};m.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var e=
this.batch_;this.batch_=[];for(var l=0;l<e.length;++l){var f=e[l];e[l]=null;try{f()}catch(z){this.asyncThrow_(z)}}}this.batch_=null};m.prototype.asyncThrow_=function(e){this.asyncExecuteFunction(function(){throw e;})};var h=function(e){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var l=this.createResolveAndReject_();try{e(l.resolve,l.reject)}catch(S){l.reject(S)}};h.prototype.createResolveAndReject_=function(){function e(e){return function(h){f||(f=!0,e.call(l,h))}}var l=this,f=!1;
return{resolve:e(this.resolveTo_),reject:e(this.reject_)}};h.prototype.resolveTo_=function(e){if(e===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof h)this.settleSameAsPromise_(e);else{a:switch(typeof e){case "object":var l=null!=e;break a;case "function":l=!0;break a;default:l=!1}l?this.resolveToNonPromiseObj_(e):this.fulfill_(e)}};h.prototype.resolveToNonPromiseObj_=function(e){var l=void 0;try{l=e.then}catch(S){this.reject_(S);return}"function"==typeof l?
this.settleSameAsThenable_(l,e):this.fulfill_(e)};h.prototype.reject_=function(e){this.settle_(2,e)};h.prototype.fulfill_=function(e){this.settle_(1,e)};h.prototype.settle_=function(e,l){if(0!=this.state_)throw Error("Cannot settle("+e+", "+l+"): Promise already settled in state"+this.state_);this.state_=e;this.result_=l;this.executeOnSettledCallbacks_()};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var e=0;e<this.onSettledCallbacks_.length;++e)X.asyncExecute(this.onSettledCallbacks_[e]);
this.onSettledCallbacks_=null}};var X=new m;h.prototype.settleSameAsPromise_=function(e){var l=this.createResolveAndReject_();e.callWhenSettled_(l.resolve,l.reject)};h.prototype.settleSameAsThenable_=function(e,l){var f=this.createResolveAndReject_();try{e.call(l,f.resolve,f.reject)}catch(z){f.reject(z)}};h.prototype.then=function(e,f){function l(e,f){return"function"==typeof e?function(f){try{m(e(f))}catch(p){v(p)}}:f}var m,v,t=new h(function(e,f){m=e;v=f});this.callWhenSettled_(l(e,m),l(f,v));return t};
h.prototype.catch=function(e){return this.then(void 0,e)};h.prototype.callWhenSettled_=function(e,f){function l(){switch(h.state_){case 1:e(h.result_);break;case 2:f(h.result_);break;default:throw Error("Unexpected state: "+h.state_);}}var h=this;null==this.onSettledCallbacks_?X.asyncExecute(l):this.onSettledCallbacks_.push(l)};h.resolve=v;h.reject=function(e){return new h(function(f,h){h(e)})};h.race=function(e){return new h(function(f,h){for(var l=$jscomp.makeIterator(e),m=l.next();!m.done;m=l.next())v(m.value).callWhenSettled_(f,
h)})};h.all=function(e){var f=$jscomp.makeIterator(e),m=f.next();return m.done?v([]):new h(function(e,h){function l(f){return function(h){t[f]=h;z--;0==z&&e(t)}}var t=[],z=0;do t.push(void 0),z++,v(m.value).callWhenSettled_(l(t.length-1),h),m=f.next();while(!m.done)})};return h},"es6","es3");
var DracoDecoderModule=function(){var f="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(f=f||__filename);return function(m){function v(k){return a.locateFile?a.locateFile(k,M):M+k}function t(a,c){a||z("Assertion failed: "+c)}function h(a,c,b){var d=c+b;for(b=c;a[b]&&!(b>=d);)++b;if(16<b-c&&a.subarray&&xa)return xa.decode(a.subarray(c,b));for(d="";c<b;){var k=a[c++];if(k&128){var e=a[c++]&63;if(192==(k&224))d+=String.fromCharCode((k&
31)<<6|e);else{var f=a[c++]&63;k=224==(k&240)?(k&15)<<12|e<<6|f:(k&7)<<18|e<<12|f<<6|a[c++]&63;65536>k?d+=String.fromCharCode(k):(k-=65536,d+=String.fromCharCode(55296|k>>10,56320|k&1023))}}else d+=String.fromCharCode(k)}return d}function X(a,c){return a?h(ca,a,c):""}function e(a,c){0<a%c&&(a+=c-a%c);return a}function l(k){ka=k;a.HEAP8=T=new Int8Array(k);a.HEAP16=new Int16Array(k);a.HEAP32=P=new Int32Array(k);a.HEAPU8=ca=new Uint8Array(k);a.HEAPU16=new Uint16Array(k);a.HEAPU32=new Uint32Array(k);
a.HEAPF32=new Float32Array(k);a.HEAPF64=new Float64Array(k)}function S(k){for(;0<k.length;){var c=k.shift();if("function"==typeof c)c();else{var b=c.func;"number"===typeof b?void 0===c.arg?a.dynCall_v(b):a.dynCall_vi(b,c.arg):b(void 0===c.arg?null:c.arg)}}}function z(k){if(a.onAbort)a.onAbort(k);k+="";ya(k);Y(k);za=!0;throw new WebAssembly.RuntimeError("abort("+k+"). Build with -s ASSERTIONS=1 for more info.");}function va(a){return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):
0===a.indexOf("data:application/octet-stream;base64,")}function wa(){try{if(da)return new Uint8Array(da);if(la)return la(U);throw"both async and sync fetching of the wasm failed";}catch(k){z(k)}}function Ma(){return da||!ea&&!Z||"function"!==typeof fetch?new Promise(function(a,c){a(wa())}):fetch(U,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+U+"'";return a.arrayBuffer()}).catch(function(){return wa()})}function ba(){if(!ba.strings){var a={USER:"web_user",
LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:na},c;for(c in Aa)a[c]=Aa[c];var b=[];for(c in a)b.push(c+"="+a[c]);ba.strings=b}return ba.strings}function ma(k){function c(){if(!fa&&(fa=!0,!za)){Ba=!0;S(Ca);S(Da);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Ea.unshift(a.postRun.shift());
S(Ea)}}if(!(0<aa)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Fa.unshift(a.preRun.shift());S(Fa);0<aa||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);c()},1)):c())}}function p(){}function u(a){return(a||p).__cache__}function N(a,c){var b=u(c),d=b[a];if(d)return d;d=Object.create((c||p).prototype);d.ptr=a;return b[a]=d}function V(a){if("string"===typeof a){for(var c=0,b=0;b<a.length;++b){var d=a.charCodeAt(b);
55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++b)&1023);127>=d?++c:c=2047>=d?c+2:65535>=d?c+3:c+4}c=Array(c+1);b=0;d=c.length;if(0<d){d=b+d-1;for(var k=0;k<a.length;++k){var e=a.charCodeAt(k);if(55296<=e&&57343>=e){var f=a.charCodeAt(++k);e=65536+((e&1023)<<10)|f&1023}if(127>=e){if(b>=d)break;c[b++]=e}else{if(2047>=e){if(b+1>=d)break;c[b++]=192|e>>6}else{if(65535>=e){if(b+2>=d)break;c[b++]=224|e>>12}else{if(b+3>=d)break;c[b++]=240|e>>18;c[b++]=128|e>>12&63}c[b++]=128|e>>6&63}c[b++]=128|
e&63}}c[b]=0}a=n.alloc(c,T);n.copy(c,T,a)}return a}function x(){throw"cannot construct a Status, no constructor in IDL";}function A(){this.ptr=Oa();u(A)[this.ptr]=this}function B(){this.ptr=Pa();u(B)[this.ptr]=this}function C(){this.ptr=Qa();u(C)[this.ptr]=this}function D(){this.ptr=Ra();u(D)[this.ptr]=this}function E(){this.ptr=Sa();u(E)[this.ptr]=this}function q(){this.ptr=Ta();u(q)[this.ptr]=this}function J(){this.ptr=Ua();u(J)[this.ptr]=this}function w(){this.ptr=Va();u(w)[this.ptr]=this}function F(){this.ptr=
Wa();u(F)[this.ptr]=this}function r(){this.ptr=Xa();u(r)[this.ptr]=this}function G(){this.ptr=Ya();u(G)[this.ptr]=this}function H(){this.ptr=Za();u(H)[this.ptr]=this}function O(){this.ptr=$a();u(O)[this.ptr]=this}function K(){this.ptr=ab();u(K)[this.ptr]=this}function g(){this.ptr=bb();u(g)[this.ptr]=this}function y(){this.ptr=cb();u(y)[this.ptr]=this}function Q(){throw"cannot construct a VoidPtr, no constructor in IDL";}function I(){this.ptr=db();u(I)[this.ptr]=this}function L(){this.ptr=eb();u(L)[this.ptr]=
this}m=m||{};var a="undefined"!==typeof m?m:{},Ga=!1,Ha=!1;a.onRuntimeInitialized=function(){Ga=!0;if(Ha&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ha=!0;if(Ga&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3<a.length?!1:1==a[0]&&0<=a[1]&&3>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};var ha={},W;for(W in a)a.hasOwnProperty(W)&&(ha[W]=a[W]);var na="./this.program",
ea=!1,Z=!1,oa=!1,fb=!1,Ia=!1;ea="object"===typeof window;Z="function"===typeof importScripts;oa=(fb="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node)&&!ea&&!Z;Ia=!ea&&!oa&&!Z;var M="",pa,qa;if(oa){M=__dirname+"/";var ra=function(a,c){pa||(pa=require("fs"));qa||(qa=require("path"));a=qa.normalize(a);return pa.readFileSync(a,c?null:"utf8")};var la=function(a){a=ra(a,!0);a.buffer||(a=new Uint8Array(a));t(a.buffer);return a};1<process.argv.length&&
(na=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);process.on("uncaughtException",function(a){throw a;});process.on("unhandledRejection",z);a.inspect=function(){return"[Emscripten Module object]"}}else if(Ia)"undefined"!=typeof read&&(ra=function(a){return read(a)}),la=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");t("object"===typeof a);return a},"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,
console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(ea||Z)Z?M=self.location.href:document.currentScript&&(M=document.currentScript.src),f&&(M=f),M=0!==M.indexOf("blob:")?M.substr(0,M.lastIndexOf("/")+1):"",ra=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);return c.responseText},Z&&(la=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)});var ya=a.print||console.log.bind(console),
Y=a.printErr||console.warn.bind(console);for(W in ha)ha.hasOwnProperty(W)&&(a[W]=ha[W]);ha=null;a.thisProgram&&(na=a.thisProgram);var da;a.wasmBinary&&(da=a.wasmBinary);"object"!==typeof WebAssembly&&Y("no native wasm support detected");var ia,gb=new WebAssembly.Table({initial:381,maximum:381,element:"anyfunc"}),za=!1,xa="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");var T,ca,P,Ja=a.TOTAL_MEMORY||16777216;if(ia=a.wasmMemory?
a.wasmMemory:new WebAssembly.Memory({initial:Ja/65536}))var ka=ia.buffer;Ja=ka.byteLength;l(ka);P[4604]=5261456;var Fa=[],Ca=[],Da=[],Ea=[],Ba=!1,aa=0,sa=null,ja=null;a.preloadedImages={};a.preloadedAudios={};var U="draco_decoder.wasm";va(U)||(U=v(U));Ca.push({func:function(){hb()}});var Aa={},R={buffers:[null,[],[]],printChar:function(a,c){var b=R.buffers[a];0===c||10===c?((1===a?ya:Y)(h(b,0)),b.length=0):b.push(c)},varargs:0,get:function(a){R.varargs+=4;return P[R.varargs-4>>2]},getStr:function(){return X(R.get())},
get64:function(){var a=R.get();R.get();return a},getZero:function(){R.get()}},Ka={__cxa_allocate_exception:function(a){return ib(a)},__cxa_throw:function(a,c,b){"uncaught_exception"in ta?ta.uncaught_exceptions++:ta.uncaught_exceptions=1;throw a;},abort:function(){z()},emscripten_get_sbrk_ptr:function(){return 18416},emscripten_memcpy_big:function(a,c,b){ca.set(ca.subarray(c,c+b),a)},emscripten_resize_heap:function(a){if(2147418112<a)return!1;for(var c=Math.max(T.length,16777216);c<a;)c=536870912>=
c?e(2*c,65536):Math.min(e((3*c+2147483648)/4,65536),2147418112);a:{try{ia.grow(c-ka.byteLength+65535>>16);l(ia.buffer);var b=1;break a}catch(d){}b=void 0}return b?!0:!1},environ_get:function(a,c){var b=0;ba().forEach(function(d,e){var f=c+b;e=P[a+4*e>>2]=f;for(f=0;f<d.length;++f)T[e++>>0]=d.charCodeAt(f);T[e>>0]=0;b+=d.length+1});return 0},environ_sizes_get:function(a,c){var b=ba();P[a>>2]=b.length;var d=0;b.forEach(function(a){d+=a.length+1});P[c>>2]=d;return 0},fd_close:function(a){return 0},fd_seek:function(a,
c,b,d,e){return 0},fd_write:function(a,c,b,d){try{for(var e=0,f=0;f<b;f++){for(var g=P[c+8*f>>2],k=P[c+(8*f+4)>>2],h=0;h<k;h++)R.printChar(a,ca[g+h]);e+=k}P[d>>2]=e;return 0}catch(ua){return"undefined"!==typeof FS&&ua instanceof FS.ErrnoError||z(ua),ua.errno}},memory:ia,setTempRet0:function(a){},table:gb},La=function(){function e(c,b){a.asm=c.exports;aa--;a.monitorRunDependencies&&a.monitorRunDependencies(aa);0==aa&&(null!==sa&&(clearInterval(sa),sa=null),ja&&(c=ja,ja=null,c()))}function c(a){e(a.instance)}
function b(a){return Ma().then(function(a){return WebAssembly.instantiate(a,d)}).then(a,function(a){Y("failed to asynchronously prepare wasm: "+a);z(a)})}var d={env:Ka,wasi_unstable:Ka};aa++;a.monitorRunDependencies&&a.monitorRunDependencies(aa);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(Na){return Y("Module.instantiateWasm callback failed with error: "+Na),!1}(function(){if(da||"function"!==typeof WebAssembly.instantiateStreaming||va(U)||"function"!==typeof fetch)return b(c);fetch(U,
{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,d).then(c,function(a){Y("wasm streaming compile failed: "+a);Y("falling back to ArrayBuffer instantiation");b(c)})})})();return{}}();a.asm=La;var hb=a.___wasm_call_ctors=function(){return a.asm.__wasm_call_ctors.apply(null,arguments)},jb=a._emscripten_bind_Status_code_0=function(){return a.asm.emscripten_bind_Status_code_0.apply(null,arguments)},kb=a._emscripten_bind_Status_ok_0=function(){return a.asm.emscripten_bind_Status_ok_0.apply(null,
arguments)},lb=a._emscripten_bind_Status_error_msg_0=function(){return a.asm.emscripten_bind_Status_error_msg_0.apply(null,arguments)},mb=a._emscripten_bind_Status___destroy___0=function(){return a.asm.emscripten_bind_Status___destroy___0.apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_DracoUInt16Array_0.apply(null,arguments)},nb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt16Array_GetValue_1.apply(null,
arguments)},ob=a._emscripten_bind_DracoUInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_size_0.apply(null,arguments)},pb=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt16Array___destroy___0.apply(null,arguments)},Pa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm.emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},qb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm.emscripten_bind_PointCloud_num_attributes_0.apply(null,
arguments)},rb=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm.emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},sb=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm.emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Qa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_DracoUInt8Array_0.apply(null,arguments)},tb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt8Array_GetValue_1.apply(null,
arguments)},ub=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},vb=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},Ra=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_DracoUInt32Array_0.apply(null,arguments)},wb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt32Array_GetValue_1.apply(null,
arguments)},xb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_size_0.apply(null,arguments)},yb=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt32Array___destroy___0.apply(null,arguments)},Sa=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},zb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=
function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},Ab=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,arguments)},Bb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},Ta=a._emscripten_bind_PointAttribute_PointAttribute_0=
function(){return a.asm.emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Cb=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm.emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm.emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},Eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm.emscripten_bind_PointAttribute_attribute_type_0.apply(null,
arguments)},Fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm.emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},Gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm.emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm.emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_stride_0.apply(null,
arguments)},Jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Kb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm.emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},Lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm.emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Ua=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=
function(){return a.asm.emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},Mb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm.emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},Nb=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm.emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},Va=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=
function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},Ob=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},Pb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},
Qb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},Rb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},Sb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)},
Wa=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return a.asm.emscripten_bind_DracoInt8Array_DracoInt8Array_0.apply(null,arguments)},Tb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt8Array_GetValue_1.apply(null,arguments)},Ub=a._emscripten_bind_DracoInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoInt8Array_size_0.apply(null,arguments)},Vb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt8Array___destroy___0.apply(null,
arguments)},Xa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm.emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},Wb=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Xb=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Yb=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=
function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntryArray_3.apply(null,arguments)},Zb=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},$b=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm.emscripten_bind_MetadataQuerier_NumEntries_1.apply(null,
arguments)},bc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm.emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},Ya=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return a.asm.emscripten_bind_DracoInt16Array_DracoInt16Array_0.apply(null,arguments)},dc=a._emscripten_bind_DracoInt16Array_GetValue_1=
function(){return a.asm.emscripten_bind_DracoInt16Array_GetValue_1.apply(null,arguments)},ec=a._emscripten_bind_DracoInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoInt16Array_size_0.apply(null,arguments)},fc=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt16Array___destroy___0.apply(null,arguments)},Za=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null,
arguments)},gc=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},hc=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},ic=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},$a=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm.emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,
arguments)},jc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm.emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},ab=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm.emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},kc=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm.emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},lc=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm.emscripten_bind_DecoderBuffer___destroy___0.apply(null,
arguments)},bb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm.emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return a.asm.emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},nc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},oc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null,
arguments)},pc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttribute_2=
function(){return a.asm.emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm.emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null,
arguments)},wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm.emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm.emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt16Array_3.apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=
function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt32Array_3.apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null,
arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3.apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3.apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3.apply(null,arguments)},
Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3.apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3.apply(null,arguments)},Jc=
a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return a.asm.emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5.apply(null,arguments)},Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm.emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},Lc=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm.emscripten_bind_Decoder___destroy___0.apply(null,arguments)},cb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm.emscripten_bind_Mesh_Mesh_0.apply(null,
arguments)},Mc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm.emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},Nc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm.emscripten_bind_Mesh_num_attributes_0.apply(null,arguments)},Oc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm.emscripten_bind_Mesh_num_points_0.apply(null,arguments)},Pc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm.emscripten_bind_Mesh___destroy___0.apply(null,arguments)},
Qc=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm.emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},db=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm.emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,arguments)},Rc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},Sc=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoInt32Array_size_0.apply(null,
arguments)},Tc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},eb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm.emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},Uc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm.emscripten_bind_Metadata___destroy___0.apply(null,arguments)},Vc=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm.emscripten_enum_draco_StatusCode_OK.apply(null,
arguments)},Wc=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_DRACO_ERROR.apply(null,arguments)},Xc=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},Yc=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm.emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Zc=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=
function(){return a.asm.emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)},$c=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm.emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return a.asm.emscripten_enum_draco_DataType_DT_INVALID.apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT8.apply(null,
arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT8.apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT16.apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT16.apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT32.apply(null,
arguments)},gd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT32.apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT64.apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT64.apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT32.apply(null,
arguments)},kd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT64.apply(null,arguments)},ld=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return a.asm.emscripten_enum_draco_DataType_DT_BOOL.apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return a.asm.emscripten_enum_draco_DataType_DT_TYPES_COUNT.apply(null,arguments)},nd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,
arguments)},od=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},pd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},qd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,
arguments)},rd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},sd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},td=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,
arguments)},ud=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},vd=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},wd=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},xd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=
function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},yd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},zd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)};a._setThrew=function(){return a.asm.setThrew.apply(null,arguments)};var ta=a.__ZSt18uncaught_exceptionv=
function(){return a.asm._ZSt18uncaught_exceptionv.apply(null,arguments)};a._free=function(){return a.asm.free.apply(null,arguments)};var ib=a._malloc=function(){return a.asm.malloc.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.__growWasmMemory=function(){return a.asm.__growWasmMemory.apply(null,arguments)};
a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)};
a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_iidiiii=function(){return a.asm.dynCall_iidiiii.apply(null,arguments)};a.dynCall_jiji=function(){return a.asm.dynCall_jiji.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.asm=La;var fa;a.then=function(e){if(fa)e(a);
else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();e(a)}}return a};ja=function c(){fa||ma();fa||(ja=c)};a.run=ma;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();ma();p.prototype=Object.create(p.prototype);p.prototype.constructor=p;p.prototype.__class__=p;p.__cache__={};a.WrapperObject=p;a.getCache=u;a.wrapPointer=N;a.castObject=function(a,b){return N(a.ptr,b)};a.NULL=N(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";
a.__destroy__();delete u(a.__class__)[a.ptr]};a.compare=function(a,b){return a.ptr===b.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var n={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(n.needed){for(var c=0;c<n.temps.length;c++)a._free(n.temps[c]);n.temps.length=0;a._free(n.buffer);n.buffer=0;n.size+=n.needed;n.needed=0}n.buffer||(n.size+=128,n.buffer=a._malloc(n.size),t(n.buffer));n.pos=0},alloc:function(c,b){t(n.buffer);c=c.length*b.BYTES_PER_ELEMENT;
c=c+7&-8;n.pos+c>=n.size?(t(0<c),n.needed+=c,b=a._malloc(c),n.temps.push(b)):(b=n.buffer+n.pos,n.pos+=c);return b},copy:function(a,b,d){switch(b.BYTES_PER_ELEMENT){case 2:d>>=1;break;case 4:d>>=2;break;case 8:d>>=3}for(var c=0;c<a.length;c++)b[d+c]=a[c]}};x.prototype=Object.create(p.prototype);x.prototype.constructor=x;x.prototype.__class__=x;x.__cache__={};a.Status=x;x.prototype.code=x.prototype.code=function(){return jb(this.ptr)};x.prototype.ok=x.prototype.ok=function(){return!!kb(this.ptr)};x.prototype.error_msg=
x.prototype.error_msg=function(){return X(lb(this.ptr))};x.prototype.__destroy__=x.prototype.__destroy__=function(){mb(this.ptr)};A.prototype=Object.create(p.prototype);A.prototype.constructor=A;A.prototype.__class__=A;A.__cache__={};a.DracoUInt16Array=A;A.prototype.GetValue=A.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return nb(c,a)};A.prototype.size=A.prototype.size=function(){return ob(this.ptr)};A.prototype.__destroy__=A.prototype.__destroy__=function(){pb(this.ptr)};
B.prototype=Object.create(p.prototype);B.prototype.constructor=B;B.prototype.__class__=B;B.__cache__={};a.PointCloud=B;B.prototype.num_attributes=B.prototype.num_attributes=function(){return qb(this.ptr)};B.prototype.num_points=B.prototype.num_points=function(){return rb(this.ptr)};B.prototype.__destroy__=B.prototype.__destroy__=function(){sb(this.ptr)};C.prototype=Object.create(p.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.DracoUInt8Array=C;C.prototype.GetValue=
C.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return tb(c,a)};C.prototype.size=C.prototype.size=function(){return ub(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){vb(this.ptr)};D.prototype=Object.create(p.prototype);D.prototype.constructor=D;D.prototype.__class__=D;D.__cache__={};a.DracoUInt32Array=D;D.prototype.GetValue=D.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return wb(c,a)};D.prototype.size=D.prototype.size=
function(){return xb(this.ptr)};D.prototype.__destroy__=D.prototype.__destroy__=function(){yb(this.ptr)};E.prototype=Object.create(p.prototype);E.prototype.constructor=E;E.prototype.__class__=E;E.__cache__={};a.AttributeOctahedronTransform=E;E.prototype.InitFromAttribute=E.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!zb(c,a)};E.prototype.quantization_bits=E.prototype.quantization_bits=function(){return Ab(this.ptr)};E.prototype.__destroy__=E.prototype.__destroy__=
function(){Bb(this.ptr)};q.prototype=Object.create(p.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.PointAttribute=q;q.prototype.size=q.prototype.size=function(){return Cb(this.ptr)};q.prototype.GetAttributeTransformData=q.prototype.GetAttributeTransformData=function(){return N(Db(this.ptr),J)};q.prototype.attribute_type=q.prototype.attribute_type=function(){return Eb(this.ptr)};q.prototype.data_type=q.prototype.data_type=function(){return Fb(this.ptr)};q.prototype.num_components=
q.prototype.num_components=function(){return Gb(this.ptr)};q.prototype.normalized=q.prototype.normalized=function(){return!!Hb(this.ptr)};q.prototype.byte_stride=q.prototype.byte_stride=function(){return Ib(this.ptr)};q.prototype.byte_offset=q.prototype.byte_offset=function(){return Jb(this.ptr)};q.prototype.unique_id=q.prototype.unique_id=function(){return Kb(this.ptr)};q.prototype.__destroy__=q.prototype.__destroy__=function(){Lb(this.ptr)};J.prototype=Object.create(p.prototype);J.prototype.constructor=
J;J.prototype.__class__=J;J.__cache__={};a.AttributeTransformData=J;J.prototype.transform_type=J.prototype.transform_type=function(){return Mb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){Nb(this.ptr)};w.prototype=Object.create(p.prototype);w.prototype.constructor=w;w.prototype.__class__=w;w.__cache__={};a.AttributeQuantizationTransform=w;w.prototype.InitFromAttribute=w.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!Ob(c,a)};
w.prototype.quantization_bits=w.prototype.quantization_bits=function(){return Pb(this.ptr)};w.prototype.min_value=w.prototype.min_value=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Qb(c,a)};w.prototype.range=w.prototype.range=function(){return Rb(this.ptr)};w.prototype.__destroy__=w.prototype.__destroy__=function(){Sb(this.ptr)};F.prototype=Object.create(p.prototype);F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.DracoInt8Array=F;F.prototype.GetValue=F.prototype.GetValue=
function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Tb(c,a)};F.prototype.size=F.prototype.size=function(){return Ub(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){Vb(this.ptr)};r.prototype=Object.create(p.prototype);r.prototype.constructor=r;r.prototype.__class__=r;r.__cache__={};a.MetadataQuerier=r;r.prototype.HasEntry=r.prototype.HasEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return!!Wb(c,
a,b)};r.prototype.GetIntEntry=r.prototype.GetIntEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return Xb(c,a,b)};r.prototype.GetIntEntryArray=r.prototype.GetIntEntryArray=function(a,b,d){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);d&&"object"===typeof d&&(d=d.ptr);Yb(c,a,b,d)};r.prototype.GetDoubleEntry=r.prototype.GetDoubleEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===
typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return Zb(c,a,b)};r.prototype.GetStringEntry=r.prototype.GetStringEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return X($b(c,a,b))};r.prototype.NumEntries=r.prototype.NumEntries=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ac(c,a)};r.prototype.GetEntryName=r.prototype.GetEntryName=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===
typeof b&&(b=b.ptr);return X(bc(c,a,b))};r.prototype.__destroy__=r.prototype.__destroy__=function(){cc(this.ptr)};G.prototype=Object.create(p.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.DracoInt16Array=G;G.prototype.GetValue=G.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return dc(c,a)};G.prototype.size=G.prototype.size=function(){return ec(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){fc(this.ptr)};H.prototype=
Object.create(p.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoFloat32Array=H;H.prototype.GetValue=H.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return gc(c,a)};H.prototype.size=H.prototype.size=function(){return hc(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){ic(this.ptr)};O.prototype=Object.create(p.prototype);O.prototype.constructor=O;O.prototype.__class__=O;O.__cache__={};a.GeometryAttribute=O;O.prototype.__destroy__=
O.prototype.__destroy__=function(){jc(this.ptr)};K.prototype=Object.create(p.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DecoderBuffer=K;K.prototype.Init=K.prototype.Init=function(a,b){var c=this.ptr;n.prepare();if("object"==typeof a&&"object"===typeof a){var e=n.alloc(a,T);n.copy(a,T,e);a=e}b&&"object"===typeof b&&(b=b.ptr);kc(c,a,b)};K.prototype.__destroy__=K.prototype.__destroy__=function(){lc(this.ptr)};g.prototype=Object.create(p.prototype);g.prototype.constructor=
g;g.prototype.__class__=g;g.__cache__={};a.Decoder=g;g.prototype.GetEncodedGeometryType=g.prototype.GetEncodedGeometryType=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return mc(c,a)};g.prototype.DecodeBufferToPointCloud=g.prototype.DecodeBufferToPointCloud=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return N(nc(c,a,b),x)};g.prototype.DecodeBufferToMesh=g.prototype.DecodeBufferToMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&
(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return N(oc(c,a,b),x)};g.prototype.GetAttributeId=g.prototype.GetAttributeId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return pc(c,a,b)};g.prototype.GetAttributeIdByName=g.prototype.GetAttributeIdByName=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return qc(c,a,b)};g.prototype.GetAttributeIdByMetadataEntry=g.prototype.GetAttributeIdByMetadataEntry=
function(a,b,d){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);d=d&&"object"===typeof d?d.ptr:V(d);return rc(c,a,b,d)};g.prototype.GetAttribute=g.prototype.GetAttribute=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return N(sc(c,a,b),q)};g.prototype.GetAttributeByUniqueId=g.prototype.GetAttributeByUniqueId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);
return N(tc(c,a,b),q)};g.prototype.GetMetadata=g.prototype.GetMetadata=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return N(uc(c,a),L)};g.prototype.GetAttributeMetadata=g.prototype.GetAttributeMetadata=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return N(vc(c,a,b),L)};g.prototype.GetFaceFromMesh=g.prototype.GetFaceFromMesh=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===
typeof d&&(d=d.ptr);return!!wc(c,a,b,d)};g.prototype.GetTriangleStripsFromMesh=g.prototype.GetTriangleStripsFromMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return xc(c,a,b)};g.prototype.GetTrianglesUInt16Array=g.prototype.GetTrianglesUInt16Array=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!yc(c,a,b,d)};g.prototype.GetTrianglesUInt32Array=g.prototype.GetTrianglesUInt32Array=
function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!zc(c,a,b,d)};g.prototype.GetAttributeFloat=g.prototype.GetAttributeFloat=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ac(c,a,b,d)};g.prototype.GetAttributeFloatForAllPoints=g.prototype.GetAttributeFloatForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&
(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Bc(c,a,b,d)};g.prototype.GetAttributeIntForAllPoints=g.prototype.GetAttributeIntForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Cc(c,a,b,d)};g.prototype.GetAttributeInt8ForAllPoints=g.prototype.GetAttributeInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&
(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Dc(c,a,b,d)};g.prototype.GetAttributeUInt8ForAllPoints=g.prototype.GetAttributeUInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ec(c,a,b,d)};g.prototype.GetAttributeInt16ForAllPoints=g.prototype.GetAttributeInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&
(d=d.ptr);return!!Fc(c,a,b,d)};g.prototype.GetAttributeUInt16ForAllPoints=g.prototype.GetAttributeUInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Gc(c,a,b,d)};g.prototype.GetAttributeInt32ForAllPoints=g.prototype.GetAttributeInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hc(c,
a,b,d)};g.prototype.GetAttributeUInt32ForAllPoints=g.prototype.GetAttributeUInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ic(c,a,b,d)};g.prototype.GetAttributeDataArrayForAllPoints=g.prototype.GetAttributeDataArrayForAllPoints=function(a,b,d,e,f){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&
(e=e.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Jc(c,a,b,d,e,f)};g.prototype.SkipAttributeTransform=g.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Kc(b,a)};g.prototype.__destroy__=g.prototype.__destroy__=function(){Lc(this.ptr)};y.prototype=Object.create(p.prototype);y.prototype.constructor=y;y.prototype.__class__=y;y.__cache__={};a.Mesh=y;y.prototype.num_faces=y.prototype.num_faces=function(){return Mc(this.ptr)};y.prototype.num_attributes=y.prototype.num_attributes=
function(){return Nc(this.ptr)};y.prototype.num_points=y.prototype.num_points=function(){return Oc(this.ptr)};y.prototype.__destroy__=y.prototype.__destroy__=function(){Pc(this.ptr)};Q.prototype=Object.create(p.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.VoidPtr=Q;Q.prototype.__destroy__=Q.prototype.__destroy__=function(){Qc(this.ptr)};I.prototype=Object.create(p.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoInt32Array=I;I.prototype.GetValue=
I.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Rc(b,a)};I.prototype.size=I.prototype.size=function(){return Sc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Tc(this.ptr)};L.prototype=Object.create(p.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.Metadata=L;L.prototype.__destroy__=L.prototype.__destroy__=function(){Uc(this.ptr)};(function(){function c(){a.OK=Vc();a.DRACO_ERROR=Wc();a.IO_ERROR=Xc();a.INVALID_PARAMETER=
Yc();a.UNSUPPORTED_VERSION=Zc();a.UNKNOWN_VERSION=$c();a.DT_INVALID=ad();a.DT_INT8=bd();a.DT_UINT8=cd();a.DT_INT16=dd();a.DT_UINT16=ed();a.DT_INT32=fd();a.DT_UINT32=gd();a.DT_INT64=hd();a.DT_UINT64=id();a.DT_FLOAT32=jd();a.DT_FLOAT64=kd();a.DT_BOOL=ld();a.DT_TYPES_COUNT=md();a.INVALID_GEOMETRY_TYPE=nd();a.POINT_CLOUD=od();a.TRIANGULAR_MESH=pd();a.ATTRIBUTE_INVALID_TRANSFORM=qd();a.ATTRIBUTE_NO_TRANSFORM=rd();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=sd();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=td();a.INVALID=ud();
a.POSITION=vd();a.NORMAL=wd();a.COLOR=xd();a.TEX_COORD=yd();a.GENERIC=zd()}Ba?c():Da.unshift(c)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return m}}();"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(e){var l=0;return function(){return l<e.length?{done:!1,value:e[l++]}:{done:!0}}};$jscomp.arrayIterator=function(e){return{next:$jscomp.arrayIteratorImpl(e)}};$jscomp.makeIterator=function(e){var l="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return l?l.call(e):$jscomp.arrayIterator(e)};
$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(e,l,m){e!=Array.prototype&&e!=Object.prototype&&(e[l]=m.value)};
$jscomp.polyfill=function(e,l,m,n){if(l){m=$jscomp.global;e=e.split(".");for(n=0;n<e.length-1;n++){var f=e[n];f in m||(m[f]={});m=m[f]}e=e[e.length-1];n=m[e];l=l(n);l!=n&&null!=l&&$jscomp.defineProperty(m,e,{configurable:!0,writable:!0,value:l})}};$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.polyfill("Promise",function(e){function l(){this.batch_=null}function m(h){return h instanceof f?h:new f(function(f,e){f(h)})}if(e&&!$jscomp.FORCE_POLYFILL_PROMISE)return e;l.prototype.asyncExecute=function(h){if(null==this.batch_){this.batch_=[];var f=this;this.asyncExecuteFunction(function(){f.executeBatch_()})}this.batch_.push(h)};var n=$jscomp.global.setTimeout;l.prototype.asyncExecuteFunction=function(h){n(h,0)};l.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var h=
this.batch_;this.batch_=[];for(var f=0;f<h.length;++f){var e=h[f];h[f]=null;try{e()}catch(U){this.asyncThrow_(U)}}}this.batch_=null};l.prototype.asyncThrow_=function(h){this.asyncExecuteFunction(function(){throw h;})};var f=function(h){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var f=this.createResolveAndReject_();try{h(f.resolve,f.reject)}catch(A){f.reject(A)}};f.prototype.createResolveAndReject_=function(){function f(f){return function(h){m||(m=!0,f.call(e,h))}}var e=this,m=!1;
return{resolve:f(this.resolveTo_),reject:f(this.reject_)}};f.prototype.resolveTo_=function(h){if(h===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(h instanceof f)this.settleSameAsPromise_(h);else{a:switch(typeof h){case "object":var e=null!=h;break a;case "function":e=!0;break a;default:e=!1}e?this.resolveToNonPromiseObj_(h):this.fulfill_(h)}};f.prototype.resolveToNonPromiseObj_=function(f){var h=void 0;try{h=f.then}catch(A){this.reject_(A);return}"function"==typeof h?
this.settleSameAsThenable_(h,f):this.fulfill_(f)};f.prototype.reject_=function(f){this.settle_(2,f)};f.prototype.fulfill_=function(f){this.settle_(1,f)};f.prototype.settle_=function(f,e){if(0!=this.state_)throw Error("Cannot settle("+f+", "+e+"): Promise already settled in state"+this.state_);this.state_=f;this.result_=e;this.executeOnSettledCallbacks_()};f.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var f=0;f<this.onSettledCallbacks_.length;++f)B.asyncExecute(this.onSettledCallbacks_[f]);
this.onSettledCallbacks_=null}};var B=new l;f.prototype.settleSameAsPromise_=function(f){var e=this.createResolveAndReject_();f.callWhenSettled_(e.resolve,e.reject)};f.prototype.settleSameAsThenable_=function(f,e){var m=this.createResolveAndReject_();try{f.call(e,m.resolve,m.reject)}catch(U){m.reject(U)}};f.prototype.then=function(e,m){function h(f,e){return"function"==typeof f?function(e){try{l(f(e))}catch(X){n(X)}}:e}var l,n,B=new f(function(f,e){l=f;n=e});this.callWhenSettled_(h(e,l),h(m,n));return B};
f.prototype.catch=function(f){return this.then(void 0,f)};f.prototype.callWhenSettled_=function(f,e){function m(){switch(h.state_){case 1:f(h.result_);break;case 2:e(h.result_);break;default:throw Error("Unexpected state: "+h.state_);}}var h=this;null==this.onSettledCallbacks_?B.asyncExecute(m):this.onSettledCallbacks_.push(m)};f.resolve=m;f.reject=function(e){return new f(function(f,m){m(e)})};f.race=function(e){return new f(function(f,h){for(var l=$jscomp.makeIterator(e),n=l.next();!n.done;n=l.next())m(n.value).callWhenSettled_(f,
h)})};f.all=function(e){var l=$jscomp.makeIterator(e),h=l.next();return h.done?m([]):new f(function(f,e){function n(e){return function(m){B[e]=m;A--;0==A&&f(B)}}var B=[],A=0;do B.push(void 0),A++,m(h.value).callWhenSettled_(n(B.length-1),e),h=l.next();while(!h.done)})};return f},"es6","es3");$jscomp.checkEs6ConformanceViaProxy=function(){try{var e={},l=Object.create(new $jscomp.global.Proxy(e,{get:function(m,n,f){return m==e&&"q"==n&&f==l}}));return!0===l.q}catch(m){return!1}};
$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.owns=function(e,l){return Object.prototype.hasOwnProperty.call(e,l)};
$jscomp.polyfill("Array.prototype.copyWithin",function(e){function l(e){e=Number(e);return Infinity===e||-Infinity===e?e:e|0}return e?e:function(e,n,f){var m=this.length;e=l(e);n=l(n);f=void 0===f?m:l(f);e=0>e?Math.max(m+e,0):Math.min(e,m);n=0>n?Math.max(m+n,0):Math.min(n,m);f=0>f?Math.max(m+f,0):Math.min(f,m);if(e<n)for(;n<f;)n in this?this[e++]=this[n++]:(delete this[e++],n++);else for(f=Math.min(f,m+n-e),e+=f-n;f>n;)--f in this?this[--e]=this[f]:delete this[--e];return this}},"es6","es3");
var DracoDecoderModule=function(){var e="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(e=e||__filename);return function(l){function m(k){return a.locateFile?a.locateFile(k,P):P+k}function n(a,c){a||A("Assertion failed: "+c)}function f(a,c,b){var d=c+b;for(b=c;a[b]&&!(b>=d);)++b;if(16<b-c&&a.subarray&&za)return za.decode(a.subarray(c,b));for(d="";c<b;){var k=a[c++];if(k&128){var e=a[c++]&63;if(192==(k&224))d+=String.fromCharCode((k&
31)<<6|e);else{var f=a[c++]&63;k=224==(k&240)?(k&15)<<12|e<<6|f:(k&7)<<18|e<<12|f<<6|a[c++]&63;65536>k?d+=String.fromCharCode(k):(k-=65536,d+=String.fromCharCode(55296|k>>10,56320|k&1023))}}else d+=String.fromCharCode(k)}return d}function B(a,c){return a?f(ba,a,c):""}function h(a,c){0<a%c&&(a+=c-a%c);return a}function xa(k){ka=k;a.HEAP8=Q=new Int8Array(k);a.HEAP16=new Int16Array(k);a.HEAP32=x=new Int32Array(k);a.HEAPU8=ba=new Uint8Array(k);a.HEAPU16=new Uint16Array(k);a.HEAPU32=new Uint32Array(k);
a.HEAPF32=new Float32Array(k);a.HEAPF64=new Float64Array(k)}function A(k){if(a.onAbort)a.onAbort(k);k+="";aa(k);Aa=!0;k=new WebAssembly.RuntimeError("abort("+k+"). Build with -s ASSERTIONS=1 for more info.");Ba(k);throw k;}function U(a,c){return String.prototype.startsWith?a.startsWith(c):0===a.indexOf(c)}function ya(){try{if(ca)return new Uint8Array(ca);if(la)return la(R);throw"both async and sync fetching of the wasm failed";}catch(k){A(k)}}function Bd(){return ca||!ma&&!Y||"function"!==typeof fetch||
U(R,"file://")?Promise.resolve().then(ya):fetch(R,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+R+"'";return a.arrayBuffer()}).catch(function(){return ya()})}function ia(k){for(;0<k.length;){var c=k.shift();if("function"==typeof c)c(a);else{var b=c.func;"number"===typeof b?void 0===c.arg?oa.get(b)():oa.get(b)(c.arg):b(void 0===c.arg?null:c.arg)}}}function Ad(a){this.excPtr=a;this.ptr=a-y.SIZE;this.set_type=function(a){x[this.ptr+y.TYPE_OFFSET>>
2]=a};this.get_type=function(){return x[this.ptr+y.TYPE_OFFSET>>2]};this.set_destructor=function(a){x[this.ptr+y.DESTRUCTOR_OFFSET>>2]=a};this.get_destructor=function(){return x[this.ptr+y.DESTRUCTOR_OFFSET>>2]};this.set_refcount=function(a){x[this.ptr+y.REFCOUNT_OFFSET>>2]=a};this.set_caught=function(a){Q[this.ptr+y.CAUGHT_OFFSET>>0]=a?1:0};this.get_caught=function(){return 0!=Q[this.ptr+y.CAUGHT_OFFSET>>0]};this.set_rethrown=function(a){Q[this.ptr+y.RETHROWN_OFFSET>>0]=a?1:0};this.get_rethrown=
function(){return 0!=Q[this.ptr+y.RETHROWN_OFFSET>>0]};this.init=function(a,b){this.set_type(a);this.set_destructor(b);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){x[this.ptr+y.REFCOUNT_OFFSET>>2]+=1};this.release_ref=function(){var a=x[this.ptr+y.REFCOUNT_OFFSET>>2];x[this.ptr+y.REFCOUNT_OFFSET>>2]=a-1;return 1===a}}function ja(){return 0<ja.uncaught_exceptions}function X(){if(!X.strings){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",
LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:pa||"./this.program"},c;for(c in Ca)a[c]=Ca[c];var b=[];for(c in a)b.push(c+"="+a[c]);X.strings=b}return X.strings}function qa(k){function c(){if(!na&&(na=!0,a.calledRun=!0,!Aa)){Da=!0;ia(Ea);ia(Fa);Ga(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Ha.unshift(a.postRun.shift());ia(Ha)}}if(!(0<
Z)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Ia.unshift(a.preRun.shift());ia(Ia);0<Z||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);c()},1)):c())}}function q(){}function u(a){return(a||q).__cache__}function M(a,c){var b=u(c),d=b[a];if(d)return d;d=Object.create((c||q).prototype);d.ptr=a;return b[a]=d}function V(a){if("string"===typeof a){for(var c=0,b=0;b<a.length;++b){var d=a.charCodeAt(b);55296<=
d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++b)&1023);127>=d?++c:c=2047>=d?c+2:65535>=d?c+3:c+4}c=Array(c+1);b=0;d=c.length;if(0<d){d=b+d-1;for(var k=0;k<a.length;++k){var e=a.charCodeAt(k);if(55296<=e&&57343>=e){var f=a.charCodeAt(++k);e=65536+((e&1023)<<10)|f&1023}if(127>=e){if(b>=d)break;c[b++]=e}else{if(2047>=e){if(b+1>=d)break;c[b++]=192|e>>6}else{if(65535>=e){if(b+2>=d)break;c[b++]=224|e>>12}else{if(b+3>=d)break;c[b++]=240|e>>18;c[b++]=128|e>>12&63}c[b++]=128|e>>6&63}c[b++]=128|e&63}}c[b]=
0}a=p.alloc(c,Q);p.copy(c,Q,a)}return a}function ra(a){if("object"===typeof a){var c=p.alloc(a,Q);p.copy(a,Q,c);return c}return a}function T(){throw"cannot construct a VoidPtr, no constructor in IDL";}function N(){this.ptr=Ja();u(N)[this.ptr]=this}function L(){this.ptr=Ka();u(L)[this.ptr]=this}function S(){this.ptr=La();u(S)[this.ptr]=this}function r(){this.ptr=Ma();u(r)[this.ptr]=this}function w(){this.ptr=Na();u(w)[this.ptr]=this}function C(){this.ptr=Oa();u(C)[this.ptr]=this}function D(){this.ptr=
Pa();u(D)[this.ptr]=this}function z(){this.ptr=Qa();u(z)[this.ptr]=this}function O(){this.ptr=Ra();u(O)[this.ptr]=this}function v(){throw"cannot construct a Status, no constructor in IDL";}function E(){this.ptr=Sa();u(E)[this.ptr]=this}function F(){this.ptr=Ta();u(F)[this.ptr]=this}function G(){this.ptr=Ua();u(G)[this.ptr]=this}function H(){this.ptr=Va();u(H)[this.ptr]=this}function I(){this.ptr=Wa();u(I)[this.ptr]=this}function J(){this.ptr=Xa();u(J)[this.ptr]=this}function K(){this.ptr=Ya();u(K)[this.ptr]=
this}function t(){this.ptr=Za();u(t)[this.ptr]=this}function g(){this.ptr=$a();u(g)[this.ptr]=this}l=l||{};var a="undefined"!==typeof l?l:{},Ga,Ba;a.ready=new Promise(function(a,c){Ga=a;Ba=c});var ab=!1,bb=!1;a.onRuntimeInitialized=function(){ab=!0;if(bb&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){bb=!0;if(ab&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>
a.length||3<a.length?!1:1==a[0]&&0<=a[1]&&3>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};var da={},W;for(W in a)a.hasOwnProperty(W)&&(da[W]=a[W]);var pa="./this.program",ma=!1,Y=!1,sa=!1,cb=!1;ma="object"===typeof window;Y="function"===typeof importScripts;sa="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;cb=!ma&&!sa&&!Y;var P="",ta,ua;if(sa){P=Y?require("path").dirname(P)+"/":__dirname+"/";var va=function(a,c){ta||(ta=require("fs"));ua||(ua=require("path"));
a=ua.normalize(a);return ta.readFileSync(a,c?null:"utf8")};var la=function(a){a=va(a,!0);a.buffer||(a=new Uint8Array(a));n(a.buffer);return a};1<process.argv.length&&(pa=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);process.on("uncaughtException",function(a){throw a;});process.on("unhandledRejection",A);a.inspect=function(){return"[Emscripten Module object]"}}else if(cb)"undefined"!=typeof read&&(va=function(a){return read(a)}),la=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));
a=read(a,"binary");n("object"===typeof a);return a},"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(ma||Y)Y?P=self.location.href:document.currentScript&&(P=document.currentScript.src),e&&(P=e),P=0!==P.indexOf("blob:")?P.substr(0,P.lastIndexOf("/")+1):"",va=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);return c.responseText},Y&&(la=function(a){var c=new XMLHttpRequest;
c.open("GET",a,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)});var Dd=a.print||console.log.bind(console),aa=a.printErr||console.warn.bind(console);for(W in da)da.hasOwnProperty(W)&&(a[W]=da[W]);da=null;a.thisProgram&&(pa=a.thisProgram);var ca;a.wasmBinary&&(ca=a.wasmBinary);"object"!==typeof WebAssembly&&A("no native wasm support detected");var ea,oa,Aa=!1,za="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");
var Q,ba,x,db=a.INITIAL_MEMORY||16777216;if(ea=a.wasmMemory?a.wasmMemory:new WebAssembly.Memory({initial:db/65536,maximum:32768}))var ka=ea.buffer;db=ka.byteLength;xa(ka);var Ia=[],Ea=[],Fa=[],Ha=[],Da=!1,Z=0,wa=null,fa=null;a.preloadedImages={};a.preloadedAudios={};var R="draco_decoder.wasm";U(R,"data:application/octet-stream;base64,")||(R=m(R));var y={DESTRUCTOR_OFFSET:0,REFCOUNT_OFFSET:4,TYPE_OFFSET:8,CAUGHT_OFFSET:12,RETHROWN_OFFSET:13,SIZE:16},Ca={},ha={mappings:{},buffers:[null,[],[]],printChar:function(a,
c){var b=ha.buffers[a];0===c||10===c?((1===a?Dd:aa)(f(b,0)),b.length=0):b.push(c)},varargs:void 0,get:function(){ha.varargs+=4;return x[ha.varargs-4>>2]},getStr:function(a){return B(a)},get64:function(a,c){return a}};Ea.push({func:function(){eb()}});var gb={__cxa_allocate_exception:function(a){return fb(a+y.SIZE)+y.SIZE},__cxa_throw:function(a,c,b){(new Ad(a)).init(c,b);"uncaught_exception"in ja?ja.uncaught_exceptions++:ja.uncaught_exceptions=1;throw a;},abort:function(){A()},array_bounds_check_error:function(a,
c){throw"Array index "+a+" out of bounds: [0,"+c+")";},emscripten_memcpy_big:function(a,c,b){ba.copyWithin(a,c,c+b)},emscripten_resize_heap:function(a){a>>>=0;var c=ba.length;if(2147483648<a)return!1;for(var b=1;4>=b;b*=2){var d=c*(1+.2/b);d=Math.min(d,a+100663296);d=Math.min(2147483648,h(Math.max(16777216,a,d),65536));a:{try{ea.grow(d-ka.byteLength+65535>>>16);xa(ea.buffer);var e=1;break a}catch(Ed){}e=void 0}if(e)return!0}return!1},environ_get:function(a,c){var b=0;X().forEach(function(d,e){var f=
c+b;e=x[a+4*e>>2]=f;for(f=0;f<d.length;++f)Q[e++>>0]=d.charCodeAt(f);Q[e>>0]=0;b+=d.length+1});return 0},environ_sizes_get:function(a,c){var b=X();x[a>>2]=b.length;var d=0;b.forEach(function(a){d+=a.length+1});x[c>>2]=d;return 0},fd_close:function(a){return 0},fd_seek:function(a,c,b,d,e){},fd_write:function(a,c,b,d){for(var e=0,f=0;f<b;f++){for(var g=x[c+8*f>>2],k=x[c+(8*f+4)>>2],h=0;h<k;h++)ha.printChar(a,ba[g+h]);e+=k}x[d>>2]=e;return 0},memory:ea,setTempRet0:function(a){}};(function(){function e(c,
b){a.asm=c.exports;oa=a.asm.__indirect_function_table;Z--;a.monitorRunDependencies&&a.monitorRunDependencies(Z);0==Z&&(null!==wa&&(clearInterval(wa),wa=null),fa&&(c=fa,fa=null,c()))}function c(a){e(a.instance)}function b(a){return Bd().then(function(a){return WebAssembly.instantiate(a,d)}).then(a,function(a){aa("failed to asynchronously prepare wasm: "+a);A(a)})}var d={env:gb,wasi_snapshot_preview1:gb};Z++;a.monitorRunDependencies&&a.monitorRunDependencies(Z);if(a.instantiateWasm)try{return a.instantiateWasm(d,
e)}catch(Cd){return aa("Module.instantiateWasm callback failed with error: "+Cd),!1}(function(){if(ca||"function"!==typeof WebAssembly.instantiateStreaming||U(R,"data:application/octet-stream;base64,")||U(R,"file://")||"function"!==typeof fetch)return b(c);fetch(R,{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,d).then(c,function(a){aa("wasm streaming compile failed: "+a);aa("falling back to ArrayBuffer instantiation");return b(c)})})})();return{}})();var eb=
a.___wasm_call_ctors=function(){return(eb=a.___wasm_call_ctors=a.asm.__wasm_call_ctors).apply(null,arguments)};a.___em_js__array_bounds_check_error=function(){return(a.___em_js__array_bounds_check_error=a.asm.__em_js__array_bounds_check_error).apply(null,arguments)};var hb=a._emscripten_bind_VoidPtr___destroy___0=function(){return(hb=a._emscripten_bind_VoidPtr___destroy___0=a.asm.emscripten_bind_VoidPtr___destroy___0).apply(null,arguments)},Ja=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(Ja=
a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.emscripten_bind_DecoderBuffer_DecoderBuffer_0).apply(null,arguments)},ib=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(ib=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.emscripten_bind_DecoderBuffer_Init_2).apply(null,arguments)},jb=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return(jb=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.emscripten_bind_DecoderBuffer___destroy___0).apply(null,arguments)},Ka=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=
function(){return(Ka=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=a.asm.emscripten_bind_AttributeTransformData_AttributeTransformData_0).apply(null,arguments)},kb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(kb=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.emscripten_bind_AttributeTransformData_transform_type_0).apply(null,arguments)},lb=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return(lb=a._emscripten_bind_AttributeTransformData___destroy___0=
a.asm.emscripten_bind_AttributeTransformData___destroy___0).apply(null,arguments)},La=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(La=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=a.asm.emscripten_bind_GeometryAttribute_GeometryAttribute_0).apply(null,arguments)},mb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(mb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.emscripten_bind_GeometryAttribute___destroy___0).apply(null,arguments)},
Ma=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ma=a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.emscripten_bind_PointAttribute_PointAttribute_0).apply(null,arguments)},nb=a._emscripten_bind_PointAttribute_size_0=function(){return(nb=a._emscripten_bind_PointAttribute_size_0=a.asm.emscripten_bind_PointAttribute_size_0).apply(null,arguments)},ob=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(ob=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=
a.asm.emscripten_bind_PointAttribute_GetAttributeTransformData_0).apply(null,arguments)},pb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(pb=a._emscripten_bind_PointAttribute_attribute_type_0=a.asm.emscripten_bind_PointAttribute_attribute_type_0).apply(null,arguments)},qb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(qb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.emscripten_bind_PointAttribute_data_type_0).apply(null,arguments)},rb=a._emscripten_bind_PointAttribute_num_components_0=
function(){return(rb=a._emscripten_bind_PointAttribute_num_components_0=a.asm.emscripten_bind_PointAttribute_num_components_0).apply(null,arguments)},sb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(sb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.emscripten_bind_PointAttribute_normalized_0).apply(null,arguments)},tb=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return(tb=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.emscripten_bind_PointAttribute_byte_stride_0).apply(null,
arguments)},ub=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(ub=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.emscripten_bind_PointAttribute_byte_offset_0).apply(null,arguments)},vb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return(vb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.emscripten_bind_PointAttribute_unique_id_0).apply(null,arguments)},wb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(wb=a._emscripten_bind_PointAttribute___destroy___0=
a.asm.emscripten_bind_PointAttribute___destroy___0).apply(null,arguments)},Na=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Na=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0).apply(null,arguments)},xb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return(xb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=
a.asm.emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1).apply(null,arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(yb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.emscripten_bind_AttributeQuantizationTransform_quantization_bits_0).apply(null,arguments)},zb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(zb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=
a.asm.emscripten_bind_AttributeQuantizationTransform_min_value_1).apply(null,arguments)},Ab=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(Ab=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.emscripten_bind_AttributeQuantizationTransform_range_0).apply(null,arguments)},Bb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(Bb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.emscripten_bind_AttributeQuantizationTransform___destroy___0).apply(null,
arguments)},Oa=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Oa=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=a.asm.emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0).apply(null,arguments)},Cb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(Cb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1).apply(null,
arguments)},Db=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(Db=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.emscripten_bind_AttributeOctahedronTransform_quantization_bits_0).apply(null,arguments)},Eb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(Eb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.emscripten_bind_AttributeOctahedronTransform___destroy___0).apply(null,arguments)},
Pa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Pa=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.emscripten_bind_PointCloud_PointCloud_0).apply(null,arguments)},Fb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(Fb=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.emscripten_bind_PointCloud_num_attributes_0).apply(null,arguments)},Gb=a._emscripten_bind_PointCloud_num_points_0=function(){return(Gb=a._emscripten_bind_PointCloud_num_points_0=a.asm.emscripten_bind_PointCloud_num_points_0).apply(null,
arguments)},Hb=a._emscripten_bind_PointCloud___destroy___0=function(){return(Hb=a._emscripten_bind_PointCloud___destroy___0=a.asm.emscripten_bind_PointCloud___destroy___0).apply(null,arguments)},Qa=a._emscripten_bind_Mesh_Mesh_0=function(){return(Qa=a._emscripten_bind_Mesh_Mesh_0=a.asm.emscripten_bind_Mesh_Mesh_0).apply(null,arguments)},Ib=a._emscripten_bind_Mesh_num_faces_0=function(){return(Ib=a._emscripten_bind_Mesh_num_faces_0=a.asm.emscripten_bind_Mesh_num_faces_0).apply(null,arguments)},Jb=
a._emscripten_bind_Mesh_num_attributes_0=function(){return(Jb=a._emscripten_bind_Mesh_num_attributes_0=a.asm.emscripten_bind_Mesh_num_attributes_0).apply(null,arguments)},Kb=a._emscripten_bind_Mesh_num_points_0=function(){return(Kb=a._emscripten_bind_Mesh_num_points_0=a.asm.emscripten_bind_Mesh_num_points_0).apply(null,arguments)},Lb=a._emscripten_bind_Mesh___destroy___0=function(){return(Lb=a._emscripten_bind_Mesh___destroy___0=a.asm.emscripten_bind_Mesh___destroy___0).apply(null,arguments)},Ra=
a._emscripten_bind_Metadata_Metadata_0=function(){return(Ra=a._emscripten_bind_Metadata_Metadata_0=a.asm.emscripten_bind_Metadata_Metadata_0).apply(null,arguments)},Mb=a._emscripten_bind_Metadata___destroy___0=function(){return(Mb=a._emscripten_bind_Metadata___destroy___0=a.asm.emscripten_bind_Metadata___destroy___0).apply(null,arguments)},Nb=a._emscripten_bind_Status_code_0=function(){return(Nb=a._emscripten_bind_Status_code_0=a.asm.emscripten_bind_Status_code_0).apply(null,arguments)},Ob=a._emscripten_bind_Status_ok_0=
function(){return(Ob=a._emscripten_bind_Status_ok_0=a.asm.emscripten_bind_Status_ok_0).apply(null,arguments)},Pb=a._emscripten_bind_Status_error_msg_0=function(){return(Pb=a._emscripten_bind_Status_error_msg_0=a.asm.emscripten_bind_Status_error_msg_0).apply(null,arguments)},Qb=a._emscripten_bind_Status___destroy___0=function(){return(Qb=a._emscripten_bind_Status___destroy___0=a.asm.emscripten_bind_Status___destroy___0).apply(null,arguments)},Sa=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=
function(){return(Sa=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm.emscripten_bind_DracoFloat32Array_DracoFloat32Array_0).apply(null,arguments)},Rb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Rb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.emscripten_bind_DracoFloat32Array_GetValue_1).apply(null,arguments)},Sb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Sb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.emscripten_bind_DracoFloat32Array_size_0).apply(null,
arguments)},Tb=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Tb=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.emscripten_bind_DracoFloat32Array___destroy___0).apply(null,arguments)},Ta=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ta=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.emscripten_bind_DracoInt8Array_DracoInt8Array_0).apply(null,arguments)},Ub=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Ub=a._emscripten_bind_DracoInt8Array_GetValue_1=
a.asm.emscripten_bind_DracoInt8Array_GetValue_1).apply(null,arguments)},Vb=a._emscripten_bind_DracoInt8Array_size_0=function(){return(Vb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.emscripten_bind_DracoInt8Array_size_0).apply(null,arguments)},Wb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Wb=a._emscripten_bind_DracoInt8Array___destroy___0=a.asm.emscripten_bind_DracoInt8Array___destroy___0).apply(null,arguments)},Ua=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Ua=
a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.emscripten_bind_DracoUInt8Array_DracoUInt8Array_0).apply(null,arguments)},Xb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Xb=a._emscripten_bind_DracoUInt8Array_GetValue_1=a.asm.emscripten_bind_DracoUInt8Array_GetValue_1).apply(null,arguments)},Yb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Yb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.emscripten_bind_DracoUInt8Array_size_0).apply(null,arguments)},Zb=
a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Zb=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.emscripten_bind_DracoUInt8Array___destroy___0).apply(null,arguments)},Va=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Va=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.emscripten_bind_DracoInt16Array_DracoInt16Array_0).apply(null,arguments)},$b=a._emscripten_bind_DracoInt16Array_GetValue_1=function(){return($b=a._emscripten_bind_DracoInt16Array_GetValue_1=
a.asm.emscripten_bind_DracoInt16Array_GetValue_1).apply(null,arguments)},ac=a._emscripten_bind_DracoInt16Array_size_0=function(){return(ac=a._emscripten_bind_DracoInt16Array_size_0=a.asm.emscripten_bind_DracoInt16Array_size_0).apply(null,arguments)},bc=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(bc=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.emscripten_bind_DracoInt16Array___destroy___0).apply(null,arguments)},Wa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=
function(){return(Wa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=a.asm.emscripten_bind_DracoUInt16Array_DracoUInt16Array_0).apply(null,arguments)},cc=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(cc=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.emscripten_bind_DracoUInt16Array_GetValue_1).apply(null,arguments)},dc=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(dc=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.emscripten_bind_DracoUInt16Array_size_0).apply(null,
arguments)},ec=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(ec=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.emscripten_bind_DracoUInt16Array___destroy___0).apply(null,arguments)},Xa=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(Xa=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.emscripten_bind_DracoInt32Array_DracoInt32Array_0).apply(null,arguments)},fc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(fc=a._emscripten_bind_DracoInt32Array_GetValue_1=
a.asm.emscripten_bind_DracoInt32Array_GetValue_1).apply(null,arguments)},gc=a._emscripten_bind_DracoInt32Array_size_0=function(){return(gc=a._emscripten_bind_DracoInt32Array_size_0=a.asm.emscripten_bind_DracoInt32Array_size_0).apply(null,arguments)},hc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(hc=a._emscripten_bind_DracoInt32Array___destroy___0=a.asm.emscripten_bind_DracoInt32Array___destroy___0).apply(null,arguments)},Ya=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=
function(){return(Ya=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=a.asm.emscripten_bind_DracoUInt32Array_DracoUInt32Array_0).apply(null,arguments)},ic=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(ic=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.emscripten_bind_DracoUInt32Array_GetValue_1).apply(null,arguments)},jc=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(jc=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.emscripten_bind_DracoUInt32Array_size_0).apply(null,
arguments)},kc=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(kc=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.emscripten_bind_DracoUInt32Array___destroy___0).apply(null,arguments)},Za=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Za=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.emscripten_bind_MetadataQuerier_MetadataQuerier_0).apply(null,arguments)},lc=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(lc=a._emscripten_bind_MetadataQuerier_HasEntry_2=
a.asm.emscripten_bind_MetadataQuerier_HasEntry_2).apply(null,arguments)},mc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(mc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=a.asm.emscripten_bind_MetadataQuerier_GetIntEntry_2).apply(null,arguments)},nc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(nc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=a.asm.emscripten_bind_MetadataQuerier_GetIntEntryArray_3).apply(null,arguments)},oc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=
function(){return(oc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.emscripten_bind_MetadataQuerier_GetDoubleEntry_2).apply(null,arguments)},pc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(pc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.emscripten_bind_MetadataQuerier_GetStringEntry_2).apply(null,arguments)},qc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(qc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.emscripten_bind_MetadataQuerier_NumEntries_1).apply(null,
arguments)},rc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(rc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.emscripten_bind_MetadataQuerier_GetEntryName_2).apply(null,arguments)},sc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(sc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.emscripten_bind_MetadataQuerier___destroy___0).apply(null,arguments)},$a=a._emscripten_bind_Decoder_Decoder_0=function(){return($a=a._emscripten_bind_Decoder_Decoder_0=
a.asm.emscripten_bind_Decoder_Decoder_0).apply(null,arguments)},tc=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(tc=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.emscripten_bind_Decoder_DecodeArrayToPointCloud_3).apply(null,arguments)},uc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(uc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.emscripten_bind_Decoder_DecodeArrayToMesh_3).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeId_2=
function(){return(vc=a._emscripten_bind_Decoder_GetAttributeId_2=a.asm.emscripten_bind_Decoder_GetAttributeId_2).apply(null,arguments)},wc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(wc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=a.asm.emscripten_bind_Decoder_GetAttributeIdByName_2).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(xc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3).apply(null,
arguments)},yc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(yc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.emscripten_bind_Decoder_GetAttribute_2).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(zc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.emscripten_bind_Decoder_GetAttributeByUniqueId_2).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(Ac=a._emscripten_bind_Decoder_GetMetadata_1=
a.asm.emscripten_bind_Decoder_GetMetadata_1).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(Bc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.emscripten_bind_Decoder_GetAttributeMetadata_2).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(Cc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.emscripten_bind_Decoder_GetFaceFromMesh_3).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=
function(){return(Dc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.emscripten_bind_Decoder_GetTriangleStripsFromMesh_2).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(Ec=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.emscripten_bind_Decoder_GetTrianglesUInt16Array_3).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(Fc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.emscripten_bind_Decoder_GetTrianglesUInt32Array_3).apply(null,
arguments)},Gc=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Gc=a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm.emscripten_bind_Decoder_GetAttributeFloat_3).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Hc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Ic=
a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeIntForAllPoints_3).apply(null,arguments)},Jc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Jc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3).apply(null,arguments)},Kc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(Kc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=
a.asm.emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3).apply(null,arguments)},Lc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Lc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3).apply(null,arguments)},Mc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Mc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3).apply(null,
arguments)},Nc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Nc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3).apply(null,arguments)},Oc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Oc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3).apply(null,arguments)},Pc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=
function(){return(Pc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5).apply(null,arguments)},Qc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Qc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.emscripten_bind_Decoder_SkipAttributeTransform_1).apply(null,arguments)},Rc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Rc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=
a.asm.emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1).apply(null,arguments)},Sc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Sc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.emscripten_bind_Decoder_DecodeBufferToPointCloud_2).apply(null,arguments)},Tc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Tc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.emscripten_bind_Decoder_DecodeBufferToMesh_2).apply(null,arguments)},Uc=
a._emscripten_bind_Decoder___destroy___0=function(){return(Uc=a._emscripten_bind_Decoder___destroy___0=a.asm.emscripten_bind_Decoder___destroy___0).apply(null,arguments)},Vc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Vc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM).apply(null,arguments)},Wc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=
function(){return(Wc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM).apply(null,arguments)},Xc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Xc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM).apply(null,arguments)},Yc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=
function(){return(Yc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM).apply(null,arguments)},Zc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Zc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.emscripten_enum_draco_GeometryAttribute_Type_INVALID).apply(null,arguments)},$c=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return($c=
a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=a.asm.emscripten_enum_draco_GeometryAttribute_Type_POSITION).apply(null,arguments)},ad=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(ad=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.emscripten_enum_draco_GeometryAttribute_Type_NORMAL).apply(null,arguments)},bd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(bd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.emscripten_enum_draco_GeometryAttribute_Type_COLOR).apply(null,
arguments)},cd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(cd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=a.asm.emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD).apply(null,arguments)},dd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(dd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.emscripten_enum_draco_GeometryAttribute_Type_GENERIC).apply(null,arguments)},ed=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=
function(){return(ed=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE).apply(null,arguments)},fd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(fd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=a.asm.emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD).apply(null,arguments)},gd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(gd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=
a.asm.emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(hd=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.emscripten_enum_draco_DataType_DT_INVALID).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(id=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.emscripten_enum_draco_DataType_DT_INT8).apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(jd=
a._emscripten_enum_draco_DataType_DT_UINT8=a.asm.emscripten_enum_draco_DataType_DT_UINT8).apply(null,arguments)},kd=a._emscripten_enum_draco_DataType_DT_INT16=function(){return(kd=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.emscripten_enum_draco_DataType_DT_INT16).apply(null,arguments)},ld=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(ld=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.emscripten_enum_draco_DataType_DT_UINT16).apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_INT32=
function(){return(md=a._emscripten_enum_draco_DataType_DT_INT32=a.asm.emscripten_enum_draco_DataType_DT_INT32).apply(null,arguments)},nd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return(nd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.emscripten_enum_draco_DataType_DT_UINT32).apply(null,arguments)},od=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(od=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.emscripten_enum_draco_DataType_DT_INT64).apply(null,arguments)},pd=a._emscripten_enum_draco_DataType_DT_UINT64=
function(){return(pd=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.emscripten_enum_draco_DataType_DT_UINT64).apply(null,arguments)},qd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(qd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.emscripten_enum_draco_DataType_DT_FLOAT32).apply(null,arguments)},rd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(rd=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.emscripten_enum_draco_DataType_DT_FLOAT64).apply(null,arguments)},
sd=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(sd=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.emscripten_enum_draco_DataType_DT_BOOL).apply(null,arguments)},td=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(td=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=a.asm.emscripten_enum_draco_DataType_DT_TYPES_COUNT).apply(null,arguments)},ud=a._emscripten_enum_draco_StatusCode_OK=function(){return(ud=a._emscripten_enum_draco_StatusCode_OK=a.asm.emscripten_enum_draco_StatusCode_OK).apply(null,
arguments)},vd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(vd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.emscripten_enum_draco_StatusCode_DRACO_ERROR).apply(null,arguments)},wd=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(wd=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.emscripten_enum_draco_StatusCode_IO_ERROR).apply(null,arguments)},xd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(xd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=
a.asm.emscripten_enum_draco_StatusCode_INVALID_PARAMETER).apply(null,arguments)},yd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(yd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION).apply(null,arguments)},zd=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(zd=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.emscripten_enum_draco_StatusCode_UNKNOWN_VERSION).apply(null,arguments)};
a.___errno_location=function(){return(a.___errno_location=a.asm.__errno_location).apply(null,arguments)};a.stackSave=function(){return(a.stackSave=a.asm.stackSave).apply(null,arguments)};a.stackRestore=function(){return(a.stackRestore=a.asm.stackRestore).apply(null,arguments)};a.stackAlloc=function(){return(a.stackAlloc=a.asm.stackAlloc).apply(null,arguments)};a._setThrew=function(){return(a._setThrew=a.asm.setThrew).apply(null,arguments)};a._free=function(){return(a._free=a.asm.free).apply(null,
arguments)};var fb=a._malloc=function(){return(fb=a._malloc=a.asm.malloc).apply(null,arguments)};a.dynCall_jiji=function(){return(a.dynCall_jiji=a.asm.dynCall_jiji).apply(null,arguments)};var na;fa=function c(){na||qa();na||(fa=c)};a.run=qa;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();qa();q.prototype=Object.create(q.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.WrapperObject=q;a.getCache=u;a.wrapPointer=
M;a.castObject=function(a,b){return M(a.ptr,b)};a.NULL=M(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";a.__destroy__();delete u(a.__class__)[a.ptr]};a.compare=function(a,b){return a.ptr===b.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var p={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(p.needed){for(var c=0;c<p.temps.length;c++)a._free(p.temps[c]);p.temps.length=0;a._free(p.buffer);
p.buffer=0;p.size+=p.needed;p.needed=0}p.buffer||(p.size+=128,p.buffer=a._malloc(p.size),n(p.buffer));p.pos=0},alloc:function(c,b){n(p.buffer);c=c.length*b.BYTES_PER_ELEMENT;c=c+7&-8;p.pos+c>=p.size?(n(0<c),p.needed+=c,b=a._malloc(c),p.temps.push(b)):(b=p.buffer+p.pos,p.pos+=c);return b},copy:function(a,b,d){d>>>=0;switch(b.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var c=0;c<a.length;c++)b[d+c]=a[c]}};T.prototype=Object.create(q.prototype);T.prototype.constructor=
T;T.prototype.__class__=T;T.__cache__={};a.VoidPtr=T;T.prototype.__destroy__=T.prototype.__destroy__=function(){hb(this.ptr)};N.prototype=Object.create(q.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DecoderBuffer=N;N.prototype.Init=N.prototype.Init=function(a,b){var c=this.ptr;p.prepare();"object"==typeof a&&(a=ra(a));b&&"object"===typeof b&&(b=b.ptr);ib(c,a,b)};N.prototype.__destroy__=N.prototype.__destroy__=function(){jb(this.ptr)};L.prototype=Object.create(q.prototype);
L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.AttributeTransformData=L;L.prototype.transform_type=L.prototype.transform_type=function(){return kb(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){lb(this.ptr)};S.prototype=Object.create(q.prototype);S.prototype.constructor=S;S.prototype.__class__=S;S.__cache__={};a.GeometryAttribute=S;S.prototype.__destroy__=S.prototype.__destroy__=function(){mb(this.ptr)};r.prototype=Object.create(q.prototype);r.prototype.constructor=
r;r.prototype.__class__=r;r.__cache__={};a.PointAttribute=r;r.prototype.size=r.prototype.size=function(){return nb(this.ptr)};r.prototype.GetAttributeTransformData=r.prototype.GetAttributeTransformData=function(){return M(ob(this.ptr),L)};r.prototype.attribute_type=r.prototype.attribute_type=function(){return pb(this.ptr)};r.prototype.data_type=r.prototype.data_type=function(){return qb(this.ptr)};r.prototype.num_components=r.prototype.num_components=function(){return rb(this.ptr)};r.prototype.normalized=
r.prototype.normalized=function(){return!!sb(this.ptr)};r.prototype.byte_stride=r.prototype.byte_stride=function(){return tb(this.ptr)};r.prototype.byte_offset=r.prototype.byte_offset=function(){return ub(this.ptr)};r.prototype.unique_id=r.prototype.unique_id=function(){return vb(this.ptr)};r.prototype.__destroy__=r.prototype.__destroy__=function(){wb(this.ptr)};w.prototype=Object.create(q.prototype);w.prototype.constructor=w;w.prototype.__class__=w;w.__cache__={};a.AttributeQuantizationTransform=
w;w.prototype.InitFromAttribute=w.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!xb(c,a)};w.prototype.quantization_bits=w.prototype.quantization_bits=function(){return yb(this.ptr)};w.prototype.min_value=w.prototype.min_value=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return zb(c,a)};w.prototype.range=w.prototype.range=function(){return Ab(this.ptr)};w.prototype.__destroy__=w.prototype.__destroy__=function(){Bb(this.ptr)};C.prototype=
Object.create(q.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.AttributeOctahedronTransform=C;C.prototype.InitFromAttribute=C.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!Cb(c,a)};C.prototype.quantization_bits=C.prototype.quantization_bits=function(){return Db(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){Eb(this.ptr)};D.prototype=Object.create(q.prototype);D.prototype.constructor=D;D.prototype.__class__=
D;D.__cache__={};a.PointCloud=D;D.prototype.num_attributes=D.prototype.num_attributes=function(){return Fb(this.ptr)};D.prototype.num_points=D.prototype.num_points=function(){return Gb(this.ptr)};D.prototype.__destroy__=D.prototype.__destroy__=function(){Hb(this.ptr)};z.prototype=Object.create(q.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.Mesh=z;z.prototype.num_faces=z.prototype.num_faces=function(){return Ib(this.ptr)};z.prototype.num_attributes=z.prototype.num_attributes=
function(){return Jb(this.ptr)};z.prototype.num_points=z.prototype.num_points=function(){return Kb(this.ptr)};z.prototype.__destroy__=z.prototype.__destroy__=function(){Lb(this.ptr)};O.prototype=Object.create(q.prototype);O.prototype.constructor=O;O.prototype.__class__=O;O.__cache__={};a.Metadata=O;O.prototype.__destroy__=O.prototype.__destroy__=function(){Mb(this.ptr)};v.prototype=Object.create(q.prototype);v.prototype.constructor=v;v.prototype.__class__=v;v.__cache__={};a.Status=v;v.prototype.code=
v.prototype.code=function(){return Nb(this.ptr)};v.prototype.ok=v.prototype.ok=function(){return!!Ob(this.ptr)};v.prototype.error_msg=v.prototype.error_msg=function(){return B(Pb(this.ptr))};v.prototype.__destroy__=v.prototype.__destroy__=function(){Qb(this.ptr)};E.prototype=Object.create(q.prototype);E.prototype.constructor=E;E.prototype.__class__=E;E.__cache__={};a.DracoFloat32Array=E;E.prototype.GetValue=E.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Rb(c,
a)};E.prototype.size=E.prototype.size=function(){return Sb(this.ptr)};E.prototype.__destroy__=E.prototype.__destroy__=function(){Tb(this.ptr)};F.prototype=Object.create(q.prototype);F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.DracoInt8Array=F;F.prototype.GetValue=F.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Ub(c,a)};F.prototype.size=F.prototype.size=function(){return Vb(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){Wb(this.ptr)};
G.prototype=Object.create(q.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.DracoUInt8Array=G;G.prototype.GetValue=G.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Xb(c,a)};G.prototype.size=G.prototype.size=function(){return Yb(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){Zb(this.ptr)};H.prototype=Object.create(q.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoInt16Array=
H;H.prototype.GetValue=H.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return $b(c,a)};H.prototype.size=H.prototype.size=function(){return ac(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){bc(this.ptr)};I.prototype=Object.create(q.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoUInt16Array=I;I.prototype.GetValue=I.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return cc(c,a)};
I.prototype.size=I.prototype.size=function(){return dc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){ec(this.ptr)};J.prototype=Object.create(q.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.DracoInt32Array=J;J.prototype.GetValue=J.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return fc(c,a)};J.prototype.size=J.prototype.size=function(){return gc(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){hc(this.ptr)};
K.prototype=Object.create(q.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoUInt32Array=K;K.prototype.GetValue=K.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ic(c,a)};K.prototype.size=K.prototype.size=function(){return jc(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){kc(this.ptr)};t.prototype=Object.create(q.prototype);t.prototype.constructor=t;t.prototype.__class__=t;t.__cache__={};a.MetadataQuerier=
t;t.prototype.HasEntry=t.prototype.HasEntry=function(a,b){var c=this.ptr;p.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return!!lc(c,a,b)};t.prototype.GetIntEntry=t.prototype.GetIntEntry=function(a,b){var c=this.ptr;p.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return mc(c,a,b)};t.prototype.GetIntEntryArray=t.prototype.GetIntEntryArray=function(a,b,d){var c=this.ptr;p.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===
typeof b?b.ptr:V(b);d&&"object"===typeof d&&(d=d.ptr);nc(c,a,b,d)};t.prototype.GetDoubleEntry=t.prototype.GetDoubleEntry=function(a,b){var c=this.ptr;p.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return oc(c,a,b)};t.prototype.GetStringEntry=t.prototype.GetStringEntry=function(a,b){var c=this.ptr;p.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return B(pc(c,a,b))};t.prototype.NumEntries=t.prototype.NumEntries=function(a){var c=this.ptr;
a&&"object"===typeof a&&(a=a.ptr);return qc(c,a)};t.prototype.GetEntryName=t.prototype.GetEntryName=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return B(rc(c,a,b))};t.prototype.__destroy__=t.prototype.__destroy__=function(){sc(this.ptr)};g.prototype=Object.create(q.prototype);g.prototype.constructor=g;g.prototype.__class__=g;g.__cache__={};a.Decoder=g;g.prototype.DecodeArrayToPointCloud=g.prototype.DecodeArrayToPointCloud=function(a,b,d){var c=
this.ptr;p.prepare();"object"==typeof a&&(a=ra(a));b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return M(tc(c,a,b,d),v)};g.prototype.DecodeArrayToMesh=g.prototype.DecodeArrayToMesh=function(a,b,d){var c=this.ptr;p.prepare();"object"==typeof a&&(a=ra(a));b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return M(uc(c,a,b,d),v)};g.prototype.GetAttributeId=g.prototype.GetAttributeId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===
typeof b&&(b=b.ptr);return vc(c,a,b)};g.prototype.GetAttributeIdByName=g.prototype.GetAttributeIdByName=function(a,b){var c=this.ptr;p.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return wc(c,a,b)};g.prototype.GetAttributeIdByMetadataEntry=g.prototype.GetAttributeIdByMetadataEntry=function(a,b,d){var c=this.ptr;p.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);d=d&&"object"===typeof d?d.ptr:V(d);return xc(c,a,b,d)};g.prototype.GetAttribute=
g.prototype.GetAttribute=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return M(yc(c,a,b),r)};g.prototype.GetAttributeByUniqueId=g.prototype.GetAttributeByUniqueId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return M(zc(c,a,b),r)};g.prototype.GetMetadata=g.prototype.GetMetadata=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return M(Ac(c,a),O)};g.prototype.GetAttributeMetadata=g.prototype.GetAttributeMetadata=
function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return M(Bc(c,a,b),O)};g.prototype.GetFaceFromMesh=g.prototype.GetFaceFromMesh=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Cc(c,a,b,d)};g.prototype.GetTriangleStripsFromMesh=g.prototype.GetTriangleStripsFromMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);
return Dc(c,a,b)};g.prototype.GetTrianglesUInt16Array=g.prototype.GetTrianglesUInt16Array=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ec(c,a,b,d)};g.prototype.GetTrianglesUInt32Array=g.prototype.GetTrianglesUInt32Array=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Fc(c,a,b,d)};g.prototype.GetAttributeFloat=g.prototype.GetAttributeFloat=
function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Gc(c,a,b,d)};g.prototype.GetAttributeFloatForAllPoints=g.prototype.GetAttributeFloatForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hc(c,a,b,d)};g.prototype.GetAttributeIntForAllPoints=g.prototype.GetAttributeIntForAllPoints=function(a,b,d){var c=this.ptr;
a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ic(c,a,b,d)};g.prototype.GetAttributeInt8ForAllPoints=g.prototype.GetAttributeInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Jc(c,a,b,d)};g.prototype.GetAttributeUInt8ForAllPoints=g.prototype.GetAttributeUInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=
a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Kc(c,a,b,d)};g.prototype.GetAttributeInt16ForAllPoints=g.prototype.GetAttributeInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Lc(c,a,b,d)};g.prototype.GetAttributeUInt16ForAllPoints=g.prototype.GetAttributeUInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&
(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Mc(c,a,b,d)};g.prototype.GetAttributeInt32ForAllPoints=g.prototype.GetAttributeInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Nc(c,a,b,d)};g.prototype.GetAttributeUInt32ForAllPoints=g.prototype.GetAttributeUInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===
typeof d&&(d=d.ptr);return!!Oc(c,a,b,d)};g.prototype.GetAttributeDataArrayForAllPoints=g.prototype.GetAttributeDataArrayForAllPoints=function(a,b,d,e,f){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Pc(c,a,b,d,e,f)};g.prototype.SkipAttributeTransform=g.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Qc(b,a)};
g.prototype.GetEncodedGeometryType_Deprecated=g.prototype.GetEncodedGeometryType_Deprecated=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Rc(b,a)};g.prototype.DecodeBufferToPointCloud=g.prototype.DecodeBufferToPointCloud=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return M(Sc(c,a,b),v)};g.prototype.DecodeBufferToMesh=g.prototype.DecodeBufferToMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===
typeof b&&(b=b.ptr);return M(Tc(c,a,b),v)};g.prototype.__destroy__=g.prototype.__destroy__=function(){Uc(this.ptr)};(function(){function c(){a.ATTRIBUTE_INVALID_TRANSFORM=Vc();a.ATTRIBUTE_NO_TRANSFORM=Wc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Xc();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Yc();a.INVALID=Zc();a.POSITION=$c();a.NORMAL=ad();a.COLOR=bd();a.TEX_COORD=cd();a.GENERIC=dd();a.INVALID_GEOMETRY_TYPE=ed();a.POINT_CLOUD=fd();a.TRIANGULAR_MESH=gd();a.DT_INVALID=hd();a.DT_INT8=id();a.DT_UINT8=jd();a.DT_INT16=
kd();a.DT_UINT16=ld();a.DT_INT32=md();a.DT_UINT32=nd();a.DT_INT64=od();a.DT_UINT64=pd();a.DT_FLOAT32=qd();a.DT_FLOAT64=rd();a.DT_BOOL=sd();a.DT_TYPES_COUNT=td();a.OK=ud();a.DRACO_ERROR=vd();a.IO_ERROR=wd();a.INVALID_PARAMETER=xd();a.UNSUPPORTED_VERSION=yd();a.UNKNOWN_VERSION=zd()}Da?c():Fa.unshift(c)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();a.Decoder.prototype.GetEncodedGeometryType=function(c){if(c.__class__&&c.__class__===a.DecoderBuffer)return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(c);
if(8>c.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(c[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return l.ready}}();"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);

View File

@ -1,104 +1,124 @@
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(f){var m=0;return function(){return m<f.length?{done:!1,value:f[m++]}:{done:!0}}};$jscomp.arrayIterator=function(f){return{next:$jscomp.arrayIteratorImpl(f)}};$jscomp.makeIterator=function(f){var m="undefined"!=typeof Symbol&&Symbol.iterator&&f[Symbol.iterator];return m?m.call(f):$jscomp.arrayIterator(f)};
$jscomp.getGlobal=function(f){return"undefined"!=typeof window&&window===f?f:"undefined"!=typeof global&&null!=global?global:f};$jscomp.global=$jscomp.getGlobal(this);$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(f,m,v){f!=Array.prototype&&f!=Object.prototype&&(f[m]=v.value)};
$jscomp.polyfill=function(f,m,v,t){if(m){v=$jscomp.global;f=f.split(".");for(t=0;t<f.length-1;t++){var h=f[t];h in v||(v[h]={});v=v[h]}f=f[f.length-1];t=v[f];m=m(t);m!=t&&null!=m&&$jscomp.defineProperty(v,f,{configurable:!0,writable:!0,value:m})}};$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.polyfill("Promise",function(f){function m(){this.batch_=null}function v(e){return e instanceof h?e:new h(function(l,f){l(e)})}if(f&&!$jscomp.FORCE_POLYFILL_PROMISE)return f;m.prototype.asyncExecute=function(e){if(null==this.batch_){this.batch_=[];var l=this;this.asyncExecuteFunction(function(){l.executeBatch_()})}this.batch_.push(e)};var t=$jscomp.global.setTimeout;m.prototype.asyncExecuteFunction=function(e){t(e,0)};m.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var e=
this.batch_;this.batch_=[];for(var l=0;l<e.length;++l){var f=e[l];e[l]=null;try{f()}catch(z){this.asyncThrow_(z)}}}this.batch_=null};m.prototype.asyncThrow_=function(e){this.asyncExecuteFunction(function(){throw e;})};var h=function(e){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var l=this.createResolveAndReject_();try{e(l.resolve,l.reject)}catch(S){l.reject(S)}};h.prototype.createResolveAndReject_=function(){function e(e){return function(h){f||(f=!0,e.call(l,h))}}var l=this,f=!1;
return{resolve:e(this.resolveTo_),reject:e(this.reject_)}};h.prototype.resolveTo_=function(e){if(e===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof h)this.settleSameAsPromise_(e);else{a:switch(typeof e){case "object":var l=null!=e;break a;case "function":l=!0;break a;default:l=!1}l?this.resolveToNonPromiseObj_(e):this.fulfill_(e)}};h.prototype.resolveToNonPromiseObj_=function(e){var l=void 0;try{l=e.then}catch(S){this.reject_(S);return}"function"==typeof l?
this.settleSameAsThenable_(l,e):this.fulfill_(e)};h.prototype.reject_=function(e){this.settle_(2,e)};h.prototype.fulfill_=function(e){this.settle_(1,e)};h.prototype.settle_=function(e,l){if(0!=this.state_)throw Error("Cannot settle("+e+", "+l+"): Promise already settled in state"+this.state_);this.state_=e;this.result_=l;this.executeOnSettledCallbacks_()};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var e=0;e<this.onSettledCallbacks_.length;++e)X.asyncExecute(this.onSettledCallbacks_[e]);
this.onSettledCallbacks_=null}};var X=new m;h.prototype.settleSameAsPromise_=function(e){var l=this.createResolveAndReject_();e.callWhenSettled_(l.resolve,l.reject)};h.prototype.settleSameAsThenable_=function(e,l){var f=this.createResolveAndReject_();try{e.call(l,f.resolve,f.reject)}catch(z){f.reject(z)}};h.prototype.then=function(e,f){function l(e,f){return"function"==typeof e?function(f){try{m(e(f))}catch(p){v(p)}}:f}var m,v,t=new h(function(e,f){m=e;v=f});this.callWhenSettled_(l(e,m),l(f,v));return t};
h.prototype.catch=function(e){return this.then(void 0,e)};h.prototype.callWhenSettled_=function(e,f){function l(){switch(h.state_){case 1:e(h.result_);break;case 2:f(h.result_);break;default:throw Error("Unexpected state: "+h.state_);}}var h=this;null==this.onSettledCallbacks_?X.asyncExecute(l):this.onSettledCallbacks_.push(l)};h.resolve=v;h.reject=function(e){return new h(function(f,h){h(e)})};h.race=function(e){return new h(function(f,h){for(var l=$jscomp.makeIterator(e),m=l.next();!m.done;m=l.next())v(m.value).callWhenSettled_(f,
h)})};h.all=function(e){var f=$jscomp.makeIterator(e),m=f.next();return m.done?v([]):new h(function(e,h){function l(f){return function(h){t[f]=h;z--;0==z&&e(t)}}var t=[],z=0;do t.push(void 0),z++,v(m.value).callWhenSettled_(l(t.length-1),h),m=f.next();while(!m.done)})};return h},"es6","es3");
var DracoDecoderModule=function(){var f="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(f=f||__filename);return function(m){function v(k){return a.locateFile?a.locateFile(k,M):M+k}function t(a,c){a||z("Assertion failed: "+c)}function h(a,c,b){var d=c+b;for(b=c;a[b]&&!(b>=d);)++b;if(16<b-c&&a.subarray&&xa)return xa.decode(a.subarray(c,b));for(d="";c<b;){var k=a[c++];if(k&128){var e=a[c++]&63;if(192==(k&224))d+=String.fromCharCode((k&
31)<<6|e);else{var f=a[c++]&63;k=224==(k&240)?(k&15)<<12|e<<6|f:(k&7)<<18|e<<12|f<<6|a[c++]&63;65536>k?d+=String.fromCharCode(k):(k-=65536,d+=String.fromCharCode(55296|k>>10,56320|k&1023))}}else d+=String.fromCharCode(k)}return d}function X(a,c){return a?h(ca,a,c):""}function e(a,c){0<a%c&&(a+=c-a%c);return a}function l(k){ka=k;a.HEAP8=T=new Int8Array(k);a.HEAP16=new Int16Array(k);a.HEAP32=P=new Int32Array(k);a.HEAPU8=ca=new Uint8Array(k);a.HEAPU16=new Uint16Array(k);a.HEAPU32=new Uint32Array(k);
a.HEAPF32=new Float32Array(k);a.HEAPF64=new Float64Array(k)}function S(k){for(;0<k.length;){var c=k.shift();if("function"==typeof c)c();else{var b=c.func;"number"===typeof b?void 0===c.arg?a.dynCall_v(b):a.dynCall_vi(b,c.arg):b(void 0===c.arg?null:c.arg)}}}function z(k){if(a.onAbort)a.onAbort(k);k+="";ya(k);Y(k);za=!0;throw new WebAssembly.RuntimeError("abort("+k+"). Build with -s ASSERTIONS=1 for more info.");}function va(a){return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):
0===a.indexOf("data:application/octet-stream;base64,")}function wa(){try{if(da)return new Uint8Array(da);if(la)return la(U);throw"both async and sync fetching of the wasm failed";}catch(k){z(k)}}function Ma(){return da||!ea&&!Z||"function"!==typeof fetch?new Promise(function(a,c){a(wa())}):fetch(U,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+U+"'";return a.arrayBuffer()}).catch(function(){return wa()})}function ba(){if(!ba.strings){var a={USER:"web_user",
LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:na},c;for(c in Aa)a[c]=Aa[c];var b=[];for(c in a)b.push(c+"="+a[c]);ba.strings=b}return ba.strings}function ma(k){function c(){if(!fa&&(fa=!0,!za)){Ba=!0;S(Ca);S(Da);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Ea.unshift(a.postRun.shift());
S(Ea)}}if(!(0<aa)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Fa.unshift(a.preRun.shift());S(Fa);0<aa||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);c()},1)):c())}}function p(){}function u(a){return(a||p).__cache__}function N(a,c){var b=u(c),d=b[a];if(d)return d;d=Object.create((c||p).prototype);d.ptr=a;return b[a]=d}function V(a){if("string"===typeof a){for(var c=0,b=0;b<a.length;++b){var d=a.charCodeAt(b);
55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++b)&1023);127>=d?++c:c=2047>=d?c+2:65535>=d?c+3:c+4}c=Array(c+1);b=0;d=c.length;if(0<d){d=b+d-1;for(var k=0;k<a.length;++k){var e=a.charCodeAt(k);if(55296<=e&&57343>=e){var f=a.charCodeAt(++k);e=65536+((e&1023)<<10)|f&1023}if(127>=e){if(b>=d)break;c[b++]=e}else{if(2047>=e){if(b+1>=d)break;c[b++]=192|e>>6}else{if(65535>=e){if(b+2>=d)break;c[b++]=224|e>>12}else{if(b+3>=d)break;c[b++]=240|e>>18;c[b++]=128|e>>12&63}c[b++]=128|e>>6&63}c[b++]=128|
e&63}}c[b]=0}a=n.alloc(c,T);n.copy(c,T,a)}return a}function x(){throw"cannot construct a Status, no constructor in IDL";}function A(){this.ptr=Oa();u(A)[this.ptr]=this}function B(){this.ptr=Pa();u(B)[this.ptr]=this}function C(){this.ptr=Qa();u(C)[this.ptr]=this}function D(){this.ptr=Ra();u(D)[this.ptr]=this}function E(){this.ptr=Sa();u(E)[this.ptr]=this}function q(){this.ptr=Ta();u(q)[this.ptr]=this}function J(){this.ptr=Ua();u(J)[this.ptr]=this}function w(){this.ptr=Va();u(w)[this.ptr]=this}function F(){this.ptr=
Wa();u(F)[this.ptr]=this}function r(){this.ptr=Xa();u(r)[this.ptr]=this}function G(){this.ptr=Ya();u(G)[this.ptr]=this}function H(){this.ptr=Za();u(H)[this.ptr]=this}function O(){this.ptr=$a();u(O)[this.ptr]=this}function K(){this.ptr=ab();u(K)[this.ptr]=this}function g(){this.ptr=bb();u(g)[this.ptr]=this}function y(){this.ptr=cb();u(y)[this.ptr]=this}function Q(){throw"cannot construct a VoidPtr, no constructor in IDL";}function I(){this.ptr=db();u(I)[this.ptr]=this}function L(){this.ptr=eb();u(L)[this.ptr]=
this}m=m||{};var a="undefined"!==typeof m?m:{},Ga=!1,Ha=!1;a.onRuntimeInitialized=function(){Ga=!0;if(Ha&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ha=!0;if(Ga&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3<a.length?!1:1==a[0]&&0<=a[1]&&3>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};var ha={},W;for(W in a)a.hasOwnProperty(W)&&(ha[W]=a[W]);var na="./this.program",
ea=!1,Z=!1,oa=!1,fb=!1,Ia=!1;ea="object"===typeof window;Z="function"===typeof importScripts;oa=(fb="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node)&&!ea&&!Z;Ia=!ea&&!oa&&!Z;var M="",pa,qa;if(oa){M=__dirname+"/";var ra=function(a,c){pa||(pa=require("fs"));qa||(qa=require("path"));a=qa.normalize(a);return pa.readFileSync(a,c?null:"utf8")};var la=function(a){a=ra(a,!0);a.buffer||(a=new Uint8Array(a));t(a.buffer);return a};1<process.argv.length&&
(na=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);process.on("uncaughtException",function(a){throw a;});process.on("unhandledRejection",z);a.inspect=function(){return"[Emscripten Module object]"}}else if(Ia)"undefined"!=typeof read&&(ra=function(a){return read(a)}),la=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");t("object"===typeof a);return a},"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,
console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(ea||Z)Z?M=self.location.href:document.currentScript&&(M=document.currentScript.src),f&&(M=f),M=0!==M.indexOf("blob:")?M.substr(0,M.lastIndexOf("/")+1):"",ra=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);return c.responseText},Z&&(la=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)});var ya=a.print||console.log.bind(console),
Y=a.printErr||console.warn.bind(console);for(W in ha)ha.hasOwnProperty(W)&&(a[W]=ha[W]);ha=null;a.thisProgram&&(na=a.thisProgram);var da;a.wasmBinary&&(da=a.wasmBinary);"object"!==typeof WebAssembly&&Y("no native wasm support detected");var ia,gb=new WebAssembly.Table({initial:293,maximum:293,element:"anyfunc"}),za=!1,xa="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");var T,ca,P,Ja=a.TOTAL_MEMORY||16777216;if(ia=a.wasmMemory?
a.wasmMemory:new WebAssembly.Memory({initial:Ja/65536}))var ka=ia.buffer;Ja=ka.byteLength;l(ka);P[3416]=5256704;var Fa=[],Ca=[],Da=[],Ea=[],Ba=!1,aa=0,sa=null,ja=null;a.preloadedImages={};a.preloadedAudios={};var U="draco_decoder.wasm";va(U)||(U=v(U));Ca.push({func:function(){hb()}});var Aa={},R={buffers:[null,[],[]],printChar:function(a,c){var b=R.buffers[a];0===c||10===c?((1===a?ya:Y)(h(b,0)),b.length=0):b.push(c)},varargs:0,get:function(a){R.varargs+=4;return P[R.varargs-4>>2]},getStr:function(){return X(R.get())},
get64:function(){var a=R.get();R.get();return a},getZero:function(){R.get()}},Ka={__cxa_allocate_exception:function(a){return ib(a)},__cxa_throw:function(a,c,b){"uncaught_exception"in ta?ta.uncaught_exceptions++:ta.uncaught_exceptions=1;throw a;},abort:function(){z()},emscripten_get_sbrk_ptr:function(){return 13664},emscripten_memcpy_big:function(a,c,b){ca.set(ca.subarray(c,c+b),a)},emscripten_resize_heap:function(a){if(2147418112<a)return!1;for(var c=Math.max(T.length,16777216);c<a;)c=536870912>=
c?e(2*c,65536):Math.min(e((3*c+2147483648)/4,65536),2147418112);a:{try{ia.grow(c-ka.byteLength+65535>>16);l(ia.buffer);var b=1;break a}catch(d){}b=void 0}return b?!0:!1},environ_get:function(a,c){var b=0;ba().forEach(function(d,e){var f=c+b;e=P[a+4*e>>2]=f;for(f=0;f<d.length;++f)T[e++>>0]=d.charCodeAt(f);T[e>>0]=0;b+=d.length+1});return 0},environ_sizes_get:function(a,c){var b=ba();P[a>>2]=b.length;var d=0;b.forEach(function(a){d+=a.length+1});P[c>>2]=d;return 0},fd_close:function(a){return 0},fd_seek:function(a,
c,b,d,e){return 0},fd_write:function(a,c,b,d){try{for(var e=0,f=0;f<b;f++){for(var g=P[c+8*f>>2],k=P[c+(8*f+4)>>2],h=0;h<k;h++)R.printChar(a,ca[g+h]);e+=k}P[d>>2]=e;return 0}catch(ua){return"undefined"!==typeof FS&&ua instanceof FS.ErrnoError||z(ua),ua.errno}},memory:ia,setTempRet0:function(a){},table:gb},La=function(){function e(c,b){a.asm=c.exports;aa--;a.monitorRunDependencies&&a.monitorRunDependencies(aa);0==aa&&(null!==sa&&(clearInterval(sa),sa=null),ja&&(c=ja,ja=null,c()))}function c(a){e(a.instance)}
function b(a){return Ma().then(function(a){return WebAssembly.instantiate(a,d)}).then(a,function(a){Y("failed to asynchronously prepare wasm: "+a);z(a)})}var d={env:Ka,wasi_unstable:Ka};aa++;a.monitorRunDependencies&&a.monitorRunDependencies(aa);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(Na){return Y("Module.instantiateWasm callback failed with error: "+Na),!1}(function(){if(da||"function"!==typeof WebAssembly.instantiateStreaming||va(U)||"function"!==typeof fetch)return b(c);fetch(U,
{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,d).then(c,function(a){Y("wasm streaming compile failed: "+a);Y("falling back to ArrayBuffer instantiation");b(c)})})})();return{}}();a.asm=La;var hb=a.___wasm_call_ctors=function(){return a.asm.__wasm_call_ctors.apply(null,arguments)},jb=a._emscripten_bind_Status_code_0=function(){return a.asm.emscripten_bind_Status_code_0.apply(null,arguments)},kb=a._emscripten_bind_Status_ok_0=function(){return a.asm.emscripten_bind_Status_ok_0.apply(null,
arguments)},lb=a._emscripten_bind_Status_error_msg_0=function(){return a.asm.emscripten_bind_Status_error_msg_0.apply(null,arguments)},mb=a._emscripten_bind_Status___destroy___0=function(){return a.asm.emscripten_bind_Status___destroy___0.apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_DracoUInt16Array_0.apply(null,arguments)},nb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt16Array_GetValue_1.apply(null,
arguments)},ob=a._emscripten_bind_DracoUInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_size_0.apply(null,arguments)},pb=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt16Array___destroy___0.apply(null,arguments)},Pa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm.emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},qb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm.emscripten_bind_PointCloud_num_attributes_0.apply(null,
arguments)},rb=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm.emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},sb=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm.emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Qa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_DracoUInt8Array_0.apply(null,arguments)},tb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt8Array_GetValue_1.apply(null,
arguments)},ub=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},vb=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},Ra=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_DracoUInt32Array_0.apply(null,arguments)},wb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt32Array_GetValue_1.apply(null,
arguments)},xb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_size_0.apply(null,arguments)},yb=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt32Array___destroy___0.apply(null,arguments)},Sa=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},zb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=
function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},Ab=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,arguments)},Bb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},Ta=a._emscripten_bind_PointAttribute_PointAttribute_0=
function(){return a.asm.emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Cb=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm.emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm.emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},Eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm.emscripten_bind_PointAttribute_attribute_type_0.apply(null,
arguments)},Fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm.emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},Gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm.emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm.emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_stride_0.apply(null,
arguments)},Jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Kb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm.emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},Lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm.emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Ua=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=
function(){return a.asm.emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},Mb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm.emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},Nb=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm.emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},Va=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=
function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},Ob=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},Pb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},
Qb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},Rb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},Sb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)},
Wa=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return a.asm.emscripten_bind_DracoInt8Array_DracoInt8Array_0.apply(null,arguments)},Tb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt8Array_GetValue_1.apply(null,arguments)},Ub=a._emscripten_bind_DracoInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoInt8Array_size_0.apply(null,arguments)},Vb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt8Array___destroy___0.apply(null,
arguments)},Xa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm.emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},Wb=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Xb=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Yb=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=
function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntryArray_3.apply(null,arguments)},Zb=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},$b=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm.emscripten_bind_MetadataQuerier_NumEntries_1.apply(null,
arguments)},bc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm.emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},Ya=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return a.asm.emscripten_bind_DracoInt16Array_DracoInt16Array_0.apply(null,arguments)},dc=a._emscripten_bind_DracoInt16Array_GetValue_1=
function(){return a.asm.emscripten_bind_DracoInt16Array_GetValue_1.apply(null,arguments)},ec=a._emscripten_bind_DracoInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoInt16Array_size_0.apply(null,arguments)},fc=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt16Array___destroy___0.apply(null,arguments)},Za=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null,
arguments)},gc=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},hc=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},ic=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},$a=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm.emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,
arguments)},jc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm.emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},ab=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm.emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},kc=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm.emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},lc=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm.emscripten_bind_DecoderBuffer___destroy___0.apply(null,
arguments)},bb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm.emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return a.asm.emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},nc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},oc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null,
arguments)},pc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttribute_2=
function(){return a.asm.emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm.emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null,
arguments)},wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm.emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm.emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt16Array_3.apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=
function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt32Array_3.apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null,
arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3.apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3.apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3.apply(null,arguments)},
Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3.apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3.apply(null,arguments)},Jc=
a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return a.asm.emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5.apply(null,arguments)},Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm.emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},Lc=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm.emscripten_bind_Decoder___destroy___0.apply(null,arguments)},cb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm.emscripten_bind_Mesh_Mesh_0.apply(null,
arguments)},Mc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm.emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},Nc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm.emscripten_bind_Mesh_num_attributes_0.apply(null,arguments)},Oc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm.emscripten_bind_Mesh_num_points_0.apply(null,arguments)},Pc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm.emscripten_bind_Mesh___destroy___0.apply(null,arguments)},
Qc=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm.emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},db=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm.emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,arguments)},Rc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},Sc=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoInt32Array_size_0.apply(null,
arguments)},Tc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},eb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm.emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},Uc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm.emscripten_bind_Metadata___destroy___0.apply(null,arguments)},Vc=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm.emscripten_enum_draco_StatusCode_OK.apply(null,
arguments)},Wc=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_DRACO_ERROR.apply(null,arguments)},Xc=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},Yc=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm.emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Zc=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=
function(){return a.asm.emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)},$c=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm.emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return a.asm.emscripten_enum_draco_DataType_DT_INVALID.apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT8.apply(null,
arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT8.apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT16.apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT16.apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT32.apply(null,
arguments)},gd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT32.apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT64.apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT64.apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT32.apply(null,
arguments)},kd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT64.apply(null,arguments)},ld=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return a.asm.emscripten_enum_draco_DataType_DT_BOOL.apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return a.asm.emscripten_enum_draco_DataType_DT_TYPES_COUNT.apply(null,arguments)},nd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,
arguments)},od=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},pd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},qd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,
arguments)},rd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},sd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},td=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,
arguments)},ud=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},vd=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},wd=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},xd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=
function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},yd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},zd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)};a._setThrew=function(){return a.asm.setThrew.apply(null,arguments)};var ta=a.__ZSt18uncaught_exceptionv=
function(){return a.asm._ZSt18uncaught_exceptionv.apply(null,arguments)};a._free=function(){return a.asm.free.apply(null,arguments)};var ib=a._malloc=function(){return a.asm.malloc.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.__growWasmMemory=function(){return a.asm.__growWasmMemory.apply(null,arguments)};
a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)};
a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_iidiiii=function(){return a.asm.dynCall_iidiiii.apply(null,arguments)};a.dynCall_jiji=function(){return a.asm.dynCall_jiji.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.asm=La;var fa;a.then=function(e){if(fa)e(a);
else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();e(a)}}return a};ja=function c(){fa||ma();fa||(ja=c)};a.run=ma;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();ma();p.prototype=Object.create(p.prototype);p.prototype.constructor=p;p.prototype.__class__=p;p.__cache__={};a.WrapperObject=p;a.getCache=u;a.wrapPointer=N;a.castObject=function(a,b){return N(a.ptr,b)};a.NULL=N(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";
a.__destroy__();delete u(a.__class__)[a.ptr]};a.compare=function(a,b){return a.ptr===b.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var n={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(n.needed){for(var c=0;c<n.temps.length;c++)a._free(n.temps[c]);n.temps.length=0;a._free(n.buffer);n.buffer=0;n.size+=n.needed;n.needed=0}n.buffer||(n.size+=128,n.buffer=a._malloc(n.size),t(n.buffer));n.pos=0},alloc:function(c,b){t(n.buffer);c=c.length*b.BYTES_PER_ELEMENT;
c=c+7&-8;n.pos+c>=n.size?(t(0<c),n.needed+=c,b=a._malloc(c),n.temps.push(b)):(b=n.buffer+n.pos,n.pos+=c);return b},copy:function(a,b,d){switch(b.BYTES_PER_ELEMENT){case 2:d>>=1;break;case 4:d>>=2;break;case 8:d>>=3}for(var c=0;c<a.length;c++)b[d+c]=a[c]}};x.prototype=Object.create(p.prototype);x.prototype.constructor=x;x.prototype.__class__=x;x.__cache__={};a.Status=x;x.prototype.code=x.prototype.code=function(){return jb(this.ptr)};x.prototype.ok=x.prototype.ok=function(){return!!kb(this.ptr)};x.prototype.error_msg=
x.prototype.error_msg=function(){return X(lb(this.ptr))};x.prototype.__destroy__=x.prototype.__destroy__=function(){mb(this.ptr)};A.prototype=Object.create(p.prototype);A.prototype.constructor=A;A.prototype.__class__=A;A.__cache__={};a.DracoUInt16Array=A;A.prototype.GetValue=A.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return nb(c,a)};A.prototype.size=A.prototype.size=function(){return ob(this.ptr)};A.prototype.__destroy__=A.prototype.__destroy__=function(){pb(this.ptr)};
B.prototype=Object.create(p.prototype);B.prototype.constructor=B;B.prototype.__class__=B;B.__cache__={};a.PointCloud=B;B.prototype.num_attributes=B.prototype.num_attributes=function(){return qb(this.ptr)};B.prototype.num_points=B.prototype.num_points=function(){return rb(this.ptr)};B.prototype.__destroy__=B.prototype.__destroy__=function(){sb(this.ptr)};C.prototype=Object.create(p.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.DracoUInt8Array=C;C.prototype.GetValue=
C.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return tb(c,a)};C.prototype.size=C.prototype.size=function(){return ub(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){vb(this.ptr)};D.prototype=Object.create(p.prototype);D.prototype.constructor=D;D.prototype.__class__=D;D.__cache__={};a.DracoUInt32Array=D;D.prototype.GetValue=D.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return wb(c,a)};D.prototype.size=D.prototype.size=
function(){return xb(this.ptr)};D.prototype.__destroy__=D.prototype.__destroy__=function(){yb(this.ptr)};E.prototype=Object.create(p.prototype);E.prototype.constructor=E;E.prototype.__class__=E;E.__cache__={};a.AttributeOctahedronTransform=E;E.prototype.InitFromAttribute=E.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!zb(c,a)};E.prototype.quantization_bits=E.prototype.quantization_bits=function(){return Ab(this.ptr)};E.prototype.__destroy__=E.prototype.__destroy__=
function(){Bb(this.ptr)};q.prototype=Object.create(p.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.PointAttribute=q;q.prototype.size=q.prototype.size=function(){return Cb(this.ptr)};q.prototype.GetAttributeTransformData=q.prototype.GetAttributeTransformData=function(){return N(Db(this.ptr),J)};q.prototype.attribute_type=q.prototype.attribute_type=function(){return Eb(this.ptr)};q.prototype.data_type=q.prototype.data_type=function(){return Fb(this.ptr)};q.prototype.num_components=
q.prototype.num_components=function(){return Gb(this.ptr)};q.prototype.normalized=q.prototype.normalized=function(){return!!Hb(this.ptr)};q.prototype.byte_stride=q.prototype.byte_stride=function(){return Ib(this.ptr)};q.prototype.byte_offset=q.prototype.byte_offset=function(){return Jb(this.ptr)};q.prototype.unique_id=q.prototype.unique_id=function(){return Kb(this.ptr)};q.prototype.__destroy__=q.prototype.__destroy__=function(){Lb(this.ptr)};J.prototype=Object.create(p.prototype);J.prototype.constructor=
J;J.prototype.__class__=J;J.__cache__={};a.AttributeTransformData=J;J.prototype.transform_type=J.prototype.transform_type=function(){return Mb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){Nb(this.ptr)};w.prototype=Object.create(p.prototype);w.prototype.constructor=w;w.prototype.__class__=w;w.__cache__={};a.AttributeQuantizationTransform=w;w.prototype.InitFromAttribute=w.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!Ob(c,a)};
w.prototype.quantization_bits=w.prototype.quantization_bits=function(){return Pb(this.ptr)};w.prototype.min_value=w.prototype.min_value=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Qb(c,a)};w.prototype.range=w.prototype.range=function(){return Rb(this.ptr)};w.prototype.__destroy__=w.prototype.__destroy__=function(){Sb(this.ptr)};F.prototype=Object.create(p.prototype);F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.DracoInt8Array=F;F.prototype.GetValue=F.prototype.GetValue=
function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Tb(c,a)};F.prototype.size=F.prototype.size=function(){return Ub(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){Vb(this.ptr)};r.prototype=Object.create(p.prototype);r.prototype.constructor=r;r.prototype.__class__=r;r.__cache__={};a.MetadataQuerier=r;r.prototype.HasEntry=r.prototype.HasEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return!!Wb(c,
a,b)};r.prototype.GetIntEntry=r.prototype.GetIntEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return Xb(c,a,b)};r.prototype.GetIntEntryArray=r.prototype.GetIntEntryArray=function(a,b,d){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);d&&"object"===typeof d&&(d=d.ptr);Yb(c,a,b,d)};r.prototype.GetDoubleEntry=r.prototype.GetDoubleEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===
typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return Zb(c,a,b)};r.prototype.GetStringEntry=r.prototype.GetStringEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return X($b(c,a,b))};r.prototype.NumEntries=r.prototype.NumEntries=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ac(c,a)};r.prototype.GetEntryName=r.prototype.GetEntryName=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===
typeof b&&(b=b.ptr);return X(bc(c,a,b))};r.prototype.__destroy__=r.prototype.__destroy__=function(){cc(this.ptr)};G.prototype=Object.create(p.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.DracoInt16Array=G;G.prototype.GetValue=G.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return dc(c,a)};G.prototype.size=G.prototype.size=function(){return ec(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){fc(this.ptr)};H.prototype=
Object.create(p.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoFloat32Array=H;H.prototype.GetValue=H.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return gc(c,a)};H.prototype.size=H.prototype.size=function(){return hc(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){ic(this.ptr)};O.prototype=Object.create(p.prototype);O.prototype.constructor=O;O.prototype.__class__=O;O.__cache__={};a.GeometryAttribute=O;O.prototype.__destroy__=
O.prototype.__destroy__=function(){jc(this.ptr)};K.prototype=Object.create(p.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DecoderBuffer=K;K.prototype.Init=K.prototype.Init=function(a,b){var c=this.ptr;n.prepare();if("object"==typeof a&&"object"===typeof a){var e=n.alloc(a,T);n.copy(a,T,e);a=e}b&&"object"===typeof b&&(b=b.ptr);kc(c,a,b)};K.prototype.__destroy__=K.prototype.__destroy__=function(){lc(this.ptr)};g.prototype=Object.create(p.prototype);g.prototype.constructor=
g;g.prototype.__class__=g;g.__cache__={};a.Decoder=g;g.prototype.GetEncodedGeometryType=g.prototype.GetEncodedGeometryType=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return mc(c,a)};g.prototype.DecodeBufferToPointCloud=g.prototype.DecodeBufferToPointCloud=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return N(nc(c,a,b),x)};g.prototype.DecodeBufferToMesh=g.prototype.DecodeBufferToMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&
(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return N(oc(c,a,b),x)};g.prototype.GetAttributeId=g.prototype.GetAttributeId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return pc(c,a,b)};g.prototype.GetAttributeIdByName=g.prototype.GetAttributeIdByName=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return qc(c,a,b)};g.prototype.GetAttributeIdByMetadataEntry=g.prototype.GetAttributeIdByMetadataEntry=
function(a,b,d){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);d=d&&"object"===typeof d?d.ptr:V(d);return rc(c,a,b,d)};g.prototype.GetAttribute=g.prototype.GetAttribute=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return N(sc(c,a,b),q)};g.prototype.GetAttributeByUniqueId=g.prototype.GetAttributeByUniqueId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);
return N(tc(c,a,b),q)};g.prototype.GetMetadata=g.prototype.GetMetadata=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return N(uc(c,a),L)};g.prototype.GetAttributeMetadata=g.prototype.GetAttributeMetadata=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return N(vc(c,a,b),L)};g.prototype.GetFaceFromMesh=g.prototype.GetFaceFromMesh=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===
typeof d&&(d=d.ptr);return!!wc(c,a,b,d)};g.prototype.GetTriangleStripsFromMesh=g.prototype.GetTriangleStripsFromMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return xc(c,a,b)};g.prototype.GetTrianglesUInt16Array=g.prototype.GetTrianglesUInt16Array=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!yc(c,a,b,d)};g.prototype.GetTrianglesUInt32Array=g.prototype.GetTrianglesUInt32Array=
function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!zc(c,a,b,d)};g.prototype.GetAttributeFloat=g.prototype.GetAttributeFloat=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ac(c,a,b,d)};g.prototype.GetAttributeFloatForAllPoints=g.prototype.GetAttributeFloatForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&
(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Bc(c,a,b,d)};g.prototype.GetAttributeIntForAllPoints=g.prototype.GetAttributeIntForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Cc(c,a,b,d)};g.prototype.GetAttributeInt8ForAllPoints=g.prototype.GetAttributeInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&
(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Dc(c,a,b,d)};g.prototype.GetAttributeUInt8ForAllPoints=g.prototype.GetAttributeUInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ec(c,a,b,d)};g.prototype.GetAttributeInt16ForAllPoints=g.prototype.GetAttributeInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&
(d=d.ptr);return!!Fc(c,a,b,d)};g.prototype.GetAttributeUInt16ForAllPoints=g.prototype.GetAttributeUInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Gc(c,a,b,d)};g.prototype.GetAttributeInt32ForAllPoints=g.prototype.GetAttributeInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hc(c,
a,b,d)};g.prototype.GetAttributeUInt32ForAllPoints=g.prototype.GetAttributeUInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ic(c,a,b,d)};g.prototype.GetAttributeDataArrayForAllPoints=g.prototype.GetAttributeDataArrayForAllPoints=function(a,b,d,e,f){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&
(e=e.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Jc(c,a,b,d,e,f)};g.prototype.SkipAttributeTransform=g.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Kc(b,a)};g.prototype.__destroy__=g.prototype.__destroy__=function(){Lc(this.ptr)};y.prototype=Object.create(p.prototype);y.prototype.constructor=y;y.prototype.__class__=y;y.__cache__={};a.Mesh=y;y.prototype.num_faces=y.prototype.num_faces=function(){return Mc(this.ptr)};y.prototype.num_attributes=y.prototype.num_attributes=
function(){return Nc(this.ptr)};y.prototype.num_points=y.prototype.num_points=function(){return Oc(this.ptr)};y.prototype.__destroy__=y.prototype.__destroy__=function(){Pc(this.ptr)};Q.prototype=Object.create(p.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.VoidPtr=Q;Q.prototype.__destroy__=Q.prototype.__destroy__=function(){Qc(this.ptr)};I.prototype=Object.create(p.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoInt32Array=I;I.prototype.GetValue=
I.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Rc(b,a)};I.prototype.size=I.prototype.size=function(){return Sc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Tc(this.ptr)};L.prototype=Object.create(p.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.Metadata=L;L.prototype.__destroy__=L.prototype.__destroy__=function(){Uc(this.ptr)};(function(){function c(){a.OK=Vc();a.DRACO_ERROR=Wc();a.IO_ERROR=Xc();a.INVALID_PARAMETER=
Yc();a.UNSUPPORTED_VERSION=Zc();a.UNKNOWN_VERSION=$c();a.DT_INVALID=ad();a.DT_INT8=bd();a.DT_UINT8=cd();a.DT_INT16=dd();a.DT_UINT16=ed();a.DT_INT32=fd();a.DT_UINT32=gd();a.DT_INT64=hd();a.DT_UINT64=id();a.DT_FLOAT32=jd();a.DT_FLOAT64=kd();a.DT_BOOL=ld();a.DT_TYPES_COUNT=md();a.INVALID_GEOMETRY_TYPE=nd();a.POINT_CLOUD=od();a.TRIANGULAR_MESH=pd();a.ATTRIBUTE_INVALID_TRANSFORM=qd();a.ATTRIBUTE_NO_TRANSFORM=rd();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=sd();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=td();a.INVALID=ud();
a.POSITION=vd();a.NORMAL=wd();a.COLOR=xd();a.TEX_COORD=yd();a.GENERIC=zd()}Ba?c():Da.unshift(c)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return m}}();"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(e){var k=0;return function(){return k<e.length?{done:!1,value:e[k++]}:{done:!0}}};$jscomp.arrayIterator=function(e){return{next:$jscomp.arrayIteratorImpl(e)}};$jscomp.makeIterator=function(e){var k="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return k?k.call(e):$jscomp.arrayIterator(e)};
$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(e,k,p){e!=Array.prototype&&e!=Object.prototype&&(e[k]=p.value)};
$jscomp.polyfill=function(e,k,p,m){if(k){p=$jscomp.global;e=e.split(".");for(m=0;m<e.length-1;m++){var f=e[m];f in p||(p[f]={});p=p[f]}e=e[e.length-1];m=p[e];k=k(m);k!=m&&null!=k&&$jscomp.defineProperty(p,e,{configurable:!0,writable:!0,value:k})}};$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.polyfill("Promise",function(e){function k(){this.batch_=null}function p(h){return h instanceof f?h:new f(function(f,e){f(h)})}if(e&&!$jscomp.FORCE_POLYFILL_PROMISE)return e;k.prototype.asyncExecute=function(h){if(null==this.batch_){this.batch_=[];var f=this;this.asyncExecuteFunction(function(){f.executeBatch_()})}this.batch_.push(h)};var m=$jscomp.global.setTimeout;k.prototype.asyncExecuteFunction=function(h){m(h,0)};k.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var h=
this.batch_;this.batch_=[];for(var f=0;f<h.length;++f){var e=h[f];h[f]=null;try{e()}catch(Z){this.asyncThrow_(Z)}}}this.batch_=null};k.prototype.asyncThrow_=function(h){this.asyncExecuteFunction(function(){throw h;})};var f=function(h){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var f=this.createResolveAndReject_();try{h(f.resolve,f.reject)}catch(U){f.reject(U)}};f.prototype.createResolveAndReject_=function(){function f(f){return function(h){p||(p=!0,f.call(e,h))}}var e=this,p=!1;
return{resolve:f(this.resolveTo_),reject:f(this.reject_)}};f.prototype.resolveTo_=function(h){if(h===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(h instanceof f)this.settleSameAsPromise_(h);else{a:switch(typeof h){case "object":var e=null!=h;break a;case "function":e=!0;break a;default:e=!1}e?this.resolveToNonPromiseObj_(h):this.fulfill_(h)}};f.prototype.resolveToNonPromiseObj_=function(f){var h=void 0;try{h=f.then}catch(U){this.reject_(U);return}"function"==typeof h?
this.settleSameAsThenable_(h,f):this.fulfill_(f)};f.prototype.reject_=function(f){this.settle_(2,f)};f.prototype.fulfill_=function(f){this.settle_(1,f)};f.prototype.settle_=function(f,e){if(0!=this.state_)throw Error("Cannot settle("+f+", "+e+"): Promise already settled in state"+this.state_);this.state_=f;this.result_=e;this.executeOnSettledCallbacks_()};f.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var f=0;f<this.onSettledCallbacks_.length;++f)S.asyncExecute(this.onSettledCallbacks_[f]);
this.onSettledCallbacks_=null}};var S=new k;f.prototype.settleSameAsPromise_=function(f){var e=this.createResolveAndReject_();f.callWhenSettled_(e.resolve,e.reject)};f.prototype.settleSameAsThenable_=function(f,e){var h=this.createResolveAndReject_();try{f.call(e,h.resolve,h.reject)}catch(Z){h.reject(Z)}};f.prototype.then=function(e,p){function h(f,e){return"function"==typeof f?function(e){try{k(f(e))}catch(ba){m(ba)}}:e}var k,m,K=new f(function(f,e){k=f;m=e});this.callWhenSettled_(h(e,k),h(p,m));
return K};f.prototype.catch=function(f){return this.then(void 0,f)};f.prototype.callWhenSettled_=function(f,e){function p(){switch(h.state_){case 1:f(h.result_);break;case 2:e(h.result_);break;default:throw Error("Unexpected state: "+h.state_);}}var h=this;null==this.onSettledCallbacks_?S.asyncExecute(p):this.onSettledCallbacks_.push(p)};f.resolve=p;f.reject=function(e){return new f(function(f,p){p(e)})};f.race=function(e){return new f(function(f,h){for(var k=$jscomp.makeIterator(e),m=k.next();!m.done;m=
k.next())p(m.value).callWhenSettled_(f,h)})};f.all=function(e){var h=$jscomp.makeIterator(e),k=h.next();return k.done?p([]):new f(function(f,e){function m(e){return function(p){S[e]=p;K--;0==K&&f(S)}}var S=[],K=0;do S.push(void 0),K++,p(k.value).callWhenSettled_(m(S.length-1),e),k=h.next();while(!k.done)})};return f},"es6","es3");$jscomp.checkEs6ConformanceViaProxy=function(){try{var e={},k=Object.create(new $jscomp.global.Proxy(e,{get:function(p,m,f){return p==e&&"q"==m&&f==k}}));return!0===k.q}catch(p){return!1}};
$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.owns=function(e,k){return Object.prototype.hasOwnProperty.call(e,k)};
$jscomp.polyfill("Array.prototype.copyWithin",function(e){function k(e){e=Number(e);return Infinity===e||-Infinity===e?e:e|0}return e?e:function(e,m,f){var p=this.length;e=k(e);m=k(m);f=void 0===f?p:k(f);e=0>e?Math.max(p+e,0):Math.min(e,p);m=0>m?Math.max(p+m,0):Math.min(m,p);f=0>f?Math.max(p+f,0):Math.min(f,p);if(e<m)for(;m<f;)m in this?this[e++]=this[m++]:(delete this[e++],m++);else for(f=Math.min(f,p+m-e),e+=f-m;f>m;)--f in this?this[--e]=this[f]:delete this[--e];return this}},"es6","es3");
var DracoDecoderModule=function(){var e="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(e=e||__filename);return function(k){function p(l){return a.locateFile?a.locateFile(l,O):O+l}function m(a,c){a||K("Assertion failed: "+c)}function f(a,c){if(a){var b=ka;var d=a+c;for(c=a;b[c]&&!(c>=d);)++c;if(16<c-a&&b.subarray&&xa)b=xa.decode(b.subarray(a,c));else{for(d="";a<c;){var l=b[a++];if(l&128){var e=b[a++]&63;if(192==(l&224))d+=String.fromCharCode((l&
31)<<6|e);else{var f=b[a++]&63;l=224==(l&240)?(l&15)<<12|e<<6|f:(l&7)<<18|e<<12|f<<6|b[a++]&63;65536>l?d+=String.fromCharCode(l):(l-=65536,d+=String.fromCharCode(55296|l>>10,56320|l&1023))}}else d+=String.fromCharCode(l)}b=d}}else b="";return b}function S(a,c){0<a%c&&(a+=c-a%c);return a}function h(l){la=l;a.HEAP8=P=new Int8Array(l);a.HEAP16=new Int16Array(l);a.HEAP32=I=new Int32Array(l);a.HEAPU8=ka=new Uint8Array(l);a.HEAPU16=new Uint16Array(l);a.HEAPU32=new Uint32Array(l);a.HEAPF32=new Float32Array(l);
a.HEAPF64=new Float64Array(l)}function K(l){if(a.onAbort)a.onAbort(l);l+="";ca(l);ya=!0;l=new WebAssembly.RuntimeError("abort("+l+"). Build with -s ASSERTIONS=1 for more info.");za(l);throw l;}function U(a,c){return String.prototype.startsWith?a.startsWith(c):0===a.indexOf(c)}function Z(){try{if(da)return new Uint8Array(da);if(ma)return ma(Q);throw"both async and sync fetching of the wasm failed";}catch(l){K(l)}}function yd(){return da||!na&&!X||"function"!==typeof fetch||U(Q,"file://")?Promise.resolve().then(Z):
fetch(Q,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+Q+"'";return a.arrayBuffer()}).catch(function(){return Z()})}function ja(l){for(;0<l.length;){var c=l.shift();if("function"==typeof c)c(a);else{var b=c.func;"number"===typeof b?void 0===c.arg?pa.get(b)():pa.get(b)(c.arg):b(void 0===c.arg?null:c.arg)}}}function zd(a){this.excPtr=a;this.ptr=a-x.SIZE;this.set_type=function(a){I[this.ptr+x.TYPE_OFFSET>>2]=a};this.get_type=function(){return I[this.ptr+
x.TYPE_OFFSET>>2]};this.set_destructor=function(a){I[this.ptr+x.DESTRUCTOR_OFFSET>>2]=a};this.get_destructor=function(){return I[this.ptr+x.DESTRUCTOR_OFFSET>>2]};this.set_refcount=function(a){I[this.ptr+x.REFCOUNT_OFFSET>>2]=a};this.set_caught=function(a){P[this.ptr+x.CAUGHT_OFFSET>>0]=a?1:0};this.get_caught=function(){return 0!=P[this.ptr+x.CAUGHT_OFFSET>>0]};this.set_rethrown=function(a){P[this.ptr+x.RETHROWN_OFFSET>>0]=a?1:0};this.get_rethrown=function(){return 0!=P[this.ptr+x.RETHROWN_OFFSET>>
0]};this.init=function(a,b){this.set_type(a);this.set_destructor(b);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){I[this.ptr+x.REFCOUNT_OFFSET>>2]+=1};this.release_ref=function(){var a=I[this.ptr+x.REFCOUNT_OFFSET>>2];I[this.ptr+x.REFCOUNT_OFFSET>>2]=a-1;return 1===a}}function ia(){return 0<ia.uncaught_exceptions}function aa(){if(!aa.strings){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&
navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:qa||"./this.program"},c;for(c in Aa)a[c]=Aa[c];var b=[];for(c in a)b.push(c+"="+a[c]);aa.strings=b}return aa.strings}function ba(l){function c(){if(!oa&&(oa=!0,a.calledRun=!0,!ya)){Ba=!0;ja(Ca);ja(Da);Ea(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Fa.unshift(a.postRun.shift());ja(Fa)}}if(!(0<Y)){if(a.preRun)for("function"==
typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Ga.unshift(a.preRun.shift());ja(Ga);0<Y||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);c()},1)):c())}}function q(){}function u(a){return(a||q).__cache__}function L(a,c){var b=u(c),d=b[a];if(d)return d;d=Object.create((c||q).prototype);d.ptr=a;return b[a]=d}function V(a){if("string"===typeof a){for(var c=0,b=0;b<a.length;++b){var d=a.charCodeAt(b);55296<=d&&57343>=d&&(d=65536+((d&1023)<<
10)|a.charCodeAt(++b)&1023);127>=d?++c:c=2047>=d?c+2:65535>=d?c+3:c+4}c=Array(c+1);b=0;d=c.length;if(0<d){d=b+d-1;for(var l=0;l<a.length;++l){var e=a.charCodeAt(l);if(55296<=e&&57343>=e){var f=a.charCodeAt(++l);e=65536+((e&1023)<<10)|f&1023}if(127>=e){if(b>=d)break;c[b++]=e}else{if(2047>=e){if(b+1>=d)break;c[b++]=192|e>>6}else{if(65535>=e){if(b+2>=d)break;c[b++]=224|e>>12}else{if(b+3>=d)break;c[b++]=240|e>>18;c[b++]=128|e>>12&63}c[b++]=128|e>>6&63}c[b++]=128|e&63}}c[b]=0}a=n.alloc(c,P);n.copy(c,P,
a)}return a}function ra(a){if("object"===typeof a){var c=n.alloc(a,P);n.copy(a,P,c);return c}return a}function T(){throw"cannot construct a VoidPtr, no constructor in IDL";}function M(){this.ptr=Ha();u(M)[this.ptr]=this}function J(){this.ptr=Ia();u(J)[this.ptr]=this}function R(){this.ptr=Ja();u(R)[this.ptr]=this}function r(){this.ptr=Ka();u(r)[this.ptr]=this}function w(){this.ptr=La();u(w)[this.ptr]=this}function z(){this.ptr=Ma();u(z)[this.ptr]=this}function A(){this.ptr=Na();u(A)[this.ptr]=this}
function y(){this.ptr=Oa();u(y)[this.ptr]=this}function N(){this.ptr=Pa();u(N)[this.ptr]=this}function v(){throw"cannot construct a Status, no constructor in IDL";}function B(){this.ptr=Qa();u(B)[this.ptr]=this}function C(){this.ptr=Ra();u(C)[this.ptr]=this}function D(){this.ptr=Sa();u(D)[this.ptr]=this}function E(){this.ptr=Ta();u(E)[this.ptr]=this}function F(){this.ptr=Ua();u(F)[this.ptr]=this}function G(){this.ptr=Va();u(G)[this.ptr]=this}function H(){this.ptr=Wa();u(H)[this.ptr]=this}function t(){this.ptr=
Xa();u(t)[this.ptr]=this}function g(){this.ptr=Ya();u(g)[this.ptr]=this}k=k||{};var a="undefined"!==typeof k?k:{},Ea,za;a.ready=new Promise(function(a,c){Ea=a;za=c});var Za=!1,$a=!1;a.onRuntimeInitialized=function(){Za=!0;if($a&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){$a=!0;if(Za&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3<a.length?!1:1==
a[0]&&0<=a[1]&&3>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};var ea={},W;for(W in a)a.hasOwnProperty(W)&&(ea[W]=a[W]);var qa="./this.program",na=!1,X=!1,sa=!1,ab=!1;na="object"===typeof window;X="function"===typeof importScripts;sa="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;ab=!na&&!sa&&!X;var O="",ta,ua;if(sa){O=X?require("path").dirname(O)+"/":__dirname+"/";var va=function(a,c){ta||(ta=require("fs"));ua||(ua=require("path"));a=ua.normalize(a);return ta.readFileSync(a,
c?null:"utf8")};var ma=function(a){a=va(a,!0);a.buffer||(a=new Uint8Array(a));m(a.buffer);return a};1<process.argv.length&&(qa=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);process.on("uncaughtException",function(a){throw a;});process.on("unhandledRejection",K);a.inspect=function(){return"[Emscripten Module object]"}}else if(ab)"undefined"!=typeof read&&(va=function(a){return read(a)}),ma=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");
m("object"===typeof a);return a},"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(na||X)X?O=self.location.href:document.currentScript&&(O=document.currentScript.src),e&&(O=e),O=0!==O.indexOf("blob:")?O.substr(0,O.lastIndexOf("/")+1):"",va=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);return c.responseText},X&&(ma=function(a){var c=new XMLHttpRequest;c.open("GET",
a,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)});a.print||console.log.bind(console);var ca=a.printErr||console.warn.bind(console);for(W in ea)ea.hasOwnProperty(W)&&(a[W]=ea[W]);ea=null;a.thisProgram&&(qa=a.thisProgram);var da;a.wasmBinary&&(da=a.wasmBinary);"object"!==typeof WebAssembly&&K("no native wasm support detected");var fa,pa,ya=!1,xa="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");
var P,ka,I,bb=a.INITIAL_MEMORY||16777216;if(fa=a.wasmMemory?a.wasmMemory:new WebAssembly.Memory({initial:bb/65536,maximum:32768}))var la=fa.buffer;bb=la.byteLength;h(la);var Ga=[],Ca=[],Da=[],Fa=[],Ba=!1,Y=0,wa=null,ha=null;a.preloadedImages={};a.preloadedAudios={};var Q="draco_decoder_gltf.wasm";U(Q,"data:application/octet-stream;base64,")||(Q=p(Q));var x={DESTRUCTOR_OFFSET:0,REFCOUNT_OFFSET:4,TYPE_OFFSET:8,CAUGHT_OFFSET:12,RETHROWN_OFFSET:13,SIZE:16},Aa={};Ca.push({func:function(){cb()}});var eb=
{__cxa_allocate_exception:function(a){return db(a+x.SIZE)+x.SIZE},__cxa_throw:function(a,c,b){(new zd(a)).init(c,b);"uncaught_exception"in ia?ia.uncaught_exceptions++:ia.uncaught_exceptions=1;throw a;},abort:function(){K()},array_bounds_check_error:function(a,c){throw"Array index "+a+" out of bounds: [0,"+c+")";},emscripten_memcpy_big:function(a,c,b){ka.copyWithin(a,c,c+b)},emscripten_resize_heap:function(a){a>>>=0;var c=ka.length;if(2147483648<a)return!1;for(var b=1;4>=b;b*=2){var d=c*(1+.2/b);d=
Math.min(d,a+100663296);d=Math.min(2147483648,S(Math.max(16777216,a,d),65536));a:{try{fa.grow(d-la.byteLength+65535>>>16);h(fa.buffer);var e=1;break a}catch(Bd){}e=void 0}if(e)return!0}return!1},environ_get:function(a,c){var b=0;aa().forEach(function(d,e){var f=c+b;e=I[a+4*e>>2]=f;for(f=0;f<d.length;++f)P[e++>>0]=d.charCodeAt(f);P[e>>0]=0;b+=d.length+1});return 0},environ_sizes_get:function(a,c){var b=aa();I[a>>2]=b.length;var d=0;b.forEach(function(a){d+=a.length+1});I[c>>2]=d;return 0},memory:fa};
(function(){function e(c,b){a.asm=c.exports;pa=a.asm.__indirect_function_table;Y--;a.monitorRunDependencies&&a.monitorRunDependencies(Y);0==Y&&(null!==wa&&(clearInterval(wa),wa=null),ha&&(c=ha,ha=null,c()))}function c(a){e(a.instance)}function b(a){return yd().then(function(a){return WebAssembly.instantiate(a,d)}).then(a,function(a){ca("failed to asynchronously prepare wasm: "+a);K(a)})}var d={env:eb,wasi_snapshot_preview1:eb};Y++;a.monitorRunDependencies&&a.monitorRunDependencies(Y);if(a.instantiateWasm)try{return a.instantiateWasm(d,
e)}catch(Ad){return ca("Module.instantiateWasm callback failed with error: "+Ad),!1}(function(){if(da||"function"!==typeof WebAssembly.instantiateStreaming||U(Q,"data:application/octet-stream;base64,")||U(Q,"file://")||"function"!==typeof fetch)return b(c);fetch(Q,{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,d).then(c,function(a){ca("wasm streaming compile failed: "+a);ca("falling back to ArrayBuffer instantiation");return b(c)})})})();return{}})();var cb=
a.___wasm_call_ctors=function(){return(cb=a.___wasm_call_ctors=a.asm.__wasm_call_ctors).apply(null,arguments)};a.___em_js__array_bounds_check_error=function(){return(a.___em_js__array_bounds_check_error=a.asm.__em_js__array_bounds_check_error).apply(null,arguments)};var fb=a._emscripten_bind_VoidPtr___destroy___0=function(){return(fb=a._emscripten_bind_VoidPtr___destroy___0=a.asm.emscripten_bind_VoidPtr___destroy___0).apply(null,arguments)},Ha=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(Ha=
a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.emscripten_bind_DecoderBuffer_DecoderBuffer_0).apply(null,arguments)},gb=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(gb=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.emscripten_bind_DecoderBuffer_Init_2).apply(null,arguments)},hb=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return(hb=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.emscripten_bind_DecoderBuffer___destroy___0).apply(null,arguments)},Ia=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=
function(){return(Ia=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=a.asm.emscripten_bind_AttributeTransformData_AttributeTransformData_0).apply(null,arguments)},ib=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(ib=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.emscripten_bind_AttributeTransformData_transform_type_0).apply(null,arguments)},jb=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return(jb=a._emscripten_bind_AttributeTransformData___destroy___0=
a.asm.emscripten_bind_AttributeTransformData___destroy___0).apply(null,arguments)},Ja=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Ja=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=a.asm.emscripten_bind_GeometryAttribute_GeometryAttribute_0).apply(null,arguments)},kb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(kb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.emscripten_bind_GeometryAttribute___destroy___0).apply(null,arguments)},
Ka=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ka=a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.emscripten_bind_PointAttribute_PointAttribute_0).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute_size_0=function(){return(lb=a._emscripten_bind_PointAttribute_size_0=a.asm.emscripten_bind_PointAttribute_size_0).apply(null,arguments)},mb=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(mb=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=
a.asm.emscripten_bind_PointAttribute_GetAttributeTransformData_0).apply(null,arguments)},nb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(nb=a._emscripten_bind_PointAttribute_attribute_type_0=a.asm.emscripten_bind_PointAttribute_attribute_type_0).apply(null,arguments)},ob=a._emscripten_bind_PointAttribute_data_type_0=function(){return(ob=a._emscripten_bind_PointAttribute_data_type_0=a.asm.emscripten_bind_PointAttribute_data_type_0).apply(null,arguments)},pb=a._emscripten_bind_PointAttribute_num_components_0=
function(){return(pb=a._emscripten_bind_PointAttribute_num_components_0=a.asm.emscripten_bind_PointAttribute_num_components_0).apply(null,arguments)},qb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(qb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.emscripten_bind_PointAttribute_normalized_0).apply(null,arguments)},rb=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return(rb=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.emscripten_bind_PointAttribute_byte_stride_0).apply(null,
arguments)},sb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(sb=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.emscripten_bind_PointAttribute_byte_offset_0).apply(null,arguments)},tb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return(tb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.emscripten_bind_PointAttribute_unique_id_0).apply(null,arguments)},ub=a._emscripten_bind_PointAttribute___destroy___0=function(){return(ub=a._emscripten_bind_PointAttribute___destroy___0=
a.asm.emscripten_bind_PointAttribute___destroy___0).apply(null,arguments)},La=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(La=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0).apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return(vb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=
a.asm.emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1).apply(null,arguments)},wb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(wb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.emscripten_bind_AttributeQuantizationTransform_quantization_bits_0).apply(null,arguments)},xb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(xb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=
a.asm.emscripten_bind_AttributeQuantizationTransform_min_value_1).apply(null,arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(yb=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.emscripten_bind_AttributeQuantizationTransform_range_0).apply(null,arguments)},zb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(zb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.emscripten_bind_AttributeQuantizationTransform___destroy___0).apply(null,
arguments)},Ma=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Ma=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=a.asm.emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0).apply(null,arguments)},Ab=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(Ab=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1).apply(null,
arguments)},Bb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(Bb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.emscripten_bind_AttributeOctahedronTransform_quantization_bits_0).apply(null,arguments)},Cb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(Cb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.emscripten_bind_AttributeOctahedronTransform___destroy___0).apply(null,arguments)},
Na=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Na=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.emscripten_bind_PointCloud_PointCloud_0).apply(null,arguments)},Db=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(Db=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.emscripten_bind_PointCloud_num_attributes_0).apply(null,arguments)},Eb=a._emscripten_bind_PointCloud_num_points_0=function(){return(Eb=a._emscripten_bind_PointCloud_num_points_0=a.asm.emscripten_bind_PointCloud_num_points_0).apply(null,
arguments)},Fb=a._emscripten_bind_PointCloud___destroy___0=function(){return(Fb=a._emscripten_bind_PointCloud___destroy___0=a.asm.emscripten_bind_PointCloud___destroy___0).apply(null,arguments)},Oa=a._emscripten_bind_Mesh_Mesh_0=function(){return(Oa=a._emscripten_bind_Mesh_Mesh_0=a.asm.emscripten_bind_Mesh_Mesh_0).apply(null,arguments)},Gb=a._emscripten_bind_Mesh_num_faces_0=function(){return(Gb=a._emscripten_bind_Mesh_num_faces_0=a.asm.emscripten_bind_Mesh_num_faces_0).apply(null,arguments)},Hb=
a._emscripten_bind_Mesh_num_attributes_0=function(){return(Hb=a._emscripten_bind_Mesh_num_attributes_0=a.asm.emscripten_bind_Mesh_num_attributes_0).apply(null,arguments)},Ib=a._emscripten_bind_Mesh_num_points_0=function(){return(Ib=a._emscripten_bind_Mesh_num_points_0=a.asm.emscripten_bind_Mesh_num_points_0).apply(null,arguments)},Jb=a._emscripten_bind_Mesh___destroy___0=function(){return(Jb=a._emscripten_bind_Mesh___destroy___0=a.asm.emscripten_bind_Mesh___destroy___0).apply(null,arguments)},Pa=
a._emscripten_bind_Metadata_Metadata_0=function(){return(Pa=a._emscripten_bind_Metadata_Metadata_0=a.asm.emscripten_bind_Metadata_Metadata_0).apply(null,arguments)},Kb=a._emscripten_bind_Metadata___destroy___0=function(){return(Kb=a._emscripten_bind_Metadata___destroy___0=a.asm.emscripten_bind_Metadata___destroy___0).apply(null,arguments)},Lb=a._emscripten_bind_Status_code_0=function(){return(Lb=a._emscripten_bind_Status_code_0=a.asm.emscripten_bind_Status_code_0).apply(null,arguments)},Mb=a._emscripten_bind_Status_ok_0=
function(){return(Mb=a._emscripten_bind_Status_ok_0=a.asm.emscripten_bind_Status_ok_0).apply(null,arguments)},Nb=a._emscripten_bind_Status_error_msg_0=function(){return(Nb=a._emscripten_bind_Status_error_msg_0=a.asm.emscripten_bind_Status_error_msg_0).apply(null,arguments)},Ob=a._emscripten_bind_Status___destroy___0=function(){return(Ob=a._emscripten_bind_Status___destroy___0=a.asm.emscripten_bind_Status___destroy___0).apply(null,arguments)},Qa=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=
function(){return(Qa=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm.emscripten_bind_DracoFloat32Array_DracoFloat32Array_0).apply(null,arguments)},Pb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Pb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.emscripten_bind_DracoFloat32Array_GetValue_1).apply(null,arguments)},Qb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Qb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.emscripten_bind_DracoFloat32Array_size_0).apply(null,
arguments)},Rb=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Rb=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.emscripten_bind_DracoFloat32Array___destroy___0).apply(null,arguments)},Ra=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ra=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.emscripten_bind_DracoInt8Array_DracoInt8Array_0).apply(null,arguments)},Sb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Sb=a._emscripten_bind_DracoInt8Array_GetValue_1=
a.asm.emscripten_bind_DracoInt8Array_GetValue_1).apply(null,arguments)},Tb=a._emscripten_bind_DracoInt8Array_size_0=function(){return(Tb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.emscripten_bind_DracoInt8Array_size_0).apply(null,arguments)},Ub=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Ub=a._emscripten_bind_DracoInt8Array___destroy___0=a.asm.emscripten_bind_DracoInt8Array___destroy___0).apply(null,arguments)},Sa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Sa=
a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.emscripten_bind_DracoUInt8Array_DracoUInt8Array_0).apply(null,arguments)},Vb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Vb=a._emscripten_bind_DracoUInt8Array_GetValue_1=a.asm.emscripten_bind_DracoUInt8Array_GetValue_1).apply(null,arguments)},Wb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Wb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.emscripten_bind_DracoUInt8Array_size_0).apply(null,arguments)},Xb=
a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Xb=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.emscripten_bind_DracoUInt8Array___destroy___0).apply(null,arguments)},Ta=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Ta=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.emscripten_bind_DracoInt16Array_DracoInt16Array_0).apply(null,arguments)},Yb=a._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(Yb=a._emscripten_bind_DracoInt16Array_GetValue_1=
a.asm.emscripten_bind_DracoInt16Array_GetValue_1).apply(null,arguments)},Zb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Zb=a._emscripten_bind_DracoInt16Array_size_0=a.asm.emscripten_bind_DracoInt16Array_size_0).apply(null,arguments)},$b=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return($b=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.emscripten_bind_DracoInt16Array___destroy___0).apply(null,arguments)},Ua=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=
function(){return(Ua=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=a.asm.emscripten_bind_DracoUInt16Array_DracoUInt16Array_0).apply(null,arguments)},ac=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(ac=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.emscripten_bind_DracoUInt16Array_GetValue_1).apply(null,arguments)},bc=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(bc=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.emscripten_bind_DracoUInt16Array_size_0).apply(null,
arguments)},cc=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(cc=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.emscripten_bind_DracoUInt16Array___destroy___0).apply(null,arguments)},Va=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(Va=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.emscripten_bind_DracoInt32Array_DracoInt32Array_0).apply(null,arguments)},dc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(dc=a._emscripten_bind_DracoInt32Array_GetValue_1=
a.asm.emscripten_bind_DracoInt32Array_GetValue_1).apply(null,arguments)},ec=a._emscripten_bind_DracoInt32Array_size_0=function(){return(ec=a._emscripten_bind_DracoInt32Array_size_0=a.asm.emscripten_bind_DracoInt32Array_size_0).apply(null,arguments)},fc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(fc=a._emscripten_bind_DracoInt32Array___destroy___0=a.asm.emscripten_bind_DracoInt32Array___destroy___0).apply(null,arguments)},Wa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=
function(){return(Wa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=a.asm.emscripten_bind_DracoUInt32Array_DracoUInt32Array_0).apply(null,arguments)},gc=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(gc=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.emscripten_bind_DracoUInt32Array_GetValue_1).apply(null,arguments)},hc=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(hc=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.emscripten_bind_DracoUInt32Array_size_0).apply(null,
arguments)},ic=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(ic=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.emscripten_bind_DracoUInt32Array___destroy___0).apply(null,arguments)},Xa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Xa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.emscripten_bind_MetadataQuerier_MetadataQuerier_0).apply(null,arguments)},jc=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(jc=a._emscripten_bind_MetadataQuerier_HasEntry_2=
a.asm.emscripten_bind_MetadataQuerier_HasEntry_2).apply(null,arguments)},kc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(kc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=a.asm.emscripten_bind_MetadataQuerier_GetIntEntry_2).apply(null,arguments)},lc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(lc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=a.asm.emscripten_bind_MetadataQuerier_GetIntEntryArray_3).apply(null,arguments)},mc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=
function(){return(mc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.emscripten_bind_MetadataQuerier_GetDoubleEntry_2).apply(null,arguments)},nc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(nc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.emscripten_bind_MetadataQuerier_GetStringEntry_2).apply(null,arguments)},oc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(oc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.emscripten_bind_MetadataQuerier_NumEntries_1).apply(null,
arguments)},pc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(pc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.emscripten_bind_MetadataQuerier_GetEntryName_2).apply(null,arguments)},qc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(qc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.emscripten_bind_MetadataQuerier___destroy___0).apply(null,arguments)},Ya=a._emscripten_bind_Decoder_Decoder_0=function(){return(Ya=a._emscripten_bind_Decoder_Decoder_0=
a.asm.emscripten_bind_Decoder_Decoder_0).apply(null,arguments)},rc=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(rc=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.emscripten_bind_Decoder_DecodeArrayToPointCloud_3).apply(null,arguments)},sc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(sc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.emscripten_bind_Decoder_DecodeArrayToMesh_3).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeId_2=
function(){return(tc=a._emscripten_bind_Decoder_GetAttributeId_2=a.asm.emscripten_bind_Decoder_GetAttributeId_2).apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(uc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=a.asm.emscripten_bind_Decoder_GetAttributeIdByName_2).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(vc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3).apply(null,
arguments)},wc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(wc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.emscripten_bind_Decoder_GetAttribute_2).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(xc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.emscripten_bind_Decoder_GetAttributeByUniqueId_2).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(yc=a._emscripten_bind_Decoder_GetMetadata_1=
a.asm.emscripten_bind_Decoder_GetMetadata_1).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(zc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.emscripten_bind_Decoder_GetAttributeMetadata_2).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(Ac=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.emscripten_bind_Decoder_GetFaceFromMesh_3).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=
function(){return(Bc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.emscripten_bind_Decoder_GetTriangleStripsFromMesh_2).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(Cc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.emscripten_bind_Decoder_GetTrianglesUInt16Array_3).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(Dc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.emscripten_bind_Decoder_GetTrianglesUInt32Array_3).apply(null,
arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm.emscripten_bind_Decoder_GetAttributeFloat_3).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Fc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Gc=
a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeIntForAllPoints_3).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Hc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(Ic=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=
a.asm.emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3).apply(null,arguments)},Jc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Jc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3).apply(null,arguments)},Kc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Kc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3).apply(null,
arguments)},Lc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Lc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3).apply(null,arguments)},Mc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Mc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=a.asm.emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3).apply(null,arguments)},Nc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=
function(){return(Nc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5).apply(null,arguments)},Oc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Oc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.emscripten_bind_Decoder_SkipAttributeTransform_1).apply(null,arguments)},Pc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Pc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=
a.asm.emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1).apply(null,arguments)},Qc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Qc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.emscripten_bind_Decoder_DecodeBufferToPointCloud_2).apply(null,arguments)},Rc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Rc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.emscripten_bind_Decoder_DecodeBufferToMesh_2).apply(null,arguments)},Sc=
a._emscripten_bind_Decoder___destroy___0=function(){return(Sc=a._emscripten_bind_Decoder___destroy___0=a.asm.emscripten_bind_Decoder___destroy___0).apply(null,arguments)},Tc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Tc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM).apply(null,arguments)},Uc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=
function(){return(Uc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM).apply(null,arguments)},Vc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Vc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM).apply(null,arguments)},Wc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=
function(){return(Wc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM).apply(null,arguments)},Xc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Xc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.emscripten_enum_draco_GeometryAttribute_Type_INVALID).apply(null,arguments)},Yc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Yc=
a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=a.asm.emscripten_enum_draco_GeometryAttribute_Type_POSITION).apply(null,arguments)},Zc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Zc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.emscripten_enum_draco_GeometryAttribute_Type_NORMAL).apply(null,arguments)},$c=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return($c=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.emscripten_enum_draco_GeometryAttribute_Type_COLOR).apply(null,
arguments)},ad=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(ad=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=a.asm.emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD).apply(null,arguments)},bd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(bd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.emscripten_enum_draco_GeometryAttribute_Type_GENERIC).apply(null,arguments)},cd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=
function(){return(cd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE).apply(null,arguments)},dd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(dd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=a.asm.emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD).apply(null,arguments)},ed=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(ed=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=
a.asm.emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(fd=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.emscripten_enum_draco_DataType_DT_INVALID).apply(null,arguments)},gd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(gd=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.emscripten_enum_draco_DataType_DT_INT8).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(hd=
a._emscripten_enum_draco_DataType_DT_UINT8=a.asm.emscripten_enum_draco_DataType_DT_UINT8).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_INT16=function(){return(id=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.emscripten_enum_draco_DataType_DT_INT16).apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(jd=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.emscripten_enum_draco_DataType_DT_UINT16).apply(null,arguments)},kd=a._emscripten_enum_draco_DataType_DT_INT32=
function(){return(kd=a._emscripten_enum_draco_DataType_DT_INT32=a.asm.emscripten_enum_draco_DataType_DT_INT32).apply(null,arguments)},ld=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return(ld=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.emscripten_enum_draco_DataType_DT_UINT32).apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(md=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.emscripten_enum_draco_DataType_DT_INT64).apply(null,arguments)},nd=a._emscripten_enum_draco_DataType_DT_UINT64=
function(){return(nd=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.emscripten_enum_draco_DataType_DT_UINT64).apply(null,arguments)},od=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(od=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.emscripten_enum_draco_DataType_DT_FLOAT32).apply(null,arguments)},pd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(pd=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.emscripten_enum_draco_DataType_DT_FLOAT64).apply(null,arguments)},
qd=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(qd=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.emscripten_enum_draco_DataType_DT_BOOL).apply(null,arguments)},rd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(rd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=a.asm.emscripten_enum_draco_DataType_DT_TYPES_COUNT).apply(null,arguments)},sd=a._emscripten_enum_draco_StatusCode_OK=function(){return(sd=a._emscripten_enum_draco_StatusCode_OK=a.asm.emscripten_enum_draco_StatusCode_OK).apply(null,
arguments)},td=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(td=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.emscripten_enum_draco_StatusCode_DRACO_ERROR).apply(null,arguments)},ud=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(ud=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.emscripten_enum_draco_StatusCode_IO_ERROR).apply(null,arguments)},vd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(vd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=
a.asm.emscripten_enum_draco_StatusCode_INVALID_PARAMETER).apply(null,arguments)},wd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(wd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION).apply(null,arguments)},xd=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(xd=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.emscripten_enum_draco_StatusCode_UNKNOWN_VERSION).apply(null,arguments)};
a.___errno_location=function(){return(a.___errno_location=a.asm.__errno_location).apply(null,arguments)};a.stackSave=function(){return(a.stackSave=a.asm.stackSave).apply(null,arguments)};a.stackRestore=function(){return(a.stackRestore=a.asm.stackRestore).apply(null,arguments)};a.stackAlloc=function(){return(a.stackAlloc=a.asm.stackAlloc).apply(null,arguments)};a._setThrew=function(){return(a._setThrew=a.asm.setThrew).apply(null,arguments)};a._free=function(){return(a._free=a.asm.free).apply(null,
arguments)};var db=a._malloc=function(){return(db=a._malloc=a.asm.malloc).apply(null,arguments)},oa;ha=function c(){oa||ba();oa||(ha=c)};a.run=ba;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();ba();q.prototype=Object.create(q.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.WrapperObject=q;a.getCache=u;a.wrapPointer=L;a.castObject=function(a,b){return L(a.ptr,b)};a.NULL=L(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";
a.__destroy__();delete u(a.__class__)[a.ptr]};a.compare=function(a,b){return a.ptr===b.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var n={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(n.needed){for(var c=0;c<n.temps.length;c++)a._free(n.temps[c]);n.temps.length=0;a._free(n.buffer);n.buffer=0;n.size+=n.needed;n.needed=0}n.buffer||(n.size+=128,n.buffer=a._malloc(n.size),m(n.buffer));n.pos=0},alloc:function(c,b){m(n.buffer);c=c.length*b.BYTES_PER_ELEMENT;
c=c+7&-8;n.pos+c>=n.size?(m(0<c),n.needed+=c,b=a._malloc(c),n.temps.push(b)):(b=n.buffer+n.pos,n.pos+=c);return b},copy:function(a,b,d){d>>>=0;switch(b.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var c=0;c<a.length;c++)b[d+c]=a[c]}};T.prototype=Object.create(q.prototype);T.prototype.constructor=T;T.prototype.__class__=T;T.__cache__={};a.VoidPtr=T;T.prototype.__destroy__=T.prototype.__destroy__=function(){fb(this.ptr)};M.prototype=Object.create(q.prototype);M.prototype.constructor=
M;M.prototype.__class__=M;M.__cache__={};a.DecoderBuffer=M;M.prototype.Init=M.prototype.Init=function(a,b){var c=this.ptr;n.prepare();"object"==typeof a&&(a=ra(a));b&&"object"===typeof b&&(b=b.ptr);gb(c,a,b)};M.prototype.__destroy__=M.prototype.__destroy__=function(){hb(this.ptr)};J.prototype=Object.create(q.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.AttributeTransformData=J;J.prototype.transform_type=J.prototype.transform_type=function(){return ib(this.ptr)};J.prototype.__destroy__=
J.prototype.__destroy__=function(){jb(this.ptr)};R.prototype=Object.create(q.prototype);R.prototype.constructor=R;R.prototype.__class__=R;R.__cache__={};a.GeometryAttribute=R;R.prototype.__destroy__=R.prototype.__destroy__=function(){kb(this.ptr)};r.prototype=Object.create(q.prototype);r.prototype.constructor=r;r.prototype.__class__=r;r.__cache__={};a.PointAttribute=r;r.prototype.size=r.prototype.size=function(){return lb(this.ptr)};r.prototype.GetAttributeTransformData=r.prototype.GetAttributeTransformData=
function(){return L(mb(this.ptr),J)};r.prototype.attribute_type=r.prototype.attribute_type=function(){return nb(this.ptr)};r.prototype.data_type=r.prototype.data_type=function(){return ob(this.ptr)};r.prototype.num_components=r.prototype.num_components=function(){return pb(this.ptr)};r.prototype.normalized=r.prototype.normalized=function(){return!!qb(this.ptr)};r.prototype.byte_stride=r.prototype.byte_stride=function(){return rb(this.ptr)};r.prototype.byte_offset=r.prototype.byte_offset=function(){return sb(this.ptr)};
r.prototype.unique_id=r.prototype.unique_id=function(){return tb(this.ptr)};r.prototype.__destroy__=r.prototype.__destroy__=function(){ub(this.ptr)};w.prototype=Object.create(q.prototype);w.prototype.constructor=w;w.prototype.__class__=w;w.__cache__={};a.AttributeQuantizationTransform=w;w.prototype.InitFromAttribute=w.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!vb(c,a)};w.prototype.quantization_bits=w.prototype.quantization_bits=function(){return wb(this.ptr)};
w.prototype.min_value=w.prototype.min_value=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return xb(c,a)};w.prototype.range=w.prototype.range=function(){return yb(this.ptr)};w.prototype.__destroy__=w.prototype.__destroy__=function(){zb(this.ptr)};z.prototype=Object.create(q.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.AttributeOctahedronTransform=z;z.prototype.InitFromAttribute=z.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&
(a=a.ptr);return!!Ab(c,a)};z.prototype.quantization_bits=z.prototype.quantization_bits=function(){return Bb(this.ptr)};z.prototype.__destroy__=z.prototype.__destroy__=function(){Cb(this.ptr)};A.prototype=Object.create(q.prototype);A.prototype.constructor=A;A.prototype.__class__=A;A.__cache__={};a.PointCloud=A;A.prototype.num_attributes=A.prototype.num_attributes=function(){return Db(this.ptr)};A.prototype.num_points=A.prototype.num_points=function(){return Eb(this.ptr)};A.prototype.__destroy__=A.prototype.__destroy__=
function(){Fb(this.ptr)};y.prototype=Object.create(q.prototype);y.prototype.constructor=y;y.prototype.__class__=y;y.__cache__={};a.Mesh=y;y.prototype.num_faces=y.prototype.num_faces=function(){return Gb(this.ptr)};y.prototype.num_attributes=y.prototype.num_attributes=function(){return Hb(this.ptr)};y.prototype.num_points=y.prototype.num_points=function(){return Ib(this.ptr)};y.prototype.__destroy__=y.prototype.__destroy__=function(){Jb(this.ptr)};N.prototype=Object.create(q.prototype);N.prototype.constructor=
N;N.prototype.__class__=N;N.__cache__={};a.Metadata=N;N.prototype.__destroy__=N.prototype.__destroy__=function(){Kb(this.ptr)};v.prototype=Object.create(q.prototype);v.prototype.constructor=v;v.prototype.__class__=v;v.__cache__={};a.Status=v;v.prototype.code=v.prototype.code=function(){return Lb(this.ptr)};v.prototype.ok=v.prototype.ok=function(){return!!Mb(this.ptr)};v.prototype.error_msg=v.prototype.error_msg=function(){return f(Nb(this.ptr))};v.prototype.__destroy__=v.prototype.__destroy__=function(){Ob(this.ptr)};
B.prototype=Object.create(q.prototype);B.prototype.constructor=B;B.prototype.__class__=B;B.__cache__={};a.DracoFloat32Array=B;B.prototype.GetValue=B.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Pb(c,a)};B.prototype.size=B.prototype.size=function(){return Qb(this.ptr)};B.prototype.__destroy__=B.prototype.__destroy__=function(){Rb(this.ptr)};C.prototype=Object.create(q.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.DracoInt8Array=
C;C.prototype.GetValue=C.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Sb(c,a)};C.prototype.size=C.prototype.size=function(){return Tb(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){Ub(this.ptr)};D.prototype=Object.create(q.prototype);D.prototype.constructor=D;D.prototype.__class__=D;D.__cache__={};a.DracoUInt8Array=D;D.prototype.GetValue=D.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Vb(c,a)};
D.prototype.size=D.prototype.size=function(){return Wb(this.ptr)};D.prototype.__destroy__=D.prototype.__destroy__=function(){Xb(this.ptr)};E.prototype=Object.create(q.prototype);E.prototype.constructor=E;E.prototype.__class__=E;E.__cache__={};a.DracoInt16Array=E;E.prototype.GetValue=E.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Yb(c,a)};E.prototype.size=E.prototype.size=function(){return Zb(this.ptr)};E.prototype.__destroy__=E.prototype.__destroy__=function(){$b(this.ptr)};
F.prototype=Object.create(q.prototype);F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.DracoUInt16Array=F;F.prototype.GetValue=F.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ac(c,a)};F.prototype.size=F.prototype.size=function(){return bc(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){cc(this.ptr)};G.prototype=Object.create(q.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.DracoInt32Array=
G;G.prototype.GetValue=G.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return dc(c,a)};G.prototype.size=G.prototype.size=function(){return ec(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){fc(this.ptr)};H.prototype=Object.create(q.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoUInt32Array=H;H.prototype.GetValue=H.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return gc(c,a)};
H.prototype.size=H.prototype.size=function(){return hc(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){ic(this.ptr)};t.prototype=Object.create(q.prototype);t.prototype.constructor=t;t.prototype.__class__=t;t.__cache__={};a.MetadataQuerier=t;t.prototype.HasEntry=t.prototype.HasEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return!!jc(c,a,b)};t.prototype.GetIntEntry=t.prototype.GetIntEntry=function(a,b){var c=
this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return kc(c,a,b)};t.prototype.GetIntEntryArray=t.prototype.GetIntEntryArray=function(a,b,d){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);d&&"object"===typeof d&&(d=d.ptr);lc(c,a,b,d)};t.prototype.GetDoubleEntry=t.prototype.GetDoubleEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return mc(c,
a,b)};t.prototype.GetStringEntry=t.prototype.GetStringEntry=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return f(nc(c,a,b))};t.prototype.NumEntries=t.prototype.NumEntries=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return oc(c,a)};t.prototype.GetEntryName=t.prototype.GetEntryName=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return f(pc(c,a,b))};t.prototype.__destroy__=
t.prototype.__destroy__=function(){qc(this.ptr)};g.prototype=Object.create(q.prototype);g.prototype.constructor=g;g.prototype.__class__=g;g.__cache__={};a.Decoder=g;g.prototype.DecodeArrayToPointCloud=g.prototype.DecodeArrayToPointCloud=function(a,b,d){var c=this.ptr;n.prepare();"object"==typeof a&&(a=ra(a));b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return L(rc(c,a,b,d),v)};g.prototype.DecodeArrayToMesh=g.prototype.DecodeArrayToMesh=function(a,b,d){var c=this.ptr;n.prepare();
"object"==typeof a&&(a=ra(a));b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return L(sc(c,a,b,d),v)};g.prototype.GetAttributeId=g.prototype.GetAttributeId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return tc(c,a,b)};g.prototype.GetAttributeIdByName=g.prototype.GetAttributeIdByName=function(a,b){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);return uc(c,a,b)};g.prototype.GetAttributeIdByMetadataEntry=
g.prototype.GetAttributeIdByMetadataEntry=function(a,b,d){var c=this.ptr;n.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:V(b);d=d&&"object"===typeof d?d.ptr:V(d);return vc(c,a,b,d)};g.prototype.GetAttribute=g.prototype.GetAttribute=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return L(wc(c,a,b),r)};g.prototype.GetAttributeByUniqueId=g.prototype.GetAttributeByUniqueId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&
(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return L(xc(c,a,b),r)};g.prototype.GetMetadata=g.prototype.GetMetadata=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return L(yc(c,a),N)};g.prototype.GetAttributeMetadata=g.prototype.GetAttributeMetadata=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return L(zc(c,a,b),N)};g.prototype.GetFaceFromMesh=g.prototype.GetFaceFromMesh=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);
b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ac(c,a,b,d)};g.prototype.GetTriangleStripsFromMesh=g.prototype.GetTriangleStripsFromMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return Bc(c,a,b)};g.prototype.GetTrianglesUInt16Array=g.prototype.GetTrianglesUInt16Array=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Cc(c,a,b,
d)};g.prototype.GetTrianglesUInt32Array=g.prototype.GetTrianglesUInt32Array=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Dc(c,a,b,d)};g.prototype.GetAttributeFloat=g.prototype.GetAttributeFloat=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ec(c,a,b,d)};g.prototype.GetAttributeFloatForAllPoints=g.prototype.GetAttributeFloatForAllPoints=
function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Fc(c,a,b,d)};g.prototype.GetAttributeIntForAllPoints=g.prototype.GetAttributeIntForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Gc(c,a,b,d)};g.prototype.GetAttributeInt8ForAllPoints=g.prototype.GetAttributeInt8ForAllPoints=function(a,b,d){var c=this.ptr;
a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hc(c,a,b,d)};g.prototype.GetAttributeUInt8ForAllPoints=g.prototype.GetAttributeUInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ic(c,a,b,d)};g.prototype.GetAttributeInt16ForAllPoints=g.prototype.GetAttributeInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=
a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Jc(c,a,b,d)};g.prototype.GetAttributeUInt16ForAllPoints=g.prototype.GetAttributeUInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Kc(c,a,b,d)};g.prototype.GetAttributeInt32ForAllPoints=g.prototype.GetAttributeInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&
(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Lc(c,a,b,d)};g.prototype.GetAttributeUInt32ForAllPoints=g.prototype.GetAttributeUInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Mc(c,a,b,d)};g.prototype.GetAttributeDataArrayForAllPoints=g.prototype.GetAttributeDataArrayForAllPoints=function(a,b,d,e,f){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&
"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Nc(c,a,b,d,e,f)};g.prototype.SkipAttributeTransform=g.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Oc(b,a)};g.prototype.GetEncodedGeometryType_Deprecated=g.prototype.GetEncodedGeometryType_Deprecated=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Pc(b,a)};g.prototype.DecodeBufferToPointCloud=g.prototype.DecodeBufferToPointCloud=
function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return L(Qc(c,a,b),v)};g.prototype.DecodeBufferToMesh=g.prototype.DecodeBufferToMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return L(Rc(c,a,b),v)};g.prototype.__destroy__=g.prototype.__destroy__=function(){Sc(this.ptr)};(function(){function c(){a.ATTRIBUTE_INVALID_TRANSFORM=Tc();a.ATTRIBUTE_NO_TRANSFORM=Uc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Vc();
a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Wc();a.INVALID=Xc();a.POSITION=Yc();a.NORMAL=Zc();a.COLOR=$c();a.TEX_COORD=ad();a.GENERIC=bd();a.INVALID_GEOMETRY_TYPE=cd();a.POINT_CLOUD=dd();a.TRIANGULAR_MESH=ed();a.DT_INVALID=fd();a.DT_INT8=gd();a.DT_UINT8=hd();a.DT_INT16=id();a.DT_UINT16=jd();a.DT_INT32=kd();a.DT_UINT32=ld();a.DT_INT64=md();a.DT_UINT64=nd();a.DT_FLOAT32=od();a.DT_FLOAT64=pd();a.DT_BOOL=qd();a.DT_TYPES_COUNT=rd();a.OK=sd();a.DRACO_ERROR=td();a.IO_ERROR=ud();a.INVALID_PARAMETER=vd();a.UNSUPPORTED_VERSION=
wd();a.UNKNOWN_VERSION=xd()}Ba?c():Da.unshift(c)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();a.Decoder.prototype.GetEncodedGeometryType=function(c){if(c.__class__&&c.__class__===a.DecoderBuffer)return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(c);if(8>c.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(c[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return k.ready}}();
"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);

View File

@ -580,7 +580,7 @@ THREE.DRACOLoader.DRACOWorker = function () {
case Int8Array:
ptr = draco._malloc( numValues );
decoder.GetAttributeDataArrayForAllPoints( dracoGeometry, attribute, draco.DT_INT8, numValues, ptr );
geometryBuffer[ attributeName ] = new Int8Array( draco.HEAP8.buffer, ptr, numValues ).slice();
array = new Int8Array( draco.HEAP8.buffer, ptr, numValues ).slice();
draco._free( ptr );
break;
@ -603,7 +603,7 @@ THREE.DRACOLoader.DRACOWorker = function () {
case Uint8Array:
ptr = draco._malloc( numValues );
decoder.GetAttributeDataArrayForAllPoints( dracoGeometry, attribute, draco.DT_UINT8, numValues, ptr );
geometryBuffer[ attributeName ] = new Uint8Array( draco.HEAPU8.buffer, ptr, numValues ).slice();
array = new Uint8Array( draco.HEAPU8.buffer, ptr, numValues ).slice();
draco._free( ptr );
break;

View File

@ -5,57 +5,9 @@
News
=======
### Version 1.3.6 release
* WASM and JavaScript decoders are now hosted from a static URL
* It is recommended to always pull your Draco WASM and JavaScript decoders from this URL:
* https://www.gstatic.com/draco/v1/decoders/*
* Replace * with the files to load. E.g.
* https://www.gstatic.com/draco/v1/decoders/draco_decoder.wasm
* Users will benefit from having the Draco decoder in cache as more sites start using the static URL
* Changed web examples to pull Draco decoders from static URL
* Added new API to Draco WASM decoder, which increased performance by ~15%
* Decreased Draco WASM decoder size by ~20%
* Added support for generic and multiple attributes to Draco Unity plug-ins
* Added new API to Draco Unity, which increased decoder performance by ~15%
* Changed quantization defaults:
* POSITION: 11
* NORMAL: 7
* TEX_COORD: 10
* COLOR: 8
* GENERIC: 8
* Code cleanup
* Bug fixes
### Version 1.3.5 release
* Added option to build Draco for Universal Scene Description
* Code cleanup
* Bug fixes
### Version 1.3.4 release
* Fixes for Unity
### Version 1.3.3 release
* Added ExpertEncoder to the JavaScript API
* Allows developers to set quantization options per attribute id
* Bug fixes
### Version 1.3.2 release
* Bug fixes
### Version 1.3.1 release
* Fix issue with multiple attributes when skipping an attribute transform
### Version 1.3.0 release
* Improved kD-tree based point cloud encoding
* Now applicable to point clouds with any number of attributes
* Support for all integer attribute types and quantized floating point types
* Improved mesh compression up to 10% (on average ~2%)
* For meshes, the 1.3.0 bitstream is fully compatible with 1.2.x decoders
* Improved JavaScript API
* Added support for all signed and unsigned integer types
* Added support for point clouds to our JavaScript encoder API
* Added support for integer properties to the PLY decoder
* Bug fixes
Check out the [README](https://github.com/google/draco/blob/1.4.0/README.md)
file for news about this release.
Description
===========
@ -82,7 +34,6 @@ NPM Package
The code shows a simple example of using Draco encoder and decoder with Node.js.
`draco_encoder_node.js` and `draco_decoder_node.js` are modified Javascript
encoding/decoding files that are compatible with Node.js.
`draco_nodejs_example.js` has the example code for usage.
How to run the code:
@ -92,6 +43,9 @@ How to run the code:
$ npm install draco3d
~~~~~
### Working example
`draco_nodejs_example.js` has the example code for usage.
(2) Run example code to test:
~~~~~ bash
@ -103,6 +57,24 @@ $ node draco_nodejs_example.js
The code loads the [Bunny] model, it will first decode to a mesh
and then encode it with different settings.
### Minimal examples
These examples only show how to load the encoder and decoder modules. `draco_minimal_encoder_decoder_example.js`, `draco_minimal_encoder_example.js`, and `draco_minimal_decoder_example.js` has the example code for usage.
(2) Run the code to test:
~~~~~ bash
$ node draco_minimal_encoder_decoder_example.js
~~~~~
~~~~~ bash
$ node draco_minimal_encoder_example.js
~~~~~
~~~~~ bash
$ node draco_minimal_decoder_example.js
~~~~~
References
==========
[Draco]: https://github.com/google/draco

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,32 @@
// This is a minimal example showing how to create the Draco decoder module.
// The decoder module is created asynchronously, so you need to set a
// callback to make sure it is initialized before you try and call the module.
'use_strict';
const draco3d = require('./draco3d');
let decoderModule = null;
// The code to create the encoder and decoder modules is asynchronous.
// draco3d.createDecoderModule will return a promise to a funciton with a
// module as a parameter when the module has been fully initialized.
// Create and set the decoder module.
draco3d.createDecoderModule({}).then(function(module) {
// This is reached when everything is ready, and you can call methods on
// Module.
decoderModule = module;
console.log('Decoder Module Initialized!');
moduleInitialized();
});
function moduleInitialized() {
let decoder = new decoderModule.Decoder();
// Do the actual decoding here. See 'draco_nodejs_example.js' for a more
// comprehensive example.
cleanup(decoder);
}
function cleanup(decoder) {
decoderModule.destroy(decoder);
}

View File

@ -0,0 +1,49 @@
// This is a minimal example showing how to create the Draco decoder and
// encoder module. The modules are created asynchronously, so you need to set
// callbacks to make sure they are initialized before you try and call the
// modules.
'use_strict';
const draco3d = require('./draco3d');
// Global decoder and encoder module variables.
let decoderModule = null;
let encoderModule = null;
// The code to create the encoder and decoder modules is asynchronous.
// draco3d.createDecoderModule will return a promise to a funciton with a
// module as a parameter when the module has been fully initialized.
// Create and set the decoder module.
draco3d.createDecoderModule({}).then(function(module) {
// This is reached when everything is ready, and you can call methods on
// Module.
decoderModule = module;
console.log('Decoder Module Initialized!');
moduleInitialized();
});
// Create and set the encoder module.
draco3d.createEncoderModule({}).then(function(module) {
// This is reached when everything is ready, and you can call methods on
// Module.
encoderModule = module;
console.log('Encoder Module Initialized!');
moduleInitialized();
});
function moduleInitialized() {
if (encoderModule && decoderModule) {
console.log('Both Modules Initialized!');
let encoder = new encoderModule.Encoder();
let decoder = new decoderModule.Decoder();
// Do the actual encoding and decoding here. See 'draco_nodejs_example.js'
// for a more comprehensive example.
cleanup(encoder, decoder);
}
}
function cleanup(encoder, decoder) {
encoderModule.destroy(encoder);
decoderModule.destroy(decoder);
}

View File

@ -0,0 +1,31 @@
// This is a minimal example showing how to create the Draco encoder module.
// The encoder module is created asynchronously, so you need to set a
// callback to make sure it is initialized before you try and call the module.
'use_strict';
const draco3d = require('./draco3d');
let encoderModule = null;
// The code to create the encoder module is asynchronous.
// draco3d.createEncoderModule will return a promise to a funciton with a
// module as a parameter when the module has been fully initialized.
draco3d.createEncoderModule({}).then(function(module) {
// This is reached when everything is ready, and you can call methods on
// Module.
encoderModule = module;
console.log('Encoder Module Initialized!');
moduleInitialized();
});
function moduleInitialized() {
let encoder = new encoderModule.Encoder();
// Do the actual encoding here. See 'draco_nodejs_example.js' for a more
// comprehensive example.
cleanup(encoder);
}
function cleanup(encoder) {
encoderModule.destroy(encoder);
}

View File

@ -17,24 +17,52 @@
const fs = require('fs');
const assert = require('assert');
const draco3d = require('draco3d');
const decoderModule = draco3d.createDecoderModule({});
const encoderModule = draco3d.createEncoderModule({});
fs.readFile('./bunny.drc', function(err, data) {
if (err) {
return console.log(err);
}
console.log("Decoding file of size " + data.byteLength + " ..");
// Decode mesh
const decoder = new decoderModule.Decoder();
const decodedGeometry = decodeDracoData(data, decoder);
// Encode mesh
encodeMeshToFile(decodedGeometry, decoder);
// Global decoder and encoder module variables.
let decoderModule = null;
let encoderModule = null;
decoderModule.destroy(decoder);
decoderModule.destroy(decodedGeometry);
// The code to create the encoder and decoder modules is asynchronous.
// draco3d.createDecoderModule will return a promise to a funciton with a
// module as a parameter when the module has been fully initialized.
// Create and set the decoder module.
draco3d.createDecoderModule({}).then(function(module) {
// This is reached when everything is ready, and you can call methods on
// Module.
decoderModule = module;
console.log('Decoder Module Initialized!');
modulesInitialized();
});
// Create and set the encoder module.
draco3d.createEncoderModule({}).then(function(module) {
// This is reached when everything is ready, and you can call methods on
// Module.
encoderModule = module;
console.log('Encoder Module Initialized!');
modulesInitialized();
});
function modulesInitialized() {
// Check if both the encoder and decoder modules have been initialized.
if (encoderModule && decoderModule) {
fs.readFile('./bunny.drc', function(err, data) {
if (err) {
return console.log(err);
}
console.log("Decoding file of size " + data.byteLength + " ..");
// Decode mesh
const decoder = new decoderModule.Decoder();
const decodedGeometry = decodeDracoData(data, decoder);
// Encode mesh
encodeMeshToFile(decodedGeometry, decoder);
decoderModule.destroy(decoder);
decoderModule.destroy(decodedGeometry);
});
}
}
function decodeDracoData(rawBuffer, decoder) {
const buffer = new decoderModule.DecoderBuffer();
buffer.Init(new Int8Array(rawBuffer), rawBuffer.byteLength);
@ -142,7 +170,8 @@ function encodeMeshToFile(mesh, decoder) {
encoderModule.destroy(meshBuilder);
// Write to file. You can view the the file using webgl_loader_draco.html
// example.
fs.writeFile("bunny_10.drc", Buffer(outputBuffer), "binary", function(err) {
fs.writeFile("bunny_10.drc", Buffer.from(outputBuffer), "binary",
function(err) {
if (err) {
console.log(err);
} else {

View File

@ -1,6 +1,6 @@
{
"name": "draco3d",
"version": "1.3.6",
"version": "1.4.0",
"description": "Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.",
"main": "draco3d.js",
"scripts": {

View File

@ -16,57 +16,9 @@ Draco github glTF branch URL: https://github.com/google/draco/tree/gltf_2.0_drac
News
=======
### Version 1.3.6 release
* WASM and JavaScript decoders are now hosted from a static URL
* It is recommended to always pull your Draco WASM and JavaScript decoders from this URL:
* https://www.gstatic.com/draco/v1/decoders/*
* Replace * with the files to load. E.g.
* https://www.gstatic.com/draco/v1/decoders/draco_decoder_gltf.wasm
* Users will benefit from having the Draco decoder in cache as more sites start using the static URL
* Changed web examples to pull Draco decoders from static URL
* Added new API to Draco WASM decoder, which increased performance by ~15%
* Decreased Draco WASM decoder size by ~20%
* Added support for generic and multiple attributes to Draco Unity plug-ins
* Added new API to Draco Unity, which increased decoder performance by ~15%
* Changed quantization defaults:
* POSITION: 11
* NORMAL: 7
* TEX_COORD: 10
* COLOR: 8
* GENERIC: 8
* Code cleanup
* Bug fixes
### Version 1.3.5 release
* Added option to build Draco for Universal Scene Description
* Code cleanup
* Bug fixes
### Version 1.3.4 release
* Fixes for Unity
### Version 1.3.3 release
* Added ExpertEncoder to the JavaScript API
* Allows developers to set quantization options per attribute id
* Bug fixes
### Version 1.3.2 release
* Bug fixes
### Version 1.3.1 release
* Fix issue with multiple attributes when skipping an attribute transform
### Version 1.3.0 release
* Improved kD-tree based point cloud encoding
* Now applicable to point clouds with any number of attributes
* Support for all integer attribute types and quantized floating point types
* Improved mesh compression up to 10% (on average ~2%)
* For meshes, the 1.3.0 bitstream is fully compatible with 1.2.x decoders
* Improved JavaScript API
* Added support for all signed and unsigned integer types
* Added support for point clouds to our JavaScript encoder API
* Added support for integer properties to the PLY decoder
* Bug fixes
Check out the [README](https://github.com/google/draco/blob/1.4.0/README.md)
file for news about this release.
NPM Package
===========

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -17,24 +17,52 @@
const fs = require('fs');
const assert = require('assert');
const draco3dgltf = require('draco3dgltf');
const decoderModule = draco3dgltf.createDecoderModule({});
const encoderModule = draco3dgltf.createEncoderModule({});
fs.readFile('./bunny.drc', function(err, data) {
if (err) {
return console.log(err);
}
console.log("Decoding file of size " + data.byteLength + " ..");
// Decode mesh
const decoder = new decoderModule.Decoder();
const decodedGeometry = decodeDracoData(data, decoder);
// Encode mesh
encodeMeshToFile(decodedGeometry, decoder);
// Global decoder and encoder module variables.
let decoderModule = null;
let encoderModule = null;
decoderModule.destroy(decoder);
decoderModule.destroy(decodedGeometry);
// The code to create the encoder and decoder modules is asynchronous.
// draco3d.createDecoderModule will return a promise to a funciton with a
// module as a parameter when the module has been fully initialized.
// Create and set the decoder module.
draco3dgltf.createDecoderModule({}).then(function(module) {
// This is reached when everything is ready, and you can call methods on
// Module.
decoderModule = module;
console.log('Decoder Module Initialized!');
moduleInitialized();
});
// Create and set the encoder module.
draco3dgltf.createEncoderModule({}).then(function(module) {
// This is reached when everything is ready, and you can call methods on
// Module.
encoderModule = module;
console.log('Encoder Module Initialized!');
moduleInitialized();
});
function moduleInitialized() {
// Check if both the encoder and decoder modules have been initialized.
if (encoderModule && decoderModule) {
fs.readFile('./bunny.drc', function(err, data) {
if (err) {
return console.log(err);
}
console.log("Decoding file of size " + data.byteLength + " ..");
// Decode mesh
const decoder = new decoderModule.Decoder();
const decodedGeometry = decodeDracoData(data, decoder);
// Encode mesh
encodeMeshToFile(decodedGeometry, decoder);
decoderModule.destroy(decoder);
decoderModule.destroy(decodedGeometry);
});
}
}
function decodeDracoData(rawBuffer, decoder) {
const buffer = new decoderModule.DecoderBuffer();
buffer.Init(new Int8Array(rawBuffer), rawBuffer.byteLength);
@ -139,7 +167,8 @@ function encodeMeshToFile(mesh, decoder) {
encoderModule.destroy(meshBuilder);
// Write to file. You can view the the file using webgl_loader_draco.html
// example.
fs.writeFile("bunny_10.drc", Buffer(outputBuffer), "binary", function(err) {
fs.writeFile("bunny_10.drc", Buffer.from(outputBuffer), "binary",
function(err) {
if (err) {
console.log(err);
} else {

View File

@ -1,6 +1,6 @@
{
"name": "draco3dgltf",
"version": "1.3.6",
"version": "1.4.0",
"description": "This package contains a specific version of Draco 3D geometric compression library that is used for glTF Draco mesh compression extension.",
"main": "draco3dgltf.js",
"scripts": {

View File

@ -16,8 +16,32 @@
const assert = require('assert');
const draco = require('./draco-animation');
const decoderModule = draco.createDecoderModule({});
const encoderModule = draco.createEncoderModule({});
// Global variables to keep track of which modules have been intiailized.
let encoderModuleInitialized = false;
let decoderModuleInitialized = false;
// Callback function when encoder module has been intialized.
let dracoEncoderType = {};
dracoEncoderType['onModuleLoaded'] = function(module) {
encoderModuleInitialized = true;
console.log('Encoder Module Initialized!');
moduleInitialized();
};
// Callback function when decoder module has been intialized.
let dracoDecoderType = {};
dracoDecoderType['onModuleLoaded'] = function(module) {
decoderModuleInitialized = true;
console.log('Decoder Module Initialized!');
moduleInitialized();
};
// The code to create the encoder and decoder modules is asynchronous.
// draco will call the 'onModuleLoaded' callback when the different
// modules have been fully initialized.
const encoderModule = draco.createEncoderModule(dracoEncoderType);
const decoderModule = draco.createDecoderModule(dracoDecoderType);
function generateAnimationData(numKeyframes, numAnimations, numComponents) {
const timestamps = new Float32Array(numKeyframes);
@ -141,10 +165,14 @@ function compareAnimation(animation, decodedAnimation) {
console.log("Done.");
}
// Create animation with 50 frames and two animations.
// The first animation has 3 components and the second has 4 components.
const animation = generateAnimationData(100, 2, [3, 4]);
const encodedData = encodeAnimation(animation);
function moduleInitialized() {
if (encoderModuleInitialized && decoderModuleInitialized) {
// Create animation with 50 frames and two animations.
// The first animation has 3 components and the second has 4 components.
const animation = generateAnimationData(100, 2, [3, 4]);
const encodedData = encodeAnimation(animation);
const decodedAnimation = decodeAnimation(encodedData);
compareAnimation(animation, decodedAnimation);
const decodedAnimation = decodeAnimation(encodedData);
compareAnimation(animation, decodedAnimation);
}
}

View File

@ -47,16 +47,14 @@ function loadWebAssemblyDecoder() {
}
function createDecoderModule() {
// draco_decoder.js or draco_wasm_wrapper.js must be loaded before
// DracoModule is created.
if (typeof dracoDecoderType === 'undefined')
dracoDecoderType = {};
dracoDecoderType['onModuleLoaded'] = function(module) {
enableButtons();
};
const create_t0 = performance.now();
decoderModule = DracoDecoderModule(dracoDecoderType);
// draco_decoder.js or draco_wasm_wrapper.js must be loaded before
// DracoModule is created.
DracoDecoderModule({}).then((module) => {
decoderModule = module;
enableButtons();
});
const create_t1 = performance.now();
addCell('DracoModule', true);
addCell(' ' + (create_t1 - create_t0), false);
@ -148,26 +146,23 @@ function testMeshDecodingAsync(filenameList, index) {
xhr.onload = function(event) {
const arrayBuffer = xhr.response;
if (arrayBuffer) {
const byteArray = new Uint8Array(arrayBuffer);
const byteArray = new Int8Array(arrayBuffer);
const total_t0 = performance.now();
const buffer = new decoderModule.DecoderBuffer();
buffer.Init(byteArray, byteArray.length);
const decoder = new decoderModule.Decoder();
const decode_t0 = performance.now();
const geometryType = decoder.GetEncodedGeometryType(buffer);
const geometryType = decoder.GetEncodedGeometryType(byteArray);
let dracoGeometry;
let decodingStatus;
if (geometryType == decoderModule.TRIANGULAR_MESH) {
dracoGeometry = new decoderModule.Mesh();
decodingStatus = decoder.DecodeBufferToMesh(buffer, dracoGeometry);
decodingStatus = decoder.DecodeArrayToMesh(byteArray, byteArray.length, dracoGeometry);
} else {
dracoGeometry = new decoderModule.PointCloud();
decodingStatus =
decoder.DecodeBufferToPointCloud(buffer, dracoGeometry);
decoder.DecodeArrayToPointCloud(byteArray, byteArray.length, dracoGeometry);
}
const t1 = performance.now();
@ -182,7 +177,6 @@ function testMeshDecodingAsync(filenameList, index) {
}
decoderModule.destroy(dracoGeometry);
decoderModule.destroy(decoder);
decoderModule.destroy(buffer);
if (index < filenameList.length - 1) {
index = index + 1;

Binary file not shown.

Binary file not shown.

View File

@ -38,6 +38,46 @@ void AttributeOctahedronTransform::CopyToAttributeTransformData(
out_data->AppendParameterValue(quantization_bits_);
}
bool AttributeOctahedronTransform::TransformAttribute(
const PointAttribute &attribute, const std::vector<PointIndex> &point_ids,
PointAttribute *target_attribute) {
return GeneratePortableAttribute(attribute, point_ids,
target_attribute->size(), target_attribute);
}
bool AttributeOctahedronTransform::InverseTransformAttribute(
const PointAttribute &attribute, PointAttribute *target_attribute) {
if (target_attribute->data_type() != DT_FLOAT32) {
return false;
}
const int num_points = target_attribute->size();
const int num_components = target_attribute->num_components();
if (num_components != 3) {
return false;
}
constexpr int kEntrySize = sizeof(float) * 3;
float att_val[3];
const int32_t *source_attribute_data = reinterpret_cast<const int32_t *>(
attribute.GetAddress(AttributeValueIndex(0)));
uint8_t *target_address =
target_attribute->GetAddress(AttributeValueIndex(0));
OctahedronToolBox octahedron_tool_box;
if (!octahedron_tool_box.SetQuantizationBits(quantization_bits_)) {
return false;
}
for (uint32_t i = 0; i < num_points; ++i) {
const int32_t s = *source_attribute_data++;
const int32_t t = *source_attribute_data++;
octahedron_tool_box.QuantizedOctahedralCoordsToUnitVector(s, t, att_val);
// Store the decoded floating point values into the attribute buffer.
std::memcpy(target_address, att_val, kEntrySize);
target_address += kEntrySize;
}
return true;
}
void AttributeOctahedronTransform::SetParameters(int quantization_bits) {
quantization_bits_ = quantization_bits;
}
@ -51,38 +91,55 @@ bool AttributeOctahedronTransform::EncodeParameters(
return false;
}
std::unique_ptr<PointAttribute>
AttributeOctahedronTransform::GeneratePortableAttribute(
const PointAttribute &attribute, const std::vector<PointIndex> &point_ids,
int num_points) const {
DRACO_DCHECK(is_initialized());
bool AttributeOctahedronTransform::DecodeParameters(
const PointAttribute &attribute, DecoderBuffer *decoder_buffer) {
uint8_t quantization_bits;
if (!decoder_buffer->Decode(&quantization_bits)) {
return false;
}
quantization_bits_ = quantization_bits;
return true;
}
// Allocate portable attribute.
const int num_entries = static_cast<int>(point_ids.size());
std::unique_ptr<PointAttribute> portable_attribute =
InitPortableAttribute(num_entries, 2, num_points, attribute, true);
bool AttributeOctahedronTransform::GeneratePortableAttribute(
const PointAttribute &attribute, const std::vector<PointIndex> &point_ids,
int num_points, PointAttribute *target_attribute) const {
DRACO_DCHECK(is_initialized());
// Quantize all values in the order given by point_ids into portable
// attribute.
int32_t *const portable_attribute_data = reinterpret_cast<int32_t *>(
portable_attribute->GetAddress(AttributeValueIndex(0)));
target_attribute->GetAddress(AttributeValueIndex(0)));
float att_val[3];
int32_t dst_index = 0;
OctahedronToolBox converter;
if (!converter.SetQuantizationBits(quantization_bits_)) {
return nullptr;
return false;
}
for (uint32_t i = 0; i < point_ids.size(); ++i) {
const AttributeValueIndex att_val_id = attribute.mapped_index(point_ids[i]);
attribute.GetValue(att_val_id, att_val);
// Encode the vector into a s and t octahedral coordinates.
int32_t s, t;
converter.FloatVectorToQuantizedOctahedralCoords(att_val, &s, &t);
portable_attribute_data[dst_index++] = s;
portable_attribute_data[dst_index++] = t;
if (!point_ids.empty()) {
for (uint32_t i = 0; i < point_ids.size(); ++i) {
const AttributeValueIndex att_val_id =
attribute.mapped_index(point_ids[i]);
attribute.GetValue(att_val_id, att_val);
// Encode the vector into a s and t octahedral coordinates.
int32_t s, t;
converter.FloatVectorToQuantizedOctahedralCoords(att_val, &s, &t);
portable_attribute_data[dst_index++] = s;
portable_attribute_data[dst_index++] = t;
}
} else {
for (PointIndex i(0); i < num_points; ++i) {
const AttributeValueIndex att_val_id = attribute.mapped_index(i);
attribute.GetValue(att_val_id, att_val);
// Encode the vector into a s and t octahedral coordinates.
int32_t s, t;
converter.FloatVectorToQuantizedOctahedralCoords(att_val, &s, &t);
portable_attribute_data[dst_index++] = s;
portable_attribute_data[dst_index++] = t;
}
}
return portable_attribute;
return true;
}
} // namespace draco

View File

@ -37,19 +37,40 @@ class AttributeOctahedronTransform : public AttributeTransform {
void CopyToAttributeTransformData(
AttributeTransformData *out_data) const override;
bool TransformAttribute(const PointAttribute &attribute,
const std::vector<PointIndex> &point_ids,
PointAttribute *target_attribute) override;
bool InverseTransformAttribute(const PointAttribute &attribute,
PointAttribute *target_attribute) override;
// Set number of quantization bits.
void SetParameters(int quantization_bits);
// Encode relevant parameters into buffer.
bool EncodeParameters(EncoderBuffer *encoder_buffer) const;
bool EncodeParameters(EncoderBuffer *encoder_buffer) const override;
bool DecodeParameters(const PointAttribute &attribute,
DecoderBuffer *decoder_buffer) override;
bool is_initialized() const { return quantization_bits_ != -1; }
int32_t quantization_bits() const { return quantization_bits_; }
// Create portable attribute.
std::unique_ptr<PointAttribute> GeneratePortableAttribute(
const PointAttribute &attribute, const std::vector<PointIndex> &point_ids,
int num_points) const;
protected:
DataType GetTransformedDataType(
const PointAttribute &attribute) const override {
return DT_UINT32;
}
int GetTransformedNumComponents(
const PointAttribute &attribute) const override {
return 2;
}
// Perform the actual transformation.
bool GeneratePortableAttribute(const PointAttribute &attribute,
const std::vector<PointIndex> &point_ids,
int num_points,
PointAttribute *target_attribute) const;
private:
int32_t quantization_bits_;

View File

@ -1,4 +1,3 @@
// Copyright 2017 The Draco Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
@ -51,13 +50,74 @@ void AttributeQuantizationTransform::CopyToAttributeTransformData(
out_data->AppendParameterValue(range_);
}
void AttributeQuantizationTransform::SetParameters(int quantization_bits,
bool AttributeQuantizationTransform::TransformAttribute(
const PointAttribute &attribute, const std::vector<PointIndex> &point_ids,
PointAttribute *target_attribute) {
if (point_ids.empty()) {
GeneratePortableAttribute(attribute, target_attribute->size(),
target_attribute);
} else {
GeneratePortableAttribute(attribute, point_ids, target_attribute->size(),
target_attribute);
}
return true;
}
bool AttributeQuantizationTransform::InverseTransformAttribute(
const PointAttribute &attribute, PointAttribute *target_attribute) {
if (target_attribute->data_type() != DT_FLOAT32) {
return false;
}
// Convert all quantized values back to floats.
const int32_t max_quantized_value =
(1u << static_cast<uint32_t>(quantization_bits_)) - 1;
const int num_components = target_attribute->num_components();
const int entry_size = sizeof(float) * num_components;
const std::unique_ptr<float[]> att_val(new float[num_components]);
int quant_val_id = 0;
int out_byte_pos = 0;
Dequantizer dequantizer;
if (!dequantizer.Init(range_, max_quantized_value)) {
return false;
}
const int32_t *const source_attribute_data =
reinterpret_cast<const int32_t *>(
attribute.GetAddress(AttributeValueIndex(0)));
const int num_values = target_attribute->size();
for (uint32_t i = 0; i < num_values; ++i) {
for (int c = 0; c < num_components; ++c) {
float value =
dequantizer.DequantizeFloat(source_attribute_data[quant_val_id++]);
value = value + min_values_[c];
att_val[c] = value;
}
// Store the floating point value into the attribute buffer.
target_attribute->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
out_byte_pos += entry_size;
}
return true;
}
bool AttributeQuantizationTransform::IsQuantizationValid(
int quantization_bits) {
// Currently we allow only up to 30 bit quantization.
return quantization_bits >= 1 && quantization_bits <= 30;
}
bool AttributeQuantizationTransform::SetParameters(int quantization_bits,
const float *min_values,
int num_components,
float range) {
if (!IsQuantizationValid(quantization_bits)) {
return false;
}
quantization_bits_ = quantization_bits;
min_values_.assign(min_values, min_values + num_components);
range_ = range;
return true;
}
bool AttributeQuantizationTransform::ComputeParameters(
@ -65,6 +125,9 @@ bool AttributeQuantizationTransform::ComputeParameters(
if (quantization_bits_ != -1) {
return false; // already initialized.
}
if (!IsQuantizationValid(quantization_bits)) {
return false;
}
quantization_bits_ = quantization_bits;
const int num_components = attribute.num_components();
@ -121,20 +184,37 @@ bool AttributeQuantizationTransform::EncodeParameters(
return false;
}
std::unique_ptr<PointAttribute>
AttributeQuantizationTransform::GeneratePortableAttribute(
const PointAttribute &attribute, int num_points) const {
bool AttributeQuantizationTransform::DecodeParameters(
const PointAttribute &attribute, DecoderBuffer *decoder_buffer) {
min_values_.resize(attribute.num_components());
if (!decoder_buffer->Decode(&min_values_[0],
sizeof(float) * min_values_.size())) {
return false;
}
if (!decoder_buffer->Decode(&range_)) {
return false;
}
uint8_t quantization_bits;
if (!decoder_buffer->Decode(&quantization_bits)) {
return false;
}
if (!IsQuantizationValid(quantization_bits)) {
return false;
}
quantization_bits_ = quantization_bits;
return true;
}
void AttributeQuantizationTransform::GeneratePortableAttribute(
const PointAttribute &attribute, int num_points,
PointAttribute *target_attribute) const {
DRACO_DCHECK(is_initialized());
// Allocate portable attribute.
const int num_entries = num_points;
const int num_components = attribute.num_components();
std::unique_ptr<PointAttribute> portable_attribute =
InitPortableAttribute(num_entries, num_components, 0, attribute, true);
// Quantize all values using the order given by point_ids.
int32_t *const portable_attribute_data = reinterpret_cast<int32_t *>(
portable_attribute->GetAddress(AttributeValueIndex(0)));
target_attribute->GetAddress(AttributeValueIndex(0)));
const uint32_t max_quantized_value = (1 << (quantization_bits_)) - 1;
Quantizer quantizer;
quantizer.Init(range(), max_quantized_value);
@ -149,24 +229,18 @@ AttributeQuantizationTransform::GeneratePortableAttribute(
portable_attribute_data[dst_index++] = q_val;
}
}
return portable_attribute;
}
std::unique_ptr<PointAttribute>
AttributeQuantizationTransform::GeneratePortableAttribute(
void AttributeQuantizationTransform::GeneratePortableAttribute(
const PointAttribute &attribute, const std::vector<PointIndex> &point_ids,
int num_points) const {
int num_points, PointAttribute *target_attribute) const {
DRACO_DCHECK(is_initialized());
// Allocate portable attribute.
const int num_entries = static_cast<int>(point_ids.size());
const int num_components = attribute.num_components();
std::unique_ptr<PointAttribute> portable_attribute = InitPortableAttribute(
num_entries, num_components, num_points, attribute, true);
// Quantize all values using the order given by point_ids.
int32_t *const portable_attribute_data = reinterpret_cast<int32_t *>(
portable_attribute->GetAddress(AttributeValueIndex(0)));
target_attribute->GetAddress(AttributeValueIndex(0)));
const uint32_t max_quantized_value = (1 << (quantization_bits_)) - 1;
Quantizer quantizer;
quantizer.Init(range(), max_quantized_value);
@ -181,7 +255,6 @@ AttributeQuantizationTransform::GeneratePortableAttribute(
portable_attribute_data[dst_index++] = q_val;
}
}
return portable_attribute;
}
} // namespace draco

View File

@ -37,14 +37,24 @@ class AttributeQuantizationTransform : public AttributeTransform {
void CopyToAttributeTransformData(
AttributeTransformData *out_data) const override;
void SetParameters(int quantization_bits, const float *min_values,
bool TransformAttribute(const PointAttribute &attribute,
const std::vector<PointIndex> &point_ids,
PointAttribute *target_attribute) override;
bool InverseTransformAttribute(const PointAttribute &attribute,
PointAttribute *target_attribute) override;
bool SetParameters(int quantization_bits, const float *min_values,
int num_components, float range);
bool ComputeParameters(const PointAttribute &attribute,
const int quantization_bits);
// Encode relevant parameters into buffer.
bool EncodeParameters(EncoderBuffer *encoder_buffer) const;
bool EncodeParameters(EncoderBuffer *encoder_buffer) const override;
bool DecodeParameters(const PointAttribute &attribute,
DecoderBuffer *decoder_buffer) override;
int32_t quantization_bits() const { return quantization_bits_; }
float min_value(int axis) const { return min_values_[axis]; }
@ -52,16 +62,30 @@ class AttributeQuantizationTransform : public AttributeTransform {
float range() const { return range_; }
bool is_initialized() const { return quantization_bits_ != -1; }
protected:
// Create portable attribute using 1:1 mapping between points in the input and
// output attribute.
std::unique_ptr<PointAttribute> GeneratePortableAttribute(
const PointAttribute &attribute, int num_points) const;
void GeneratePortableAttribute(const PointAttribute &attribute,
int num_points,
PointAttribute *target_attribute) const;
// Create portable attribute using custom mapping between input and output
// points.
std::unique_ptr<PointAttribute> GeneratePortableAttribute(
const PointAttribute &attribute, const std::vector<PointIndex> &point_ids,
int num_points) const;
void GeneratePortableAttribute(const PointAttribute &attribute,
const std::vector<PointIndex> &point_ids,
int num_points,
PointAttribute *target_attribute) const;
DataType GetTransformedDataType(
const PointAttribute &attribute) const override {
return DT_UINT32;
}
int GetTransformedNumComponents(
const PointAttribute &attribute) const override {
return attribute.num_components();
}
static bool IsQuantizationValid(int quantization_bits);
private:
int32_t quantization_bits_;

View File

@ -24,21 +24,17 @@ bool AttributeTransform::TransferToAttribute(PointAttribute *attribute) const {
return true;
}
std::unique_ptr<PointAttribute> AttributeTransform::InitPortableAttribute(
int num_entries, int num_components, int num_points,
const PointAttribute &attribute, bool is_unsigned) const {
const DataType dt = is_unsigned ? DT_UINT32 : DT_INT32;
std::unique_ptr<PointAttribute> AttributeTransform::InitTransformedAttribute(
const PointAttribute &src_attribute, int num_entries) {
const int num_components = GetTransformedNumComponents(src_attribute);
const DataType dt = GetTransformedDataType(src_attribute);
GeometryAttribute va;
va.Init(attribute.attribute_type(), nullptr, num_components, dt, false,
va.Init(src_attribute.attribute_type(), nullptr, num_components, dt, false,
num_components * DataTypeLength(dt), 0);
std::unique_ptr<PointAttribute> portable_attribute(new PointAttribute(va));
portable_attribute->Reset(num_entries);
if (num_points) {
portable_attribute->SetExplicitMapping(num_points);
} else {
portable_attribute->SetIdentityMapping();
}
return portable_attribute;
std::unique_ptr<PointAttribute> transformed_attribute(new PointAttribute(va));
transformed_attribute->Reset(num_entries);
transformed_attribute->SetIdentityMapping();
return transformed_attribute;
}
} // namespace draco

View File

@ -17,6 +17,8 @@
#include "draco/attributes/attribute_transform_data.h"
#include "draco/attributes/point_attribute.h"
#include "draco/core/decoder_buffer.h"
#include "draco/core/encoder_buffer.h"
namespace draco {
@ -35,10 +37,38 @@ class AttributeTransform {
AttributeTransformData *out_data) const = 0;
bool TransferToAttribute(PointAttribute *attribute) const;
// Applies the transform to |attribute| and stores the result in
// |target_attribute|. |point_ids| is an optional vector that can be used to
// remap values during the transform.
virtual bool TransformAttribute(const PointAttribute &attribute,
const std::vector<PointIndex> &point_ids,
PointAttribute *target_attribute) = 0;
// Applies an inverse transform to |attribute| and stores the result in
// |target_attribute|. In this case, |attribute| is an attribute that was
// already transformed (e.g. quantized) and |target_attribute| is the
// attribute before the transformation.
virtual bool InverseTransformAttribute(const PointAttribute &attribute,
PointAttribute *target_attribute) = 0;
// Encodes all data needed by the transformation into the |encoder_buffer|.
virtual bool EncodeParameters(EncoderBuffer *encoder_buffer) const = 0;
// Decodes all data needed to transform |attribute| back to the original
// format.
virtual bool DecodeParameters(const PointAttribute &attribute,
DecoderBuffer *decoder_buffer) = 0;
// Initializes a transformed attribute that can be used as target in the
// TransformAttribute() function call.
virtual std::unique_ptr<PointAttribute> InitTransformedAttribute(
const PointAttribute &src_attribute, int num_entries);
protected:
std::unique_ptr<PointAttribute> InitPortableAttribute(
int num_entries, int num_components, int num_points,
const PointAttribute &attribute, bool is_unsigned) const;
virtual DataType GetTransformedDataType(
const PointAttribute &attribute) const = 0;
virtual int GetTransformedNumComponents(
const PointAttribute &attribute) const = 0;
};
} // namespace draco

View File

@ -43,10 +43,6 @@ void GeometryAttribute::Init(GeometryAttribute::Type attribute_type,
}
bool GeometryAttribute::CopyFrom(const GeometryAttribute &src_att) {
if (buffer_ == nullptr || src_att.buffer_ == nullptr) {
return false;
}
buffer_->Update(src_att.buffer_->data(), src_att.buffer_->data_size());
num_components_ = src_att.num_components_;
data_type_ = src_att.data_type_;
normalized_ = src_att.normalized_;
@ -55,6 +51,14 @@ bool GeometryAttribute::CopyFrom(const GeometryAttribute &src_att) {
attribute_type_ = src_att.attribute_type_;
buffer_descriptor_ = src_att.buffer_descriptor_;
unique_id_ = src_att.unique_id_;
if (src_att.buffer_ == nullptr) {
buffer_ = nullptr;
} else {
if (buffer_ == nullptr) {
return false;
}
buffer_->Update(src_att.buffer_->data(), src_att.buffer_->data_size());
}
return true;
}

View File

@ -111,6 +111,9 @@ class GeometryAttribute {
const int64_t byte_pos = GetBytePos(att_index);
return buffer_->data() + byte_pos;
}
inline bool IsAddressValid(const uint8_t *address) const {
return ((buffer_->data() + buffer_->data_size()) > address);
}
// Fills out_data with the raw value of the requested attribute entry.
// out_data must be at least byte_stride_ long.
@ -263,7 +266,21 @@ class GeometryAttribute {
// Convert all components available in both the original and output formats.
for (int i = 0; i < std::min(num_components_, out_num_components); ++i) {
if (!IsAddressValid(src_address)) {
return false;
}
const T in_value = *reinterpret_cast<const T *>(src_address);
// Make sure the in_value fits within the range of values that OutT
// is able to represent. Perform the check only for integral types.
if (std::is_integral<T>::value && std::is_integral<OutT>::value) {
static constexpr OutT kOutMin =
std::is_signed<T>::value ? std::numeric_limits<OutT>::lowest() : 0;
if (in_value < kOutMin || in_value > std::numeric_limits<OutT>::max()) {
return false;
}
}
out_value[i] = static_cast<OutT>(in_value);
// When converting integer to floating point, normalize the value if
// necessary.

View File

@ -43,9 +43,18 @@ bool AttributesDecoder::DecodeAttributesDecoderData(DecoderBuffer *in_buffer) {
return false;
}
}
// Check that decoded number of attributes is valid.
if (num_attributes == 0) {
return false;
}
if (num_attributes > 5 * in_buffer->remaining_size()) {
// The decoded number of attributes is unreasonably high, because at least
// five bytes of attribute descriptor data per attribute are expected.
return false;
}
// Decode attribute descriptor data.
point_attribute_ids_.resize(num_attributes);
PointCloud *pc = point_cloud_;
for (uint32_t i = 0; i < num_attributes; ++i) {
@ -69,9 +78,14 @@ bool AttributesDecoder::DecodeAttributesDecoderData(DecoderBuffer *in_buffer) {
if (data_type == DT_INVALID || data_type >= DT_TYPES_COUNT) {
return false;
}
const DataType draco_dt = static_cast<DataType>(data_type);
// Add the attribute to the point cloud
// Check decoded attribute descriptor data.
if (num_components == 0) {
return false;
}
// Add the attribute to the point cloud.
const DataType draco_dt = static_cast<DataType>(data_type);
GeometryAttribute ga;
ga.Init(static_cast<GeometryAttribute::Type>(att_type), nullptr,
num_components, draco_dt, normalized > 0,
@ -90,7 +104,9 @@ bool AttributesDecoder::DecodeAttributesDecoderData(DecoderBuffer *in_buffer) {
} else
#endif
{
DecodeVarint(&unique_id, in_buffer);
if (!DecodeVarint(&unique_id, in_buffer)) {
return false;
}
ga.set_unique_id(unique_id);
}
const int att_id = pc->AddAttribute(

View File

@ -278,8 +278,10 @@ bool KdTreeAttributesDecoder::DecodeDataNeededByPortableTransforms(
return false;
}
AttributeQuantizationTransform transform;
transform.SetParameters(quantization_bits, min_value.data(),
num_components, max_value_dif);
if (!transform.SetParameters(quantization_bits, min_value.data(),
num_components, max_value_dif)) {
return false;
}
const int num_transforms =
static_cast<int>(attribute_quantization_transforms_.size());
if (!transform.TransferToAttribute(
@ -293,7 +295,9 @@ bool KdTreeAttributesDecoder::DecodeDataNeededByPortableTransforms(
// Decode transform data for signed integer attributes.
for (int i = 0; i < min_signed_values_.size(); ++i) {
int32_t val;
DecodeVarint(&val, in_buffer);
if (!DecodeVarint(&val, in_buffer)) {
return false;
}
min_signed_values_[i] = val;
}
return true;
@ -353,8 +357,9 @@ bool KdTreeAttributesDecoder::DecodeDataNeededByPortableTransforms(
return false;
}
if (6 < compression_level) {
LOGE("KdTreeAttributesDecoder: compression level %i not supported.\n",
compression_level);
DRACO_LOGE(
"KdTreeAttributesDecoder: compression level %i not supported.\n",
compression_level);
return false;
}

View File

@ -71,16 +71,21 @@ bool KdTreeAttributesEncoder::TransformAttributesToPortableFormat() {
att->num_components(), range);
} else {
// Compute quantization settings from the attribute values.
attribute_quantization_transform.ComputeParameters(*att,
quantization_bits);
if (!attribute_quantization_transform.ComputeParameters(
*att, quantization_bits)) {
return false;
}
}
attribute_quantization_transforms_.push_back(
attribute_quantization_transform);
// Store the quantized attribute in an array that will be used when we do
// the actual encoding of the data.
quantized_portable_attributes_.push_back(
attribute_quantization_transform.GeneratePortableAttribute(
*att, static_cast<int>(num_points)));
auto portable_att =
attribute_quantization_transform.InitTransformedAttribute(*att,
num_points);
attribute_quantization_transform.TransformAttribute(*att, {},
portable_att.get());
quantized_portable_attributes_.push_back(std::move(portable_att));
} else if (att->data_type() == DT_INT32 || att->data_type() == DT_INT16 ||
att->data_type() == DT_INT8) {
// For signed types, find the minimum value for each component. These

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef DRACO_COMPRESSION_ATTRIBUTES_POINT_CLOUD_KD_TREE_ATTRIBUTES_ENCODER_H_
#define DRACO_COMPRESSION_ATTRIBUTES_POINT_CLOUD_KD_TREE_ATTRIBUTES_ENCODER_H_
#ifndef DRACO_COMPRESSION_ATTRIBUTES_KD_TREE_ATTRIBUTES_ENCODER_H_
#define DRACO_COMPRESSION_ATTRIBUTES_KD_TREE_ATTRIBUTES_ENCODER_H_
#include "draco/attributes/attribute_quantization_transform.h"
#include "draco/compression/attributes/attributes_encoder.h"
@ -48,4 +48,4 @@ class KdTreeAttributesEncoder : public AttributesEncoder {
} // namespace draco
#endif // DRACO_COMPRESSION_ATTRIBUTES_POINT_CLOUD_KD_TREE_ATTRIBUTES_ENCODER_H_
#endif // DRACO_COMPRESSION_ATTRIBUTES_KD_TREE_ATTRIBUTES_ENCODER_H_

View File

@ -53,6 +53,7 @@ class OctahedronToolBox {
: quantization_bits_(-1),
max_quantized_value_(-1),
max_value_(-1),
dequantization_scale_(1.f),
center_value_(-1) {}
bool SetQuantizationBits(int32_t q) {
@ -62,6 +63,7 @@ class OctahedronToolBox {
quantization_bits_ = q;
max_quantized_value_ = (1 << quantization_bits_) - 1;
max_value_ = max_quantized_value_ - 1;
dequantization_scale_ = 2.f / max_value_;
center_value_ = max_value_ / 2;
return true;
}
@ -192,64 +194,11 @@ class OctahedronToolBox {
}
}
// TODO(b/149328891): Change function to not use templates as |T| is only
// float.
template <typename T>
void OctaherdalCoordsToUnitVector(T in_s, T in_t, T *out_vector) const {
DRACO_DCHECK_GE(in_s, 0);
DRACO_DCHECK_GE(in_t, 0);
DRACO_DCHECK_LE(in_s, 1);
DRACO_DCHECK_LE(in_t, 1);
T s = in_s;
T t = in_t;
T spt = s + t;
T smt = s - t;
T x_sign = 1.0;
if (spt >= 0.5 && spt <= 1.5 && smt >= -0.5 && smt <= 0.5) {
// Right hemisphere. Don't do anything.
} else {
// Left hemisphere.
x_sign = -1.0;
if (spt <= 0.5) {
s = 0.5 - in_t;
t = 0.5 - in_s;
} else if (spt >= 1.5) {
s = 1.5 - in_t;
t = 1.5 - in_s;
} else if (smt <= -0.5) {
s = in_t - 0.5;
t = in_s + 0.5;
} else {
s = in_t + 0.5;
t = in_s - 0.5;
}
spt = s + t;
smt = s - t;
}
const T y = 2.0 * s - 1.0;
const T z = 2.0 * t - 1.0;
const T x = std::min(std::min(2.0 * spt - 1.0, 3.0 - 2.0 * spt),
std::min(2.0 * smt + 1.0, 1.0 - 2.0 * smt)) *
x_sign;
// Normalize the computed vector.
const T normSquared = x * x + y * y + z * z;
if (normSquared < 1e-6) {
out_vector[0] = 0;
out_vector[1] = 0;
out_vector[2] = 0;
} else {
const T d = 1.0 / std::sqrt(normSquared);
out_vector[0] = x * d;
out_vector[1] = y * d;
out_vector[2] = z * d;
}
}
template <typename T>
void QuantizedOctaherdalCoordsToUnitVector(int32_t in_s, int32_t in_t,
T *out_vector) const {
T scale = 1.0 / static_cast<T>(max_value_);
OctaherdalCoordsToUnitVector(in_s * scale, in_t * scale, out_vector);
inline void QuantizedOctahedralCoordsToUnitVector(int32_t in_s, int32_t in_t,
float *out_vector) const {
OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
in_t * dequantization_scale_ - 1.f,
out_vector);
}
// |s| and |t| are expected to be signed values.
@ -333,9 +282,77 @@ class OctahedronToolBox {
int32_t center_value() const { return center_value_; }
private:
inline void OctahedralCoordsToUnitVector(float in_s_scaled, float in_t_scaled,
float *out_vector) const {
// Background about the encoding:
// A normal is encoded in a normalized space <s, t> depicted below. The
// encoding correponds to an octahedron that is unwrapped to a 2D plane.
// During encoding, a normal is projected to the surface of the octahedron
// and the projection is then unwrapped to the 2D plane. Decoding is the
// reverse of this process.
// All points in the central diamond are located on triangles on the
// right "hemisphere" of the octahedron while all points outside of the
// diamond are on the left hemisphere (basically, they would have to be
// wrapped along the diagonal edges to form the octahedron). The central
// point corresponds to the right most vertex of the octahedron and all
// corners of the plane correspond to the left most vertex of the
// octahedron.
//
// t
// ^ *-----*-----*
// | | /|\ |
// | / | \ |
// | / | \ |
// | / | \ |
// *-----*---- *
// | \ | / |
// | \ | / |
// | \ | / |
// | \|/ |
// *-----*-----* --> s
// Note that the input |in_s_scaled| and |in_t_scaled| are already scaled to
// <-1, 1> range. This way, the central point is at coordinate (0, 0).
float y = in_s_scaled;
float z = in_t_scaled;
// Remaining coordinate can be computed by projecting the (y, z) values onto
// the surface of the octahedron.
const float x = 1.f - abs(y) - abs(z);
// |x| is essentially a signed distance from the diagonal edges of the
// diamond shown on the figure above. It is positive for all points in the
// diamond (right hemisphere) and negative for all points outside the
// diamond (left hemisphere). For all points on the left hemisphere we need
// to update their (y, z) coordinates to account for the wrapping along
// the edges of the diamond.
float x_offset = -x;
x_offset = x_offset < 0 ? 0 : x_offset;
// This will do nothing for the points on the right hemisphere but it will
// mirror the (y, z) location along the nearest diagonal edge of the
// diamond.
y += y < 0 ? x_offset : -x_offset;
z += z < 0 ? x_offset : -x_offset;
// Normalize the computed vector.
const float norm_squared = x * x + y * y + z * z;
if (norm_squared < 1e-6) {
out_vector[0] = 0;
out_vector[1] = 0;
out_vector[2] = 0;
} else {
const float d = 1.0f / std::sqrt(norm_squared);
out_vector[0] = x * d;
out_vector[1] = y * d;
out_vector[2] = z * d;
}
}
int32_t quantization_bits_;
int32_t max_quantized_value_;
int32_t max_value_;
float dequantization_scale_;
int32_t center_value_;
};
} // namespace draco

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef DRACO_COMPRESSION_ATTRIBUTES_MESH_PREDICTION_SCHEMES_PREDICTION_SCHEME_DATA_H_
#define DRACO_COMPRESSION_ATTRIBUTES_MESH_PREDICTION_SCHEMES_PREDICTION_SCHEME_DATA_H_
#ifndef DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_DATA_H_
#define DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_DATA_H_
#include "draco/mesh/corner_table.h"
#include "draco/mesh/mesh.h"

View File

@ -69,7 +69,14 @@ class MeshPredictionSchemeGeometricNormalPredictorArea
// Computing cross product.
const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
normal = normal + cross;
// Prevent signed integer overflows by doing math as unsigned.
auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
normal_data[0] = normal_data[0] + cross_data[0];
normal_data[1] = normal_data[1] + cross_data[1];
normal_data[2] = normal_data[2] + cross_data[2];
cit.Next();
}

View File

@ -60,8 +60,13 @@ inline bool ComputeParallelogramPrediction(
const int v_next_off = vert_next * num_components;
const int v_prev_off = vert_prev * num_components;
for (int c = 0; c < num_components; ++c) {
out_prediction[c] = (in_data[v_next_off + c] + in_data[v_prev_off + c]) -
in_data[v_opp_off + c];
const int64_t in_data_next_off = in_data[v_next_off + c];
const int64_t in_data_prev_off = in_data[v_prev_off + c];
const int64_t in_data_opp_off = in_data[v_opp_off + c];
const int64_t result =
(in_data_next_off + in_data_prev_off) - in_data_opp_off;
out_prediction[c] = static_cast<DataTypeT>(result);
}
return true;
}

Some files were not shown because too many files have changed in this diff Show More