Merge pull request #184 from google/update_snapshot

Update Draco snapshot.
This commit is contained in:
FrankGalligan 2017-08-21 16:12:17 -07:00 committed by GitHub
commit 92433ca250
30 changed files with 853 additions and 327 deletions

View File

@ -14,22 +14,26 @@ endif ()
include(CMakePackageConfigHelpers)
include("${draco_root}/cmake/compiler_flags.cmake")
include("${draco_root}/cmake/sanitizers.cmake")
include("${draco_root}/cmake/util.cmake")
# Draco requires C++11 support.
require_cxx_flag_nomsvc("-std=c++11" YES)
option(ENABLE_POINT_CLOUD_COMPRESSION "" ON)
option(ENABLE_MESH_COMPRESSION "" ON)
option(ENABLE_STANDARD_EDGEBREAKER "" ON)
option(ENABLE_PREDICTIVE_EDGEBREAKER "" ON)
option(ENABLE_CCACHE "Enable ccache support." OFF)
option(ENABLE_DISTCC "Enable distcc support." OFF)
option(ENABLE_EXTRA_SPEED "" OFF)
option(ENABLE_EXTRA_WARNINGS "" OFF)
option(ENABLE_GOMA "Enable goma support." OFF)
option(ENABLE_MESH_COMPRESSION "" ON)
option(ENABLE_POINT_CLOUD_COMPRESSION "" ON)
option(ENABLE_PREDICTIVE_EDGEBREAKER "" ON)
option(ENABLE_STANDARD_EDGEBREAKER "" ON)
option(ENABLE_TESTS "Enables tests." OFF)
option(ENABLE_WASM "" OFF)
option(ENABLE_WERROR "" OFF)
option(ENABLE_WEXTRA "" OFF)
option(IGNORE_EMPTY_BUILD_TYPE "" OFF)
option(ENABLE_WASM "" OFF)
if (ENABLE_POINT_CLOUD_COMPRESSION)
add_cxx_preproc_definition("DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED")
@ -73,6 +77,15 @@ endif ()
if (ENABLE_WEXTRA)
add_compiler_flag_if_supported("-Wextra")
endif ()
if (ENABLE_CCACHE)
set_compiler_launcher(ENABLE_CCACHE ccache)
endif ()
if (ENABLE_DISTCC)
set_compiler_launcher(ENABLE_DISTCC distcc)
endif ()
if (ENABLE_GOMA)
set_compiler_launcher(ENABLE_GOMA gomacc)
endif ()
# Generate a version file containing repository info.
include(FindGit)
@ -224,7 +237,8 @@ set(draco_compression_attributes_pred_schemes_dec_sources
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_data.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_decoder.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_decoder.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor_area.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor_base.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_multi_parallelogram_decoder.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_encoder.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_shared.h"
@ -251,7 +265,8 @@ set(draco_compression_attributes_pred_schemes_enc_sources
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_data.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_encoder.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_encoder.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor_area.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor_base.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_multi_parallelogram_encoder.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_encoder.h"
"${draco_src_root}/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_shared.h"
@ -541,21 +556,21 @@ include_directories("${draco_root}/src")
#
if (EMSCRIPTEN)
# Draco js decoder.
require_flag("-s ALLOW_MEMORY_GROWTH=1" YES)
require_flag("-Wno-almost-asm" YES)
require_flag("--memory-init-file 0" YES)
require_flag("-fno-omit-frame-pointer" YES)
require_flag("-s MODULARIZE=1" YES)
require_compiler_flag("-s ALLOW_MEMORY_GROWTH=1" YES)
require_compiler_flag("-Wno-almost-asm" YES)
require_compiler_flag("--memory-init-file 0" YES)
require_compiler_flag("-fno-omit-frame-pointer" YES)
require_compiler_flag("-s MODULARIZE=1" YES)
if (ENABLE_EXTRA_SPEED)
require_flag("--llvm-lto 1" YES)
require_compiler_flag("--llvm-lto 1" YES)
endif ()
require_flag("-s NO_FILESYSTEM=1" YES)
require_flag("-s ELIMINATE_DUPLICATE_FUNCTIONS=1" YES)
require_flag("-s EXPORTED_RUNTIME_METHODS=[]" YES)
require_flag("-s PRECISE_F32=1" YES)
require_compiler_flag("-s NO_FILESYSTEM=1" YES)
require_compiler_flag("-s ELIMINATE_DUPLICATE_FUNCTIONS=1" YES)
require_compiler_flag("-s EXPORTED_RUNTIME_METHODS=[]" YES)
require_compiler_flag("-s PRECISE_F32=1" YES)
if (ENABLE_WASM)
require_flag("-s WASM=1" YES)
require_flag("-s BINARYEN_IMPRECISE=1" YES)
require_compiler_flag("-s WASM=1" YES)
require_compiler_flag("-s BINARYEN_IMPRECISE=1" YES)
endif ()
if (CMAKE_BUILD_TYPE STREQUAL "")

View File

@ -159,6 +159,12 @@ And your standard debug build will be produced using:
$ cmake path/to/draco -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 path/to/draco -DSANITIZE=address
~~~~~
Googletest Integration
----------------------

View File

@ -3,6 +3,7 @@ set(DRACO_CMAKE_COMPILER_FLAGS_CMAKE_ 1)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include("${draco_root}/cmake/compiler_tests.cmake")
# Strings used to cache failed C/CXX flags.
set(DRACO_FAILED_C_FLAGS)
@ -103,7 +104,7 @@ endfunction ()
# Checks for support of $flag by both the C and CXX compilers. Terminates
# generation when support is not present in both compilers.
function (require_flag flag update_cmake_flags)
function (require_compiler_flag flag update_cmake_flags)
require_c_flag(${flag} ${update_cmake_flags})
require_cxx_flag(${flag} ${update_cmake_flags})
endfunction ()
@ -127,7 +128,7 @@ endfunction ()
# Checks only non-MSVC targets for support of $flag by both the C and CXX
# compilers. Terminates generation when support is not present in both
# compilers.
function (require_flag_nomsvc flag update_cmake_flags)
function (require_compiler_flag_nomsvc flag update_cmake_flags)
require_c_flag_nomsvc(${flag} ${update_cmake_flags})
require_cxx_flag_nomsvc(${flag} ${update_cmake_flags})
endfunction ()
@ -231,5 +232,18 @@ function (append_link_flag_to_target target flags)
set_target_properties(${target} PROPERTIES LINK_FLAGS ${target_link_flags})
endfunction ()
endif () # DRACO_CMAKE_COMPILER_FLAGS_CMAKE_
# Adds $flag to executable linker flags, and makes sure C/CXX builds still work.
function (require_linker_flag flag)
append_exe_linker_flag(${flag})
unset(c_passed)
draco_check_c_compiles("LINKER_FLAG_C_TEST(${flag})" "" c_passed)
unset(cxx_passed)
draco_check_cxx_compiles("LINKER_FLAG_CXX_TEST(${flag})" "" cxx_passed)
if (NOT c_passed OR NOT cxx_passed)
message(FATAL_ERROR "Linker flag test for ${flag} failed.")
endif ()
endfunction ()
endif () # DRACO_CMAKE_COMPILER_FLAGS_CMAKE_

128
cmake/compiler_tests.cmake Normal file
View File

@ -0,0 +1,128 @@
if (NOT DRACO_CMAKE_COMPILER_TESTS_CMAKE_)
set(DRACO_CMAKE_COMPILER_TESTS_CMAKE_ 1)
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)
# The basic main() function used in all compile tests.
set(DRACO_C_MAIN "\nint main(void) { return 0; }")
set(DRACO_CXX_MAIN "\nint main() { return 0; }")
# Strings containing the names of passed and failed tests.
set(DRACO_C_PASSED_TESTS)
set(DRACO_C_FAILED_TESTS)
set(DRACO_CXX_PASSED_TESTS)
set(DRACO_CXX_FAILED_TESTS)
function(draco_push_var var new_value)
set(SAVED_${var} ${var} PARENT_SCOPE)
set(${var} ${new_value} PARENT_SCOPE)
endfunction ()
function(draco_pop_var var)
set(var ${SAVED_${var}} PARENT_SCOPE)
unset(SAVED_${var} PARENT_SCOPE)
endfunction ()
# Confirms $test_source compiles and stores $test_name in one of
# $DRACO_C_PASSED_TESTS or $DRACO_C_FAILED_TESTS depending on out come. When the
# test passes $result_var is set to 1. When it fails $result_var is unset.
# The test is not run if the test name is found in either of the passed or
# failed test variables.
function(draco_check_c_compiles test_name test_source result_var)
unset(C_TEST_PASSED CACHE)
unset(C_TEST_FAILED CACHE)
string(FIND "${DRACO_C_PASSED_TESTS}" "${test_name}" C_TEST_PASSED)
string(FIND "${DRACO_C_FAILED_TESTS}" "${test_name}" C_TEST_FAILED)
if (${C_TEST_PASSED} EQUAL -1 AND ${C_TEST_FAILED} EQUAL -1)
unset(C_TEST_COMPILED CACHE)
message("Running C compiler test: ${test_name}")
check_c_source_compiles("${test_source} ${DRACO_C_MAIN}" C_TEST_COMPILED)
set(${result_var} ${C_TEST_COMPILED} PARENT_SCOPE)
if (C_TEST_COMPILED)
set(DRACO_C_PASSED_TESTS "${DRACO_C_PASSED_TESTS} ${test_name}" CACHE
STRING "" FORCE)
else ()
set(DRACO_C_FAILED_TESTS "${DRACO_C_FAILED_TESTS} ${test_name}" CACHE
STRING "" FORCE)
message("C Compiler test ${test_name} failed.")
endif ()
elseif (NOT ${C_TEST_PASSED} EQUAL -1)
set(${result_var} 1 PARENT_SCOPE)
else () # ${C_TEST_FAILED} NOT EQUAL -1
unset(${result_var} PARENT_SCOPE)
endif ()
endfunction ()
# Confirms $test_source compiles and stores $test_name in one of
# $DRACO_CXX_PASSED_TESTS or $DRACO_CXX_FAILED_TESTS depending on out come. When
# the test passes $result_var is set to 1. When it fails $result_var is unset.
# The test is not run if the test name is found in either of the passed or
# failed test variables.
function(draco_check_cxx_compiles test_name test_source result_var)
unset(CXX_TEST_PASSED CACHE)
unset(CXX_TEST_FAILED CACHE)
string(FIND "${DRACO_CXX_PASSED_TESTS}" "${test_name}" CXX_TEST_PASSED)
string(FIND "${DRACO_CXX_FAILED_TESTS}" "${test_name}" CXX_TEST_FAILED)
if (${CXX_TEST_PASSED} EQUAL -1 AND ${CXX_TEST_FAILED} EQUAL -1)
unset(CXX_TEST_COMPILED CACHE)
message("Running CXX compiler test: ${test_name}")
check_cxx_source_compiles("${test_source} ${DRACO_CXX_MAIN}"
CXX_TEST_COMPILED)
set(${result_var} ${CXX_TEST_COMPILED} PARENT_SCOPE)
if (CXX_TEST_COMPILED)
set(DRACO_CXX_PASSED_TESTS "${DRACO_CXX_PASSED_TESTS} ${test_name}" CACHE
STRING "" FORCE)
else ()
set(DRACO_CXX_FAILED_TESTS "${DRACO_CXX_FAILED_TESTS} ${test_name}" CACHE
STRING "" FORCE)
message("CXX Compiler test ${test_name} failed.")
endif ()
elseif (NOT ${CXX_TEST_PASSED} EQUAL -1)
set(${result_var} 1 PARENT_SCOPE)
else () # ${CXX_TEST_FAILED} NOT EQUAL -1
unset(${result_var} PARENT_SCOPE)
endif ()
endfunction ()
# Convenience function that confirms $test_source compiles as C and C++.
# $result_var is set to 1 when both tests are successful, and 0 when one or both
# tests fail.
# Note: This function is intended to be used to write to result variables that
# are expanded via configure_file(). $result_var is set to 1 or 0 to allow
# direct usage of the value in generated source files.
function(draco_check_source_compiles test_name test_source result_var)
unset(C_PASSED)
unset(CXX_PASSED)
draco_check_c_compiles(${test_name} ${test_source} C_PASSED)
draco_check_cxx_compiles(${test_name} ${test_source} CXX_PASSED)
if (C_PASSED AND CXX_PASSED)
set(${result_var} 1 PARENT_SCOPE)
else ()
set(${result_var} 0 PARENT_SCOPE)
endif ()
endfunction ()
# When inline support is detected for the current compiler the supported
# inlining keyword is written to $result in caller scope.
function (draco_get_inline result)
draco_check_source_compiles("inline_check_1"
"static inline void function(void) {}"
HAVE_INLINE_1)
if (HAVE_INLINE_1 EQUAL 1)
set(${result} "inline" PARENT_SCOPE)
return()
endif ()
# Check __inline.
draco_check_source_compiles("inline_check_2"
"static __inline void function(void) {}"
HAVE_INLINE_2)
if (HAVE_INLINE_2 EQUAL 1)
set(${result} "__inline" PARENT_SCOPE)
endif ()
endfunction ()
endif () # DRACO_CMAKE_COMPILER_TESTS_CMAKE_

19
cmake/sanitizers.cmake Normal file
View File

@ -0,0 +1,19 @@
if (NOT DRACO_CMAKE_SANITIZERS_CMAKE_)
set(DRACO_CMAKE_SANITIZERS_CMAKE_ 1)
if (MSVC OR NOT SANITIZE)
return ()
endif ()
include("${draco_root}/cmake/compiler_flags.cmake")
string(TOLOWER ${SANITIZE} SANITIZE)
# Require the sanitizer requested.
require_linker_flag("-fsanitize=${SANITIZE}")
require_compiler_flag("-fsanitize=${SANITIZE}" YES)
# Make callstacks accurate.
require_compiler_flag("-fno-omit-frame-pointer -fno-optimize-sibling-calls" YES)
endif() # DRACO_CMAKE_SANITIZERS_CMAKE_

View File

@ -1,6 +1,9 @@
if (NOT DRACO_CMAKE_UTIL_CMAKE_)
set(DRACO_CMAKE_UTIL_CMAKE_ 1)
# Creates dummy source file in $draco_build_dir named $basename.$extension and
# returns the full path to the dummy source file via the $out_file_path
# parameter.
function (create_dummy_source_file basename extension out_file_path)
set(dummy_source_file "${draco_build_dir}/${basename}.${extension}")
file(WRITE "${dummy_source_file}"
@ -11,11 +14,18 @@ function (create_dummy_source_file basename extension out_file_path)
set(${out_file_path} ${dummy_source_file} PARENT_SCOPE)
endfunction ()
# Convenience function for adding a dummy source file to $target_name using
# $extension as the file extension. Wraps create_dummy_source_file().
function (add_dummy_source_file_to_target target_name extension)
create_dummy_source_file("${target_name}" "${extension}" "dummy_source_file")
target_sources(${target_name} PRIVATE ${dummy_source_file})
endfunction ()
# Extracts the version number from $version_file and returns it to the user via
# $version_string_out_var. This is achieved by finding the first instance of
# the kDracoVersion variable and then removing everything but the string literal
# assigned to the variable. Quotes and semicolon are stripped from the returned
# string.
function (extract_version_string version_file version_string_out_var)
file(STRINGS "${version_file}" draco_version REGEX "kDracoVersion")
list(GET draco_version 0 draco_version)
@ -26,5 +36,20 @@ function (extract_version_string version_file version_string_out_var)
set("${version_string_out_var}" "${draco_version}" PARENT_SCOPE)
endfunction ()
# Sets CMake compiler launcher to $launcher_name when $launcher_name is found in
# $PATH. Warns user about ignoring build flag $launcher_flag when $launcher_name
# is not found in $PATH.
function (set_compiler_launcher launcher_flag launcher_name)
find_program(launcher_path "${launcher_name}")
if (launcher_path)
set(CMAKE_C_COMPILER_LAUNCHER "${launcher_path}" PARENT_SCOPE)
set(CMAKE_CXX_COMPILER_LAUNCHER "${launcher_path}" PARENT_SCOPE)
message("--- Using ${launcher_name} as compiler launcher.")
else ()
message(WARNING
"--- Cannot find ${launcher_name}, ${launcher_flag} ignored.")
endif ()
endfunction ()
endif() # DRACO_CMAKE_UTIL_CMAKE_

View File

@ -14,17 +14,21 @@
//
'use strict';
THREE.DRACOLoader = function(manager) {
// If |dracoDecoderType|.type is set to "js", then DRACOLoader will load the
// Draco JavaScript decoder.
THREE.DRACOLoader = function(manager, dracoDecoderType) {
this.timeLoaded = 0;
this.manager = (manager !== undefined) ? manager :
THREE.DefaultLoadingManager;
this.materials = null;
this.verbosity = 0;
this.attributeOptions = {};
this.dracoDecoderType = {};
this.dracoDecoderType =
(dracoDecoderType !== undefined) ? dracoDecoderType : {};
this.drawMode = THREE.TrianglesDrawMode;
THREE.DRACOLoader.loadDracoDecoder(this);
};
THREE.DRACOLoader.prototype = {
constructor: THREE.DRACOLoader,
@ -54,10 +58,6 @@ THREE.DRACOLoader.prototype = {
this.verbosity = level;
},
setDracoDecoderType: function(dracoDecoderType) {
this.dracoDecoderType = dracoDecoderType;
},
/**
* Sets desired mode for generated geometry indices.
* Can be either:
@ -84,7 +84,7 @@ THREE.DRACOLoader.prototype = {
decodeDracoFile: function(rawBuffer, callback) {
var scope = this;
THREE.DRACOLoader.getDecoder(this.dracoDecoderType,
THREE.DRACOLoader.getDecoder(this,
function(dracoDecoder) {
scope.decodeDracoFileInternal(rawBuffer, dracoDecoder, callback);
});
@ -360,7 +360,7 @@ THREE.DRACOLoader.prototype = {
},
isVersionSupported: function(version, callback) {
THREE.DRACOLoader.getDecoder(this.dracoDecoderType,
THREE.DRACOLoader.getDecoder(this,
function(decoder) {
callback(decoder.isVersionSupported(version));
});
@ -373,6 +373,64 @@ THREE.DRACOLoader.prototype = {
}
};
// This function loads a JavaScript file and adds it to the page. "path"
// is the path to the JavaScript file. "onLoadFunc" is the function to be
// called when the JavaScript file has been loaded.
THREE.DRACOLoader.loadJavaScriptFile = function(path, onLoadFunc,
dracoDecoder) {
var head = document.getElementsByTagName('head')[0];
var element = document.createElement('script');
element.id = "decoder_script";
element.type = 'text/javascript';
element.src = path;
if (onLoadFunc !== null) {
element.onload = onLoadFunc(dracoDecoder);
} else {
element.onload = function(dracoDecoder) {
dracoDecoder.timeLoaded = performance.now();
};
}
var previous_decoder_script = document.getElementById("decoder_script");
if (previous_decoder_script !== null) {
previous_decoder_script.parentNode.removeChild(previous_decoder_script);
}
head.appendChild(element);
}
THREE.DRACOLoader.loadWebAssemblyDecoder = function(dracoDecoder) {
dracoDecoder.dracoDecoderType['wasmBinaryFile'] = '../draco_decoder.wasm';
var xhr = new XMLHttpRequest();
xhr.open('GET', '../draco_decoder.wasm', true);
xhr.responseType = 'arraybuffer';
xhr.onload = function() {
// draco_wasm_wrapper.js must be loaded before DracoDecoderModule is
// created. The object passed into DracoDecoderModule() must contain a
// property with the name of wasmBinary and the value must be an
// ArrayBuffer containing the contents of the .wasm file.
dracoDecoder.dracoDecoderType['wasmBinary'] = xhr.response;
dracoDecoder.timeLoaded = performance.now();
};
xhr.send(null)
}
// This function will test if the browser has support for WebAssembly. If
// it does it will download the WebAssembly Draco decoder, if not it will
// download the asmjs Draco decoder.
THREE.DRACOLoader.loadDracoDecoder = function(dracoDecoder) {
if (typeof WebAssembly !== 'object' ||
dracoDecoder.dracoDecoderType.type === 'js') {
// No WebAssembly support
THREE.DRACOLoader.loadJavaScriptFile('../draco_decoder.js',
null, dracoDecoder);
} else {
THREE.DRACOLoader.loadJavaScriptFile('../draco_wasm_wrapper.js',
function (dracoDecoder) {
THREE.DRACOLoader.loadWebAssemblyDecoder(dracoDecoder);
}, dracoDecoder);
}
}
/**
* Creates and returns a singleton instance of the DracoDecoderModule.
* The module loading is done asynchronously for WebAssembly. Initialized module
@ -381,24 +439,50 @@ THREE.DRACOLoader.prototype = {
*/
THREE.DRACOLoader.getDecoder = (function() {
var decoder;
var decoderCreationCalled = false;
return function(dracoDecoderType, onDracoDecoderModuleLoadedCallback) {
if (typeof DracoDecoderModule === 'undefined') {
throw new Error('THREE.DRACOLoader: DracoDecoderModule not found.');
}
return function(dracoDecoder, onDracoDecoderModuleLoadedCallback) {
if (typeof decoder !== 'undefined') {
// Module already initialized.
if (typeof onDracoDecoderModuleLoadedCallback !== 'undefined') {
onDracoDecoderModuleLoadedCallback(decoder);
}
} else {
dracoDecoderType['onModuleLoaded'] = function(module) {
if (typeof onDracoDecoderModuleLoadedCallback === 'function') {
if (typeof DracoDecoderModule === 'undefined') {
// Wait until the Draco decoder is loaded before starting the error
// timer.
if (dracoDecoder.timeLoaded > 0) {
var waitMs = performance.now() - dracoDecoder.timeLoaded;
// After loading the Draco JavaScript decoder file, there is still
// some time before the DracoDecoderModule is defined. So start a
// loop to check when the DracoDecoderModule gets defined. If the
// time is hit throw an error.
if (waitMs > 5000) {
throw new Error(
'THREE.DRACOLoader: DracoDecoderModule not found.');
}
}
} else {
if (!decoderCreationCalled) {
decoderCreationCalled = true;
dracoDecoder.dracoDecoderType['onModuleLoaded'] =
function(module) {
if (typeof onDracoDecoderModuleLoadedCallback ===
'function') {
decoder = module;
onDracoDecoderModuleLoadedCallback(module);
}
};
DracoDecoderModule(dracoDecoderType);
DracoDecoderModule(dracoDecoder.dracoDecoderType);
}
}
// Either the DracoDecoderModule has not been defined or the decoder
// has not been created yet. Call getDecoder() again.
setTimeout(function() {
THREE.DRACOLoader.getDecoder(dracoDecoder,
onDracoDecoderModuleLoadedCallback);
}, 10);
}
};

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,69 +1,69 @@
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(e,m,f){e!=Array.prototype&&e!=Object.prototype&&(e[m]=f.value)};$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(e,m,f,A){if(m){f=$jscomp.global;e=e.split(".");for(A=0;A<e.length-1;A++){var k=e[A];k in f||(f[k]={});f=f[k]}e=e[e.length-1];A=f[e];m=m(A);m!=A&&null!=m&&$jscomp.defineProperty(f,e,{configurable:!0,writable:!0,value:m})}};$jscomp.polyfill("Math.imul",function(e){return e?e:function(e,f){e=Number(e);f=Number(f);var m=e&65535,k=f&65535;return m*k+((e>>>16&65535)*k+m*(f>>>16&65535)<<16>>>0)|0}},"es6","es3");
$jscomp.polyfill=function(e,m,f,z){if(m){f=$jscomp.global;e=e.split(".");for(z=0;z<e.length-1;z++){var h=e[z];h in f||(f[h]={});f=f[h]}e=e[e.length-1];z=f[e];m=m(z);m!=z&&null!=m&&$jscomp.defineProperty(f,e,{configurable:!0,writable:!0,value:m})}};$jscomp.polyfill("Math.imul",function(e){return e?e:function(e,f){e=Number(e);f=Number(f);var m=e&65535,h=f&65535;return m*h+((e>>>16&65535)*h+m*(f>>>16&65535)<<16>>>0)|0}},"es6","es3");
$jscomp.polyfill("Math.clz32",function(e){return e?e:function(e){e=Number(e)>>>0;if(0===e)return 32;var f=0;0===(e&4294901760)&&(e<<=16,f+=16);0===(e&4278190080)&&(e<<=8,f+=8);0===(e&4026531840)&&(e<<=4,f+=4);0===(e&3221225472)&&(e<<=2,f+=2);0===(e&2147483648)&&f++;return f}},"es6","es3");$jscomp.polyfill("Math.trunc",function(e){return e?e:function(e){e=Number(e);if(isNaN(e)||Infinity===e||-Infinity===e||0===e)return e;var f=Math.floor(Math.abs(e));return 0>e?-f:f}},"es6","es3");
$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(e){return $jscomp.SYMBOL_PREFIX+(e||"")+$jscomp.symbolCounter_++};
$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var e=0;return function(m){return $jscomp.SYMBOL_PREFIX+(m||"")+e++}}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var e=$jscomp.global.Symbol.iterator;e||(e=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[e]&&$jscomp.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(e){var m=0;return $jscomp.iteratorPrototype(function(){return m<e.length?{done:!1,value:e[m++]}:{done:!0}})};
$jscomp.iteratorPrototype=function(e){$jscomp.initSymbolIterator();e={next:e};e[$jscomp.global.Symbol.iterator]=function(){return this};return e};$jscomp.makeIterator=function(e){$jscomp.initSymbolIterator();var m=e[Symbol.iterator];return m?m.call(e):$jscomp.arrayIterator(e)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.polyfill("Promise",function(e){function m(){this.batch_=null}function f(e){return e instanceof k?e:new k(function(t,f){t(e)})}if(e&&!$jscomp.FORCE_POLYFILL_PROMISE)return e;m.prototype.asyncExecute=function(e){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(e);return this};m.prototype.asyncExecuteBatch_=function(){var e=this;this.asyncExecuteFunction(function(){e.executeBatch_()})};var A=$jscomp.global.setTimeout;m.prototype.asyncExecuteFunction=function(e){A(e,
0)};m.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var e=this.batch_;this.batch_=[];for(var f=0;f<e.length;++f){var k=e[f];delete e[f];try{k()}catch(qa){this.asyncThrow_(qa)}}}this.batch_=null};m.prototype.asyncThrow_=function(e){this.asyncExecuteFunction(function(){throw e;})};var k=function(e){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var f=this.createResolveAndReject_();try{e(f.resolve,f.reject)}catch(ia){f.reject(ia)}};k.prototype.createResolveAndReject_=
function(){function e(e){return function(t){k||(k=!0,e.call(f,t))}}var f=this,k=!1;return{resolve:e(this.resolveTo_),reject:e(this.reject_)}};k.prototype.resolveTo_=function(e){if(e===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof k)this.settleSameAsPromise_(e);else{a:switch(typeof e){case "object":var f=null!=e;break a;case "function":f=!0;break a;default:f=!1}f?this.resolveToNonPromiseObj_(e):this.fulfill_(e)}};k.prototype.resolveToNonPromiseObj_=function(e){var f=
void 0;try{f=e.then}catch(ia){this.reject_(ia);return}"function"==typeof f?this.settleSameAsThenable_(f,e):this.fulfill_(e)};k.prototype.reject_=function(e){this.settle_(2,e)};k.prototype.fulfill_=function(e){this.settle_(1,e)};k.prototype.settle_=function(e,f){if(0!=this.state_)throw Error("Cannot settle("+e+", "+f|"): Promise already settled in state"+this.state_);this.state_=e;this.result_=f;this.executeOnSettledCallbacks_()};k.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var e=
this.onSettledCallbacks_,f=0;f<e.length;++f)e[f].call(),e[f]=null;this.onSettledCallbacks_=null}};var R=new m;k.prototype.settleSameAsPromise_=function(e){var f=this.createResolveAndReject_();e.callWhenSettled_(f.resolve,f.reject)};k.prototype.settleSameAsThenable_=function(e,f){var k=this.createResolveAndReject_();try{e.call(f,k.resolve,k.reject)}catch(qa){k.reject(qa)}};k.prototype.then=function(e,f){function m(e,f){return"function"==typeof e?function(f){try{t(e(f))}catch(ra){ja(ra)}}:f}var t,ja,
A=new k(function(e,f){t=e;ja=f});this.callWhenSettled_(m(e,t),m(f,ja));return A};k.prototype.catch=function(e){return this.then(void 0,e)};k.prototype.callWhenSettled_=function(e,f){function k(){switch(m.state_){case 1:e(m.result_);break;case 2:f(m.result_);break;default:throw Error("Unexpected state: "+m.state_);}}var m=this;null==this.onSettledCallbacks_?R.asyncExecute(k):this.onSettledCallbacks_.push(function(){R.asyncExecute(k)})};k.resolve=f;k.reject=function(e){return new k(function(f,k){k(e)})};
k.race=function(e){return new k(function(k,m){for(var t=$jscomp.makeIterator(e),A=t.next();!A.done;A=t.next())f(A.value).callWhenSettled_(k,m)})};k.all=function(e){var m=$jscomp.makeIterator(e),t=m.next();return t.done?f([]):new k(function(e,k){function A(f){return function(k){ba[f]=k;R--;0==R&&e(ba)}}var ba=[],R=0;do ba.push(void 0),R++,f(t.value).callWhenSettled_(A(ba.length-1),k),t=m.next();while(!t.done)})};return k},"es6","es3");
var DracoDecoderModule=function(e){function m(a){eval.call(null,a)}function f(a,b){a||M("Assertion failed: "+b)}function A(c){var b=a["_"+c];if(!b)try{b=eval("_"+c)}catch(d){}f(b,"Cannot call unknown function "+c+" (perhaps LLVM optimizations or closure removed it?)");return b}function k(a,b,d){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return N[a>>0];case "i8":return N[a>>0];case "i16":return sa[a>>1];case "i32":return u[a>>2];case "i64":return u[a>>2];case "float":return ya[a>>
2];case "double":return za[a>>3];default:M("invalid type for setValue: "+b)}return null}function R(a,b,d,g){if("number"===typeof a){var c=!0;var e=a}else c=!1,e=a.length;var S="string"===typeof b?b:null;d=4==d?g:["function"===typeof la?la:n.staticAlloc,n.stackAlloc,n.staticAlloc,n.dynamicAlloc][void 0===d?2:d](Math.max(e,S?1:b.length));if(c){g=d;f(0==(d&3));for(a=d+(e&-4);g<a;g+=4)u[g>>2]=0;for(a=d+e;g<a;)N[g++>>0]=0;return d}if("i8"===S)return a.subarray||a.slice?G.set(a,d):G.set(new Uint8Array(a),
d),d;g=0;for(var k,m;g<e;){var h=a[g];"function"===typeof h&&(h=n.getFunctionIndex(h));c=S||b[g];if(0===c)g++;else{"i64"==c&&(c="i32");var l=d+g,ea=c;ea=ea||"i8";"*"===ea.charAt(ea.length-1)&&(ea="i32");switch(ea){case "i1":N[l>>0]=h;break;case "i8":N[l>>0]=h;break;case "i16":sa[l>>1]=h;break;case "i32":u[l>>2]=h;break;case "i64":tempI64=[h>>>0,(tempDouble=h,1<=+qb(tempDouble)?0<tempDouble?(rb(+sb(tempDouble/4294967296),4294967295)|0)>>>0:~~+tb((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)];
u[l>>2]=tempI64[0];u[l+4>>2]=tempI64[1];break;case "float":ya[l>>2]=h;break;case "double":za[l>>3]=h;break;default:M("invalid type for setValue: "+ea)}m!==c&&(k=n.getNativeTypeSize(c),m=c);g+=k}}return d}function t(c,b){if(0===b||!c)return"";for(var d=0,g,e=0;;){g=G[c+e>>0];d|=g;if(0==g&&!b)break;e++;if(b&&e==b)break}b||(b=e);g="";if(128>d){for(;0<b;)d=String.fromCharCode.apply(String,G.subarray(c,c+Math.min(b,1024))),g=g?g+d:d,c+=1024,b-=1024;return g}return a.UTF8ToString(c)}function Ea(a,b,d,g){if(!(0<
g))return 0;var c=d;g=d+g-1;for(var e=0;e<a.length;++e){var f=a.charCodeAt(e);55296<=f&&57343>=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++e)&1023);if(127>=f){if(d>=g)break;b[d++]=f}else{if(2047>=f){if(d+1>=g)break;b[d++]=192|f>>6}else{if(65535>=f){if(d+2>=g)break;b[d++]=224|f>>12}else{if(2097151>=f){if(d+3>=g)break;b[d++]=240|f>>18}else{if(67108863>=f){if(d+4>=g)break;b[d++]=248|f>>24}else{if(d+5>=g)break;b[d++]=252|f>>30;b[d++]=128|f>>24&63}b[d++]=128|f>>18&63}b[d++]=128|f>>12&63}b[d++]=128|f>>6&
63}b[d++]=128|f&63}}b[d]=0;return d-c}function ia(a){for(var b=0,c=0;c<a.length;++c){var g=a.charCodeAt(c);55296<=g&&57343>=g&&(g=65536+((g&1023)<<10)|a.charCodeAt(++c)&1023);127>=g?++b:b=2047>=g?b+2:65535>=g?b+3:2097151>=g?b+4:67108863>=g?b+5:b+6}return b}function qa(c){return c.replace(/__Z[\w\d_]+/g,function(b){a:{var c=a.___cxa_demangle||a.__cxa_demangle;if(c)try{var g=b.substr(1),e=ia(g)+1;var f=la(e);Ea(g,G,f,e);var h=la(4);var l=c(f,0,0,h);if(0===k(h,"i32")&&l){var m=t(l);break a}}catch(wd){}finally{f&&
Ia(f),h&&Ia(h),l&&Ia(l)}else n.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");m=b}return b===m?b:b+" ["+m+"]"})}function ja(){a:{var c=Error();if(!c.stack){try{throw Error(0);}catch(b){c=b}if(!c.stack){c="(no stack trace available)";break a}}c=c.stack.toString()}a.extraStackTrace&&(c+="\n"+a.extraStackTrace());return qa(c)}function Fa(a,b){0<a%b&&(a+=b-a%b);return a}function ba(){a.HEAP8=N=new Int8Array(H);a.HEAP16=sa=new Int16Array(H);a.HEAP32=u=new Int32Array(H);
a.HEAPU8=G=new Uint8Array(H);a.HEAPU16=Wa=new Uint16Array(H);a.HEAPU32=Xa=new Uint32Array(H);a.HEAPF32=ya=new Float32Array(H);a.HEAPF64=za=new Float64Array(H)}function Va(){var c=a.usingWasm?Ja:Ya,b=2147483648-c;if(u[X>>2]>b)return!1;var d=y;for(y=Math.max(y,ub);y<u[X>>2];)y=536870912>=y?Fa(2*y,c):Math.min(Fa((3*y+2147483648)/4,c),b);c=a.reallocBuffer(y);if(!c||c.byteLength!=y)return y=d,!1;a.buffer=H=c;ba();return!0}function ka(c){for(;0<c.length;){var b=c.shift();if("function"==typeof b)b();else{var d=
b.func;"number"===typeof d?void 0===b.arg?a.dynCall_v(d):a.dynCall_vi(d,b.arg):d(void 0===b.arg?null:b.arg)}}}function ra(a,b,d){d=0<d?d:ia(a)+1;d=Array(d);a=Ea(a,d,0,d.length);b&&(d.length=a);return d}function Za(c){fa++;a.monitorRunDependencies&&a.monitorRunDependencies(fa)}function $a(c){fa--;a.monitorRunDependencies&&a.monitorRunDependencies(fa);0==fa&&(null!==Ka&&(clearInterval(Ka),Ka=null),ta&&(c=ta,ta=null,c()))}function ma(){return!!ma.uncaught_exception}function ua(){var c=C.last;if(!c)return(n.setTempRet0(0),
0)|0;var b=C.infos[c],d=b.type;if(!d)return(n.setTempRet0(0),c)|0;var g=Array.prototype.slice.call(arguments);a.___cxa_is_pointer_type(d);ua.buffer||(ua.buffer=la(4));u[ua.buffer>>2]=c;c=ua.buffer;for(var e=0;e<g.length;e++)if(g[e]&&a.___cxa_can_catch(g[e],d,c))return c=u[c>>2],b.adjusted=c,(n.setTempRet0(g[e]),c)|0;c=u[c>>2];return(n.setTempRet0(d),c)|0}function va(c,b){va.seen||(va.seen={});c in va.seen||(a.dynCall_v(b),va.seen[c]=1)}function ca(c,b){r.varargs=b;try{var d=r.get(),e=r.get(),h=r.get();
c=0;ca.buffer||(ca.buffers=[null,[],[]],ca.printChar=function(b,c){var d=ca.buffers[b];f(d);if(0===c||10===c){b=1===b?a.print:a.printErr;a:{for(var e=c=0;d[e];)++e;if(16<e-c&&d.subarray&&ab)c=ab.decode(d.subarray(c,e));else for(e="";;){var g=d[c++];if(!g){c=e;break a}if(g&128){var h=d[c++]&63;if(192==(g&224))e+=String.fromCharCode((g&31)<<6|h);else{var k=d[c++]&63;if(224==(g&240))g=(g&15)<<12|h<<6|k;else{var l=d[c++]&63;if(240==(g&248))g=(g&7)<<18|h<<12|k<<6|l;else{var m=d[c++]&63;if(248==(g&252))g=
(g&3)<<24|h<<18|k<<12|l<<6|m;else{var x=d[c++]&63;g=(g&1)<<30|h<<24|k<<18|l<<12|m<<6|x}}}65536>g?e+=String.fromCharCode(g):(g-=65536,e+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else e+=String.fromCharCode(g)}}b(c);d.length=0}else d.push(c)});for(b=0;b<h;b++){for(var k=u[e+8*b>>2],l=u[e+(8*b+4)>>2],m=0;m<l;m++)ca.printChar(d,G[k+m]);c+=l}return c}catch(Ha){return"undefined"!==typeof FS&&Ha instanceof FS.ErrnoError||M(Ha),-Ha.errno}}function na(a){this.name="ExitStatus";this.message="Program terminated with exit("+
a+")";this.status=a}function La(c){function b(){if(!a.calledRun&&(a.calledRun=!0,!oa)){Aa||(Aa=!0,ka(Ma));ka(bb);if(a.onRuntimeInitialized)a.onRuntimeInitialized();a._main&&cb&&a.callMain(c);if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)db.unshift(a.postRun.shift());ka(db)}}c=c||a.arguments;null===eb&&(eb=Date.now());if(!(0<fa)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)fb.unshift(a.preRun.shift());ka(fb);0<fa||a.calledRun||
(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function gb(c,b){if(!b||!a.noExitRuntime){if(!a.noExitRuntime&&(oa=!0,T=vb,ka(hb),a.onExit))a.onExit(c);pa&&process.exit(c);a.quit(c,new na(c))}}function M(c){if(a.onAbort)a.onAbort(c);void 0!==c?(a.print(c),a.printErr(c),c=JSON.stringify(c)):c="";oa=!0;var b="abort("+c+") at "+ja()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";ib&&
ib.forEach(function(a){b=a(b,c)});throw b;}function v(){}function E(a){return(a||v).__cache__}function Y(a,b){var c=E(b),g=c[a];if(g)return g;g=Object.create((b||v).prototype);g.ptr=a;return c[a]=g}function Z(a){if("string"===typeof a){a=ra(a);var b=h.alloc(a,N);h.copy(a,N,b);return b}return a}function D(){throw"cannot construct a Status, no constructor in IDL";}function I(){this.ptr=wb();E(I)[this.ptr]=this}function J(){this.ptr=xb();E(J)[this.ptr]=this}function p(){this.ptr=yb();E(p)[this.ptr]=
$jscomp.polyfill("Promise",function(e){function m(){this.batch_=null}function f(e){return e instanceof h?e:new h(function(t,f){t(e)})}if(e&&!$jscomp.FORCE_POLYFILL_PROMISE)return e;m.prototype.asyncExecute=function(e){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(e);return this};m.prototype.asyncExecuteBatch_=function(){var e=this;this.asyncExecuteFunction(function(){e.executeBatch_()})};var z=$jscomp.global.setTimeout;m.prototype.asyncExecuteFunction=function(e){z(e,
0)};m.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var e=this.batch_;this.batch_=[];for(var f=0;f<e.length;++f){var h=e[f];delete e[f];try{h()}catch(qa){this.asyncThrow_(qa)}}}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 f=this.createResolveAndReject_();try{e(f.resolve,f.reject)}catch(ia){f.reject(ia)}};h.prototype.createResolveAndReject_=
function(){function e(e){return function(t){h||(h=!0,e.call(f,t))}}var f=this,h=!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 f=null!=e;break a;case "function":f=!0;break a;default:f=!1}f?this.resolveToNonPromiseObj_(e):this.fulfill_(e)}};h.prototype.resolveToNonPromiseObj_=function(e){var f=
void 0;try{f=e.then}catch(ia){this.reject_(ia);return}"function"==typeof f?this.settleSameAsThenable_(f,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,f){if(0!=this.state_)throw Error("Cannot settle("+e+", "+f|"): Promise already settled in state"+this.state_);this.state_=e;this.result_=f;this.executeOnSettledCallbacks_()};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var e=
this.onSettledCallbacks_,f=0;f<e.length;++f)e[f].call(),e[f]=null;this.onSettledCallbacks_=null}};var R=new m;h.prototype.settleSameAsPromise_=function(e){var f=this.createResolveAndReject_();e.callWhenSettled_(f.resolve,f.reject)};h.prototype.settleSameAsThenable_=function(e,f){var h=this.createResolveAndReject_();try{e.call(f,h.resolve,h.reject)}catch(qa){h.reject(qa)}};h.prototype.then=function(e,f){function m(e,f){return"function"==typeof e?function(f){try{t(e(f))}catch(ra){ja(ra)}}:f}var t,ja,
z=new h(function(e,f){t=e;ja=f});this.callWhenSettled_(m(e,t),m(f,ja));return z};h.prototype.catch=function(e){return this.then(void 0,e)};h.prototype.callWhenSettled_=function(e,f){function h(){switch(m.state_){case 1:e(m.result_);break;case 2:f(m.result_);break;default:throw Error("Unexpected state: "+m.state_);}}var m=this;null==this.onSettledCallbacks_?R.asyncExecute(h):this.onSettledCallbacks_.push(function(){R.asyncExecute(h)})};h.resolve=f;h.reject=function(e){return new h(function(f,h){h(e)})};
h.race=function(e){return new h(function(h,m){for(var t=$jscomp.makeIterator(e),z=t.next();!z.done;z=t.next())f(z.value).callWhenSettled_(h,m)})};h.all=function(e){var m=$jscomp.makeIterator(e),t=m.next();return t.done?f([]):new h(function(e,h){function z(f){return function(h){ba[f]=h;R--;0==R&&e(ba)}}var ba=[],R=0;do ba.push(void 0),R++,f(t.value).callWhenSettled_(z(ba.length-1),h),t=m.next();while(!t.done)})};return h},"es6","es3");
var DracoDecoderModule=function(e){function m(a){eval.call(null,a)}function f(a,b){a||M("Assertion failed: "+b)}function z(d){var b=a["_"+d];if(!b)try{b=eval("_"+d)}catch(c){}f(b,"Cannot call unknown function "+d+" (perhaps LLVM optimizations or closure removed it?)");return b}function h(a,b,c){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return N[a>>0];case "i8":return N[a>>0];case "i16":return sa[a>>1];case "i32":return u[a>>2];case "i64":return u[a>>2];case "float":return ya[a>>
2];case "double":return za[a>>3];default:M("invalid type for setValue: "+b)}return null}function R(a,b,c,g){if("number"===typeof a){var d=!0;var e=a}else d=!1,e=a.length;var S="string"===typeof b?b:null;c=4==c?g:["function"===typeof la?la:n.staticAlloc,n.stackAlloc,n.staticAlloc,n.dynamicAlloc][void 0===c?2:c](Math.max(e,S?1:b.length));if(d){g=c;f(0==(c&3));for(a=c+(e&-4);g<a;g+=4)u[g>>2]=0;for(a=c+e;g<a;)N[g++>>0]=0;return c}if("i8"===S)return a.subarray||a.slice?G.set(a,c):G.set(new Uint8Array(a),
c),c;g=0;for(var h,m;g<e;){var k=a[g];"function"===typeof k&&(k=n.getFunctionIndex(k));d=S||b[g];if(0===d)g++;else{"i64"==d&&(d="i32");var l=c+g,ea=d;ea=ea||"i8";"*"===ea.charAt(ea.length-1)&&(ea="i32");switch(ea){case "i1":N[l>>0]=k;break;case "i8":N[l>>0]=k;break;case "i16":sa[l>>1]=k;break;case "i32":u[l>>2]=k;break;case "i64":tempI64=[k>>>0,(tempDouble=k,1<=+qb(tempDouble)?0<tempDouble?(rb(+sb(tempDouble/4294967296),4294967295)|0)>>>0:~~+tb((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)];
u[l>>2]=tempI64[0];u[l+4>>2]=tempI64[1];break;case "float":ya[l>>2]=k;break;case "double":za[l>>3]=k;break;default:M("invalid type for setValue: "+ea)}m!==d&&(h=n.getNativeTypeSize(d),m=d);g+=h}}return c}function t(d,b){if(0===b||!d)return"";for(var c=0,g,e=0;;){g=G[d+e>>0];c|=g;if(0==g&&!b)break;e++;if(b&&e==b)break}b||(b=e);g="";if(128>c){for(;0<b;)c=String.fromCharCode.apply(String,G.subarray(d,d+Math.min(b,1024))),g=g?g+c:c,d+=1024,b-=1024;return g}return a.UTF8ToString(d)}function Ea(a,b,c,g){if(!(0<
g))return 0;var d=c;g=c+g-1;for(var e=0;e<a.length;++e){var f=a.charCodeAt(e);55296<=f&&57343>=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++e)&1023);if(127>=f){if(c>=g)break;b[c++]=f}else{if(2047>=f){if(c+1>=g)break;b[c++]=192|f>>6}else{if(65535>=f){if(c+2>=g)break;b[c++]=224|f>>12}else{if(2097151>=f){if(c+3>=g)break;b[c++]=240|f>>18}else{if(67108863>=f){if(c+4>=g)break;b[c++]=248|f>>24}else{if(c+5>=g)break;b[c++]=252|f>>30;b[c++]=128|f>>24&63}b[c++]=128|f>>18&63}b[c++]=128|f>>12&63}b[c++]=128|f>>6&
63}b[c++]=128|f&63}}b[c]=0;return c-d}function ia(a){for(var b=0,d=0;d<a.length;++d){var g=a.charCodeAt(d);55296<=g&&57343>=g&&(g=65536+((g&1023)<<10)|a.charCodeAt(++d)&1023);127>=g?++b:b=2047>=g?b+2:65535>=g?b+3:2097151>=g?b+4:67108863>=g?b+5:b+6}return b}function qa(d){return d.replace(/__Z[\w\d_]+/g,function(b){a:{var d=a.___cxa_demangle||a.__cxa_demangle;if(d)try{var g=b.substr(1),e=ia(g)+1;var f=la(e);Ea(g,G,f,e);var k=la(4);var l=d(f,0,0,k);if(0===h(k,"i32")&&l){var m=t(l);break a}}catch(xd){}finally{f&&
Ia(f),k&&Ia(k),l&&Ia(l)}else n.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");m=b}return b===m?b:b+" ["+m+"]"})}function ja(){a:{var d=Error();if(!d.stack){try{throw Error(0);}catch(b){d=b}if(!d.stack){d="(no stack trace available)";break a}}d=d.stack.toString()}a.extraStackTrace&&(d+="\n"+a.extraStackTrace());return qa(d)}function Fa(a,b){0<a%b&&(a+=b-a%b);return a}function ba(){a.HEAP8=N=new Int8Array(H);a.HEAP16=sa=new Int16Array(H);a.HEAP32=u=new Int32Array(H);
a.HEAPU8=G=new Uint8Array(H);a.HEAPU16=Wa=new Uint16Array(H);a.HEAPU32=Xa=new Uint32Array(H);a.HEAPF32=ya=new Float32Array(H);a.HEAPF64=za=new Float64Array(H)}function Va(){var d=a.usingWasm?Ja:Ya,b=2147483648-d;if(u[X>>2]>b)return!1;var c=x;for(x=Math.max(x,ub);x<u[X>>2];)x=536870912>=x?Fa(2*x,d):Math.min(Fa((3*x+2147483648)/4,d),b);d=a.reallocBuffer(x);if(!d||d.byteLength!=x)return x=c,!1;a.buffer=H=d;ba();return!0}function ka(d){for(;0<d.length;){var b=d.shift();if("function"==typeof b)b();else{var c=
b.func;"number"===typeof c?void 0===b.arg?a.dynCall_v(c):a.dynCall_vi(c,b.arg):c(void 0===b.arg?null:b.arg)}}}function ra(a,b,c){c=0<c?c:ia(a)+1;c=Array(c);a=Ea(a,c,0,c.length);b&&(c.length=a);return c}function Za(d){fa++;a.monitorRunDependencies&&a.monitorRunDependencies(fa)}function $a(d){fa--;a.monitorRunDependencies&&a.monitorRunDependencies(fa);0==fa&&(null!==Ka&&(clearInterval(Ka),Ka=null),ta&&(d=ta,ta=null,d()))}function ma(){return!!ma.uncaught_exception}function ua(){var d=C.last;if(!d)return(n.setTempRet0(0),
0)|0;var b=C.infos[d],c=b.type;if(!c)return(n.setTempRet0(0),d)|0;var g=Array.prototype.slice.call(arguments);a.___cxa_is_pointer_type(c);ua.buffer||(ua.buffer=la(4));u[ua.buffer>>2]=d;d=ua.buffer;for(var e=0;e<g.length;e++)if(g[e]&&a.___cxa_can_catch(g[e],c,d))return d=u[d>>2],b.adjusted=d,(n.setTempRet0(g[e]),d)|0;d=u[d>>2];return(n.setTempRet0(c),d)|0}function va(d,b){va.seen||(va.seen={});d in va.seen||(a.dynCall_v(b),va.seen[d]=1)}function ca(d,b){r.varargs=b;try{var c=r.get(),g=r.get(),e=r.get();
d=0;ca.buffer||(ca.buffers=[null,[],[]],ca.printChar=function(b,d){var c=ca.buffers[b];f(c);if(0===d||10===d){b=1===b?a.print:a.printErr;a:{for(var e=d=0;c[e];)++e;if(16<e-d&&c.subarray&&ab)d=ab.decode(c.subarray(d,e));else for(e="";;){var g=c[d++];if(!g){d=e;break a}if(g&128){var h=c[d++]&63;if(192==(g&224))e+=String.fromCharCode((g&31)<<6|h);else{var k=c[d++]&63;if(224==(g&240))g=(g&15)<<12|h<<6|k;else{var l=c[d++]&63;if(240==(g&248))g=(g&7)<<18|h<<12|k<<6|l;else{var A=c[d++]&63;if(248==(g&252))g=
(g&3)<<24|h<<18|k<<12|l<<6|A;else{var m=c[d++]&63;g=(g&1)<<30|h<<24|k<<18|l<<12|A<<6|m}}}65536>g?e+=String.fromCharCode(g):(g-=65536,e+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else e+=String.fromCharCode(g)}}b(d);c.length=0}else c.push(d)});for(b=0;b<e;b++){for(var k=u[g+8*b>>2],h=u[g+(8*b+4)>>2],l=0;l<h;l++)ca.printChar(c,G[k+l]);d+=h}return d}catch(Ha){return"undefined"!==typeof FS&&Ha instanceof FS.ErrnoError||M(Ha),-Ha.errno}}function na(a){this.name="ExitStatus";this.message="Program terminated with exit("+
a+")";this.status=a}function La(d){function b(){if(!a.calledRun&&(a.calledRun=!0,!oa)){Aa||(Aa=!0,ka(Ma));ka(bb);if(a.onRuntimeInitialized)a.onRuntimeInitialized();a._main&&cb&&a.callMain(d);if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)db.unshift(a.postRun.shift());ka(db)}}d=d||a.arguments;null===eb&&(eb=Date.now());if(!(0<fa)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)fb.unshift(a.preRun.shift());ka(fb);0<fa||a.calledRun||
(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function gb(d,b){if(!b||!a.noExitRuntime){if(!a.noExitRuntime&&(oa=!0,T=vb,ka(hb),a.onExit))a.onExit(d);pa&&process.exit(d);a.quit(d,new na(d))}}function M(d){if(a.onAbort)a.onAbort(d);void 0!==d?(a.print(d),a.printErr(d),d=JSON.stringify(d)):d="";oa=!0;var b="abort("+d+") at "+ja()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";ib&&
ib.forEach(function(a){b=a(b,d)});throw b;}function v(){}function E(a){return(a||v).__cache__}function Y(a,b){var d=E(b),g=d[a];if(g)return g;g=Object.create((b||v).prototype);g.ptr=a;return d[a]=g}function Z(a){if("string"===typeof a){a=ra(a);var b=k.alloc(a,N);k.copy(a,N,b);return b}return a}function D(){throw"cannot construct a Status, no constructor in IDL";}function I(){this.ptr=wb();E(I)[this.ptr]=this}function J(){this.ptr=xb();E(J)[this.ptr]=this}function p(){this.ptr=yb();E(p)[this.ptr]=
this}function O(){this.ptr=zb();E(O)[this.ptr]=this}function B(){this.ptr=Ab();E(B)[this.ptr]=this}function q(){this.ptr=Bb();E(q)[this.ptr]=this}function K(){this.ptr=Cb();E(K)[this.ptr]=this}function V(){this.ptr=Db();E(V)[this.ptr]=this}function P(){this.ptr=Eb();E(P)[this.ptr]=this}function l(){this.ptr=Fb();E(l)[this.ptr]=this}function F(){this.ptr=Gb();E(F)[this.ptr]=this}function aa(){throw"cannot construct a VoidPtr, no constructor in IDL";}function L(){this.ptr=Hb();E(L)[this.ptr]=this}function Q(){this.ptr=
Ib();E(Q)[this.ptr]=this}var a=e=e||{},jb=!1,kb=!1;a.onRuntimeInitialized=function(){jb=!0;if(kb&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){kb=!0;if(jb&&"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]?!0:0!=a[0]||10<a[1]?!1:!0};a||(a=("undefined"!==typeof e?e:null)||{});var wa={},da;for(da in a)a.hasOwnProperty(da)&&
(wa[da]=a[da]);var xa=!1,ha=!1,pa=!1,Ba=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)xa=!0;else if("WORKER"===a.ENVIRONMENT)ha=!0;else if("NODE"===a.ENVIRONMENT)pa=!0;else if("SHELL"===a.ENVIRONMENT)Ba=!0;else throw Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else xa="object"===typeof window,ha="function"===typeof importScripts,pa="object"===typeof process&&"function"===typeof require&&!xa&&!ha,Ba=!xa&&!pa&&!ha;if(pa){a.print||(a.print=
console.log);a.printErr||(a.printErr=console.warn);var Na,Oa;a.read=function(a,b){Na||(Na=require("fs"));Oa||(Oa=require("path"));a=Oa.normalize(a);a=Na.readFileSync(a);return b?a:a.toString()};a.readBinary=function(c){c=a.read(c,!0);c.buffer||(c=new Uint8Array(c));f(c.buffer);return c};a.load=function(a){m(read(a))};a.thisProgram||(a.thisProgram=1<process.argv.length?process.argv[1].replace(/\\/g,"/"):"unknown-program");a.arguments=process.argv.slice(2);"undefined"!==typeof module&&(module.exports=
console.log);a.printErr||(a.printErr=console.warn);var Na,Oa;a.read=function(a,b){Na||(Na=require("fs"));Oa||(Oa=require("path"));a=Oa.normalize(a);a=Na.readFileSync(a);return b?a:a.toString()};a.readBinary=function(d){d=a.read(d,!0);d.buffer||(d=new Uint8Array(d));f(d.buffer);return d};a.load=function(a){m(read(a))};a.thisProgram||(a.thisProgram=1<process.argv.length?process.argv[1].replace(/\\/g,"/"):"unknown-program");a.arguments=process.argv.slice(2);"undefined"!==typeof module&&(module.exports=
a);process.on("uncaughtException",function(a){if(!(a instanceof na))throw a;});a.inspect=function(){return"[Emscripten Module object]"}}else if(Ba)a.print||(a.print=print),"undefined"!=typeof printErr&&(a.printErr=printErr),a.read="undefined"!=typeof read?read:function(){throw"no read() available";},a.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");f("object"===typeof a);return a},"undefined"!=typeof scriptArgs?a.arguments=scriptArgs:
"undefined"!=typeof arguments&&(a.arguments=arguments),"function"===typeof quit&&(a.quit=function(a,b){quit(a)});else if(xa||ha)a.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ha&&(a.readBinary=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),a.readAsync=function(a,b,d){var c=new XMLHttpRequest;c.open("GET",a,!0);c.responseType="arraybuffer";c.onload=function(){200==
c.status||0==c.status&&c.response?b(c.response):d()};c.onerror=d;c.send(null)},"undefined"!=typeof arguments&&(a.arguments=arguments),"undefined"!==typeof console?(a.print||(a.print=function(a){console.log(a)}),a.printErr||(a.printErr=function(a){console.warn(a)})):a.print||(a.print=function(a){}),ha&&(a.load=importScripts),"undefined"===typeof a.setWindowTitle&&(a.setWindowTitle=function(a){document.title=a});else throw"Unknown runtime environment. Where are we?";!a.load&&a.read&&(a.load=function(c){m(a.read(c))});
"undefined"!=typeof arguments&&(a.arguments=arguments),"function"===typeof quit&&(a.quit=function(a,b){quit(a)});else if(xa||ha)a.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ha&&(a.readBinary=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),a.readAsync=function(a,b,c){var d=new XMLHttpRequest;d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=function(){200==
d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)},"undefined"!=typeof arguments&&(a.arguments=arguments),"undefined"!==typeof console?(a.print||(a.print=function(a){console.log(a)}),a.printErr||(a.printErr=function(a){console.warn(a)})):a.print||(a.print=function(a){}),ha&&(a.load=importScripts),"undefined"===typeof a.setWindowTitle&&(a.setWindowTitle=function(a){document.title=a});else throw"Unknown runtime environment. Where are we?";!a.load&&a.read&&(a.load=function(d){m(a.read(d))});
a.print||(a.print=function(){});a.printErr||(a.printErr=a.print);a.arguments||(a.arguments=[]);a.thisProgram||(a.thisProgram="./this.program");a.quit||(a.quit=function(a,b){throw b;});a.print=a.print;a.printErr=a.printErr;a.preRun=[];a.postRun=[];for(da in wa)wa.hasOwnProperty(da)&&(a[da]=wa[da]);wa=void 0;var n={setTempRet0:function(a){return tempRet0=a},getTempRet0:function(){return tempRet0},stackSave:function(){return T},stackRestore:function(a){T=a},getNativeTypeSize:function(a){switch(a){case "i1":case "i8":return 1;
case "i16":return 2;case "i32":return 4;case "i64":return 8;case "float":return 4;case "double":return 8;default:return"*"===a[a.length-1]?n.QUANTUM_SIZE:"i"===a[0]?(a=parseInt(a.substr(1)),f(0===a%8),a/8):0}},getNativeFieldSize:function(a){return Math.max(n.getNativeTypeSize(a),n.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(a,b){"double"===b||"i64"===b?a&7&&(f(4===(a&7)),a+=4):f(0===(a&3));return a},getAlignSize:function(a,b,d){return d||"i64"!=a&&"double"!=a?a?Math.min(b||(a?n.getNativeFieldSize(a):
0),n.QUANTUM_SIZE):Math.min(b,8):8},dynCall:function(c,b,d){return d&&d.length?a["dynCall_"+c].apply(null,[b].concat(d)):a["dynCall_"+c].call(null,b)},functionPointers:[],addFunction:function(a){for(var b=0;b<n.functionPointers.length;b++)if(!n.functionPointers[b])return n.functionPointers[b]=a,2*(1+b);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.";},removeFunction:function(a){n.functionPointers[(a-2)/2]=null},warnOnce:function(c){n.warnOnce.shown||
(n.warnOnce.shown={});n.warnOnce.shown[c]||(n.warnOnce.shown[c]=1,a.printErr(c))},funcWrappers:{},getFuncWrapper:function(a,b){f(b);n.funcWrappers[b]||(n.funcWrappers[b]={});var c=n.funcWrappers[b];c[a]||(c[a]=1===b.length?function(){return n.dynCall(b,a)}:2===b.length?function(c){return n.dynCall(b,a,[c])}:function(){return n.dynCall(b,a,Array.prototype.slice.call(arguments))});return c[a]},getCompilerSetting:function(a){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work";
},stackAlloc:function(a){var b=T;T=T+a|0;T=T+15&-16;return b},staticAlloc:function(a){var b=W;W=W+a|0;W=W+15&-16;return b},dynamicAlloc:function(a){var b=u[X>>2];a=(b+a+15|0)&-16;u[X>>2]=a;return a>=y&&!Va()?(u[X>>2]=b,0):b},alignMemory:function(a,b){return Math.ceil(a/(b?b:16))*(b?b:16)},makeBigInt:function(a,b,d){return d?+(a>>>0)+4294967296*+(b>>>0):+(a>>>0)+4294967296*+(b|0)},GLOBAL_BASE:1024,QUANTUM_SIZE:4,__dummy__:0},oa=0;(function(){function a(a){a=a.toString().match(e).slice(1);return{arguments:a[0],
body:a[1],returnValue:a[2]}}function b(){if(!f){f={};for(var b in d)d.hasOwnProperty(b)&&(f[b]=a(d[b]))}}var d={stackSave:function(){n.stackSave()},stackRestore:function(){n.stackRestore()},arrayToC:function(a){var b=n.stackAlloc(a.length);N.set(a,b);return b},stringToC:function(a){var b=0;if(null!==a&&void 0!==a&&0!==a){var c=(a.length<<2)+1;b=n.stackAlloc(c);Ea(a,G,b,c)}return b}},e=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,f=null;cwrap=function(c,
d,e){e=e||[];var g=A(c);c=e.every(function(a){return"number"===a});var h="string"!==d;if(h&&c)return g;var k=e.map(function(a,b){return"$"+b});d="(function("+k.join(",")+") {";var l=e.length;if(!c){b();d+="var stack = "+f.stackSave.body+";";for(var m=0;m<l;m++){var n=k[m],x=e[m];"number"!==x&&(x=f[x+"ToC"],d+="var "+x.arguments+" = "+n+";",d+=x.body+";",d+=n+"=("+x.returnValue+");")}}e=a(function(){return g}).returnValue;d+="var ret = "+e+"("+k.join(",")+");";h||(e=a(function(){return t}).returnValue,
d+="ret = "+e+"(ret);");c||(b(),d+=f.stackRestore.body.replace("()","(stack)")+";");return eval(d+"return ret})")}})();var ab="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");var Ja=65536,Ya=16777216,ub=16777216,N,G,sa,Wa,u,Xa,ya,za,W,Pa,T,Ca,Qa,X;var Ra=W=Pa=T=Ca=Qa=X=0;a.reallocBuffer||(a.reallocBuffer=function(a){try{if(ArrayBuffer.transfer)var b=ArrayBuffer.transfer(H,a);else{var c=N;b=new ArrayBuffer(a);(new Int8Array(b)).set(c)}}catch(g){return!1}return Jb(b)?
b:!1});try{var Sa=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Sa(new ArrayBuffer(4))}catch(c){Sa=function(a){return a.byteLength}}var Ta=a.TOTAL_STACK||5242880,y=a.TOTAL_MEMORY||16777216;y<Ta&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+y+"! (TOTAL_STACK="+Ta+")");if(a.buffer)var H=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:y/Ja}),H=
a.wasmMemory.buffer):H=new ArrayBuffer(y);ba();u[0]=1668509029;sa[1]=25459;if(115!==G[2]||99!==G[3])throw"Runtime error: expected the system to be little-endian!";a.HEAP=void 0;a.buffer=H;a.HEAP8=N;a.HEAP16=sa;a.HEAP32=u;a.HEAPU8=G;a.HEAPU16=Wa;a.HEAPU32=Xa;a.HEAPF32=ya;a.HEAPF64=za;var fb=[],Ma=[],bb=[],hb=[],db=[],Aa=!1;Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(a,b){var c=a&65535,e=b&65535;return c*e+((a>>>16)*e+c*(b>>>16)<<16)|0});Math.imul=Math.imul;if(!Math.fround){var lb=
new Float32Array(1);Math.fround=function(a){lb[0]=a;return lb[0]}}Math.fround=Math.fround;Math.clz32||(Math.clz32=function(a){a>>>=0;for(var b=0;32>b;b++)if(a&1<<31-b)return b;return 32});Math.clz32=Math.clz32;Math.trunc||(Math.trunc=function(a){return 0>a?Math.ceil(a):Math.floor(a)});Math.trunc=Math.trunc;var qb=Math.abs,tb=Math.ceil,sb=Math.floor,rb=Math.min,fa=0,Ka=null,ta=null;a.preloadedImages={};a.preloadedAudios={};var U=null;(function(c){function b(a,b){var c=t;if(0>a.indexOf("."))c=(c||{})[a];
else{var d=a.split(".");c=(c||{})[d[0]];c=(c||{})[d[1]]}b&&(c=(c||{})[b]);void 0===c&&M("bad lookupImport to ("+a+")."+b);return c}function d(b){var d=c.buffer;b.byteLength<d.byteLength&&c.printErr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here");d=new Int8Array(d);var e=new Int8Array(b);U||d.set(e.subarray(c.STATIC_BASE,c.STATIC_BASE+c.STATIC_BUMP),c.STATIC_BASE);e.set(d);a.buffer=H=b;ba()}function e(){try{if(c.wasmBinary){var a=c.wasmBinary;
a=new Uint8Array(a)}else if(c.readBinary)a=c.readBinary(p);else throw"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)";return a}catch(Kb){M(Kb)}}function h(){return c.wasmBinary||"function"!==typeof fetch?new Promise(function(a,b){a(e())}):fetch(p,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+p+"'";return a.arrayBuffer()})}function k(a,b,d){if("function"!==
typeof c.asm||c.asm===y)c.asmPreload?c.asm=c.asmPreload:eval(c.read(v));return"function"!==typeof c.asm?(c.printErr("asm evalling did not set the module properly"),!1):c.asm(a,b,d)}function l(a,b,e){function g(a){u=a.exports;u.memory&&d(u.memory);c.asm=u;c.usingWasm=!0;$a("wasm-instantiate")}if("object"!==typeof WebAssembly)return c.printErr("no native wasm support detected"),!1;if(!(c.wasmMemory instanceof WebAssembly.Memory))return c.printErr("no native wasm Memory in use"),!1;b.memory=c.wasmMemory;
t.global={NaN:NaN,Infinity:Infinity};t["global.Math"]=a.Math;t.env=b;Za("wasm-instantiate");if(c.instantiateWasm)try{return c.instantiateWasm(t,g)}catch(Lb){return c.printErr("Module.instantiateWasm callback failed with error: "+Lb),!1}h().then(function(a){return WebAssembly.instantiate(a,t)}).then(function(a){g(a.instance)}).catch(function(a){c.printErr("failed to asynchronously prepare wasm: "+a);M(a)});return{}}var m=c.wasmJSMethod||"native-wasm";c.wasmJSMethod=m;var n=c.wasmTextFile||"draco_decoder.wast",
p=c.wasmBinaryFile||"draco_decoder.wasm",v=c.asmjsCodeFile||"draco_decoder.temp.asm.js";"function"===typeof c.locateFile&&(n=c.locateFile(n),p=c.locateFile(p),v=c.locateFile(v));var t={global:null,env:null,asm2wasm:{"f64-rem":function(a,b){return a%b},"f64-to-int":function(a){return a|0},"i32s-div":function(a,b){return(a|0)/(b|0)|0},"i32u-div":function(a,b){return(a>>>0)/(b>>>0)>>>0},"i32s-rem":function(a,b){return(a|0)%(b|0)|0},"i32u-rem":function(a,b){return(a>>>0)%(b>>>0)>>>0},"debugger":function(){debugger}},
parent:c},u=null;c.asmPreload=c.asm;var q=c.reallocBuffer,r=function(a){a=Fa(a,c.usingWasm?Ja:Ya);var b=c.buffer,d=b.byteLength;if(c.usingWasm)try{return-1!==c.wasmMemory.grow((a-d)/65536)?c.buffer=c.wasmMemory.buffer:null}catch(xd){return null}else return u.__growWasmMemory((a-d)/65536),c.buffer!==b?c.buffer:null};c.reallocBuffer=function(a){return"asmjs"===A?q(a):r(a)};var A="";c.asm=function(a,g,h){if(!g.table){var x=c.wasmTableSize;void 0===x&&(x=1024);var p=c.wasmMaxTableSize;g.table="object"===
typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==p?new WebAssembly.Table({initial:x,maximum:p,element:"anyfunc"}):new WebAssembly.Table({initial:x,element:"anyfunc"}):Array(x);c.wasmTable=g.table}g.memoryBase||(g.memoryBase=c.STATIC_BASE);g.tableBase||(g.tableBase=0);var q;x=m.split(",");for(p=0;p<x.length;p++){var w=x[p];A=w;if("native-wasm"===w){if(q=l(a,g,h))break}else if("asmjs"===w){if(q=k(a,g,h))break}else if("interpret-asm2wasm"===w||"interpret-s-expr"===w||"interpret-binary"===
w){q=a;var r=g;var y=h,z=w;if("function"!==typeof WasmJS)c.printErr("WasmJS not detected - polyfill not bundled?"),w=!1;else{w=WasmJS({});w.outside=c;w.info=t;w.lookupImport=b;f(y===c.buffer);t.global=q;t.env=r;f(y===c.buffer);r.memory=y;f(r.memory instanceof ArrayBuffer);w.providedTotalMemory=c.buffer.byteLength;q="interpret-binary"===z?e():c.read("interpret-asm2wasm"==z?v:n);if("interpret-asm2wasm"==z)r=w._malloc(q.length+1),w.writeAsciiToMemory(q,r),w._load_asm2wasm(r);else if("interpret-s-expr"===
z)r=w._malloc(q.length+1),w.writeAsciiToMemory(q,r),w._load_s_expr2wasm(r);else if("interpret-binary"===z)r=w._malloc(q.length),w.HEAPU8.set(q,r),w._load_binary2wasm(r,q.length);else throw"what? "+z;w._free(r);w._instantiate(r);c.newBuffer&&(d(c.newBuffer),c.newBuffer=null);w=u=w.asmExports}if(q=w)break}else M("bad method: "+w)}if(!q)throw"no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods";
return q};var y=c.asm})(a);Ra=n.GLOBAL_BASE;W=Ra+25296;Ma.push();U=0<=a.wasmJSMethod.indexOf("asmjs")||0<=a.wasmJSMethod.indexOf("interpret-asm2wasm")?"draco_decoder.js.mem":null;a.STATIC_BASE=Ra;a.STATIC_BUMP=25296;var Mb=W;W+=16;var C={last:0,caught:[],infos:{},deAdjust:function(a){if(!a||C.infos[a])return a;for(var b in C.infos)if(C.infos[b].adjusted===a)return b;return a},addRef:function(a){a&&C.infos[a].refcount++},decRef:function(c){if(c){var b=C.infos[c];f(0<b.refcount);b.refcount--;0!==b.refcount||
b.rethrown||(b.destructor&&a.dynCall_vi(b.destructor,c),delete C.infos[c],___cxa_free_exception(c))}},clearRef:function(a){a&&(C.infos[a].refcount=0)}};a._memset=Nb;a._memcpy=Ob;var r={varargs:0,get:function(a){r.varargs+=4;return u[r.varargs-4>>2]},getStr:function(){return t(r.get())},get64:function(){var a=r.get(),b=r.get();0<=a?f(0===b):f(-1===b);return a},getZero:function(){f(0===r.get())}},Da={};a._sbrk=Pb;a._memmove=Qb;var Ua=1;a._llvm_bswap_i32=Rb;hb.push(function(){var c=a._fflush;c&&c(0);
if(c=ca.printChar){var b=ca.buffers;b[1].length&&c(1,10);b[2].length&&c(2,10)}});X=R(1,"i32",2);Pa=T=n.alignMemory(W);Ca=Pa+Ta;Qa=n.alignMemory(Ca);u[X>>2]=Qa;a.wasmTableSize=644;a.wasmMaxTableSize=644;a.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:Infinity,byteLength:Sa};a.asmLibraryArg={abort:M,assert:f,enlargeMemory:Va,
getTotalMemory:function(){return y},abortOnCannotGrowMemory:function(){M("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+y+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},invoke_iiii:function(c,b,d,e){try{return a.dynCall_iiii(c,b,d,e)}catch(x){if("number"!==typeof x&&"longjmp"!==x)throw x;
a.setThrew(1,0)}},invoke_viiiii:function(c,b,d,e,f,h){try{a.dynCall_viiiii(c,b,d,e,f,h)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_vi:function(c,b){try{a.dynCall_vi(c,b)}catch(d){if("number"!==typeof d&&"longjmp"!==d)throw d;a.setThrew(1,0)}},invoke_vii:function(c,b,d){try{a.dynCall_vii(c,b,d)}catch(g){if("number"!==typeof g&&"longjmp"!==g)throw g;a.setThrew(1,0)}},invoke_iiiiiii:function(c,b,d,e,f,h,k){try{return a.dynCall_iiiiiii(c,b,d,e,f,h,k)}catch(z){if("number"!==
typeof z&&"longjmp"!==z)throw z;a.setThrew(1,0)}},invoke_ii:function(c,b){try{return a.dynCall_ii(c,b)}catch(d){if("number"!==typeof d&&"longjmp"!==d)throw d;a.setThrew(1,0)}},invoke_viii:function(c,b,d,e){try{a.dynCall_viii(c,b,d,e)}catch(x){if("number"!==typeof x&&"longjmp"!==x)throw x;a.setThrew(1,0)}},invoke_v:function(c){try{a.dynCall_v(c)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_viiiiii:function(c,b,d,e,f,h,k){try{a.dynCall_viiiiii(c,b,d,e,f,h,k)}catch(z){if("number"!==
typeof z&&"longjmp"!==z)throw z;a.setThrew(1,0)}},invoke_iii:function(c,b,d){try{return a.dynCall_iii(c,b,d)}catch(g){if("number"!==typeof g&&"longjmp"!==g)throw g;a.setThrew(1,0)}},invoke_viiii:function(c,b,d,e,f){try{a.dynCall_viiii(c,b,d,e,f)}catch(Ga){if("number"!==typeof Ga&&"longjmp"!==Ga)throw Ga;a.setThrew(1,0)}},_pthread_getspecific:function(a){return Da[a]||0},___syscall54:function(a,b){r.varargs=b;return 0},_pthread_setspecific:function(a,b){if(!(a in Da))return 22;Da[a]=b;return 0},___cxa_throw:function(a,
b,d){C.infos[a]={ptr:a,adjusted:a,type:b,destructor:d,refcount:0,caught:!1,rethrown:!1};C.last=a;"uncaught_exception"in ma?ma.uncaught_exception++:ma.uncaught_exception=1;throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";},___gxx_personality_v0:function(){},_abort:function(){a.abort()},___setErrNo:function(c){a.___errno_location&&(u[a.___errno_location()>>2]=c);return c},___syscall6:function(a,
b){r.varargs=b;try{var c=r.getStreamFromFD();FS.close(c);return 0}catch(g){return"undefined"!==typeof FS&&g instanceof FS.ErrnoError||M(g),-g.errno}},___cxa_begin_catch:function(a){var b=C.infos[a];b&&!b.caught&&(b.caught=!0,ma.uncaught_exception--);b&&(b.rethrown=!1);C.caught.push(a);C.addRef(C.deAdjust(a));return a},___syscall146:ca,_pthread_once:va,_emscripten_memcpy_big:function(a,b,d){G.set(G.subarray(b,b+d),a);return a},_pthread_key_create:function(a,b){if(0==a)return 22;u[a>>2]=Ua;Da[Ua]=0;
Ua++;return 0},___syscall140:function(a,b){r.varargs=b;try{var d=r.getStreamFromFD();r.get();var c=r.get(),e=r.get(),f=r.get();FS.llseek(d,c,f);u[e>>2]=d.position;d.getdents&&0===c&&0===f&&(d.getdents=null);return 0}catch(S){return"undefined"!==typeof FS&&S instanceof FS.ErrnoError||M(S),-S.errno}},___resumeException:function(a){C.last||(C.last=a);throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
},___cxa_find_matching_catch:ua,___assert_fail:function(a,b,d,e){oa=!0;throw"Assertion failed: "+t(a)+", at: "+[b?t(b):"unknown filename",d,e?t(e):"unknown function"]+" at "+ja();},___cxa_pure_virtual:function(){oa=!0;throw"Pure virtual function called!";},___cxa_allocate_exception:function(a){return la(a)},__ZSt18uncaught_exceptionv:ma,DYNAMICTOP_PTR:X,tempDoublePtr:Mb,ABORT:oa,STACKTOP:T,STACK_MAX:Ca};var mb=a.asm(a.asmGlobalArg,a.asmLibraryArg,H);a.asm=mb;var Sb=a._emscripten_bind_Decoder_GetAttributeFloat_3=
case "i16":return 2;case "i32":return 4;case "i64":return 8;case "float":return 4;case "double":return 8;default:return"*"===a[a.length-1]?n.QUANTUM_SIZE:"i"===a[0]?(a=parseInt(a.substr(1)),f(0===a%8),a/8):0}},getNativeFieldSize:function(a){return Math.max(n.getNativeTypeSize(a),n.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(a,b){"double"===b||"i64"===b?a&7&&(f(4===(a&7)),a+=4):f(0===(a&3));return a},getAlignSize:function(a,b,c){return c||"i64"!=a&&"double"!=a?a?Math.min(b||(a?n.getNativeFieldSize(a):
0),n.QUANTUM_SIZE):Math.min(b,8):8},dynCall:function(d,b,c){return c&&c.length?a["dynCall_"+d].apply(null,[b].concat(c)):a["dynCall_"+d].call(null,b)},functionPointers:[],addFunction:function(a){for(var b=0;b<n.functionPointers.length;b++)if(!n.functionPointers[b])return n.functionPointers[b]=a,2*(1+b);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.";},removeFunction:function(a){n.functionPointers[(a-2)/2]=null},warnOnce:function(d){n.warnOnce.shown||
(n.warnOnce.shown={});n.warnOnce.shown[d]||(n.warnOnce.shown[d]=1,a.printErr(d))},funcWrappers:{},getFuncWrapper:function(a,b){f(b);n.funcWrappers[b]||(n.funcWrappers[b]={});var d=n.funcWrappers[b];d[a]||(d[a]=1===b.length?function(){return n.dynCall(b,a)}:2===b.length?function(d){return n.dynCall(b,a,[d])}:function(){return n.dynCall(b,a,Array.prototype.slice.call(arguments))});return d[a]},getCompilerSetting:function(a){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work";
},stackAlloc:function(a){var b=T;T=T+a|0;T=T+15&-16;return b},staticAlloc:function(a){var b=W;W=W+a|0;W=W+15&-16;return b},dynamicAlloc:function(a){var b=u[X>>2];a=(b+a+15|0)&-16;u[X>>2]=a;return a>=x&&!Va()?(u[X>>2]=b,0):b},alignMemory:function(a,b){return Math.ceil(a/(b?b:16))*(b?b:16)},makeBigInt:function(a,b,c){return c?+(a>>>0)+4294967296*+(b>>>0):+(a>>>0)+4294967296*+(b|0)},GLOBAL_BASE:1024,QUANTUM_SIZE:4,__dummy__:0},oa=0;(function(){function a(a){a=a.toString().match(e).slice(1);return{arguments:a[0],
body:a[1],returnValue:a[2]}}function b(){if(!f){f={};for(var b in c)c.hasOwnProperty(b)&&(f[b]=a(c[b]))}}var c={stackSave:function(){n.stackSave()},stackRestore:function(){n.stackRestore()},arrayToC:function(a){var b=n.stackAlloc(a.length);N.set(a,b);return b},stringToC:function(a){var b=0;if(null!==a&&void 0!==a&&0!==a){var d=(a.length<<2)+1;b=n.stackAlloc(d);Ea(a,G,b,d)}return b}},e=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,f=null;cwrap=function(d,
c,e){e=e||[];var g=z(d);d=e.every(function(a){return"number"===a});var h="string"!==c;if(h&&d)return g;var k=e.map(function(a,b){return"$"+b});c="(function("+k.join(",")+") {";var l=e.length;if(!d){b();c+="var stack = "+f.stackSave.body+";";for(var m=0;m<l;m++){var A=k[m],n=e[m];"number"!==n&&(n=f[n+"ToC"],c+="var "+n.arguments+" = "+A+";",c+=n.body+";",c+=A+"=("+n.returnValue+");")}}e=a(function(){return g}).returnValue;c+="var ret = "+e+"("+k.join(",")+");";h||(e=a(function(){return t}).returnValue,
c+="ret = "+e+"(ret);");d||(b(),c+=f.stackRestore.body.replace("()","(stack)")+";");return eval(c+"return ret})")}})();var ab="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");var Ja=65536,Ya=16777216,ub=16777216,N,G,sa,Wa,u,Xa,ya,za,W,Pa,T,Ca,Qa,X;var Ra=W=Pa=T=Ca=Qa=X=0;a.reallocBuffer||(a.reallocBuffer=function(a){try{if(ArrayBuffer.transfer)var b=ArrayBuffer.transfer(H,a);else{var d=N;b=new ArrayBuffer(a);(new Int8Array(b)).set(d)}}catch(g){return!1}return Jb(b)?
b:!1});try{var Sa=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Sa(new ArrayBuffer(4))}catch(d){Sa=function(a){return a.byteLength}}var Ta=a.TOTAL_STACK||5242880,x=a.TOTAL_MEMORY||16777216;x<Ta&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+x+"! (TOTAL_STACK="+Ta+")");if(a.buffer)var H=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:x/Ja}),H=
a.wasmMemory.buffer):H=new ArrayBuffer(x);ba();u[0]=1668509029;sa[1]=25459;if(115!==G[2]||99!==G[3])throw"Runtime error: expected the system to be little-endian!";a.HEAP=void 0;a.buffer=H;a.HEAP8=N;a.HEAP16=sa;a.HEAP32=u;a.HEAPU8=G;a.HEAPU16=Wa;a.HEAPU32=Xa;a.HEAPF32=ya;a.HEAPF64=za;var fb=[],Ma=[],bb=[],hb=[],db=[],Aa=!1;Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(a,b){var d=a&65535,e=b&65535;return d*e+((a>>>16)*e+d*(b>>>16)<<16)|0});Math.imul=Math.imul;if(!Math.fround){var lb=
new Float32Array(1);Math.fround=function(a){lb[0]=a;return lb[0]}}Math.fround=Math.fround;Math.clz32||(Math.clz32=function(a){a>>>=0;for(var b=0;32>b;b++)if(a&1<<31-b)return b;return 32});Math.clz32=Math.clz32;Math.trunc||(Math.trunc=function(a){return 0>a?Math.ceil(a):Math.floor(a)});Math.trunc=Math.trunc;var qb=Math.abs,tb=Math.ceil,sb=Math.floor,rb=Math.min,fa=0,Ka=null,ta=null;a.preloadedImages={};a.preloadedAudios={};var U=null;(function(d){function b(a,b){var d=t;if(0>a.indexOf("."))d=(d||{})[a];
else{var c=a.split(".");d=(d||{})[c[0]];d=(d||{})[c[1]]}b&&(d=(d||{})[b]);void 0===d&&M("bad lookupImport to ("+a+")."+b);return d}function c(b){var c=d.buffer;b.byteLength<c.byteLength&&d.printErr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here");c=new Int8Array(c);var e=new Int8Array(b);U||c.set(e.subarray(d.STATIC_BASE,d.STATIC_BASE+d.STATIC_BUMP),d.STATIC_BASE);e.set(c);a.buffer=H=b;ba()}function e(){try{if(d.wasmBinary){var a=d.wasmBinary;
a=new Uint8Array(a)}else if(d.readBinary)a=d.readBinary(p);else throw"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)";return a}catch(Kb){M(Kb)}}function h(){return d.wasmBinary||"function"!==typeof fetch?new Promise(function(a,b){a(e())}):fetch(p,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+p+"'";return a.arrayBuffer()})}function k(a,b,c){if("function"!==
typeof d.asm||d.asm===x)d.asmPreload?d.asm=d.asmPreload:eval(d.read(v));return"function"!==typeof d.asm?(d.printErr("asm evalling did not set the module properly"),!1):d.asm(a,b,c)}function l(a,b,e){function g(a){u=a.exports;u.memory&&c(u.memory);d.asm=u;d.usingWasm=!0;$a("wasm-instantiate")}if("object"!==typeof WebAssembly)return d.printErr("no native wasm support detected"),!1;if(!(d.wasmMemory instanceof WebAssembly.Memory))return d.printErr("no native wasm Memory in use"),!1;b.memory=d.wasmMemory;
t.global={NaN:NaN,Infinity:Infinity};t["global.Math"]=a.Math;t.env=b;Za("wasm-instantiate");if(d.instantiateWasm)try{return d.instantiateWasm(t,g)}catch(Lb){return d.printErr("Module.instantiateWasm callback failed with error: "+Lb),!1}h().then(function(a){return WebAssembly.instantiate(a,t)}).then(function(a){g(a.instance)}).catch(function(a){d.printErr("failed to asynchronously prepare wasm: "+a);M(a)});return{}}var m=d.wasmJSMethod||"native-wasm";d.wasmJSMethod=m;var n=d.wasmTextFile||"draco_decoder.wast",
p=d.wasmBinaryFile||"draco_decoder.wasm",v=d.asmjsCodeFile||"draco_decoder.temp.asm.js";"function"===typeof d.locateFile&&(n=d.locateFile(n),p=d.locateFile(p),v=d.locateFile(v));var t={global:null,env:null,asm2wasm:{"f64-rem":function(a,b){return a%b},"f64-to-int":function(a){return a|0},"i32s-div":function(a,b){return(a|0)/(b|0)|0},"i32u-div":function(a,b){return(a>>>0)/(b>>>0)>>>0},"i32s-rem":function(a,b){return(a|0)%(b|0)|0},"i32u-rem":function(a,b){return(a>>>0)%(b>>>0)>>>0},"debugger":function(){debugger}},
parent:d},u=null;d.asmPreload=d.asm;var q=d.reallocBuffer,r=function(a){a=Fa(a,d.usingWasm?Ja:Ya);var b=d.buffer,c=b.byteLength;if(d.usingWasm)try{return-1!==d.wasmMemory.grow((a-c)/65536)?d.buffer=d.wasmMemory.buffer:null}catch(yd){return null}else return u.__growWasmMemory((a-c)/65536),d.buffer!==b?d.buffer:null};d.reallocBuffer=function(a){return"asmjs"===z?q(a):r(a)};var z="";d.asm=function(a,g,h){if(!g.table){var A=d.wasmTableSize;void 0===A&&(A=1024);var p=d.wasmMaxTableSize;g.table="object"===
typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==p?new WebAssembly.Table({initial:A,maximum:p,element:"anyfunc"}):new WebAssembly.Table({initial:A,element:"anyfunc"}):Array(A);d.wasmTable=g.table}g.memoryBase||(g.memoryBase=d.STATIC_BASE);g.tableBase||(g.tableBase=0);var q;A=m.split(",");for(p=0;p<A.length;p++){var w=A[p];z=w;if("native-wasm"===w){if(q=l(a,g,h))break}else if("asmjs"===w){if(q=k(a,g,h))break}else if("interpret-asm2wasm"===w||"interpret-s-expr"===w||"interpret-binary"===
w){q=a;var r=g;var x=h,y=w;if("function"!==typeof WasmJS)d.printErr("WasmJS not detected - polyfill not bundled?"),w=!1;else{w=WasmJS({});w.outside=d;w.info=t;w.lookupImport=b;f(x===d.buffer);t.global=q;t.env=r;f(x===d.buffer);r.memory=x;f(r.memory instanceof ArrayBuffer);w.providedTotalMemory=d.buffer.byteLength;q="interpret-binary"===y?e():d.read("interpret-asm2wasm"==y?v:n);if("interpret-asm2wasm"==y)r=w._malloc(q.length+1),w.writeAsciiToMemory(q,r),w._load_asm2wasm(r);else if("interpret-s-expr"===
y)r=w._malloc(q.length+1),w.writeAsciiToMemory(q,r),w._load_s_expr2wasm(r);else if("interpret-binary"===y)r=w._malloc(q.length),w.HEAPU8.set(q,r),w._load_binary2wasm(r,q.length);else throw"what? "+y;w._free(r);w._instantiate(r);d.newBuffer&&(c(d.newBuffer),d.newBuffer=null);w=u=w.asmExports}if(q=w)break}else M("bad method: "+w)}if(!q)throw"no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods";
return q};var x=d.asm})(a);Ra=n.GLOBAL_BASE;W=Ra+28960;Ma.push();U=0<=a.wasmJSMethod.indexOf("asmjs")||0<=a.wasmJSMethod.indexOf("interpret-asm2wasm")?"draco_decoder.js.mem":null;a.STATIC_BASE=Ra;a.STATIC_BUMP=28960;var Mb=W;W+=16;var C={last:0,caught:[],infos:{},deAdjust:function(a){if(!a||C.infos[a])return a;for(var b in C.infos)if(C.infos[b].adjusted===a)return b;return a},addRef:function(a){a&&C.infos[a].refcount++},decRef:function(d){if(d){var b=C.infos[d];f(0<b.refcount);b.refcount--;0!==b.refcount||
b.rethrown||(b.destructor&&a.dynCall_vi(b.destructor,d),delete C.infos[d],___cxa_free_exception(d))}},clearRef:function(a){a&&(C.infos[a].refcount=0)}};a._memset=Nb;a._memcpy=Ob;var r={varargs:0,get:function(a){r.varargs+=4;return u[r.varargs-4>>2]},getStr:function(){return t(r.get())},get64:function(){var a=r.get(),b=r.get();0<=a?f(0===b):f(-1===b);return a},getZero:function(){f(0===r.get())}},Da={};a._sbrk=Pb;a._memmove=Qb;var Ua=1;a._llvm_bswap_i32=Rb;hb.push(function(){var d=a._fflush;d&&d(0);
if(d=ca.printChar){var b=ca.buffers;b[1].length&&d(1,10);b[2].length&&d(2,10)}});X=R(1,"i32",2);Pa=T=n.alignMemory(W);Ca=Pa+Ta;Qa=n.alignMemory(Ca);u[X>>2]=Qa;a.wasmTableSize=780;a.wasmMaxTableSize=780;a.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:Infinity,byteLength:Sa};a.asmLibraryArg={abort:M,assert:f,enlargeMemory:Va,
getTotalMemory:function(){return x},abortOnCannotGrowMemory:function(){M("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+x+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},invoke_iiii:function(d,b,c,e){try{return a.dynCall_iiii(d,b,c,e)}catch(A){if("number"!==typeof A&&"longjmp"!==A)throw A;
a.setThrew(1,0)}},invoke_viiiii:function(d,b,c,e,f,h){try{a.dynCall_viiiii(d,b,c,e,f,h)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_vi:function(d,b){try{a.dynCall_vi(d,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_vii:function(d,b,c){try{a.dynCall_vii(d,b,c)}catch(g){if("number"!==typeof g&&"longjmp"!==g)throw g;a.setThrew(1,0)}},invoke_iiiiiii:function(d,b,c,e,f,h,k){try{return a.dynCall_iiiiiii(d,b,c,e,f,h,k)}catch(y){if("number"!==
typeof y&&"longjmp"!==y)throw y;a.setThrew(1,0)}},invoke_ii:function(d,b){try{return a.dynCall_ii(d,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_viii:function(d,b,c,e){try{a.dynCall_viii(d,b,c,e)}catch(A){if("number"!==typeof A&&"longjmp"!==A)throw A;a.setThrew(1,0)}},invoke_v:function(d){try{a.dynCall_v(d)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_viiiiii:function(d,b,c,e,f,h,k){try{a.dynCall_viiiiii(d,b,c,e,f,h,k)}catch(y){if("number"!==
typeof y&&"longjmp"!==y)throw y;a.setThrew(1,0)}},invoke_iii:function(d,b,c){try{return a.dynCall_iii(d,b,c)}catch(g){if("number"!==typeof g&&"longjmp"!==g)throw g;a.setThrew(1,0)}},invoke_viiii:function(d,b,c,e,f){try{a.dynCall_viiii(d,b,c,e,f)}catch(Ga){if("number"!==typeof Ga&&"longjmp"!==Ga)throw Ga;a.setThrew(1,0)}},_pthread_getspecific:function(a){return Da[a]||0},___syscall54:function(a,b){r.varargs=b;return 0},_pthread_setspecific:function(a,b){if(!(a in Da))return 22;Da[a]=b;return 0},___cxa_throw:function(a,
b,c){C.infos[a]={ptr:a,adjusted:a,type:b,destructor:c,refcount:0,caught:!1,rethrown:!1};C.last=a;"uncaught_exception"in ma?ma.uncaught_exception++:ma.uncaught_exception=1;throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";},___gxx_personality_v0:function(){},_abort:function(){a.abort()},___setErrNo:function(d){a.___errno_location&&(u[a.___errno_location()>>2]=d);return d},___syscall6:function(a,
b){r.varargs=b;try{var c=r.getStreamFromFD();FS.close(c);return 0}catch(g){return"undefined"!==typeof FS&&g instanceof FS.ErrnoError||M(g),-g.errno}},___cxa_begin_catch:function(a){var b=C.infos[a];b&&!b.caught&&(b.caught=!0,ma.uncaught_exception--);b&&(b.rethrown=!1);C.caught.push(a);C.addRef(C.deAdjust(a));return a},___syscall146:ca,_pthread_once:va,_emscripten_memcpy_big:function(a,b,c){G.set(G.subarray(b,b+c),a);return a},_pthread_key_create:function(a,b){if(0==a)return 22;u[a>>2]=Ua;Da[Ua]=0;
Ua++;return 0},___syscall140:function(a,b){r.varargs=b;try{var c=r.getStreamFromFD();r.get();var d=r.get(),e=r.get(),f=r.get();FS.llseek(c,d,f);u[e>>2]=c.position;c.getdents&&0===d&&0===f&&(c.getdents=null);return 0}catch(S){return"undefined"!==typeof FS&&S instanceof FS.ErrnoError||M(S),-S.errno}},___resumeException:function(a){C.last||(C.last=a);throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
},___cxa_find_matching_catch:ua,___assert_fail:function(a,b,c,e){oa=!0;throw"Assertion failed: "+t(a)+", at: "+[b?t(b):"unknown filename",c,e?t(e):"unknown function"]+" at "+ja();},___cxa_pure_virtual:function(){oa=!0;throw"Pure virtual function called!";},___cxa_allocate_exception:function(a){return la(a)},__ZSt18uncaught_exceptionv:ma,DYNAMICTOP_PTR:X,tempDoublePtr:Mb,ABORT:oa,STACKTOP:T,STACK_MAX:Ca};var mb=a.asm(a.asmGlobalArg,a.asmLibraryArg,H);a.asm=mb;var Sb=a._emscripten_bind_Decoder_GetAttributeFloat_3=
function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Tb=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Ub=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Vb=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm._emscripten_bind_DecoderBuffer_Init_2.apply(null,
arguments)},Wb=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Xb=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},Pb=a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)},Ob=a._memcpy=function(){return a.asm._memcpy.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};
var Yb=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},Zb=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},$b=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},ac=a._emscripten_bind_Status_ok_0=
@ -80,44 +80,45 @@ function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(
arguments)},Rb=a._llvm_bswap_i32=function(){return a.asm._llvm_bswap_i32.apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null,arguments)},Bc=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm._emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)};a.establishStackSpace=function(){return a.asm.establishStackSpace.apply(null,arguments)};var Cc=a._emscripten_enum_draco_StatusCode_IO_ERROR=
function(){return a.asm._emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},Dc=a._emscripten_bind_MetadataQuerier_HasIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasIntEntry_2.apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,arguments)},Fc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,
arguments)},Eb=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm._emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},Gc=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm._emscripten_bind_DracoInt32Array_size_0.apply(null,arguments)},Hc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm._emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},Ic=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=
function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},Jc=a._emscripten_enum_draco_StatusCode_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_ERROR.apply(null,arguments)},Kc=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},Lc=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=
function(){return a.asm._emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Mc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},Nc=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm._emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},Nb=a._memset=function(){return a.asm._memset.apply(null,arguments)},Oc=a._emscripten_bind_PointAttribute_attribute_type_0=
function(){return a.asm._emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},Pc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm._emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},Qc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},Rc=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm._emscripten_bind_DecoderBuffer___destroy___0.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_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)};a.setTempRet0=function(){return a.asm.setTempRet0.apply(null,arguments)};var Hb=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm._emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,
arguments)},Uc=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},Vc=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},Wc=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm._emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},Xc=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,
arguments)},Db=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm._emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,arguments)},Yc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm._emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},Zc=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm._emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},$c=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_size_0.apply(null,
arguments)},ad=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},la=a._malloc=function(){return a.asm._malloc.apply(null,arguments)},bd=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm._emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},cd=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_offset_0.apply(null,
arguments)},Jb=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)},Qb=a._memmove=function(){return a.asm._memmove.apply(null,arguments)},wb=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm._emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},dd=a._emscripten_bind_Status_error_msg_0=function(){return a.asm._emscripten_bind_Status_error_msg_0.apply(null,arguments)},ed=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm._emscripten_bind_Mesh___destroy___0.apply(null,
arguments)},fd=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm._emscripten_bind_Metadata___destroy___0.apply(null,arguments)},gd=a._emscripten_bind_Status___destroy___0=function(){return a.asm._emscripten_bind_Status___destroy___0.apply(null,arguments)},hd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},Ab=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=
function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},id=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},jd=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},kd=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm._emscripten_enum_draco_StatusCode_OK.apply(null,
arguments)},ld=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm._emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},md=a._emscripten_bind_Status_code_0=function(){return a.asm._emscripten_bind_Status_code_0.apply(null,arguments)},xb=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},Cb=
a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null,arguments)},nd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)},od=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null,arguments)},pd=a._emscripten_bind_DracoFloat32Array_GetValue_1=
function(){return a.asm._emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},yb=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return a.asm._emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},qd=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm._emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},rd=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,
arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};var sd=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},td=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm._emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},ud=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,
function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},Jc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null,arguments)},Kc=a._emscripten_enum_draco_StatusCode_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_ERROR.apply(null,arguments)},Lc=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,
arguments)},Mc=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm._emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Nc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},Oc=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm._emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},Nb=a._memset=function(){return a.asm._memset.apply(null,
arguments)},Pc=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm._emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},Qc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm._emscripten_bind_MetadataQuerier___destroy___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_DecoderBuffer___destroy___0=function(){return a.asm._emscripten_bind_DecoderBuffer___destroy___0.apply(null,
arguments)},Tc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return a.asm._emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},Uc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)};a.setTempRet0=function(){return a.asm.setTempRet0.apply(null,arguments)};var Hb=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm._emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,
arguments)},Vc=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},Wc=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},Xc=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm._emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},Yc=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,
arguments)},Db=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm._emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,arguments)},Zc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm._emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},$c=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm._emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},ad=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_size_0.apply(null,
arguments)},bd=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},la=a._malloc=function(){return a.asm._malloc.apply(null,arguments)},cd=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm._emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},dd=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_offset_0.apply(null,
arguments)},Jb=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)},Qb=a._memmove=function(){return a.asm._memmove.apply(null,arguments)},wb=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm._emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},ed=a._emscripten_bind_Status_error_msg_0=function(){return a.asm._emscripten_bind_Status_error_msg_0.apply(null,arguments)},fd=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm._emscripten_bind_Mesh___destroy___0.apply(null,
arguments)},gd=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm._emscripten_bind_Metadata___destroy___0.apply(null,arguments)},hd=a._emscripten_bind_Status___destroy___0=function(){return a.asm._emscripten_bind_Status___destroy___0.apply(null,arguments)},id=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},Ab=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=
function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},jd=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},kd=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},ld=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm._emscripten_enum_draco_StatusCode_OK.apply(null,
arguments)},md=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm._emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},nd=a._emscripten_bind_Status_code_0=function(){return a.asm._emscripten_bind_Status_code_0.apply(null,arguments)},xb=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},Cb=
a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null,arguments)},od=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)},pd=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null,arguments)},qd=a._emscripten_bind_DracoFloat32Array_GetValue_1=
function(){return a.asm._emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},yb=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return a.asm._emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},rd=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm._emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},sd=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,
arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};var td=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},ud=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm._emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},vd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,
arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,
arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};n.stackAlloc=a.stackAlloc;n.stackSave=a.stackSave;n.stackRestore=a.stackRestore;n.establishStackSpace=a.establishStackSpace;n.setTempRet0=a.setTempRet0;n.getTempRet0=a.getTempRet0;a.asm=mb;
if(U)if("function"===typeof a.locateFile?U=a.locateFile(U):a.memoryInitializerPrefixURL&&(U=a.memoryInitializerPrefixURL+U),pa||Ba){var vd=a.readBinary(U);G.set(vd,n.GLOBAL_BASE)}else{var ob=function(){a.readAsync(U,nb,function(){throw"could not load memory initializer "+U;})};Za("memory initializer");var nb=function(c){c.byteLength&&(c=new Uint8Array(c));G.set(c,n.GLOBAL_BASE);a.memoryInitializerRequest&&delete a.memoryInitializerRequest.response;$a("memory initializer")};if(a.memoryInitializerRequest){var pb=
function(){var c=a.memoryInitializerRequest;200!==c.status&&0!==c.status?(console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+c.status+", retrying "+U),ob()):nb(c.response)};a.memoryInitializerRequest.response?setTimeout(pb,0):a.memoryInitializerRequest.addEventListener("load",pb)}else ob()}a.then=function(c){if(a.calledRun)c(a);else{var b=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){b&&b();c(a)}}return a};na.prototype=Error();na.prototype.constructor=
na;var vb,eb=null;ta=function b(){a.calledRun||La();a.calledRun||(ta=b)};a.callMain=a.callMain=function(b){function d(){for(var a=0;3>a;a++)f.push(0)}b=b||[];Aa||(Aa=!0,ka(Ma));var e=b.length+1,f=[R(ra(a.thisProgram),"i8",0)];d();for(var h=0;h<e-1;h+=1)f.push(R(ra(b[h]),"i8",0)),d();f.push(0);f=R(f,"i32",0);try{var k=a._main(e,f,0);gb(k,!0)}catch(z){z instanceof na||("SimulateInfiniteLoop"==z?a.noExitRuntime=!0:((b=z)&&"object"===typeof z&&z.stack&&(b=[z,z.stack]),a.printErr("exception thrown: "+
b),a.quit(1,z)))}finally{}};a.run=a.run=La;a.exit=a.exit=gb;var ib=[];a.abort=a.abort=M;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();var cb=!0;a.noInitialRun&&(cb=!1);La();v.prototype=Object.create(v.prototype);v.prototype.constructor=v;v.prototype.__class__=v;v.__cache__={};a.WrapperObject=v;a.getCache=E;a.wrapPointer=Y;a.castObject=function(a,d){return Y(a.ptr,d)};a.NULL=Y(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";
a.__destroy__();delete E(a.__class__)[a.ptr]};a.compare=function(a,d){return a.ptr===d.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var h={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(h.needed){for(var b=0;b<h.temps.length;b++)a._free(h.temps[b]);h.temps.length=0;a._free(h.buffer);h.buffer=0;h.size+=h.needed;h.needed=0}h.buffer||(h.size+=128,h.buffer=a._malloc(h.size),f(h.buffer));h.pos=0},alloc:function(b,d){f(h.buffer);b=b.length*d.BYTES_PER_ELEMENT;
b=b+7&-8;h.pos+b>=h.size?(f(0<b),h.needed+=b,d=a._malloc(b),h.temps.push(d)):(d=h.buffer+h.pos,h.pos+=b);return d},copy:function(a,d,e){switch(d.BYTES_PER_ELEMENT){case 2:e>>=1;break;case 4:e>>=2;break;case 8:e>>=3}for(var b=0;b<a.length;b++)d[e+b]=a[b]}};D.prototype=Object.create(v.prototype);D.prototype.constructor=D;D.prototype.__class__=D;D.__cache__={};a.Status=D;D.prototype.code=D.prototype.code=function(){return md(this.ptr)};D.prototype.ok=D.prototype.ok=function(){return!!ac(this.ptr)};D.prototype.error_msg=
D.prototype.error_msg=function(){return t(dd(this.ptr))};D.prototype.__destroy__=D.prototype.__destroy__=function(){gd(this.ptr)};I.prototype=Object.create(v.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.PointCloud=I;I.prototype.num_attributes=I.prototype.num_attributes=function(){return tc(this.ptr)};I.prototype.num_points=I.prototype.num_points=function(){return Wc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Xc(this.ptr)};J.prototype=Object.create(v.prototype);
J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.AttributeOctahedronTransform=J;J.prototype.InitFromAttribute=J.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!ad(b,a)};J.prototype.quantization_bits=J.prototype.quantization_bits=function(){return yc(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){zc(this.ptr)};p.prototype=Object.create(v.prototype);p.prototype.constructor=p;p.prototype.__class__=p;p.__cache__=
{};a.PointAttribute=p;p.prototype.size=p.prototype.size=function(){return Wb(this.ptr)};p.prototype.GetAttributeTransformData=p.prototype.GetAttributeTransformData=function(){return Y(bd(this.ptr),O)};p.prototype.attribute_type=p.prototype.attribute_type=function(){return Oc(this.ptr)};p.prototype.data_type=p.prototype.data_type=function(){return Zc(this.ptr)};p.prototype.num_components=p.prototype.num_components=function(){return pc(this.ptr)};p.prototype.normalized=p.prototype.normalized=function(){return!!Tb(this.ptr)};
p.prototype.byte_stride=p.prototype.byte_stride=function(){return hc(this.ptr)};p.prototype.byte_offset=p.prototype.byte_offset=function(){return cd(this.ptr)};p.prototype.unique_id=p.prototype.unique_id=function(){return Bc(this.ptr)};p.prototype.__destroy__=p.prototype.__destroy__=function(){td(this.ptr)};O.prototype=Object.create(v.prototype);O.prototype.constructor=O;O.prototype.__class__=O;O.__cache__={};a.AttributeTransformData=O;O.prototype.transform_type=O.prototype.transform_type=function(){return ld(this.ptr)};
O.prototype.__destroy__=O.prototype.__destroy__=function(){oc(this.ptr)};B.prototype=Object.create(v.prototype);B.prototype.constructor=B;B.prototype.__class__=B;B.__cache__={};a.AttributeQuantizationTransform=B;B.prototype.InitFromAttribute=B.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!sd(b,a)};B.prototype.quantization_bits=B.prototype.quantization_bits=function(){return Kc(this.ptr)};B.prototype.min_value=B.prototype.min_value=function(a){var b=
this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ic(b,a)};B.prototype.range=B.prototype.range=function(){return id(this.ptr)};B.prototype.__destroy__=B.prototype.__destroy__=function(){qc(this.ptr)};q.prototype=Object.create(v.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.MetadataQuerier=q;q.prototype.HasIntEntry=q.prototype.HasIntEntry=function(a,d){var b=this.ptr;h.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:Z(d);return!!Dc(b,a,d)};
q.prototype.GetIntEntry=q.prototype.GetIntEntry=function(a,d){var b=this.ptr;h.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:Z(d);return kc(b,a,d)};q.prototype.HasDoubleEntry=q.prototype.HasDoubleEntry=function(a,d){var b=this.ptr;h.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:Z(d);return!!vc(b,a,d)};q.prototype.GetDoubleEntry=q.prototype.GetDoubleEntry=function(a,d){var b=this.ptr;h.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===
typeof d?d.ptr:Z(d);return wc(b,a,d)};q.prototype.HasStringEntry=q.prototype.HasStringEntry=function(a,d){var b=this.ptr;h.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:Z(d);return!!nc(b,a,d)};q.prototype.GetStringEntry=q.prototype.GetStringEntry=function(a,d){var b=this.ptr;h.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:Z(d);return t(jc(b,a,d))};q.prototype.__destroy__=q.prototype.__destroy__=function(){Pc(this.ptr)};K.prototype=Object.create(v.prototype);
K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoFloat32Array=K;K.prototype.GetValue=K.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return pd(b,a)};K.prototype.size=K.prototype.size=function(){return $c(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){Vc(this.ptr)};V.prototype=Object.create(v.prototype);V.prototype.constructor=V;V.prototype.__class__=V;V.__cache__={};a.GeometryAttribute=V;V.prototype.__destroy__=V.prototype.__destroy__=
function(){gc(this.ptr)};P.prototype=Object.create(v.prototype);P.prototype.constructor=P;P.prototype.__class__=P;P.__cache__={};a.DecoderBuffer=P;P.prototype.Init=P.prototype.Init=function(a,d){var b=this.ptr;h.prepare();if("object"==typeof a&&"object"===typeof a){var e=h.alloc(a,N);h.copy(a,N,e);a=e}d&&"object"===typeof d&&(d=d.ptr);Vb(b,a,d)};P.prototype.__destroy__=P.prototype.__destroy__=function(){Rc(this.ptr)};l.prototype=Object.create(v.prototype);l.prototype.constructor=l;l.prototype.__class__=
l;l.__cache__={};a.Decoder=l;l.prototype.GetEncodedGeometryType=l.prototype.GetEncodedGeometryType=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ec(b,a)};l.prototype.DecodeBufferToPointCloud=l.prototype.DecodeBufferToPointCloud=function(a,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);return Y(cc(b,a,d),D)};l.prototype.DecodeBufferToMesh=l.prototype.DecodeBufferToMesh=function(a,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===
typeof d&&(d=d.ptr);return Y(od(b,a,d),D)};l.prototype.GetAttributeId=l.prototype.GetAttributeId=function(a,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);return jd(b,a,d)};l.prototype.GetAttributeIdByName=l.prototype.GetAttributeIdByName=function(a,d){var b=this.ptr;h.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:Z(d);return Zb(b,a,d)};l.prototype.GetAttributeIdByMetadataEntry=l.prototype.GetAttributeIdByMetadataEntry=function(a,
d,e){var b=this.ptr;h.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:Z(d);e=e&&"object"===typeof e?e.ptr:Z(e);return uc(b,a,d,e)};l.prototype.GetAttribute=l.prototype.GetAttribute=function(a,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);return Y(Sc(b,a,d),p)};l.prototype.GetMetadata=l.prototype.GetMetadata=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Y(qd(b,a),Q)};l.prototype.GetAttributeMetadata=l.prototype.GetAttributeMetadata=
function(a,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);return Y(Ac(b,a,d),Q)};l.prototype.GetFaceFromMesh=l.prototype.GetFaceFromMesh=function(a,d,e){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);return!!Yc(b,a,d,e)};l.prototype.GetTriangleStripsFromMesh=l.prototype.GetTriangleStripsFromMesh=function(a,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);
return Ec(b,a,d)};l.prototype.GetAttributeFloat=l.prototype.GetAttributeFloat=function(a,d,e){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);return!!Sb(b,a,d,e)};l.prototype.GetAttributeFloatForAllPoints=l.prototype.GetAttributeFloatForAllPoints=function(a,d,e){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);return!!Ub(b,a,d,e)};l.prototype.SkipAttributeTransform=
l.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Hc(b,a)};l.prototype.__destroy__=l.prototype.__destroy__=function(){lc(this.ptr)};F.prototype=Object.create(v.prototype);F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.Mesh=F;F.prototype.num_faces=F.prototype.num_faces=function(){return bc(this.ptr)};F.prototype.num_attributes=F.prototype.num_attributes=function(){return xc(this.ptr)};F.prototype.num_points=F.prototype.num_points=function(){return sc(this.ptr)};
F.prototype.__destroy__=F.prototype.__destroy__=function(){ed(this.ptr)};aa.prototype=Object.create(v.prototype);aa.prototype.constructor=aa;aa.prototype.__class__=aa;aa.__cache__={};a.VoidPtr=aa;aa.prototype.__destroy__=aa.prototype.__destroy__=function(){Nc(this.ptr)};L.prototype=Object.create(v.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt32Array=L;L.prototype.GetValue=L.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Qc(b,
a)};L.prototype.size=L.prototype.size=function(){return Gc(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){rc(this.ptr)};Q.prototype=Object.create(v.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.Metadata=Q;Q.prototype.__destroy__=Q.prototype.__destroy__=function(){fd(this.ptr)};(function(){function b(){a.OK=kd();a.ERROR=Jc();a.IO_ERROR=Cc();a.INVALID_PARAMETER=Lc();a.UNSUPPORTED_VERSION=ud();a.UNKNOWN_VERSION=Uc();a.INVALID_GEOMETRY_TYPE=fc();
a.POINT_CLOUD=$b();a.TRIANGULAR_MESH=Tc();a.ATTRIBUTE_INVALID_TRANSFORM=hd();a.ATTRIBUTE_NO_TRANSFORM=dc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Ic();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=mc();a.INVALID=Yb();a.POSITION=Xb();a.NORMAL=rd();a.COLOR=Mc();a.TEX_COORD=Fc();a.GENERIC=nd()}a.calledRun?b():bb.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return e};"object"===typeof module&&module.exports&&(module.exports=DracoDecoderModule);
if(U)if("function"===typeof a.locateFile?U=a.locateFile(U):a.memoryInitializerPrefixURL&&(U=a.memoryInitializerPrefixURL+U),pa||Ba){var wd=a.readBinary(U);G.set(wd,n.GLOBAL_BASE)}else{var ob=function(){a.readAsync(U,nb,function(){throw"could not load memory initializer "+U;})};Za("memory initializer");var nb=function(d){d.byteLength&&(d=new Uint8Array(d));G.set(d,n.GLOBAL_BASE);a.memoryInitializerRequest&&delete a.memoryInitializerRequest.response;$a("memory initializer")};if(a.memoryInitializerRequest){var pb=
function(){var d=a.memoryInitializerRequest;200!==d.status&&0!==d.status?(console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+d.status+", retrying "+U),ob()):nb(d.response)};a.memoryInitializerRequest.response?setTimeout(pb,0):a.memoryInitializerRequest.addEventListener("load",pb)}else ob()}a.then=function(d){if(a.calledRun)d(a);else{var b=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){b&&b();d(a)}}return a};na.prototype=Error();na.prototype.constructor=
na;var vb,eb=null;ta=function b(){a.calledRun||La();a.calledRun||(ta=b)};a.callMain=a.callMain=function(b){function c(){for(var a=0;3>a;a++)f.push(0)}b=b||[];Aa||(Aa=!0,ka(Ma));var e=b.length+1,f=[R(ra(a.thisProgram),"i8",0)];c();for(var h=0;h<e-1;h+=1)f.push(R(ra(b[h]),"i8",0)),c();f.push(0);f=R(f,"i32",0);try{var k=a._main(e,f,0);gb(k,!0)}catch(y){y instanceof na||("SimulateInfiniteLoop"==y?a.noExitRuntime=!0:((b=y)&&"object"===typeof y&&y.stack&&(b=[y,y.stack]),a.printErr("exception thrown: "+
b),a.quit(1,y)))}finally{}};a.run=a.run=La;a.exit=a.exit=gb;var ib=[];a.abort=a.abort=M;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();var cb=!0;a.noInitialRun&&(cb=!1);La();v.prototype=Object.create(v.prototype);v.prototype.constructor=v;v.prototype.__class__=v;v.__cache__={};a.WrapperObject=v;a.getCache=E;a.wrapPointer=Y;a.castObject=function(a,c){return Y(a.ptr,c)};a.NULL=Y(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";
a.__destroy__();delete E(a.__class__)[a.ptr]};a.compare=function(a,c){return a.ptr===c.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var k={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(k.needed){for(var b=0;b<k.temps.length;b++)a._free(k.temps[b]);k.temps.length=0;a._free(k.buffer);k.buffer=0;k.size+=k.needed;k.needed=0}k.buffer||(k.size+=128,k.buffer=a._malloc(k.size),f(k.buffer));k.pos=0},alloc:function(b,c){f(k.buffer);b=b.length*c.BYTES_PER_ELEMENT;
b=b+7&-8;k.pos+b>=k.size?(f(0<b),k.needed+=b,c=a._malloc(b),k.temps.push(c)):(c=k.buffer+k.pos,k.pos+=b);return c},copy:function(a,c,e){switch(c.BYTES_PER_ELEMENT){case 2:e>>=1;break;case 4:e>>=2;break;case 8:e>>=3}for(var b=0;b<a.length;b++)c[e+b]=a[b]}};D.prototype=Object.create(v.prototype);D.prototype.constructor=D;D.prototype.__class__=D;D.__cache__={};a.Status=D;D.prototype.code=D.prototype.code=function(){return nd(this.ptr)};D.prototype.ok=D.prototype.ok=function(){return!!ac(this.ptr)};D.prototype.error_msg=
D.prototype.error_msg=function(){return t(ed(this.ptr))};D.prototype.__destroy__=D.prototype.__destroy__=function(){hd(this.ptr)};I.prototype=Object.create(v.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.PointCloud=I;I.prototype.num_attributes=I.prototype.num_attributes=function(){return tc(this.ptr)};I.prototype.num_points=I.prototype.num_points=function(){return Xc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Yc(this.ptr)};J.prototype=Object.create(v.prototype);
J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.AttributeOctahedronTransform=J;J.prototype.InitFromAttribute=J.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!bd(b,a)};J.prototype.quantization_bits=J.prototype.quantization_bits=function(){return yc(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){zc(this.ptr)};p.prototype=Object.create(v.prototype);p.prototype.constructor=p;p.prototype.__class__=p;p.__cache__=
{};a.PointAttribute=p;p.prototype.size=p.prototype.size=function(){return Wb(this.ptr)};p.prototype.GetAttributeTransformData=p.prototype.GetAttributeTransformData=function(){return Y(cd(this.ptr),O)};p.prototype.attribute_type=p.prototype.attribute_type=function(){return Pc(this.ptr)};p.prototype.data_type=p.prototype.data_type=function(){return $c(this.ptr)};p.prototype.num_components=p.prototype.num_components=function(){return pc(this.ptr)};p.prototype.normalized=p.prototype.normalized=function(){return!!Tb(this.ptr)};
p.prototype.byte_stride=p.prototype.byte_stride=function(){return hc(this.ptr)};p.prototype.byte_offset=p.prototype.byte_offset=function(){return dd(this.ptr)};p.prototype.unique_id=p.prototype.unique_id=function(){return Bc(this.ptr)};p.prototype.__destroy__=p.prototype.__destroy__=function(){ud(this.ptr)};O.prototype=Object.create(v.prototype);O.prototype.constructor=O;O.prototype.__class__=O;O.__cache__={};a.AttributeTransformData=O;O.prototype.transform_type=O.prototype.transform_type=function(){return md(this.ptr)};
O.prototype.__destroy__=O.prototype.__destroy__=function(){oc(this.ptr)};B.prototype=Object.create(v.prototype);B.prototype.constructor=B;B.prototype.__class__=B;B.__cache__={};a.AttributeQuantizationTransform=B;B.prototype.InitFromAttribute=B.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!td(b,a)};B.prototype.quantization_bits=B.prototype.quantization_bits=function(){return Lc(this.ptr)};B.prototype.min_value=B.prototype.min_value=function(a){var b=
this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ic(b,a)};B.prototype.range=B.prototype.range=function(){return jd(this.ptr)};B.prototype.__destroy__=B.prototype.__destroy__=function(){qc(this.ptr)};q.prototype=Object.create(v.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.MetadataQuerier=q;q.prototype.HasIntEntry=q.prototype.HasIntEntry=function(a,c){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return!!Dc(b,a,c)};
q.prototype.GetIntEntry=q.prototype.GetIntEntry=function(a,c){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return kc(b,a,c)};q.prototype.HasDoubleEntry=q.prototype.HasDoubleEntry=function(a,c){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return!!vc(b,a,c)};q.prototype.GetDoubleEntry=q.prototype.GetDoubleEntry=function(a,c){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===
typeof c?c.ptr:Z(c);return wc(b,a,c)};q.prototype.HasStringEntry=q.prototype.HasStringEntry=function(a,c){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return!!nc(b,a,c)};q.prototype.GetStringEntry=q.prototype.GetStringEntry=function(a,c){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return t(jc(b,a,c))};q.prototype.__destroy__=q.prototype.__destroy__=function(){Qc(this.ptr)};K.prototype=Object.create(v.prototype);
K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoFloat32Array=K;K.prototype.GetValue=K.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return qd(b,a)};K.prototype.size=K.prototype.size=function(){return ad(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){Wc(this.ptr)};V.prototype=Object.create(v.prototype);V.prototype.constructor=V;V.prototype.__class__=V;V.__cache__={};a.GeometryAttribute=V;V.prototype.__destroy__=V.prototype.__destroy__=
function(){gc(this.ptr)};P.prototype=Object.create(v.prototype);P.prototype.constructor=P;P.prototype.__class__=P;P.__cache__={};a.DecoderBuffer=P;P.prototype.Init=P.prototype.Init=function(a,c){var b=this.ptr;k.prepare();if("object"==typeof a&&"object"===typeof a){var e=k.alloc(a,N);k.copy(a,N,e);a=e}c&&"object"===typeof c&&(c=c.ptr);Vb(b,a,c)};P.prototype.__destroy__=P.prototype.__destroy__=function(){Sc(this.ptr)};l.prototype=Object.create(v.prototype);l.prototype.constructor=l;l.prototype.__class__=
l;l.__cache__={};a.Decoder=l;l.prototype.GetEncodedGeometryType=l.prototype.GetEncodedGeometryType=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ec(b,a)};l.prototype.DecodeBufferToPointCloud=l.prototype.DecodeBufferToPointCloud=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return Y(cc(b,a,c),D)};l.prototype.DecodeBufferToMesh=l.prototype.DecodeBufferToMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===
typeof c&&(c=c.ptr);return Y(pd(b,a,c),D)};l.prototype.GetAttributeId=l.prototype.GetAttributeId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return kd(b,a,c)};l.prototype.GetAttributeIdByName=l.prototype.GetAttributeIdByName=function(a,c){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return Zb(b,a,c)};l.prototype.GetAttributeIdByMetadataEntry=l.prototype.GetAttributeIdByMetadataEntry=function(a,
c,e){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);e=e&&"object"===typeof e?e.ptr:Z(e);return uc(b,a,c,e)};l.prototype.GetAttribute=l.prototype.GetAttribute=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return Y(Tc(b,a,c),p)};l.prototype.GetMetadata=l.prototype.GetMetadata=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Y(rd(b,a),Q)};l.prototype.GetAttributeMetadata=l.prototype.GetAttributeMetadata=
function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return Y(Ac(b,a,c),Q)};l.prototype.GetFaceFromMesh=l.prototype.GetFaceFromMesh=function(a,c,e){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);e&&"object"===typeof e&&(e=e.ptr);return!!Zc(b,a,c,e)};l.prototype.GetTriangleStripsFromMesh=l.prototype.GetTriangleStripsFromMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);
return Ec(b,a,c)};l.prototype.GetAttributeFloat=l.prototype.GetAttributeFloat=function(a,c,e){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);e&&"object"===typeof e&&(e=e.ptr);return!!Sb(b,a,c,e)};l.prototype.GetAttributeFloatForAllPoints=l.prototype.GetAttributeFloatForAllPoints=function(a,c,e){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);e&&"object"===typeof e&&(e=e.ptr);return!!Ub(b,a,c,e)};l.prototype.GetAttributeIntForAllPoints=
l.prototype.GetAttributeIntForAllPoints=function(a,c,e){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);e&&"object"===typeof e&&(e=e.ptr);return!!Jc(b,a,c,e)};l.prototype.SkipAttributeTransform=l.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Hc(b,a)};l.prototype.__destroy__=l.prototype.__destroy__=function(){lc(this.ptr)};F.prototype=Object.create(v.prototype);F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__=
{};a.Mesh=F;F.prototype.num_faces=F.prototype.num_faces=function(){return bc(this.ptr)};F.prototype.num_attributes=F.prototype.num_attributes=function(){return xc(this.ptr)};F.prototype.num_points=F.prototype.num_points=function(){return sc(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){fd(this.ptr)};aa.prototype=Object.create(v.prototype);aa.prototype.constructor=aa;aa.prototype.__class__=aa;aa.__cache__={};a.VoidPtr=aa;aa.prototype.__destroy__=aa.prototype.__destroy__=function(){Oc(this.ptr)};
L.prototype=Object.create(v.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt32Array=L;L.prototype.GetValue=L.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Rc(b,a)};L.prototype.size=L.prototype.size=function(){return Gc(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){rc(this.ptr)};Q.prototype=Object.create(v.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.Metadata=Q;Q.prototype.__destroy__=
Q.prototype.__destroy__=function(){gd(this.ptr)};(function(){function b(){a.OK=ld();a.ERROR=Kc();a.IO_ERROR=Cc();a.INVALID_PARAMETER=Mc();a.UNSUPPORTED_VERSION=vd();a.UNKNOWN_VERSION=Vc();a.INVALID_GEOMETRY_TYPE=fc();a.POINT_CLOUD=$b();a.TRIANGULAR_MESH=Uc();a.ATTRIBUTE_INVALID_TRANSFORM=id();a.ATTRIBUTE_NO_TRANSFORM=dc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Ic();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=mc();a.INVALID=Yb();a.POSITION=Xb();a.NORMAL=sd();a.COLOR=Nc();a.TEX_COORD=Fc();a.GENERIC=od()}a.calledRun?
b():bb.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return e};"object"===typeof module&&module.exports&&(module.exports=DracoDecoderModule);

View File

@ -29,91 +29,31 @@
<pre id="fileDisplayArea"><pre>
</div>
<script src="https://cdn.rawgit.com/mrdoob/three.js/dev/build/three.min.js"></script>
<script src="DRACOLoader.js"></script>
<script src="../DRACOLoader.js"></script>
<script src="geometry_helper.js"></script>
<script>
'use strict';
// Global Draco decoder type.
var dracoDecoderType = {};
var dracoLoader;
var currentDecoder;
var dracoDecoderType = {};
loadDracoDecoder();
// This function loads a JavaScript file and adds it to the page. "path"
// is the path to the JavaScript file. "onLoadFunc" is the function to be
// called when the JavaScript file has been loaded.
function loadJavaScriptFile(path, onLoadFunc) {
var head = document.getElementsByTagName('head')[0];
var element = document.createElement('script');
element.id = "decoder_script";
element.type = 'text/javascript';
element.src = path;
if (onLoadFunc !== null)
element.onload = onLoadFunc;
var previous_decoder_script = document.getElementById("decoder_script");
if (previous_decoder_script !== null) {
previous_decoder_script.parentNode.removeChild(previous_decoder_script);
}
head.appendChild(element);
}
function loadWebAssemblyDecoder() {
dracoDecoderType['wasmBinaryFile'] = '../draco_decoder.wasm';
var xhr = new XMLHttpRequest();
xhr.open('GET', '../draco_decoder.wasm', true);
xhr.responseType = 'arraybuffer';
xhr.onload = function() {
// draco_wasm_wrapper.js must be loaded before DracoDecoderModule is
// created. The object passed into DracoDecoderModule() must contain a
// property with the name of wasmBinary and the value must be an
// ArrayBuffer containing the contents of the .wasm file.
dracoDecoderType['wasmBinary'] = xhr.response;
createDracoDecoder();
};
xhr.send(null)
function createDracoDecoder() {
dracoLoader = new THREE.DRACOLoader();
}
function switchDecoder() {
var showDecoder = document.getElementById('decoderType');
dracoDecoderType = {};
if (currentDecoder === "wasm") {
currentDecoder = "js";
loadJavaScriptFile('../draco_decoder.js', createDracoDecoder);
if (dracoDecoderType.type === "wasm") {
dracoDecoderType.type = "js";
showDecoder.innerText = "Now using Javascript Decoder.";
} else {
currentDecoder = "wasm";
loadJavaScriptFile('../draco_wasm_wrapper.js', loadWebAssemblyDecoder);
dracoDecoderType.type = "wasm";
showDecoder.innerText = "Now using WebAssembly Decoder.";
}
}
// This function will test if the browser has support for WebAssembly. If
// it does it will download the WebAssembly Draco decoder, if not it will
// download the asmjs Draco decoder.
// TODO: Investigate moving the Draco decoder loading code
// over to DRACOLoader.js.
function loadDracoDecoder() {
var showDecoder = document.getElementById('decoderType');
if (typeof WebAssembly !== 'object') {
// No WebAssembly support
currentDecoder = "js";
loadJavaScriptFile('../draco_decoder.js', createDracoDecoder);
var switchButton = document.getElementById('switchDecoder');
showDecoder.parentNode.removeChild(showDecoder);
switchButton.parentNode.removeChild(switchButton);
} else {
currentDecoder = "wasm";
loadJavaScriptFile('../draco_wasm_wrapper.js', loadWebAssemblyDecoder);
showDecoder.innerText = "Now using WebAssembly Decoder.";
}
}
function createDracoDecoder() {
dracoLoader = new THREE.DRACOLoader();
dracoLoader.setDracoDecoderType(dracoDecoderType);
dracoLoader = new THREE.DRACOLoader(undefined, dracoDecoderType);
}
var camera, cameraTarget, scene, renderer;

View File

@ -51,7 +51,7 @@ function createDracoDecoder() {
};
const create_t0 = performance.now();
dracoDecoder = DracoModule(dracoDecoderType);
dracoDecoder = DracoDecoderModule(dracoDecoderType);
const create_t1 = performance.now();
addCell('DracoModule', true);
addCell(' ' + (create_t1 - create_t0), false);
@ -153,11 +153,15 @@ function testMeshDecodingAsync(filenameList, index) {
const decode_t0 = performance.now();
const geometryType = decoder.GetEncodedGeometryType(buffer);
let outputGeometry;
let dracoGeometry;
let decodingStatus;
if (geometryType == dracoDecoder.TRIANGULAR_MESH) {
outputGeometry = decoder.DecodeMeshFromBuffer(buffer);
dracoGeometry = new dracoDecoder.Mesh();
decodingStatus = decoder.DecodeBufferToMesh(buffer, dracoGeometry);
} else {
outputGeometry = decoder.DecodePointCloudFromBuffer(buffer);
dracoGeometry = new dracoDecoder.PointCloud();
decodingStatus =
decoder.DecodeBufferToPointCloud(buffer, dracoGeometry);
}
const t1 = performance.now();
@ -165,9 +169,9 @@ function testMeshDecodingAsync(filenameList, index) {
addCell('' + (t1 - total_t0), false);
addCell('' + (t1 - decode_t0), false);
addCell('' + byteArray.length, false);
addCell('' + outputGeometry.num_points(), false);
addCell('' + dracoGeometry.num_points(), false);
dracoDecoder.destroy(outputGeometry);
dracoDecoder.destroy(dracoGeometry);
dracoDecoder.destroy(decoder);
dracoDecoder.destroy(buffer);

View File

@ -82,6 +82,21 @@ class GeometryAttribute {
return out;
}
// Function for getting a attribute value with a specific format.
// T is the attribute data type.
// att_components_t is the number of attribute components.
template <typename T, int att_components_t>
bool GetValue(AttributeValueIndex att_index,
std::array<T, att_components_t> *out) const {
// Byte address of the attribute index.
const int64_t byte_pos = byte_offset_ + byte_stride_ * att_index.value();
// Check we are not reading past end of data.
if (byte_pos + sizeof(*out) > buffer_->data_size())
return false;
buffer_->Read(byte_pos, &((*out)[0]), sizeof(*out));
return true;
}
// Returns the byte position of the attribute entry in the data buffer.
inline int64_t GetBytePos(AttributeValueIndex att_index) const {
return byte_offset_ + byte_stride_ * att_index.value();
@ -201,9 +216,10 @@ class GeometryAttribute {
// out_att_components_t is the number of components of the output format.
template <typename T, int att_components_t, typename OutT,
int out_att_components_t>
void ConvertTypedValue(AttributeValueIndex att_id, OutT *out_value) const {
std::array<T, att_components_t> att_value =
GetValue<T, att_components_t>(att_id);
bool ConvertTypedValue(AttributeValueIndex att_id, OutT *out_value) const {
std::array<T, att_components_t> att_value;
if (!GetValue<T, att_components_t>(att_id, &att_value))
return false;
// Convert all components available in both the original and output formats.
for (int i = 0; i < std::min(att_components_t, out_att_components_t); ++i) {
out_value[i] = static_cast<OutT>(att_value[i]);
@ -223,30 +239,32 @@ class GeometryAttribute {
for (int i = att_components_t; i < out_att_components_t; ++i) {
out_value[i] = static_cast<OutT>(0);
}
return true;
}
// The same as above but without a component specifier for input attribute.
template <typename T, typename OutT, int OUT_CMPS>
bool ConvertTypedValue(AttributeValueIndex att_index, OutT *out_value) const {
bool rv = false;
// Select the right method to call based on the number of attribute
// components.
switch (num_components_) {
case 1:
ConvertTypedValue<T, 1, OutT, OUT_CMPS>(att_index, out_value);
rv = ConvertTypedValue<T, 1, OutT, OUT_CMPS>(att_index, out_value);
break;
case 2:
ConvertTypedValue<T, 2, OutT, OUT_CMPS>(att_index, out_value);
rv = ConvertTypedValue<T, 2, OutT, OUT_CMPS>(att_index, out_value);
break;
case 3:
ConvertTypedValue<T, 3, OutT, OUT_CMPS>(att_index, out_value);
rv = ConvertTypedValue<T, 3, OutT, OUT_CMPS>(att_index, out_value);
break;
case 4:
ConvertTypedValue<T, 4, OutT, OUT_CMPS>(att_index, out_value);
rv = ConvertTypedValue<T, 4, OutT, OUT_CMPS>(att_index, out_value);
break;
default:
return false; // This shouldn't happen.
}
return true;
return rv;
}
DataBuffer *buffer_;

View File

@ -51,4 +51,79 @@ TEST_F(PointAttributeTest, TestCopy) {
}
}
TEST_F(PointAttributeTest, TestGetValueFloat) {
draco::GeometryAttribute pos_att;
pos_att.Init(draco::GeometryAttribute::POSITION, nullptr, 3,
draco::DT_FLOAT32, false, 4, 0);
draco::PointAttribute pa(pos_att);
pa.SetIdentityMapping();
pa.Reset(5);
float points[3];
for (int32_t i = 0; i < 5; ++i) {
points[0] = i * 3.0;
points[1] = (i * 3.0) + 1.0;
points[2] = (i * 3.0) + 2.0;
pa.SetAttributeValue(draco::AttributeValueIndex(i), &points);
}
for (int32_t i = 0; i < 5; ++i) {
pa.GetValue(draco::AttributeValueIndex(i), &points);
ASSERT_FLOAT_EQ(points[0], i * 3.0);
ASSERT_FLOAT_EQ(points[1], (i * 3.0) + 1.0);
ASSERT_FLOAT_EQ(points[2], (i * 3.0) + 2.0);
}
}
TEST_F(PointAttributeTest, TestGetArray) {
draco::GeometryAttribute pos_att;
pos_att.Init(draco::GeometryAttribute::POSITION, nullptr, 3,
draco::DT_FLOAT32, false, 4, 0);
draco::PointAttribute pa(pos_att);
pa.SetIdentityMapping();
pa.Reset(5);
float points[3];
for (int32_t i = 0; i < 5; ++i) {
points[0] = i * 3.0;
points[1] = (i * 3.0) + 1.0;
points[2] = (i * 3.0) + 2.0;
pa.SetAttributeValue(draco::AttributeValueIndex(i), &points);
}
for (int32_t i = 0; i < 5; ++i) {
std::array<float, 3> att_value;
att_value = pa.GetValue<float, 3>(draco::AttributeValueIndex(i));
ASSERT_FLOAT_EQ(att_value[0], i * 3.0);
ASSERT_FLOAT_EQ(att_value[1], (i * 3.0) + 1.0);
ASSERT_FLOAT_EQ(att_value[2], (i * 3.0) + 2.0);
}
for (int32_t i = 0; i < 5; ++i) {
std::array<float, 3> att_value;
EXPECT_TRUE(
(pa.GetValue<float, 3>(draco::AttributeValueIndex(i), &att_value)));
ASSERT_FLOAT_EQ(att_value[0], i * 3.0);
ASSERT_FLOAT_EQ(att_value[1], (i * 3.0) + 1.0);
ASSERT_FLOAT_EQ(att_value[2], (i * 3.0) + 2.0);
}
}
TEST_F(PointAttributeTest, TestArrayReadError) {
draco::GeometryAttribute pos_att;
pos_att.Init(draco::GeometryAttribute::POSITION, nullptr, 3,
draco::DT_FLOAT32, false, 4, 0);
draco::PointAttribute pa(pos_att);
pa.SetIdentityMapping();
pa.Reset(5);
float points[3];
for (int32_t i = 0; i < 5; ++i) {
points[0] = i * 3.0;
points[1] = (i * 3.0) + 1.0;
points[2] = (i * 3.0) + 2.0;
pa.SetAttributeValue(draco::AttributeValueIndex(i), &points);
}
std::array<float, 3> att_value;
EXPECT_FALSE(
(pa.GetValue<float, 3>(draco::AttributeValueIndex(5), &att_value)));
}
} // namespace

View File

@ -16,7 +16,7 @@
#define DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_DECODER_H_
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_decoder.h"
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor.h"
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor_area.h"
#include "draco/core/bit_coders/rans_bit_decoder.h"
namespace draco {
@ -80,7 +80,8 @@ class MeshPredictionSchemeGeometricNormalDecoder
}
private:
MeshPredictionSchemeGeometricNormalPredictor<DataTypeT, TransformT, MeshDataT>
MeshPredictionSchemeGeometricNormalPredictorArea<DataTypeT, TransformT,
MeshDataT>
predictor_;
OctahedronToolBox octahedron_tool_box_;
RAnsBitDecoder flip_normal_bit_decoder_;

View File

@ -16,7 +16,7 @@
#define DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_ENCODER_H_
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_encoder.h"
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor.h"
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor_area.h"
#include "draco/compression/config/compression_shared.h"
#include "draco/core/bit_coders/rans_bit_encoder.h"
@ -80,7 +80,8 @@ class MeshPredictionSchemeGeometricNormalEncoder
DCHECK_LE(q, 30);
octahedron_tool_box_.SetQuantizationBits(q);
}
MeshPredictionSchemeGeometricNormalPredictor<DataTypeT, TransformT, MeshDataT>
MeshPredictionSchemeGeometricNormalPredictorArea<DataTypeT, TransformT,
MeshDataT>
predictor_;
OctahedronToolBox octahedron_tool_box_;

View File

@ -0,0 +1,85 @@
// Copyright 2017 The Draco Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// 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.
//
#ifndef DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_PREDICTOR_AREA_H_
#define DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_PREDICTOR_AREA_H_
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_predictor_base.h"
namespace draco {
// This predictor estimates the normal via the surrounding triangles of the
// given corner. Triangles are weighted according to their area.
template <typename DataTypeT, class TransformT, class MeshDataT>
class MeshPredictionSchemeGeometricNormalPredictorArea
: public MeshPredictionSchemeGeometricNormalPredictorBase<
DataTypeT, TransformT, MeshDataT> {
typedef MeshPredictionSchemeGeometricNormalPredictorBase<
DataTypeT, TransformT, MeshDataT>
Base;
public:
MeshPredictionSchemeGeometricNormalPredictorArea(const MeshDataT &md)
: Base(md){};
virtual ~MeshPredictionSchemeGeometricNormalPredictorArea() {}
// Computes predicted octahedral coordinates on a given corner.
virtual void ComputePredictedValue(CornerIndex corner_id,
DataTypeT *prediction) override {
DCHECK(this->IsInitialized());
typedef typename MeshDataT::CornerTable CornerTable;
const CornerTable *const corner_table = this->mesh_data_.corner_table();
// Going to compute the predicted normal from the surrounding triangles
// according to the connectivity of the given corner table.
VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
// Position of central vertex does not change in loop.
const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
// Computing normals for triangles and adding them up.
VectorD<int64_t, 3> normal;
while (!cit.End()) {
// Getting corners.
const CornerIndex c_next = corner_table->Next(corner_id);
const CornerIndex c_prev = corner_table->Previous(corner_id);
// Getting positions for next and previous.
const auto pos_next = this->GetPositionForCorner(c_next);
const auto pos_prev = this->GetPositionForCorner(c_prev);
// Computing delta vectors to next and prev.
const auto delta_next = pos_next - pos_cent;
const auto delta_prev = pos_prev - pos_cent;
// Computing cross product.
const auto cross = CrossProduct(delta_next, delta_prev);
normal = normal + cross;
cit.Next();
}
// Convert to int32_t, make sure entries are not too large.
const int32_t abs_sum = normal.AbsSum();
constexpr int64_t upper_bound = 1 << 29;
if (abs_sum > upper_bound) {
const int64_t quotient = abs_sum / upper_bound;
normal = normal / quotient;
}
DCHECK_LE(normal.AbsSum(), upper_bound);
prediction[0] = static_cast<int32_t>(normal[0]);
prediction[1] = static_cast<int32_t>(normal[1]);
prediction[2] = static_cast<int32_t>(normal[2]);
}
};
} // namespace draco
#endif // DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_PREDICTOR_AREA_H_

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_PREDICTOR_H_
#define DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_PREDICTOR_H_
#ifndef DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_PREDICTOR_BASE_H_
#define DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_PREDICTOR_BASE_H_
#include <math.h>
@ -26,22 +26,23 @@
namespace draco {
// This predictor estimates the normal via the surrounding triangles of the
// given corner. Triangles are weighted according to their area.
// Base class for geometric normal predictors using position attribute.
template <typename DataTypeT, class TransformT, class MeshDataT>
class MeshPredictionSchemeGeometricNormalPredictor {
public:
MeshPredictionSchemeGeometricNormalPredictor(const MeshDataT &md)
class MeshPredictionSchemeGeometricNormalPredictorBase {
protected:
MeshPredictionSchemeGeometricNormalPredictorBase(const MeshDataT &md)
: pos_attribute_(nullptr),
entry_to_point_id_map_(nullptr),
mesh_data_(md) {}
virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
public:
void SetPositionAttribute(const PointAttribute &position_attribute) {
pos_attribute_ = &position_attribute;
}
void SetEntryToPointIdMap(const PointIndex *map) {
entry_to_point_id_map_ = map;
}
bool IsInitialized() const {
if (pos_attribute_ == nullptr)
return false;
@ -50,6 +51,7 @@ class MeshPredictionSchemeGeometricNormalPredictor {
return true;
}
protected:
VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
DCHECK(this->IsInitialized());
const auto point_id = entry_to_point_id_map_[data_id];
@ -65,61 +67,16 @@ class MeshPredictionSchemeGeometricNormalPredictor {
const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
return GetPositionForDataId(data_id);
}
VectorD<int32_t, 2> GetOctahedralCoordForDataId(int data_id,
const DataTypeT *data) const {
DCHECK(this->IsInitialized());
const int data_offset = data_id * 2;
return VectorD<int32_t, 2>(data[data_offset], data[data_offset + 1]);
}
// Computes predicted octahedral coordinates on a given corner.
void ComputePredictedValue(CornerIndex corner_id, DataTypeT *prediction) {
DCHECK(this->IsInitialized());
typedef typename MeshDataT::CornerTable CornerTable;
const CornerTable *const corner_table = mesh_data_.corner_table();
// Going to compute the predicted normal from the surrounding triangles
// according to the connectivity of the given corner table.
VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
// Position of central vertex does not change in loop.
const VectorD<int64_t, 3> pos_cent = GetPositionForCorner(corner_id);
// Computing normals for triangles and adding them up.
virtual void ComputePredictedValue(CornerIndex corner_id,
DataTypeT *prediction) = 0;
VectorD<int64_t, 3> normal;
while (!cit.End()) {
// Getting corners.
const CornerIndex c_next = corner_table->Next(corner_id);
const CornerIndex c_prev = corner_table->Previous(corner_id);
// Getting positions for next and previous.
const auto pos_next = GetPositionForCorner(c_next);
const auto pos_prev = GetPositionForCorner(c_prev);
// Computing delta vectors to next and prev.
const auto delta_next = pos_next - pos_cent;
const auto delta_prev = pos_prev - pos_cent;
// TODO(hemmer): Improve weight function.
// Computing cross product.
const auto cross = CrossProduct(delta_next, delta_prev);
normal = normal + cross;
cit.Next();
}
// Convert to int32_t, make sure entries are not too large.
const int32_t abs_sum = normal.AbsSum();
constexpr int64_t upper_bound = 1 << 29;
if (abs_sum > upper_bound) {
const int64_t quotient = abs_sum / upper_bound;
normal = normal / quotient;
}
DCHECK_LE(normal.AbsSum(), upper_bound);
prediction[0] = static_cast<int32_t>(normal[0]);
prediction[1] = static_cast<int32_t>(normal[1]);
prediction[2] = static_cast<int32_t>(normal[2]);
}
private:
const PointAttribute *pos_attribute_;
const PointIndex *entry_to_point_id_map_;
MeshDataT mesh_data_;
@ -127,4 +84,4 @@ class MeshPredictionSchemeGeometricNormalPredictor {
} // namespace draco
#endif // DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_PREDICTOR_H_
#endif // DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_GEOMETRIC_NORMAL_PREDICTOR_BASE_H_

View File

@ -195,7 +195,9 @@ bool SequentialIntegerAttributeEncoder::PrepareValues(
int32_t *const portable_attribute_data = GetPortableAttributeData();
for (PointIndex pi : point_ids) {
const AttributeValueIndex att_id = attrib->mapped_index(pi);
attrib->ConvertValue<int32_t>(att_id, portable_attribute_data + dst_index);
if (!attrib->ConvertValue<int32_t>(att_id,
portable_attribute_data + dst_index))
return false;
dst_index += num_components;
}
return true;

View File

@ -40,39 +40,47 @@ Status ExpertEncoder::EncodePointCloudToBuffer(const PointCloud &pc,
EncoderBuffer *out_buffer) {
std::unique_ptr<PointCloudEncoder> encoder;
const int encoding_method = options().GetGlobalInt("encoding_method", -1);
if (encoding_method == POINT_CLOUD_KD_TREE_ENCODING ||
(options().GetSpeed() < 10 && pc.num_attributes() == 1)) {
if (encoding_method == POINT_CLOUD_SEQUENTIAL_ENCODING) {
// Use sequential encoding if requested.
encoder.reset(new PointCloudSequentialEncoder());
} else if (encoding_method == -1 && options().GetSpeed() == 10) {
// Use sequential encoding if speed is at max.
encoder.reset(new PointCloudSequentialEncoder());
} else {
// Speed < 10, use POINT_CLOUD_KD_TREE_ENCODING if possible.
const PointAttribute *const att = pc.attribute(0);
bool create_kd_tree_encoder = true;
bool kd_tree_possible = true;
// Kd-Tree encoder can be currently used only under following conditions:
// - Point cloud has one attribute describing positions
// - Position is described by three components (x,y,z)
// - Position data type is one of the following:
// -float32 and quantization is enabled
// -uint32
if (att->attribute_type() != GeometryAttribute::POSITION ||
att->num_components() != 3)
create_kd_tree_encoder = false;
if (create_kd_tree_encoder && att->data_type() != DT_FLOAT32 &&
if (kd_tree_possible &&
att->attribute_type() != GeometryAttribute::POSITION)
kd_tree_possible = false;
if (kd_tree_possible && att->num_components() != 3)
kd_tree_possible = false;
if (kd_tree_possible && att->data_type() != DT_FLOAT32 &&
att->data_type() != DT_UINT32)
create_kd_tree_encoder = false;
if (create_kd_tree_encoder && att->data_type() == DT_FLOAT32 &&
kd_tree_possible = false;
if (kd_tree_possible && att->data_type() == DT_FLOAT32 &&
options().GetAttributeInt(0, "quantization_bits", -1) <= 0)
create_kd_tree_encoder = false; // Quantization not enabled.
if (create_kd_tree_encoder) {
kd_tree_possible = false; // Quantization not enabled.
if (kd_tree_possible) {
// Create kD-tree encoder (all checks passed).
encoder =
std::unique_ptr<PointCloudEncoder>(new PointCloudKdTreeEncoder());
encoder.reset(new PointCloudKdTreeEncoder());
} else if (encoding_method == POINT_CLOUD_KD_TREE_ENCODING) {
// Encoding method was explicitly specified but we cannot use it for the
// given input (some of the checks above failed).
// Encoding method was explicitly specified but we cannot use it for
// the given input (some of the checks above failed).
return Status(Status::ERROR, "Invalid encoding method.");
}
}
if (!encoder) {
// Default choice.
encoder =
std::unique_ptr<PointCloudEncoder>(new PointCloudSequentialEncoder());
encoder.reset(new PointCloudSequentialEncoder());
}
encoder->SetPointCloud(pc);
return encoder->Encode(options(), out_buffer);

View File

@ -313,7 +313,6 @@ static inline int ans_read_init(struct AnsDecoder *const ans,
ans->buf_offset = offset - 3;
ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
} else {
// x == 3 implies this byte is a super frame marker
return 1;
}
ans->state += l_base;

View File

@ -18,7 +18,7 @@
namespace draco {
// Draco version is comprised of <major>.<minor>.<revision>.
static const char kDracoVersion[] = "1.0.0";
static const char kDracoVersion[] = "1.0.1";
const char *Version() { return kDracoVersion; }

View File

@ -24,33 +24,67 @@ namespace draco {
class IoPointCloudIoTest : public ::testing::Test {
protected:
std::unique_ptr<PointCloud> DecodeObj(const std::string &file_name) const {
const std::string path = GetTestFileFullPath(file_name);
std::unique_ptr<PointCloud> pc(new PointCloud());
ObjDecoder decoder;
if (!decoder.DecodeFromFile(path, pc.get()))
return nullptr;
return pc;
void test_compression_method(PointCloudEncodingMethod method,
int expected_num_attributes,
const std::string &file_name) {
const std::unique_ptr<PointCloud> encoded_pc =
ReadPointCloudFromFile(GetTestFileFullPath(file_name));
ASSERT_NE(encoded_pc, nullptr) << "Failed to load test model " << file_name;
ASSERT_GE(encoded_pc->num_attributes(), expected_num_attributes)
<< "Failed to load test model: " << file_name
<< " wrong number of attributes" << std::endl;
// Set quantization.
EncoderOptions options = EncoderOptions::CreateDefaultOptions();
for (int i = 0; i <= GeometryAttribute::NAMED_ATTRIBUTES_COUNT; i++) {
options.SetAttributeInt(GeometryAttribute::Type(i), "quantization_bits",
14);
}
void test_compression_method(PointCloudEncodingMethod method,
const std::string &file_name) {
const std::unique_ptr<PointCloud> pc(DecodeObj(file_name));
ASSERT_NE(pc, nullptr) << "Failed to load test model " << file_name;
std::stringstream ss;
WritePointCloudIntoStream(pc.get(), ss, method);
WritePointCloudIntoStream(encoded_pc.get(), ss, method, options);
ASSERT_TRUE(ss.good());
std::unique_ptr<PointCloud> decoded_pc;
ReadPointCloudFromStream(&decoded_pc, ss);
ASSERT_TRUE(ss.good());
for (int i = 0; i <= GeometryAttribute::NAMED_ATTRIBUTES_COUNT; i++) {
ASSERT_EQ(encoded_pc->NumNamedAttributes(GeometryAttribute::Type(i)),
decoded_pc->NumNamedAttributes(GeometryAttribute::Type(i)));
}
ASSERT_EQ(encoded_pc->num_points(), decoded_pc->num_points());
}
};
TEST_F(IoPointCloudIoTest, EncodeWithBinary) {
test_compression_method(POINT_CLOUD_SEQUENTIAL_ENCODING, "test_nm.obj");
test_compression_method(POINT_CLOUD_SEQUENTIAL_ENCODING, "sphere.obj");
TEST_F(IoPointCloudIoTest, EncodeSequentialPointCloudTestNmObj) {
test_compression_method(POINT_CLOUD_SEQUENTIAL_ENCODING, 2, "test_nm.obj");
}
TEST_F(IoPointCloudIoTest, EncodeSequentialPointCloudTestPosObj) {
test_compression_method(POINT_CLOUD_SEQUENTIAL_ENCODING, 1,
"point_cloud_test_pos.obj");
}
TEST_F(IoPointCloudIoTest, EncodeSequentialPointCloudTestPosPly) {
test_compression_method(POINT_CLOUD_SEQUENTIAL_ENCODING, 1,
"point_cloud_test_pos.ply");
}
TEST_F(IoPointCloudIoTest, EncodeSequentialPointCloudTestPosNormObj) {
test_compression_method(POINT_CLOUD_SEQUENTIAL_ENCODING, 2,
"point_cloud_test_pos_norm.obj");
}
TEST_F(IoPointCloudIoTest, EncodeSequentialPointCloudTestPosNormPly) {
test_compression_method(POINT_CLOUD_SEQUENTIAL_ENCODING, 2,
"point_cloud_test_pos_norm.ply");
}
TEST_F(IoPointCloudIoTest, EncodeKdTreePointCloudTestPosObj) {
test_compression_method(POINT_CLOUD_KD_TREE_ENCODING, 1,
"point_cloud_test_pos.obj");
}
TEST_F(IoPointCloudIoTest, EncodeKdTreePointCloudTestPosPly) {
test_compression_method(POINT_CLOUD_KD_TREE_ENCODING, 1,
"point_cloud_test_pos.ply");
}
TEST_F(IoPointCloudIoTest, ObjFileInput) {
@ -61,4 +95,21 @@ TEST_F(IoPointCloudIoTest, ObjFileInput) {
EXPECT_EQ(pc->num_points(), 97) << "Obj point cloud not loaded properly.";
}
// Test if we handle wrong input for all file extensions.
TEST_F(IoPointCloudIoTest, WrongFileObj) {
const std::unique_ptr<PointCloud> pc =
ReadPointCloudFromFile(GetTestFileFullPath("wrong_file_name.obj"));
ASSERT_EQ(pc, nullptr);
}
TEST_F(IoPointCloudIoTest, WrongFilePly) {
const std::unique_ptr<PointCloud> pc =
ReadPointCloudFromFile(GetTestFileFullPath("wrong_file_name.ply"));
ASSERT_EQ(pc, nullptr);
}
TEST_F(IoPointCloudIoTest, WrongFile) {
const std::unique_ptr<PointCloud> pc =
ReadPointCloudFromFile(GetTestFileFullPath("wrong_file_name"));
ASSERT_EQ(pc, nullptr);
}
} // namespace draco

View File

@ -197,6 +197,28 @@ bool Decoder::GetAttributeFloatForAllPoints(const PointCloud &pc,
return true;
}
bool Decoder::GetAttributeIntForAllPoints(const PointCloud &pc,
const PointAttribute &pa,
DracoInt32Array *out_values) {
const int components = pa.num_components();
const int num_points = pc.num_points();
const int num_entries = num_points * components;
const int kMaxAttributeIntValues = 4;
int values[kMaxAttributeIntValues] = {0, 0, 0, 0};
int entry_id = 0;
out_values->SetValues(nullptr, num_entries);
for (draco::PointIndex i(0); i < num_points; ++i) {
const draco::AttributeValueIndex val_index = pa.mapped_index(i);
if (!pa.ConvertValue<int>(val_index, values))
return false;
for (int j = 0; j < components; ++j) {
out_values->SetValue(entry_id++, values[j]);
}
}
return true;
}
void Decoder::SkipAttributeTransform(draco_GeometryAttribute_Type att_type) {
decoder_.SetSkipAttributeTransform(att_type);
}

View File

@ -73,8 +73,12 @@ class DracoFloat32Array {
class DracoInt32Array {
public:
DracoInt32Array();
int GetValue(int index) const;
bool SetValues(const int *values, int count);
void SetValue(int index, int val) { values_[index] = val; }
int size() const { return values_.size(); }
private:
@ -142,6 +146,12 @@ class Decoder {
const draco::PointAttribute &pa,
DracoFloat32Array *out_values);
// Returns integer attribute values for all point ids of the point cloud.
// I.e., the |out_values| is going to contain m.num_points() entries.
static bool GetAttributeIntForAllPoints(const draco::PointCloud &pc,
const draco::PointAttribute &pa,
DracoInt32Array *out_values);
// Tells the decoder to skip an attribute transform (e.g. dequantization) for
// an attribute of a given type.
void SkipAttributeTransform(draco_GeometryAttribute_Type att_type);

View File

@ -175,5 +175,9 @@ interface Decoder {
boolean GetAttributeFloatForAllPoints([Ref, Const] PointCloud pc,
[Ref, Const] PointAttribute pa,
DracoFloat32Array out_values);
boolean GetAttributeIntForAllPoints([Ref, Const] PointCloud pc,
[Ref, Const] PointAttribute pa,
DracoInt32Array out_values);
void SkipAttributeTransform(draco_GeometryAttribute_Type att_type);
};

22
testdata/point_cloud_test_pos.obj vendored Normal file
View File

@ -0,0 +1,22 @@
####
#
# OBJ File Generated by Meshlab
#
####
# Object point_cloud_test_pos.obj
#
# Vertices: 4
# Faces: 2
#
####
v 38.638046 19.293715 1.344739
v 37.934464 16.675100 3.278329
v 43.772350 8.421069 3.516231
v 44.082806 8.826009 3.492609
# 4 vertices, 0 vertices normals
f 1 2 3
f 2 3 4
# 2 faces, 0 coords texture
# End of File

11
testdata/point_cloud_test_pos.ply vendored Normal file
View File

@ -0,0 +1,11 @@
ply
format binary_little_endian 1.0
comment VCGLIB generated
element vertex 4
property float x
property float y
property float z
element face 0
property list uchar int vertex_indices
end_header
\<5C>B‡YšAh ¬?ä¼Bf…A$ÐQ@ã/B³¼Aî a@ËT0BU7 Aè†_@

26
testdata/point_cloud_test_pos_norm.obj vendored Normal file
View File

@ -0,0 +1,26 @@
####
#
# OBJ File Generated by Meshlab
#
####
# Object point_cloud_test_pos_norm.obj
#
# Vertices: 4
# Faces: 2
#
####
v 38.638046 19.293715 1.344739
vn 38.638046 19.293715 1.344739
v 37.934464 16.675100 3.278329
vn 37.934464 16.675100 3.278329
v 43.772350 8.421069 3.516231
vn 43.772350 8.421069 3.516231
v 44.082806 8.826009 3.492609
vn 44.082806 8.826009 3.492609
# 4 vertices, 4 vertices normals
f 1//1 2//2 3//3
f 2//2 3//3 4//4
# 2 faces, 0 coords texture
# End of File

BIN
testdata/point_cloud_test_pos_norm.ply vendored Normal file

Binary file not shown.