mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-12 03:49:01 +08:00
Updated snapshot to 1.2.4
* Up to 20% faster decoding * Added support for integer attributes to our Javascript Encoder * Fixed issues with THREE.DracoLoader not releasing memory associated with the Draco module * OBJ decoder can now be used to parse pure point clouds * Added Unity plugins to support runtime loading and design-time importing of encoded Draco files
This commit is contained in:
parent
451b56f4c9
commit
5186ec2f7a
@ -36,6 +36,7 @@ option(ENABLE_WASM "" OFF)
|
||||
option(ENABLE_WERROR "" OFF)
|
||||
option(ENABLE_WEXTRA "" OFF)
|
||||
option(IGNORE_EMPTY_BUILD_TYPE "" OFF)
|
||||
option(BUILD_UNITY_PLUGIN "Build plugin library for Unity" OFF)
|
||||
option(BUILD_FOR_GLTF "" OFF)
|
||||
|
||||
if (BUILD_FOR_GLTF)
|
||||
@ -100,6 +101,10 @@ endif ()
|
||||
if (ENABLE_GOMA)
|
||||
set_compiler_launcher(ENABLE_GOMA gomacc)
|
||||
endif ()
|
||||
if (BUILD_UNITY_PLUGIN)
|
||||
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared library for unity plugin.")
|
||||
add_cxx_preproc_definition("BUILD_UNITY_PLUGIN")
|
||||
endif ()
|
||||
|
||||
if(ENABLE_EXTRA_SPEED)
|
||||
if(MSVC)
|
||||
@ -467,7 +472,6 @@ set(draco_io_sources
|
||||
set(draco_mesh_sources
|
||||
"${draco_src_root}/mesh/corner_table.cc"
|
||||
"${draco_src_root}/mesh/corner_table.h"
|
||||
"${draco_src_root}/mesh/corner_table_indices.h"
|
||||
"${draco_src_root}/mesh/corner_table_iterators.h"
|
||||
"${draco_src_root}/mesh/corner_table_traversal_processor.h"
|
||||
"${draco_src_root}/mesh/edgebreaker_observer.h"
|
||||
@ -480,7 +484,6 @@ set(draco_mesh_sources
|
||||
"${draco_src_root}/mesh/mesh_attribute_corner_table.h"
|
||||
"${draco_src_root}/mesh/mesh_cleanup.cc"
|
||||
"${draco_src_root}/mesh/mesh_cleanup.h"
|
||||
"${draco_src_root}/mesh/mesh_indices.h"
|
||||
"${draco_src_root}/mesh/mesh_misc_functions.cc"
|
||||
"${draco_src_root}/mesh/mesh_misc_functions.h"
|
||||
"${draco_src_root}/mesh/mesh_stripifier.cc"
|
||||
@ -573,6 +576,10 @@ set(draco_version_sources
|
||||
"${draco_build_dir}/draco_version.cc"
|
||||
"${draco_build_dir}/draco_version.h")
|
||||
|
||||
set(draco_unity_plug_sources
|
||||
"${draco_src_root}/unity/draco_unity_plugin.cc"
|
||||
"${draco_src_root}/unity/draco_unity_plugin.h")
|
||||
|
||||
include_directories("${draco_root}/src")
|
||||
|
||||
#
|
||||
@ -758,6 +765,8 @@ else ()
|
||||
add_library(draco_points_enc OBJECT
|
||||
${draco_points_common_sources}
|
||||
${draco_points_enc_sources})
|
||||
add_library(draco_unity_plugin OBJECT
|
||||
${draco_unity_plug_sources})
|
||||
|
||||
# Library targets that consume the object collections.
|
||||
add_library(dracodec
|
||||
@ -817,7 +826,30 @@ else ()
|
||||
$<TARGET_OBJECTS:draco_point_cloud>
|
||||
$<TARGET_OBJECTS:draco_points_dec>
|
||||
$<TARGET_OBJECTS:draco_points_enc>)
|
||||
|
||||
if (BUILD_UNITY_PLUGIN)
|
||||
add_library(dracodec_unity
|
||||
MODULE
|
||||
${draco_version_sources}
|
||||
$<TARGET_OBJECTS:draco_unity_plugin>
|
||||
$<TARGET_OBJECTS:draco_attributes>
|
||||
$<TARGET_OBJECTS:draco_compression_attributes_dec>
|
||||
$<TARGET_OBJECTS:draco_compression_decode>
|
||||
$<TARGET_OBJECTS:draco_compression_mesh_dec>
|
||||
$<TARGET_OBJECTS:draco_compression_point_cloud_dec>
|
||||
$<TARGET_OBJECTS:draco_core>
|
||||
$<TARGET_OBJECTS:draco_core_bit_coders>
|
||||
$<TARGET_OBJECTS:draco_dec_config>
|
||||
$<TARGET_OBJECTS:draco_io>
|
||||
$<TARGET_OBJECTS:draco_mesh>
|
||||
$<TARGET_OBJECTS:draco_metadata>
|
||||
$<TARGET_OBJECTS:draco_metadata_dec>
|
||||
$<TARGET_OBJECTS:draco_point_cloud>
|
||||
$<TARGET_OBJECTS:draco_points_dec>)
|
||||
# For Mac, we need to build a .bundle for plugin.
|
||||
if (APPLE)
|
||||
set_target_properties(dracodec_unity PROPERTIES BUNDLE true)
|
||||
endif ()
|
||||
endif ()
|
||||
set(draco_header_only_targets
|
||||
draco_compression_attributes_pred_schemes_dec
|
||||
draco_dec_config
|
||||
@ -832,6 +864,9 @@ else ()
|
||||
set_target_properties(dracodec PROPERTIES SOVERSION 1)
|
||||
set_target_properties(dracoenc PROPERTIES SOVERSION 1)
|
||||
set_target_properties(draco PROPERTIES SOVERSION 1)
|
||||
if (BUILD_UNITY_PLUGIN)
|
||||
set_target_properties(dracodec_unity PROPERTIES SOVERSION 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
extract_version_string("${draco_src_root}/core/draco_version.h" draco_version)
|
||||
@ -886,6 +921,10 @@ else ()
|
||||
# Add install rules for lib and executable targets.
|
||||
install(TARGETS dracodec dracoenc draco
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
if (BUILD_UNITY_PLUGIN)
|
||||
install(TARGETS dracodec_unity
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
endif ()
|
||||
install(TARGETS draco_decoder draco_encoder DESTINATION
|
||||
"${CMAKE_INSTALL_PREFIX}/bin")
|
||||
|
||||
|
@ -5,6 +5,13 @@
|
||||
|
||||
News
|
||||
=======
|
||||
### Version 1.2.4 release
|
||||
* Up to 20% faster decoding
|
||||
* Added support for integer attributes to our Javascript Encoder
|
||||
* Fixed issues with THREE.DracoLoader not releasing memory associated with the Draco module
|
||||
* OBJ decoder can now be used to parse pure point clouds
|
||||
* Added Unity plugins to support runtime loading and design-time importing of encoded Draco files
|
||||
|
||||
### Version 1.2.3 release
|
||||
* Fixed Visual Studio building issue
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -1,125 +1,113 @@
|
||||
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,h,f){e!=Array.prototype&&e!=Object.prototype&&(e[h]=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,h,f,z){if(h){f=$jscomp.global;e=e.split(".");for(z=0;z<e.length-1;z++){var k=e[z];k in f||(f[k]={});f=f[k]}e=e[e.length-1];z=f[e];h=h(z);h!=z&&null!=h&&$jscomp.defineProperty(f,e,{configurable:!0,writable:!0,value:h})}};$jscomp.polyfill("Math.imul",function(e){return e?e:function(e,f){e=Number(e);f=Number(f);var h=e&65535,k=f&65535;return h*k+((e>>>16&65535)*k+h*(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.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 h=0;return $jscomp.iteratorPrototype(function(){return h<e.length?{done:!1,value:e[h++]}:{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 h=e[Symbol.iterator];return h?h.call(e):$jscomp.arrayIterator(e)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
|
||||
$jscomp.polyfill("Promise",function(e){function h(){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;h.prototype.asyncExecute=function(e){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(e);return this};h.prototype.asyncExecuteBatch_=function(){var e=this;this.asyncExecuteFunction(function(){e.executeBatch_()})};var z=$jscomp.global.setTimeout;h.prototype.asyncExecuteFunction=function(e){z(e,
|
||||
0)};h.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(pa){this.asyncThrow_(pa)}}}this.batch_=null};h.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(ha){f.reject(ha)}};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(ha){this.reject_(ha);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 h;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(pa){k.reject(pa)}};k.prototype.then=function(e,f){function h(e,f){return"function"==typeof e?function(f){try{t(e(f))}catch(qa){ia(qa)}}:f}var t,ia,
|
||||
z=new k(function(e,f){t=e;ia=f});this.callWhenSettled_(h(e,t),h(f,ia));return z};k.prototype.catch=function(e){return this.then(void 0,e)};k.prototype.callWhenSettled_=function(e,f){function k(){switch(h.state_){case 1:e(h.result_);break;case 2:f(h.result_);break;default:throw Error("Unexpected state: "+h.state_);}}var h=this;null==this.onSettledCallbacks_?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,h){for(var t=$jscomp.makeIterator(e),z=t.next();!z.done;z=t.next())f(z.value).callWhenSettled_(k,h)})};k.all=function(e){var h=$jscomp.makeIterator(e),t=h.next();return t.done?f([]):new k(function(e,k){function z(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_(z(ba.length-1),k),t=h.next();while(!t.done)})};return k},"es6","es3");
|
||||
var DracoDecoderModule=function(e){function h(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 k(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 ra[a>>1];case "i32":return u[a>>2];case "i64":return u[a>>2];case "float":return xa[a>>
|
||||
2];case "double":return ya[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 ka?ka: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 k,m;g<e;){var h=a[g];"function"===typeof h&&(h=n.getFunctionIndex(h));d=S||b[g];if(0===d)g++;else{"i64"==d&&(d="i32");var l=c+g,p=d;p=p||"i8";"*"===p.charAt(p.length-1)&&(p="i32");switch(p){case "i1":N[l>>0]=h;break;case "i8":N[l>>0]=h;break;case "i16":ra[l>>1]=h;break;case "i32":u[l>>2]=h;break;case "i64":tempI64=[h>>>0,(tempDouble=h,1<=+pb(tempDouble)?0<tempDouble?(qb(+rb(tempDouble/4294967296),4294967295)|0)>>>0:~~+sb((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)];u[l>>2]=
|
||||
tempI64[0];u[l+4>>2]=tempI64[1];break;case "float":xa[l>>2]=h;break;case "double":ya[l>>3]=h;break;default:M("invalid type for setValue: "+p)}m!==d&&(k=n.getNativeTypeSize(d),m=d);g+=k}}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 Da(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 ha(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 pa(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=ha(g)+1;var f=ka(e);Da(g,G,f,e);var h=ka(4);var l=d(f,0,0,h);if(0===k(h,"i32")&&l){var m=t(l);break a}}catch(xd){}finally{f&&
|
||||
Ha(f),h&&Ha(h),l&&Ha(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 ia(){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 pa(d)}function Ea(a,b){0<a%b&&(a+=b-a%b);return a}function ba(){a.HEAP8=N=new Int8Array(H);a.HEAP16=ra=new Int16Array(H);a.HEAP32=u=new Int32Array(H);
|
||||
a.HEAPU8=G=new Uint8Array(H);a.HEAPU16=Va=new Uint16Array(H);a.HEAPU32=Wa=new Uint32Array(H);a.HEAPF32=xa=new Float32Array(H);a.HEAPF64=ya=new Float64Array(H)}function Ua(){var d=a.usingWasm?Ia:Xa,b=2147483648-d;if(u[Y>>2]>b)return!1;var c=x;for(x=Math.max(x,tb);x<u[Y>>2];)x=536870912>=x?Ea(2*x,d):Math.min(Ea((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 ja(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 qa(a,b,c){c=0<c?c:ha(a)+1;c=Array(c);a=Da(a,c,0,c.length);b&&(c.length=a);return c}function Ya(d){ea++;a.monitorRunDependencies&&a.monitorRunDependencies(ea)}function Za(d){ea--;a.monitorRunDependencies&&a.monitorRunDependencies(ea);0==ea&&(null!==Ja&&(clearInterval(Ja),Ja=null),sa&&(d=sa,sa=null,d()))}function la(){return!!la.uncaught_exception}function ta(){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);ta.buffer||(ta.buffer=ka(4));u[ta.buffer>>2]=d;d=ta.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 ua(d,b){ua.seen||(ua.seen={});d in ua.seen||(a.dynCall_v(b),ua.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 g=d=0;c[g];)++g;if(16<g-d&&c.subarray&&$a)d=$a.decode(c.subarray(d,g));else for(g="";;){var e=c[d++];if(!e){d=g;break a}if(e&128){var h=c[d++]&63;if(192==(e&224))g+=String.fromCharCode((e&31)<<6|h);else{var k=c[d++]&63;if(224==(e&240))e=(e&15)<<12|h<<6|k;else{var l=c[d++]&63;if(240==(e&248))e=(e&7)<<18|h<<12|k<<6|l;else{var A=c[d++]&63;if(248==(e&252))e=
|
||||
(e&3)<<24|h<<18|k<<12|l<<6|A;else{var m=c[d++]&63;e=(e&1)<<30|h<<24|k<<18|l<<12|A<<6|m}}}65536>e?g+=String.fromCharCode(e):(e-=65536,g+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else g+=String.fromCharCode(e)}}b(d);c.length=0}else c.push(d)});for(b=0;b<e;b++){for(var h=u[g+8*b>>2],k=u[g+(8*b+4)>>2],l=0;l<k;l++)ca.printChar(c,G[h+l]);d+=k}return d}catch(Ga){return"undefined"!==typeof FS&&Ga instanceof FS.ErrnoError||M(Ga),-Ga.errno}}function ma(a){this.name="ExitStatus";this.message="Program terminated with exit("+
|
||||
a+")";this.status=a}function Ka(d){function b(){if(!a.calledRun&&(a.calledRun=!0,!na)){za||(za=!0,ja(La));ja(ab);if(a.onRuntimeInitialized)a.onRuntimeInitialized();a._main&&bb&&a.callMain(d);if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)cb.unshift(a.postRun.shift());ja(cb)}}d=d||a.arguments;null===db&&(db=Date.now());if(!(0<ea)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)eb.unshift(a.preRun.shift());ja(eb);0<ea||a.calledRun||
|
||||
(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function fb(d,b){if(!b||!a.noExitRuntime){if(!a.noExitRuntime&&(na=!0,T=ub,ja(gb),a.onExit))a.onExit(d);oa&&process.exit(d);a.quit(d,new ma(d))}}function M(d){if(a.onAbort)a.onAbort(d);void 0!==d?(a.print(d),a.printErr(d),d=JSON.stringify(d)):d="";na=!0;var b="abort("+d+") at "+ia()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";hb&&
|
||||
hb.forEach(function(a){b=a(b,d)});throw b;}function v(){}function E(a){return(a||v).__cache__}function V(a,b){var d=E(b),e=d[a];if(e)return e;e=Object.create((b||v).prototype);e.ptr=a;return d[a]=e}function Z(a){if("string"===typeof a){a=qa(a);var b=l.alloc(a,N);l.copy(a,N,b);return b}return a}function D(){throw"cannot construct a Status, no constructor in IDL";}function I(){this.ptr=vb();E(I)[this.ptr]=this}function J(){this.ptr=wb();E(J)[this.ptr]=this}function p(){this.ptr=xb();E(p)[this.ptr]=
|
||||
this}function O(){this.ptr=yb();E(O)[this.ptr]=this}function B(){this.ptr=zb();E(B)[this.ptr]=this}function q(){this.ptr=Ab();E(q)[this.ptr]=this}function K(){this.ptr=Bb();E(K)[this.ptr]=this}function W(){this.ptr=Cb();E(W)[this.ptr]=this}function P(){this.ptr=Db();E(P)[this.ptr]=this}function m(){this.ptr=Eb();E(m)[this.ptr]=this}function F(){this.ptr=Fb();E(F)[this.ptr]=this}function aa(){throw"cannot construct a VoidPtr, no constructor in IDL";}function L(){this.ptr=Gb();E(L)[this.ptr]=this}function Q(){this.ptr=
|
||||
Hb();E(Q)[this.ptr]=this}var a=e=e||{},ib=!1,jb=!1;a.onRuntimeInitialized=function(){ib=!0;if(jb&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){jb=!0;if(ib&&"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]&&2>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};a||(a=("undefined"!==typeof e?e:null)||{});var va={},da;for(da in a)a.hasOwnProperty(da)&&
|
||||
(va[da]=a[da]);var wa=!1,fa=!1,oa=!1,Aa=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)wa=!0;else if("WORKER"===a.ENVIRONMENT)fa=!0;else if("NODE"===a.ENVIRONMENT)oa=!0;else if("SHELL"===a.ENVIRONMENT)Aa=!0;else throw Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else wa="object"===typeof window,fa="function"===typeof importScripts,oa="object"===typeof process&&"function"===typeof require&&!wa&&!fa,Aa=!wa&&!oa&&!fa;if(oa){a.print||(a.print=
|
||||
console.log);a.printErr||(a.printErr=console.warn);var Ma,Na;a.read=function(a,b){Ma||(Ma=require("fs"));Na||(Na=require("path"));a=Na.normalize(a);a=Ma.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){h(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 ma))throw a;});a.inspect=function(){return"[Emscripten Module object]"}}else if(Aa)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(wa||fa)a.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},fa&&(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){}),fa&&(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){h(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 va)va.hasOwnProperty(da)&&(a[da]=va[da]);va=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,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=X;X=X+a|0;X=X+15&-16;return b},dynamicAlloc:function(a){var b=u[Y>>2];a=(b+a+15|0)&-16;u[Y>>2]=a;return a>=x&&!Ua()?(u[Y>>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},na=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);Da(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 $a="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");var Ia=65536,Xa=16777216,tb=16777216,N,G,ra,Va,u,Wa,xa,ya,X,Oa,T,Ba,Pa,Y;var Qa=X=Oa=T=Ba=Pa=Y=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 Ib(b)?
|
||||
b:!1});try{var Ra=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Ra(new ArrayBuffer(4))}catch(d){Ra=function(a){return a.byteLength}}var Sa=a.TOTAL_STACK||5242880,x=a.TOTAL_MEMORY||16777216;x<Sa&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+x+"! (TOTAL_STACK="+Sa+")");if(a.buffer)var H=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:x/Ia}),H=
|
||||
a.wasmMemory.buffer):H=new ArrayBuffer(x);ba();u[0]=1668509029;ra[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=ra;a.HEAP32=u;a.HEAPU8=G;a.HEAPU16=Va;a.HEAPU32=Wa;a.HEAPF32=xa;a.HEAPF64=ya;var eb=[],La=[],ab=[],gb=[],cb=[],za=!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 kb=
|
||||
new Float32Array(1);Math.fround=function(a){kb[0]=a;return kb[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 pb=Math.abs,sb=Math.ceil,rb=Math.floor,qb=Math.min,ea=0,Ja=null,sa=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(Jb){M(Jb)}}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;Za("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;Ya("wasm-instantiate");if(d.instantiateWasm)try{return d.instantiateWasm(t,g)}catch(Kb){return d.printErr("Module.instantiateWasm callback failed with error: "+Kb),!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=Ea(a,d.usingWasm?Ia:Xa);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);Qa=n.GLOBAL_BASE;X=Qa+23504;La.push();U=0<=a.wasmJSMethod.indexOf("asmjs")||0<=a.wasmJSMethod.indexOf("interpret-asm2wasm")?"draco_decoder.js.mem":null;a.STATIC_BASE=Qa;a.STATIC_BUMP=23504;var Lb=X;X+=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=Mb;a._memcpy=Nb;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())}},Ca={};a._sbrk=Ob;a._memmove=Pb;var Ta=1;a._llvm_bswap_i32=Qb;gb.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)}});Y=R(1,"i32",2);Oa=T=n.alignMemory(X);Ba=Oa+Sa;Pa=n.alignMemory(Ba);u[Y>>2]=Pa;a.wasmTableSize=492;a.wasmMaxTableSize=492;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:Ra};a.asmLibraryArg={abort:M,assert:f,enlargeMemory:Ua,
|
||||
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(Fa){if("number"!==typeof Fa&&"longjmp"!==Fa)throw Fa;a.setThrew(1,0)}},_pthread_getspecific:function(a){return Ca[a]||0},___syscall54:function(a,b){r.varargs=b;return 0},_pthread_setspecific:function(a,b){if(!(a in Ca))return 22;Ca[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 la?la.uncaught_exception++:la.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,la.uncaught_exception--);b&&(b.rethrown=!1);C.caught.push(a);C.addRef(C.deAdjust(a));return a},___syscall146:ca,_pthread_once:ua,_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]=Ta;Ca[Ta]=0;
|
||||
Ta++;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:ta,___assert_fail:function(a,b,c,e){na=!0;throw"Assertion failed: "+t(a)+", at: "+[b?t(b):"unknown filename",c,e?t(e):"unknown function"]+" at "+ia();},___cxa_pure_virtual:function(){na=!0;throw"Pure virtual function called!";},___cxa_allocate_exception:function(a){return ka(a)},__ZSt18uncaught_exceptionv:la,DYNAMICTOP_PTR:Y,tempDoublePtr:Lb,ABORT:na,STACKTOP:T,STACK_MAX:Ba};var lb=a.asm(a.asmGlobalArg,a.asmLibraryArg,H);a.asm=lb;var Rb=a._emscripten_bind_Decoder_GetAttributeFloat_3=
|
||||
function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Sb=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Tb=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Ub=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm._emscripten_bind_DecoderBuffer_Init_2.apply(null,
|
||||
arguments)},Vb=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Wb=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},Ob=a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)},Nb=a._memcpy=function(){return a.asm._memcpy.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};
|
||||
var Xb=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},Yb=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},Zb=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},$b=a._emscripten_bind_Status_ok_0=
|
||||
function(){return a.asm._emscripten_bind_Status_ok_0.apply(null,arguments)},ac=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm._emscripten_bind_Mesh_num_faces_0.apply(null,arguments)};a._emscripten_get_global_libc=function(){return a.asm._emscripten_get_global_libc.apply(null,arguments)};var bc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},cc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=
|
||||
function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)};a.runPostSets=function(){return a.asm.runPostSets.apply(null,arguments)};var dc=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return a.asm._emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)};a.___cxa_can_catch=function(){return a.asm.___cxa_can_catch.apply(null,arguments)};var Ha=a._free=function(){return a.asm._free.apply(null,arguments)},ec=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=
|
||||
function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,arguments)},fc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm._emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},gc=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_stride_0.apply(null,arguments)},Hb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm._emscripten_bind_Metadata_Metadata_0.apply(null,
|
||||
arguments)},hc=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},Eb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm._emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},ic=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},jc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=
|
||||
function(){return a.asm._emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},kc=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm._emscripten_bind_Decoder___destroy___0.apply(null,arguments)},lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)};a.getTempRet0=function(){return a.asm.getTempRet0.apply(null,arguments)};
|
||||
a.setThrew=function(){return a.asm.setThrew.apply(null,arguments)};var mc=a._emscripten_bind_MetadataQuerier_HasStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasStringEntry_2.apply(null,arguments)},nc=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm._emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},oc=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm._emscripten_bind_PointAttribute_num_components_0.apply(null,
|
||||
arguments)};a.___cxa_is_pointer_type=function(){return a.asm.___cxa_is_pointer_type.apply(null,arguments)};var yb=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return a.asm._emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},pc=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,
|
||||
arguments)};var qc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},rc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm._emscripten_bind_Mesh_num_points_0.apply(null,arguments)},sc=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm._emscripten_bind_PointCloud_num_attributes_0.apply(null,arguments)},Fb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm._emscripten_bind_Mesh_Mesh_0.apply(null,
|
||||
arguments)},Ab=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm._emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},vc=a._emscripten_bind_MetadataQuerier_HasDoubleEntry_2=
|
||||
function(){return a.asm._emscripten_bind_MetadataQuerier_HasDoubleEntry_2.apply(null,arguments)},wc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},xc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm._emscripten_bind_Mesh_num_attributes_0.apply(null,arguments)},yc=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,
|
||||
arguments)},zc=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},Qb=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)},Db=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_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)},Mb=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_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,
|
||||
arguments)};a.setTempRet0=function(){return a.asm.setTempRet0.apply(null,arguments)};var Gb=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_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},Cb=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)},ka=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)},Ib=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)},
|
||||
Pb=a._memmove=function(){return a.asm._memmove.apply(null,arguments)},vb=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)},zb=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)},wb=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},Bb=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)},xb=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=lb;if(U)if("function"===typeof a.locateFile?U=a.locateFile(U):a.memoryInitializerPrefixURL&&(U=a.memoryInitializerPrefixURL+U),oa||Aa){var wd=a.readBinary(U);G.set(wd,n.GLOBAL_BASE)}else{var nb=function(){a.readAsync(U,mb,function(){throw"could not load memory initializer "+
|
||||
U;})};Ya("memory initializer");var mb=function(d){d.byteLength&&(d=new Uint8Array(d));G.set(d,n.GLOBAL_BASE);a.memoryInitializerRequest&&delete a.memoryInitializerRequest.response;Za("memory initializer")};if(a.memoryInitializerRequest){var ob=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),nb()):mb(d.response)};a.memoryInitializerRequest.response?setTimeout(ob,
|
||||
0):a.memoryInitializerRequest.addEventListener("load",ob)}else nb()}a.then=function(d){if(a.calledRun)d(a);else{var b=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){b&&b();d(a)}}return a};ma.prototype=Error();ma.prototype.constructor=ma;var ub,db=null;sa=function b(){a.calledRun||Ka();a.calledRun||(sa=b)};a.callMain=a.callMain=function(b){function c(){for(var a=0;3>a;a++)f.push(0)}b=b||[];za||(za=!0,ja(La));var e=b.length+1,f=[R(qa(a.thisProgram),"i8",0)];c();for(var h=0;h<e-1;h+=1)f.push(R(qa(b[h]),
|
||||
"i8",0)),c();f.push(0);f=R(f,"i32",0);try{var k=a._main(e,f,0);fb(k,!0)}catch(y){y instanceof ma||("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=Ka;a.exit=a.exit=fb;var hb=[];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 bb=!0;a.noInitialRun&&(bb=!1);Ka();v.prototype=Object.create(v.prototype);
|
||||
v.prototype.constructor=v;v.prototype.__class__=v;v.__cache__={};a.WrapperObject=v;a.getCache=E;a.wrapPointer=V;a.castObject=function(a,c){return V(a.ptr,c)};a.NULL=V(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 l={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(l.needed){for(var b=
|
||||
0;b<l.temps.length;b++)a._free(l.temps[b]);l.temps.length=0;a._free(l.buffer);l.buffer=0;l.size+=l.needed;l.needed=0}l.buffer||(l.size+=128,l.buffer=a._malloc(l.size),f(l.buffer));l.pos=0},alloc:function(b,c){f(l.buffer);b=b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;l.pos+b>=l.size?(f(0<b),l.needed+=b,c=a._malloc(b),l.temps.push(c)):(c=l.buffer+l.pos,l.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!!$b(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 sc(this.ptr)};I.prototype.num_points=I.prototype.num_points=function(){return Xc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Uc(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 Vb(this.ptr)};p.prototype.GetAttributeTransformData=p.prototype.GetAttributeTransformData=function(){return V(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 oc(this.ptr)};p.prototype.normalized=p.prototype.normalized=function(){return!!Sb(this.ptr)};p.prototype.byte_stride=p.prototype.byte_stride=function(){return gc(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(){nc(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 hc(b,a)};B.prototype.range=B.prototype.range=function(){return jd(this.ptr)};B.prototype.__destroy__=B.prototype.__destroy__=function(){pc(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;l.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;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return jc(b,a,c)};q.prototype.HasDoubleEntry=q.prototype.HasDoubleEntry=
|
||||
function(a,c){var b=this.ptr;l.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;l.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;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return!!mc(b,a,c)};q.prototype.GetStringEntry=
|
||||
q.prototype.GetStringEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return t(ic(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)};W.prototype=Object.create(v.prototype);W.prototype.constructor=W;W.prototype.__class__=W;W.__cache__={};a.GeometryAttribute=W;W.prototype.__destroy__=W.prototype.__destroy__=function(){fc(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;l.prepare();
|
||||
if("object"==typeof a&&"object"===typeof a){var e=l.alloc(a,N);l.copy(a,N,e);a=e}c&&"object"===typeof c&&(c=c.ptr);Ub(b,a,c)};P.prototype.__destroy__=P.prototype.__destroy__=function(){Sc(this.ptr)};m.prototype=Object.create(v.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.Decoder=m;m.prototype.GetEncodedGeometryType=m.prototype.GetEncodedGeometryType=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return dc(b,a)};m.prototype.DecodeBufferToPointCloud=m.prototype.DecodeBufferToPointCloud=
|
||||
function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return V(bc(b,a,c),D)};m.prototype.DecodeBufferToMesh=m.prototype.DecodeBufferToMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return V(pd(b,a,c),D)};m.prototype.GetAttributeId=m.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)};m.prototype.GetAttributeIdByName=
|
||||
m.prototype.GetAttributeIdByName=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return Yb(b,a,c)};m.prototype.GetAttributeIdByMetadataEntry=m.prototype.GetAttributeIdByMetadataEntry=function(a,c,e){var b=this.ptr;l.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)};m.prototype.GetAttribute=m.prototype.GetAttribute=function(a,c){var b=this.ptr;a&&"object"===
|
||||
typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return V(Tc(b,a,c),p)};m.prototype.GetAttributeByUniqueId=m.prototype.GetAttributeByUniqueId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return V(tc(b,a,c),p)};m.prototype.GetMetadata=m.prototype.GetMetadata=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return V(rd(b,a),Q)};m.prototype.GetAttributeMetadata=m.prototype.GetAttributeMetadata=function(a,c){var b=this.ptr;a&&"object"===
|
||||
typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return V(Ac(b,a,c),Q)};m.prototype.GetFaceFromMesh=m.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)};m.prototype.GetTriangleStripsFromMesh=m.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)};m.prototype.GetAttributeFloat=
|
||||
m.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!!Rb(b,a,c,e)};m.prototype.GetAttributeFloatForAllPoints=m.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!!Tb(b,a,c,e)};m.prototype.GetAttributeIntForAllPoints=m.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)};m.prototype.SkipAttributeTransform=m.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Hc(b,a)};m.prototype.__destroy__=m.prototype.__destroy__=function(){kc(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 ac(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 rc(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(){qc(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=ec();a.POINT_CLOUD=Zb();a.TRIANGULAR_MESH=Yc();a.ATTRIBUTE_INVALID_TRANSFORM=id();a.ATTRIBUTE_NO_TRANSFORM=cc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Ic();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=lc();a.INVALID=Xb();a.POSITION=Wb();a.NORMAL=sd();a.COLOR=Nc();a.TEX_COORD=Fc();a.GENERIC=od()}a.calledRun?
|
||||
b():ab.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return e};"object"===typeof module&&module.exports&&(module.exports=DracoDecoderModule);
|
||||
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(c,f,n){c!=Array.prototype&&c!=Object.prototype&&(c[f]=n.value)};$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);
|
||||
$jscomp.polyfill=function(c,f,n,D){if(f){n=$jscomp.global;c=c.split(".");for(D=0;D<c.length-1;D++){var g=c[D];g in n||(n[g]={});n=n[g]}c=c[c.length-1];D=n[c];f=f(D);f!=D&&null!=f&&$jscomp.defineProperty(n,c,{configurable:!0,writable:!0,value:f})}};$jscomp.polyfill("Math.imul",function(c){return c?c:function(f,c){f=Number(f);c=Number(c);var n=f&65535,g=c&65535;return n*g+((f>>>16&65535)*g+n*(c>>>16&65535)<<16>>>0)|0}},"es6","es3");
|
||||
$jscomp.polyfill("Math.clz32",function(c){return c?c:function(f){f=Number(f)>>>0;if(0===f)return 32;var c=0;0===(f&4294901760)&&(f<<=16,c+=16);0===(f&4278190080)&&(f<<=8,c+=8);0===(f&4026531840)&&(f<<=4,c+=4);0===(f&3221225472)&&(f<<=2,c+=2);0===(f&2147483648)&&c++;return c}},"es6","es3");$jscomp.polyfill("Math.trunc",function(c){return c?c:function(c){c=Number(c);if(isNaN(c)||Infinity===c||-Infinity===c||0===c)return c;var f=Math.floor(Math.abs(c));return 0>c?-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(c){return $jscomp.SYMBOL_PREFIX+(c||"")+$jscomp.symbolCounter_++};
|
||||
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var c=$jscomp.global.Symbol.iterator;c||(c=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[c]&&$jscomp.defineProperty(Array.prototype,c,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(c){var f=0;return $jscomp.iteratorPrototype(function(){return f<c.length?{done:!1,value:c[f++]}:{done:!0}})};
|
||||
$jscomp.iteratorPrototype=function(c){$jscomp.initSymbolIterator();c={next:c};c[$jscomp.global.Symbol.iterator]=function(){return this};return c};$jscomp.makeIterator=function(c){$jscomp.initSymbolIterator();var f=c[Symbol.iterator];return f?f.call(c):$jscomp.arrayIterator(c)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
|
||||
$jscomp.polyfill("Promise",function(c){function f(){this.batch_=null}function n(c){return c instanceof g?c:new g(function(f,R){f(c)})}if(c&&!$jscomp.FORCE_POLYFILL_PROMISE)return c;f.prototype.asyncExecute=function(c){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(c);return this};f.prototype.asyncExecuteBatch_=function(){var c=this;this.asyncExecuteFunction(function(){c.executeBatch_()})};var D=$jscomp.global.setTimeout;f.prototype.asyncExecuteFunction=function(c){D(c,
|
||||
0)};f.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var c=this.batch_;this.batch_=[];for(var f=0;f<c.length;++f){var g=c[f];delete c[f];try{g()}catch(v){this.asyncThrow_(v)}}}this.batch_=null};f.prototype.asyncThrow_=function(c){this.asyncExecuteFunction(function(){throw c;})};var g=function(c){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var f=this.createResolveAndReject_();try{c(f.resolve,f.reject)}catch(u){f.reject(u)}};g.prototype.createResolveAndReject_=
|
||||
function(){function c(c){return function(R){g||(g=!0,c.call(f,R))}}var f=this,g=!1;return{resolve:c(this.resolveTo_),reject:c(this.reject_)}};g.prototype.resolveTo_=function(c){if(c===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(c instanceof g)this.settleSameAsPromise_(c);else{a:switch(typeof c){case "object":var f=null!=c;break a;case "function":f=!0;break a;default:f=!1}f?this.resolveToNonPromiseObj_(c):this.fulfill_(c)}};g.prototype.resolveToNonPromiseObj_=function(c){var f=
|
||||
void 0;try{f=c.then}catch(u){this.reject_(u);return}"function"==typeof f?this.settleSameAsThenable_(f,c):this.fulfill_(c)};g.prototype.reject_=function(c){this.settle_(2,c)};g.prototype.fulfill_=function(c){this.settle_(1,c)};g.prototype.settle_=function(c,f){if(0!=this.state_)throw Error("Cannot settle("+c+", "+f|"): Promise already settled in state"+this.state_);this.state_=c;this.result_=f;this.executeOnSettledCallbacks_()};g.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var c=
|
||||
this.onSettledCallbacks_,f=0;f<c.length;++f)c[f].call(),c[f]=null;this.onSettledCallbacks_=null}};var ha=new f;g.prototype.settleSameAsPromise_=function(c){var f=this.createResolveAndReject_();c.callWhenSettled_(f.resolve,f.reject)};g.prototype.settleSameAsThenable_=function(c,f){var g=this.createResolveAndReject_();try{c.call(f,g.resolve,g.reject)}catch(v){g.reject(v)}};g.prototype.then=function(c,f){function n(c,f){return"function"==typeof c?function(f){try{v(c(f))}catch(aa){R(aa)}}:f}var v,R,D=
|
||||
new g(function(c,f){v=c;R=f});this.callWhenSettled_(n(c,v),n(f,R));return D};g.prototype.catch=function(c){return this.then(void 0,c)};g.prototype.callWhenSettled_=function(c,f){function g(){switch(n.state_){case 1:c(n.result_);break;case 2:f(n.result_);break;default:throw Error("Unexpected state: "+n.state_);}}var n=this;null==this.onSettledCallbacks_?ha.asyncExecute(g):this.onSettledCallbacks_.push(function(){ha.asyncExecute(g)})};g.resolve=n;g.reject=function(c){return new g(function(f,g){g(c)})};
|
||||
g.race=function(c){return new g(function(f,g){for(var v=$jscomp.makeIterator(c),u=v.next();!u.done;u=v.next())n(u.value).callWhenSettled_(f,g)})};g.all=function(c){var f=$jscomp.makeIterator(c),u=f.next();return u.done?n([]):new g(function(c,g){function D(f){return function(g){v[f]=g;L--;0==L&&c(v)}}var v=[],L=0;do v.push(void 0),L++,n(u.value).callWhenSettled_(D(v.length-1),g),u=f.next();while(!u.done)})};return g},"es6","es3");
|
||||
var DracoDecoderModule=function(c){function f(a,b){a||S("Assertion failed: "+b)}function n(e,b){if(0===b||!e)return"";for(var d=0,l,c=0;;){l=O[e+c>>0];d|=l;if(0==l&&!b)break;c++;if(b&&c==b)break}b||(b=c);l="";if(128>d){for(;0<b;)d=String.fromCharCode.apply(String,O.subarray(e,e+Math.min(b,1024))),l=l?l+d:d,e+=1024,b-=1024;return l}return a.UTF8ToString(e)}function D(a){return a.replace(/__Z[\w\d_]+/g,function(a){return a===a?a:a+" ["+a+"]"})}function g(){a:{var e=Error();if(!e.stack){try{throw Error(0);
|
||||
}catch(b){e=b}if(!e.stack){e="(no stack trace available)";break a}}e=e.stack.toString()}a.extraStackTrace&&(e+="\n"+a.extraStackTrace());return D(e)}function ha(a,b){0<a%b&&(a+=b-a%b);return a}function R(){a.HEAP8=ba=new Int8Array(E);a.HEAP16=ua=new Int16Array(E);a.HEAP32=w=new Int32Array(E);a.HEAPU8=O=new Uint8Array(E);a.HEAPU16=Ja=new Uint16Array(E);a.HEAPU32=Ka=new Uint32Array(E);a.HEAPF32=La=new Float32Array(E);a.HEAPF64=Ma=new Float64Array(E)}function Ha(){var e=a.usingWasm?va:Na,b=2147483648-
|
||||
e;if(w[W>>2]>b)return!1;var d=x;for(x=Math.max(x,db);x<w[W>>2];)x=536870912>=x?ha(2*x,e):Math.min(ha((3*x+2147483648)/4,e),b);e=a.reallocBuffer(x);if(!e||e.byteLength!=x)return x=d,!1;a.buffer=E=e;R();return!0}function u(e){for(;0<e.length;){var b=e.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 v(e){ca++;a.monitorRunDependencies&&a.monitorRunDependencies(ca)}function Ia(e){ca--;
|
||||
a.monitorRunDependencies&&a.monitorRunDependencies(ca);0==ca&&(null!==wa&&(clearInterval(wa),wa=null),oa&&(e=oa,oa=null,e()))}function ia(){return!!ia.uncaught_exception}function ma(){var e=z.last;if(!e)return(m.setTempRet0(0),0)|0;var b=z.infos[e],d=b.type;if(!d)return(m.setTempRet0(0),e)|0;var l=Array.prototype.slice.call(arguments);a.___cxa_is_pointer_type(d);ma.buffer||(ma.buffer=Oa(4));w[ma.buffer>>2]=e;e=ma.buffer;for(var c=0;c<l.length;c++)if(l[c]&&a.___cxa_can_catch(l[c],d,e))return e=w[e>>
|
||||
2],b.adjusted=e,(m.setTempRet0(l[c]),e)|0;e=w[e>>2];return(m.setTempRet0(d),e)|0}function L(e,b){t.varargs=b;try{var d=t.get(),l=t.get(),c=t.get();e=0;L.buffer||(L.buffers=[null,[],[]],L.printChar=function(b,e){var d=L.buffers[b];f(d);if(0===e||10===e){b=1===b?a.print:a.printErr;a:{for(var l=e=0;d[l];)++l;if(16<l-e&&d.subarray&&Pa)e=Pa.decode(d.subarray(e,l));else for(l="";;){var c=d[e++];if(!c){e=l;break a}if(c&128){var g=d[e++]&63;if(192==(c&224))l+=String.fromCharCode((c&31)<<6|g);else{var h=d[e++]&
|
||||
63;if(224==(c&240))c=(c&15)<<12|g<<6|h;else{var F=d[e++]&63;if(240==(c&248))c=(c&7)<<18|g<<12|h<<6|F;else{var k=d[e++]&63;if(248==(c&252))c=(c&3)<<24|g<<18|h<<12|F<<6|k;else{var pa=d[e++]&63;c=(c&1)<<30|g<<24|h<<18|F<<12|k<<6|pa}}}65536>c?l+=String.fromCharCode(c):(c-=65536,l+=String.fromCharCode(55296|c>>10,56320|c&1023))}}else l+=String.fromCharCode(c)}}b(e);d.length=0}else d.push(e)});for(b=0;b<c;b++){for(var g=w[l+8*b>>2],h=w[l+(8*b+4)>>2],k=0;k<h;k++)L.printChar(d,O[g+k]);e+=h}return e}catch(xa){return"undefined"!==
|
||||
typeof FS&&xa instanceof FS.ErrnoError||S(xa),-xa.errno}}function na(e,b){na.seen||(na.seen={});e in na.seen||(a.dynCall_v(b),na.seen[e]=1)}function aa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function ya(e){function b(){if(!a.calledRun&&(a.calledRun=!0,!ja)){Qa||(Qa=!0,u(Ra));u(Sa);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Ta.unshift(a.postRun.shift());
|
||||
u(Ta)}}null===Ua&&(Ua=Date.now());if(!(0<ca)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Va.unshift(a.preRun.shift());u(Va);0<ca||a.calledRun||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function S(e){if(a.onAbort)a.onAbort(e);void 0!==e?(a.print(e),a.printErr(e),e=JSON.stringify(e)):e="";ja=!0;var b="abort("+e+") at "+g()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";
|
||||
Wa&&Wa.forEach(function(a){b=a(b,e)});throw b;}function q(){}function B(a){return(a||q).__cache__}function T(a,b){var e=B(b),c=e[a];if(c)return c;c=Object.create((b||q).prototype);c.ptr=a;return e[a]=c}function X(a){if("string"===typeof a){for(var b=0,e=0;e<a.length;++e){var c=a.charCodeAt(e);55296<=c&&57343>=c&&(c=65536+((c&1023)<<10)|a.charCodeAt(++e)&1023);127>=c?++b:b=2047>=c?b+2:65535>=c?b+3:2097151>=c?b+4:67108863>=c?b+5:b+6}b=Array(b+1);e=0;c=b.length;if(0<c){c=e+c-1;for(var f=0;f<a.length;++f){var g=
|
||||
a.charCodeAt(f);55296<=g&&57343>=g&&(g=65536+((g&1023)<<10)|a.charCodeAt(++f)&1023);if(127>=g){if(e>=c)break;b[e++]=g}else{if(2047>=g){if(e+1>=c)break;b[e++]=192|g>>6}else{if(65535>=g){if(e+2>=c)break;b[e++]=224|g>>12}else{if(2097151>=g){if(e+3>=c)break;b[e++]=240|g>>18}else{if(67108863>=g){if(e+4>=c)break;b[e++]=248|g>>24}else{if(e+5>=c)break;b[e++]=252|g>>30;b[e++]=128|g>>24&63}b[e++]=128|g>>18&63}b[e++]=128|g>>12&63}b[e++]=128|g>>6&63}b[e++]=128|g&63}}b[e]=0}a=k.alloc(b,ba);k.copy(b,ba,a)}return a}
|
||||
function A(){throw"cannot construct a Status, no constructor in IDL";}function G(){this.ptr=gb();B(G)[this.ptr]=this}function H(){this.ptr=hb();B(H)[this.ptr]=this}function p(){this.ptr=ib();B(p)[this.ptr]=this}function K(){this.ptr=jb();B(K)[this.ptr]=this}function y(){this.ptr=kb();B(y)[this.ptr]=this}function r(){this.ptr=lb();B(r)[this.ptr]=this}function I(){this.ptr=mb();B(I)[this.ptr]=this}function U(){this.ptr=nb();B(U)[this.ptr]=this}function M(){this.ptr=ob();B(M)[this.ptr]=this}function h(){this.ptr=
|
||||
pb();B(h)[this.ptr]=this}function C(){this.ptr=qb();B(C)[this.ptr]=this}function Y(){throw"cannot construct a VoidPtr, no constructor in IDL";}function J(){this.ptr=rb();B(J)[this.ptr]=this}function N(){this.ptr=sb();B(N)[this.ptr]=this}var a=c=c||{},Xa=!1,Ya=!1;a.onRuntimeInitialized=function(){Xa=!0;if(Ya&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ya=!0;if(Xa&&"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]&&2>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};a||(a=("undefined"!==typeof c?c:null)||{});var qa={},Z;for(Z in a)a.hasOwnProperty(Z)&&(qa[Z]=a[Z]);var ka=!1,fa=!1,la=!1,ra=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)ka=!0;else if("WORKER"===a.ENVIRONMENT)fa=!0;else if("NODE"===a.ENVIRONMENT)la=!0;else if("SHELL"===a.ENVIRONMENT)ra=!0;else throw Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");
|
||||
else ka="object"===typeof window,fa="function"===typeof importScripts,la="object"===typeof process&&"function"===typeof require&&!ka&&!fa,ra=!ka&&!la&&!fa;if(la){a.print||(a.print=console.log);a.printErr||(a.printErr=console.warn);var za,Aa;a.read=function(a,b){za||(za=require("fs"));Aa||(Aa=require("path"));a=Aa.normalize(a);a=za.readFileSync(a);return b?a:a.toString()};a.readBinary=function(e){e=a.read(e,!0);e.buffer||(e=new Uint8Array(e));f(e.buffer);return e};a.thisProgram||(a.thisProgram=1<process.argv.length?
|
||||
process.argv[1].replace(/\\/g,"/"):"unknown-program");a.arguments=process.argv.slice(2);process.on("uncaughtException",function(a){if(!(a instanceof aa))throw a;});a.inspect=function(){return"[Emscripten Module object]"}}else if(ra)a.print||(a.print=print),"undefined"!=typeof printErr&&(a.printErr=printErr),a.read="undefined"!=typeof read?function(a){return read(a)}: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(ka||fa)a.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},fa&&(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 e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){200==e.status||0==e.status&&e.response?b(e.response):d()};e.onerror=d;e.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){}),"undefined"===typeof a.setWindowTitle&&(a.setWindowTitle=function(a){document.title=a});else throw Error("Unknown runtime environment. Where are we?");
|
||||
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(Z in qa)qa.hasOwnProperty(Z)&&(a[Z]=qa[Z]);qa=void 0;var m={setTempRet0:function(a){return tempRet0=a},getTempRet0:function(){return tempRet0},stackSave:function(){return P},stackRestore:function(a){P=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]?m.QUANTUM_SIZE:"i"===a[0]?(a=parseInt(a.substr(1)),f(0===a%8),a/8):0}},getNativeFieldSize:function(a){return Math.max(m.getNativeTypeSize(a),m.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?m.getNativeFieldSize(a):
|
||||
0),m.QUANTUM_SIZE):Math.min(b,8):8},dynCall:function(e,b,d){return d&&d.length?a["dynCall_"+e].apply(null,[b].concat(d)):a["dynCall_"+e].call(null,b)},functionPointers:[],addFunction:function(a){for(var b=0;b<m.functionPointers.length;b++)if(!m.functionPointers[b])return m.functionPointers[b]=a,2*(1+b);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.";},removeFunction:function(a){m.functionPointers[(a-2)/2]=null},warnOnce:function(e){m.warnOnce.shown||
|
||||
(m.warnOnce.shown={});m.warnOnce.shown[e]||(m.warnOnce.shown[e]=1,a.printErr(e))},funcWrappers:{},getFuncWrapper:function(a,b){if(a){f(b);m.funcWrappers[b]||(m.funcWrappers[b]={});var d=m.funcWrappers[b];d[a]||(d[a]=1===b.length?function(){return m.dynCall(b,a)}:2===b.length?function(d){return m.dynCall(b,a,[d])}:function(){return m.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=P;P=P+a|0;P=P+15&-16;return b},staticAlloc:function(a){var b=V;V=V+a|0;V=V+15&-16;return b},dynamicAlloc:function(a){var b=w[W>>2];a=(b+a+15|0)&-16;w[W>>2]=a;return a>=x&&!Ha()?(w[W>>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},ja=0,Pa="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==
|
||||
typeof TextDecoder&&new TextDecoder("utf-16le");var va=65536,Na=16777216,db=16777216,ba,O,ua,Ja,w,Ka,La,Ma,V,Ba,P,sa,Ca,W;var Da=V=Ba=P=sa=Ca=W=0;a.reallocBuffer||(a.reallocBuffer=function(a){try{if(ArrayBuffer.transfer)var b=ArrayBuffer.transfer(E,a);else{var d=ba;b=new ArrayBuffer(a);(new Int8Array(b)).set(d)}}catch(l){return!1}return tb(b)?b:!1});try{var Ea=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Ea(new ArrayBuffer(4))}catch(e){Ea=function(a){return a.byteLength}}var Fa=
|
||||
a.TOTAL_STACK||5242880,x=a.TOTAL_MEMORY||16777216;x<Fa&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+x+"! (TOTAL_STACK="+Fa+")");if(a.buffer)var E=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:x/va}),E=a.wasmMemory.buffer):E=new ArrayBuffer(x);R();w[0]=1668509029;ua[1]=25459;if(115!==O[2]||99!==O[3])throw"Runtime error: expected the system to be little-endian!";a.HEAP=void 0;a.buffer=E;a.HEAP8=
|
||||
ba;a.HEAP16=ua;a.HEAP32=w;a.HEAPU8=O;a.HEAPU16=Ja;a.HEAPU32=Ka;a.HEAPF32=La;a.HEAPF64=Ma;var Va=[],Ra=[],Sa=[],Za=[],Ta=[],Qa=!1;f(Math.imul&&Math.fround&&Math.clz32&&Math.trunc,"this is a legacy browser, build with LEGACY_VM_SUPPORT");var ca=0,wa=null,oa=null;a.preloadedImages={};a.preloadedAudios={};var Q=null;(function(){function e(){try{if(a.wasmBinary)return new Uint8Array(a.wasmBinary);if(a.readBinary)return a.readBinary(c);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)";
|
||||
}catch(eb){S(eb)}}function b(){return a.wasmBinary||!ka&&!fa||"function"!==typeof fetch?new Promise(function(a,b){a(e())}):fetch(c,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+c+"'";return a.arrayBuffer()}).catch(function(){return e()})}function d(d,e,l){function f(b,d){h=b.exports;if(h.memory){b=h.memory;d=a.buffer;b.byteLength<d.byteLength&&a.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);Q||d.set(e.subarray(a.STATIC_BASE,a.STATIC_BASE+a.STATIC_BUMP),a.STATIC_BASE);e.set(d);a.buffer=E=b;R()}a.asm=h;a.usingWasm=!0;Ia("wasm-instantiate")}function k(a){f(a.instance,a.module)}function F(d){b().then(function(a){return WebAssembly.instantiate(a,g)}).then(d).catch(function(b){a.printErr("failed to asynchronously prepare wasm: "+b);S(b)})}if("object"!==typeof WebAssembly)return a.printErr("no native wasm support detected"),!1;if(!(a.wasmMemory instanceof
|
||||
WebAssembly.Memory))return a.printErr("no native wasm Memory in use"),!1;e.memory=a.wasmMemory;g.global={NaN:NaN,Infinity:Infinity};g["global.Math"]=d.Math;g.env=e;v("wasm-instantiate");if(a.instantiateWasm)try{return a.instantiateWasm(g,f)}catch(fb){return a.printErr("Module.instantiateWasm callback failed with error: "+fb),!1}a.wasmBinary||"function"!==typeof WebAssembly.instantiateStreaming||0===c.indexOf("data:")||"function"!==typeof fetch?F(k):WebAssembly.instantiateStreaming(fetch(c,{credentials:"same-origin"}),
|
||||
g).then(k).catch(function(b){a.printErr("wasm streaming compile failed: "+b);a.printErr("falling back to ArrayBuffer instantiation");F(k)});return{}}var c="draco_decoder.wasm",f="draco_decoder.temp.asm.js";"function"===typeof a.locateFile&&(a.locateFile("draco_decoder.wast"),c=a.locateFile(c),f=a.locateFile(f));var g={global:null,env:null,asm2wasm:{"f64-rem":function(a,b){return a%b},"debugger":function(){debugger}},parent:a},h=null;a.asmPreload=a.asm;var k=a.reallocBuffer;a.reallocBuffer=function(b){if("asmjs"===
|
||||
m)var d=k(b);else a:{b=ha(b,a.usingWasm?va:Na);var e=a.buffer.byteLength;if(a.usingWasm)try{d=-1!==a.wasmMemory.grow((b-e)/65536)?a.buffer=a.wasmMemory.buffer:null;break a}catch(cd){d=null;break a}d=void 0}return d};var m="";a.asm=function(b,e,c){if(!e.table){var l=a.wasmTableSize;void 0===l&&(l=1024);var f=a.wasmMaxTableSize;e.table="object"===typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==f?new WebAssembly.Table({initial:l,maximum:f,element:"anyfunc"}):new WebAssembly.Table({initial:l,
|
||||
element:"anyfunc"}):Array(l);a.wasmTable=e.table}e.memoryBase||(e.memoryBase=a.STATIC_BASE);e.tableBase||(e.tableBase=0);(b=d(b,e,c))||S("no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods");return b}})();Da=m.GLOBAL_BASE;V=Da+23360;Ra.push();Q=null;a.STATIC_BASE=Da;a.STATIC_BUMP=23360;var ub=V;V+=16;var z={last:0,caught:[],infos:{},deAdjust:function(a){if(!a||z.infos[a])return a;
|
||||
for(var b in z.infos)if(z.infos[b].adjusted===a)return b;return a},addRef:function(a){a&&z.infos[a].refcount++},decRef:function(e){if(e){var b=z.infos[e];f(0<b.refcount);b.refcount--;0!==b.refcount||b.rethrown||(b.destructor&&a.dynCall_vi(b.destructor,e),delete z.infos[e],___cxa_free_exception(e))}},clearRef:function(a){a&&(z.infos[a].refcount=0)}},t={varargs:0,get:function(a){t.varargs+=4;return w[t.varargs-4>>2]},getStr:function(){return n(t.get())},get64:function(){var a=t.get(),b=t.get();0<=a?
|
||||
f(0===b):f(-1===b);return a},getZero:function(){f(0===t.get())}},ta={},Ga=1;Za.push(function(){var e=a._fflush;e&&e(0);if(e=L.printChar){var b=L.buffers;b[1].length&&e(1,10);b[2].length&&e(2,10)}});W=m.staticAlloc(4);Ba=P=m.alignMemory(V);sa=Ba+Fa;Ca=m.alignMemory(sa);w[W>>2]=Ca;a.wasmTableSize=492;a.wasmMaxTableSize=492;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:Ea};a.asmLibraryArg={abort:S,assert:f,enlargeMemory:Ha,getTotalMemory:function(){return x},abortOnCannotGrowMemory:function(){S("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_ii:function(e,b){try{return a.dynCall_ii(e,b)}catch(d){if("number"!==typeof d&&"longjmp"!==d)throw d;a.setThrew(1,0)}},invoke_iii:function(e,b,d){try{return a.dynCall_iii(e,b,d)}catch(l){if("number"!==typeof l&&"longjmp"!==l)throw l;a.setThrew(1,0)}},invoke_iiii:function(e,b,d,c){try{return a.dynCall_iiii(e,b,d,c)}catch(F){if("number"!==typeof F&&"longjmp"!==F)throw F;a.setThrew(1,0)}},invoke_iiiiiii:function(e,b,d,c,f,g,h){try{return a.dynCall_iiiiiii(e,b,d,c,f,g,h)}catch(ea){if("number"!==
|
||||
typeof ea&&"longjmp"!==ea)throw ea;a.setThrew(1,0)}},invoke_v:function(e){try{a.dynCall_v(e)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_vi:function(e,b){try{a.dynCall_vi(e,b)}catch(d){if("number"!==typeof d&&"longjmp"!==d)throw d;a.setThrew(1,0)}},invoke_vii:function(e,b,d){try{a.dynCall_vii(e,b,d)}catch(l){if("number"!==typeof l&&"longjmp"!==l)throw l;a.setThrew(1,0)}},invoke_viii:function(e,b,d,c){try{a.dynCall_viii(e,b,d,c)}catch(F){if("number"!==typeof F&&
|
||||
"longjmp"!==F)throw F;a.setThrew(1,0)}},invoke_viiii:function(e,b,d,c,f){try{a.dynCall_viiii(e,b,d,c,f)}catch(pa){if("number"!==typeof pa&&"longjmp"!==pa)throw pa;a.setThrew(1,0)}},invoke_viiiii:function(e,b,d,c,f,g){try{a.dynCall_viiiii(e,b,d,c,f,g)}catch(da){if("number"!==typeof da&&"longjmp"!==da)throw da;a.setThrew(1,0)}},invoke_viiiiii:function(e,b,d,c,f,g,h){try{a.dynCall_viiiiii(e,b,d,c,f,g,h)}catch(ea){if("number"!==typeof ea&&"longjmp"!==ea)throw ea;a.setThrew(1,0)}},__ZSt18uncaught_exceptionv:ia,
|
||||
___assert_fail:function(a,b,d,c){ja=!0;throw"Assertion failed: "+n(a)+", at: "+[b?n(b):"unknown filename",d,c?n(c):"unknown function"]+" at "+g();},___cxa_allocate_exception:function(a){return Oa(a)},___cxa_begin_catch:function(a){var b=z.infos[a];b&&!b.caught&&(b.caught=!0,ia.uncaught_exception--);b&&(b.rethrown=!1);z.caught.push(a);z.addRef(z.deAdjust(a));return a},___cxa_find_matching_catch:ma,___cxa_pure_virtual:function(){ja=!0;throw"Pure virtual function called!";},___cxa_throw:function(a,b,
|
||||
d){z.infos[a]={ptr:a,adjusted:a,type:b,destructor:d,refcount:0,caught:!1,rethrown:!1};z.last=a;"uncaught_exception"in ia?ia.uncaught_exception++:ia.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(){},___resumeException:function(a){z.last||(z.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.";
|
||||
},___setErrNo:function(c){a.___errno_location&&(w[a.___errno_location()>>2]=c);return c},___syscall140:function(a,b){t.varargs=b;try{var d=t.getStreamFromFD();t.get();var c=t.get(),e=t.get(),f=t.get();FS.llseek(d,c,f);w[e>>2]=d.position;d.getdents&&0===c&&0===f&&(d.getdents=null);return 0}catch(da){return"undefined"!==typeof FS&&da instanceof FS.ErrnoError||S(da),-da.errno}},___syscall146:L,___syscall54:function(a,b){t.varargs=b;return 0},___syscall6:function(a,b){t.varargs=b;try{var d=t.getStreamFromFD();
|
||||
FS.close(d);return 0}catch(l){return"undefined"!==typeof FS&&l instanceof FS.ErrnoError||S(l),-l.errno}},_abort:function(){a.abort()},_emscripten_memcpy_big:function(a,b,d){O.set(O.subarray(b,b+d),a);return a},_pthread_getspecific:function(a){return ta[a]||0},_pthread_key_create:function(a,b){if(0==a)return 22;w[a>>2]=Ga;ta[Ga]=0;Ga++;return 0},_pthread_once:na,_pthread_setspecific:function(a,b){if(!(a in ta))return 22;ta[a]=b;return 0},DYNAMICTOP_PTR:W,tempDoublePtr:ub,ABORT:ja,STACKTOP:P,STACK_MAX:sa};
|
||||
var $a=a.asm(a.asmGlobalArg,a.asmLibraryArg,E);a.asm=$a;a.___cxa_can_catch=function(){return a.asm.___cxa_can_catch.apply(null,arguments)};a.___cxa_is_pointer_type=function(){return a.asm.___cxa_is_pointer_type.apply(null,arguments)};var hb=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},vb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=
|
||||
function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},wb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},xb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,arguments)},kb=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=
|
||||
function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},zb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)},Ab=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=
|
||||
function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},Bb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},Cb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},jb=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=
|
||||
function(){return a.asm._emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},Db=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm._emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},Eb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm._emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},ob=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm._emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,
|
||||
arguments)},Fb=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm._emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},Gb=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm._emscripten_bind_DecoderBuffer___destroy___0.apply(null,arguments)},Hb=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null,arguments)},Ib=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,
|
||||
arguments)},pb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm._emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},Jb=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},Kb=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Lb=a._emscripten_bind_Decoder_GetAttributeFloat_3=
|
||||
function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Mb=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},Nb=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},Ob=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeId_2.apply(null,
|
||||
arguments)},Pb=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},Qb=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null,arguments)},Rb=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null,arguments)},Sb=a._emscripten_bind_Decoder_GetAttribute_2=
|
||||
function(){return a.asm._emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},Tb=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return a.asm._emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},Ub=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm._emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},Vb=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm._emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},
|
||||
Wb=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,arguments)},Xb=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm._emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},Yb=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm._emscripten_bind_Decoder___destroy___0.apply(null,arguments)},mb=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null,
|
||||
arguments)},Zb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},$b=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},ac=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},rb=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm._emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,
|
||||
arguments)},bc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},cc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},dc=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm._emscripten_bind_DracoInt32Array_size_0.apply(null,arguments)},nb=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm._emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,
|
||||
arguments)},ec=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm._emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},qb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm._emscripten_bind_Mesh_Mesh_0.apply(null,arguments)},fc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm._emscripten_bind_Mesh___destroy___0.apply(null,arguments)},gc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm._emscripten_bind_Mesh_num_attributes_0.apply(null,
|
||||
arguments)},hc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm._emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},ic=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm._emscripten_bind_Mesh_num_points_0.apply(null,arguments)},jc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},kc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,
|
||||
arguments)},lc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},mc=a._emscripten_bind_MetadataQuerier_HasDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasDoubleEntry_2.apply(null,arguments)},nc=a._emscripten_bind_MetadataQuerier_HasIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasIntEntry_2.apply(null,arguments)},oc=a._emscripten_bind_MetadataQuerier_HasStringEntry_2=
|
||||
function(){return a.asm._emscripten_bind_MetadataQuerier_HasStringEntry_2.apply(null,arguments)},lb=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm._emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},pc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm._emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},sb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm._emscripten_bind_Metadata_Metadata_0.apply(null,
|
||||
arguments)},qc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm._emscripten_bind_Metadata___destroy___0.apply(null,arguments)},rc=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm._emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return a.asm._emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},sc=a._emscripten_bind_PointAttribute___destroy___0=
|
||||
function(){return a.asm._emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},tc=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm._emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},uc=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},vc=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_stride_0.apply(null,
|
||||
arguments)},wc=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm._emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},xc=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},yc=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm._emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},zc=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,
|
||||
arguments)},Ac=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm._emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},gb=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm._emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},Bc=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Cc=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm._emscripten_bind_PointCloud_num_attributes_0.apply(null,
|
||||
arguments)},Dc=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm._emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},Ec=a._emscripten_bind_Status___destroy___0=function(){return a.asm._emscripten_bind_Status___destroy___0.apply(null,arguments)},Fc=a._emscripten_bind_Status_code_0=function(){return a.asm._emscripten_bind_Status_code_0.apply(null,arguments)},Gc=a._emscripten_bind_Status_error_msg_0=function(){return a.asm._emscripten_bind_Status_error_msg_0.apply(null,arguments)},
|
||||
Hc=a._emscripten_bind_Status_ok_0=function(){return a.asm._emscripten_bind_Status_ok_0.apply(null,arguments)},Ic=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm._emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},Jc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=
|
||||
function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)},Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,
|
||||
arguments)},Nc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,arguments)},Oc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},Pc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,
|
||||
arguments)},Qc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},Rc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)},Sc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=
|
||||
function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},Uc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},Vc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},Wc=a._emscripten_enum_draco_StatusCode_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_ERROR.apply(null,
|
||||
arguments)},Xc=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm._emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Yc=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},Zc=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm._emscripten_enum_draco_StatusCode_OK.apply(null,arguments)},$c=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,
|
||||
arguments)},ad=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)};a._emscripten_get_global_libc=function(){return a.asm._emscripten_get_global_libc.apply(null,arguments)};var tb=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)};a._free=function(){return a.asm._free.apply(null,arguments)};a._llvm_bswap_i32=function(){return a.asm._llvm_bswap_i32.apply(null,
|
||||
arguments)};var Oa=a._malloc=function(){return a.asm._malloc.apply(null,arguments)};a._memcpy=function(){return a.asm._memcpy.apply(null,arguments)};a._memmove=function(){return a.asm._memmove.apply(null,arguments)};a._memset=function(){return a.asm._memset.apply(null,arguments)};a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)};a.establishStackSpace=function(){return a.asm.establishStackSpace.apply(null,arguments)};a.getTempRet0=function(){return a.asm.getTempRet0.apply(null,arguments)};
|
||||
a.runPostSets=function(){return a.asm.runPostSets.apply(null,arguments)};a.setTempRet0=function(){return a.asm.setTempRet0.apply(null,arguments)};a.setThrew=function(){return a.asm.setThrew.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_iii=
|
||||
function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.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_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)};
|
||||
a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};m.stackAlloc=a.stackAlloc;m.stackSave=a.stackSave;m.stackRestore=a.stackRestore;m.establishStackSpace=a.establishStackSpace;m.setTempRet0=a.setTempRet0;m.getTempRet0=a.getTempRet0;a.asm=$a;if(Q)if("function"===typeof a.locateFile?Q=a.locateFile(Q):a.memoryInitializerPrefixURL&&
|
||||
(Q=a.memoryInitializerPrefixURL+Q),la||ra){var bd=a.readBinary(Q);O.set(bd,m.GLOBAL_BASE)}else{var bb=function(){a.readAsync(Q,ab,function(){throw"could not load memory initializer "+Q;})};v("memory initializer");var ab=function(c){c.byteLength&&(c=new Uint8Array(c));O.set(c,m.GLOBAL_BASE);a.memoryInitializerRequest&&delete a.memoryInitializerRequest.response;Ia("memory initializer")};if(a.memoryInitializerRequest){var cb=function(){var c=a.memoryInitializerRequest,b=c.response;200!==c.status&&0!==
|
||||
c.status?(console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+c.status+", retrying "+Q),bb()):ab(b)};a.memoryInitializerRequest.response?setTimeout(cb,0):a.memoryInitializerRequest.addEventListener("load",cb)}else bb()}a.then=function(c){if(a.calledRun)c(a);else{var b=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){b&&b();c(a)}}return a};aa.prototype=Error();aa.prototype.constructor=aa;var Ua=null;oa=function b(){a.calledRun||ya();a.calledRun||(oa=
|
||||
b)};a.run=ya;a.exit=function(b,d){if(!d||!a.noExitRuntime){if(!a.noExitRuntime&&(ja=!0,P=void 0,u(Za),a.onExit))a.onExit(b);la&&process.exit(b);a.quit(b,new aa(b))}};var Wa=[];a.abort=S;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();ya();q.prototype=Object.create(q.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.WrapperObject=q;a.getCache=B;a.wrapPointer=T;a.castObject=function(a,d){return T(a.ptr,d)};a.NULL=
|
||||
T(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";a.__destroy__();delete B(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 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,d){f(k.buffer);b=b.length*d.BYTES_PER_ELEMENT;b=b+7&-8;k.pos+b>=k.size?(f(0<b),k.needed+=b,d=a._malloc(b),k.temps.push(d)):(d=k.buffer+k.pos,k.pos+=b);return d},copy:function(a,d,c){switch(d.BYTES_PER_ELEMENT){case 2:c>>=1;break;case 4:c>>=2;break;case 8:c>>=3}for(var b=0;b<a.length;b++)d[c+b]=a[b]}};A.prototype=Object.create(q.prototype);A.prototype.constructor=A;A.prototype.__class__=A;A.__cache__={};a.Status=A;A.prototype.code=
|
||||
A.prototype.code=function(){return Fc(this.ptr)};A.prototype.ok=A.prototype.ok=function(){return!!Hc(this.ptr)};A.prototype.error_msg=A.prototype.error_msg=function(){return n(Gc(this.ptr))};A.prototype.__destroy__=A.prototype.__destroy__=function(){Ec(this.ptr)};G.prototype=Object.create(q.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.PointCloud=G;G.prototype.num_attributes=G.prototype.num_attributes=function(){return Cc(this.ptr)};G.prototype.num_points=G.prototype.num_points=
|
||||
function(){return Dc(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){Bc(this.ptr)};H.prototype=Object.create(q.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.AttributeOctahedronTransform=H;H.prototype.InitFromAttribute=H.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!vb(b,a)};H.prototype.quantization_bits=H.prototype.quantization_bits=function(){return xb(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=
|
||||
function(){wb(this.ptr)};p.prototype=Object.create(q.prototype);p.prototype.constructor=p;p.prototype.__class__=p;p.__cache__={};a.PointAttribute=p;p.prototype.size=p.prototype.size=function(){return zc(this.ptr)};p.prototype.GetAttributeTransformData=p.prototype.GetAttributeTransformData=function(){return T(rc(this.ptr),K)};p.prototype.attribute_type=p.prototype.attribute_type=function(){return tc(this.ptr)};p.prototype.data_type=p.prototype.data_type=function(){return wc(this.ptr)};p.prototype.num_components=
|
||||
p.prototype.num_components=function(){return yc(this.ptr)};p.prototype.normalized=p.prototype.normalized=function(){return!!xc(this.ptr)};p.prototype.byte_stride=p.prototype.byte_stride=function(){return vc(this.ptr)};p.prototype.byte_offset=p.prototype.byte_offset=function(){return uc(this.ptr)};p.prototype.unique_id=p.prototype.unique_id=function(){return Ac(this.ptr)};p.prototype.__destroy__=p.prototype.__destroy__=function(){sc(this.ptr)};K.prototype=Object.create(q.prototype);K.prototype.constructor=
|
||||
K;K.prototype.__class__=K;K.__cache__={};a.AttributeTransformData=K;K.prototype.transform_type=K.prototype.transform_type=function(){return Eb(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){Db(this.ptr)};y.prototype=Object.create(q.prototype);y.prototype.constructor=y;y.prototype.__class__=y;y.__cache__={};a.AttributeQuantizationTransform=y;y.prototype.InitFromAttribute=y.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!yb(b,a)};
|
||||
y.prototype.quantization_bits=y.prototype.quantization_bits=function(){return Bb(this.ptr)};y.prototype.min_value=y.prototype.min_value=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Ab(b,a)};y.prototype.range=y.prototype.range=function(){return Cb(this.ptr)};y.prototype.__destroy__=y.prototype.__destroy__=function(){zb(this.ptr)};r.prototype=Object.create(q.prototype);r.prototype.constructor=r;r.prototype.__class__=r;r.__cache__={};a.MetadataQuerier=r;r.prototype.HasIntEntry=
|
||||
r.prototype.HasIntEntry=function(a,d){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return!!nc(b,a,d)};r.prototype.GetIntEntry=r.prototype.GetIntEntry=function(a,d){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return kc(b,a,d)};r.prototype.HasDoubleEntry=r.prototype.HasDoubleEntry=function(a,d){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return!!mc(b,
|
||||
a,d)};r.prototype.GetDoubleEntry=r.prototype.GetDoubleEntry=function(a,d){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return jc(b,a,d)};r.prototype.HasStringEntry=r.prototype.HasStringEntry=function(a,d){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return!!oc(b,a,d)};r.prototype.GetStringEntry=r.prototype.GetStringEntry=function(a,d){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);
|
||||
d=d&&"object"===typeof d?d.ptr:X(d);return n(lc(b,a,d))};r.prototype.__destroy__=r.prototype.__destroy__=function(){pc(this.ptr)};I.prototype=Object.create(q.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoFloat32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Zb(b,a)};I.prototype.size=I.prototype.size=function(){return ac(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){$b(this.ptr)};
|
||||
U.prototype=Object.create(q.prototype);U.prototype.constructor=U;U.prototype.__class__=U;U.__cache__={};a.GeometryAttribute=U;U.prototype.__destroy__=U.prototype.__destroy__=function(){ec(this.ptr)};M.prototype=Object.create(q.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DecoderBuffer=M;M.prototype.Init=M.prototype.Init=function(a,d){var b=this.ptr;k.prepare();if("object"==typeof a&&"object"===typeof a){var c=k.alloc(a,ba);k.copy(a,ba,c);a=c}d&&"object"===typeof d&&
|
||||
(d=d.ptr);Fb(b,a,d)};M.prototype.__destroy__=M.prototype.__destroy__=function(){Gb(this.ptr)};h.prototype=Object.create(q.prototype);h.prototype.constructor=h;h.prototype.__class__=h;h.__cache__={};a.Decoder=h;h.prototype.GetEncodedGeometryType=h.prototype.GetEncodedGeometryType=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Tb(b,a)};h.prototype.DecodeBufferToPointCloud=h.prototype.DecodeBufferToPointCloud=function(a,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===
|
||||
typeof d&&(d=d.ptr);return T(Ib(b,a,d),A)};h.prototype.DecodeBufferToMesh=h.prototype.DecodeBufferToMesh=function(a,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);return T(Hb(b,a,d),A)};h.prototype.GetAttributeId=h.prototype.GetAttributeId=function(a,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);return Ob(b,a,d)};h.prototype.GetAttributeIdByName=h.prototype.GetAttributeIdByName=function(a,d){var b=this.ptr;k.prepare();
|
||||
a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return Nb(b,a,d)};h.prototype.GetAttributeIdByMetadataEntry=h.prototype.GetAttributeIdByMetadataEntry=function(a,d,c){var b=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);c=c&&"object"===typeof c?c.ptr:X(c);return Mb(b,a,d,c)};h.prototype.GetAttribute=h.prototype.GetAttribute=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Sb(b,
|
||||
a,c),p)};h.prototype.GetAttributeByUniqueId=h.prototype.GetAttributeByUniqueId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Jb(b,a,c),p)};h.prototype.GetMetadata=h.prototype.GetMetadata=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return T(Vb(b,a),N)};h.prototype.GetAttributeMetadata=h.prototype.GetAttributeMetadata=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Rb(b,
|
||||
a,c),N)};h.prototype.GetFaceFromMesh=h.prototype.GetFaceFromMesh=function(a,c,f){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Ub(b,a,c,f)};h.prototype.GetTriangleStripsFromMesh=h.prototype.GetTriangleStripsFromMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return Wb(b,a,c)};h.prototype.GetAttributeFloat=h.prototype.GetAttributeFloat=function(a,c,f){var b=this.ptr;
|
||||
a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Lb(b,a,c,f)};h.prototype.GetAttributeFloatForAllPoints=h.prototype.GetAttributeFloatForAllPoints=function(a,c,f){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Kb(b,a,c,f)};h.prototype.GetAttributeIntForAllPoints=h.prototype.GetAttributeIntForAllPoints=function(a,c,f){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);
|
||||
c&&"object"===typeof c&&(c=c.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Qb(b,a,c,f)};h.prototype.GetAttributeInt32ForAllPoints=h.prototype.GetAttributeInt32ForAllPoints=function(a,c,f){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Pb(b,a,c,f)};h.prototype.SkipAttributeTransform=h.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Xb(b,a)};h.prototype.__destroy__=h.prototype.__destroy__=
|
||||
function(){Yb(this.ptr)};C.prototype=Object.create(q.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Mesh=C;C.prototype.num_faces=C.prototype.num_faces=function(){return hc(this.ptr)};C.prototype.num_attributes=C.prototype.num_attributes=function(){return gc(this.ptr)};C.prototype.num_points=C.prototype.num_points=function(){return ic(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){fc(this.ptr)};Y.prototype=Object.create(q.prototype);Y.prototype.constructor=
|
||||
Y;Y.prototype.__class__=Y;Y.__cache__={};a.VoidPtr=Y;Y.prototype.__destroy__=Y.prototype.__destroy__=function(){Ic(this.ptr)};J.prototype=Object.create(q.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.DracoInt32Array=J;J.prototype.GetValue=J.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return bc(b,a)};J.prototype.size=J.prototype.size=function(){return dc(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){cc(this.ptr)};
|
||||
N.prototype=Object.create(q.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.Metadata=N;N.prototype.__destroy__=N.prototype.__destroy__=function(){qc(this.ptr)};(function(){function b(){a.OK=Zc();a.ERROR=Wc();a.IO_ERROR=Yc();a.INVALID_PARAMETER=Xc();a.UNSUPPORTED_VERSION=ad();a.UNKNOWN_VERSION=$c();a.INVALID_GEOMETRY_TYPE=Nc();a.POINT_CLOUD=Oc();a.TRIANGULAR_MESH=Pc();a.ATTRIBUTE_INVALID_TRANSFORM=Jc();a.ATTRIBUTE_NO_TRANSFORM=Kc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Mc();
|
||||
a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Lc();a.INVALID=Sc();a.POSITION=Uc();a.NORMAL=Tc();a.COLOR=Qc();a.TEX_COORD=Vc();a.GENERIC=Rc()}a.calledRun?b():Sa.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return c};"object"===typeof module&&module.exports&&(module.exports=DracoDecoderModule);
|
||||
|
@ -1,124 +1,113 @@
|
||||
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,h,f){e!=Array.prototype&&e!=Object.prototype&&(e[h]=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,h,f,r){if(h){f=$jscomp.global;e=e.split(".");for(r=0;r<e.length-1;r++){var k=e[r];k in f||(f[k]={});f=f[k]}e=e[e.length-1];r=f[e];h=h(r);h!=r&&null!=h&&$jscomp.defineProperty(f,e,{configurable:!0,writable:!0,value:h})}};$jscomp.polyfill("Math.imul",function(e){return e?e:function(e,f){e=Number(e);f=Number(f);var h=e&65535,k=f&65535;return h*k+((e>>>16&65535)*k+h*(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.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 h=0;return $jscomp.iteratorPrototype(function(){return h<e.length?{done:!1,value:e[h++]}:{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 h=e[Symbol.iterator];return h?h.call(e):$jscomp.arrayIterator(e)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
|
||||
$jscomp.polyfill("Promise",function(e){function h(){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;h.prototype.asyncExecute=function(e){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(e);return this};h.prototype.asyncExecuteBatch_=function(){var e=this;this.asyncExecuteFunction(function(){e.executeBatch_()})};var r=$jscomp.global.setTimeout;h.prototype.asyncExecuteFunction=function(e){r(e,
|
||||
0)};h.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(pa){this.asyncThrow_(pa)}}}this.batch_=null};h.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(ha){f.reject(ha)}};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(ha){this.reject_(ha);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 h;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(pa){k.reject(pa)}};k.prototype.then=function(e,f){function h(e,f){return"function"==typeof e?function(f){try{t(e(f))}catch(qa){ia(qa)}}:f}var t,ia,
|
||||
r=new k(function(e,f){t=e;ia=f});this.callWhenSettled_(h(e,t),h(f,ia));return r};k.prototype.catch=function(e){return this.then(void 0,e)};k.prototype.callWhenSettled_=function(e,f){function k(){switch(h.state_){case 1:e(h.result_);break;case 2:f(h.result_);break;default:throw Error("Unexpected state: "+h.state_);}}var h=this;null==this.onSettledCallbacks_?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,h){for(var t=$jscomp.makeIterator(e),r=t.next();!r.done;r=t.next())f(r.value).callWhenSettled_(k,h)})};k.all=function(e){var h=$jscomp.makeIterator(e),t=h.next();return t.done?f([]):new k(function(e,k){function r(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_(r(ba.length-1),k),t=h.next();while(!t.done)})};return k},"es6","es3");
|
||||
var DracoDecoderModule=function(e){function h(a){eval.call(null,a)}function f(a,b){a||M("Assertion failed: "+b)}function r(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 k(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 ra[a>>1];case "i32":return u[a>>2];case "i64":return u[a>>2];case "float":return xa[a>>
|
||||
2];case "double":return ya[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 ka?ka: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 k,m;g<e;){var h=a[g];"function"===typeof h&&(h=n.getFunctionIndex(h));d=S||b[g];if(0===d)g++;else{"i64"==d&&(d="i32");var l=c+g,p=d;p=p||"i8";"*"===p.charAt(p.length-1)&&(p="i32");switch(p){case "i1":N[l>>0]=h;break;case "i8":N[l>>0]=h;break;case "i16":ra[l>>1]=h;break;case "i32":u[l>>2]=h;break;case "i64":tempI64=[h>>>0,(tempDouble=h,1<=+pb(tempDouble)?0<tempDouble?(qb(+rb(tempDouble/4294967296),4294967295)|0)>>>0:~~+sb((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)];u[l>>2]=
|
||||
tempI64[0];u[l+4>>2]=tempI64[1];break;case "float":xa[l>>2]=h;break;case "double":ya[l>>3]=h;break;default:M("invalid type for setValue: "+p)}m!==d&&(k=n.getNativeTypeSize(d),m=d);g+=k}}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 Da(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 ha(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 pa(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=ha(g)+1;var f=ka(e);Da(g,G,f,e);var h=ka(4);var l=d(f,0,0,h);if(0===k(h,"i32")&&l){var m=t(l);break a}}catch(xd){}finally{f&&
|
||||
Ha(f),h&&Ha(h),l&&Ha(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 ia(){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 pa(d)}function Ea(a,b){0<a%b&&(a+=b-a%b);return a}function ba(){a.HEAP8=N=new Int8Array(H);a.HEAP16=ra=new Int16Array(H);a.HEAP32=u=new Int32Array(H);
|
||||
a.HEAPU8=G=new Uint8Array(H);a.HEAPU16=Va=new Uint16Array(H);a.HEAPU32=Wa=new Uint32Array(H);a.HEAPF32=xa=new Float32Array(H);a.HEAPF64=ya=new Float64Array(H)}function Ua(){var d=a.usingWasm?Ia:Xa,b=2147483648-d;if(u[Y>>2]>b)return!1;var c=x;for(x=Math.max(x,tb);x<u[Y>>2];)x=536870912>=x?Ea(2*x,d):Math.min(Ea((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 ja(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 qa(a,b,c){c=0<c?c:ha(a)+1;c=Array(c);a=Da(a,c,0,c.length);b&&(c.length=a);return c}function Ya(d){ea++;a.monitorRunDependencies&&a.monitorRunDependencies(ea)}function Za(d){ea--;a.monitorRunDependencies&&a.monitorRunDependencies(ea);0==ea&&(null!==Ja&&(clearInterval(Ja),Ja=null),sa&&(d=sa,sa=null,d()))}function la(){return!!la.uncaught_exception}function ta(){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);ta.buffer||(ta.buffer=ka(4));u[ta.buffer>>2]=d;d=ta.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 ua(d,b){ua.seen||(ua.seen={});d in ua.seen||(a.dynCall_v(b),ua.seen[d]=1)}function ca(d,b){A.varargs=b;try{var c=A.get(),g=A.get(),e=A.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 g=d=0;c[g];)++g;if(16<g-d&&c.subarray&&$a)d=$a.decode(c.subarray(d,g));else for(g="";;){var e=c[d++];if(!e){d=g;break a}if(e&128){var h=c[d++]&63;if(192==(e&224))g+=String.fromCharCode((e&31)<<6|h);else{var k=c[d++]&63;if(224==(e&240))e=(e&15)<<12|h<<6|k;else{var l=c[d++]&63;if(240==(e&248))e=(e&7)<<18|h<<12|k<<6|l;else{var z=c[d++]&63;if(248==(e&252))e=
|
||||
(e&3)<<24|h<<18|k<<12|l<<6|z;else{var m=c[d++]&63;e=(e&1)<<30|h<<24|k<<18|l<<12|z<<6|m}}}65536>e?g+=String.fromCharCode(e):(e-=65536,g+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else g+=String.fromCharCode(e)}}b(d);c.length=0}else c.push(d)});for(b=0;b<e;b++){for(var h=u[g+8*b>>2],k=u[g+(8*b+4)>>2],l=0;l<k;l++)ca.printChar(c,G[h+l]);d+=k}return d}catch(Ga){return"undefined"!==typeof FS&&Ga instanceof FS.ErrnoError||M(Ga),-Ga.errno}}function ma(a){this.name="ExitStatus";this.message="Program terminated with exit("+
|
||||
a+")";this.status=a}function Ka(d){function b(){if(!a.calledRun&&(a.calledRun=!0,!na)){za||(za=!0,ja(La));ja(ab);if(a.onRuntimeInitialized)a.onRuntimeInitialized();a._main&&bb&&a.callMain(d);if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)cb.unshift(a.postRun.shift());ja(cb)}}d=d||a.arguments;null===db&&(db=Date.now());if(!(0<ea)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)eb.unshift(a.preRun.shift());ja(eb);0<ea||a.calledRun||
|
||||
(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function fb(d,b){if(!b||!a.noExitRuntime){if(!a.noExitRuntime&&(na=!0,T=ub,ja(gb),a.onExit))a.onExit(d);oa&&process.exit(d);a.quit(d,new ma(d))}}function M(d){if(a.onAbort)a.onAbort(d);void 0!==d?(a.print(d),a.printErr(d),d=JSON.stringify(d)):d="";na=!0;var b="abort("+d+") at "+ia()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";hb&&
|
||||
hb.forEach(function(a){b=a(b,d)});throw b;}function v(){}function E(a){return(a||v).__cache__}function V(a,b){var d=E(b),e=d[a];if(e)return e;e=Object.create((b||v).prototype);e.ptr=a;return d[a]=e}function Z(a){if("string"===typeof a){a=qa(a);var b=l.alloc(a,N);l.copy(a,N,b);return b}return a}function D(){throw"cannot construct a Status, no constructor in IDL";}function I(){this.ptr=vb();E(I)[this.ptr]=this}function J(){this.ptr=wb();E(J)[this.ptr]=this}function p(){this.ptr=xb();E(p)[this.ptr]=
|
||||
this}function O(){this.ptr=yb();E(O)[this.ptr]=this}function B(){this.ptr=zb();E(B)[this.ptr]=this}function q(){this.ptr=Ab();E(q)[this.ptr]=this}function K(){this.ptr=Bb();E(K)[this.ptr]=this}function W(){this.ptr=Cb();E(W)[this.ptr]=this}function P(){this.ptr=Db();E(P)[this.ptr]=this}function m(){this.ptr=Eb();E(m)[this.ptr]=this}function F(){this.ptr=Fb();E(F)[this.ptr]=this}function aa(){throw"cannot construct a VoidPtr, no constructor in IDL";}function L(){this.ptr=Gb();E(L)[this.ptr]=this}function Q(){this.ptr=
|
||||
Hb();E(Q)[this.ptr]=this}var a=e=e||{},ib=!1,jb=!1;a.onRuntimeInitialized=function(){ib=!0;if(jb&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){jb=!0;if(ib&&"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]&&2>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};a||(a=("undefined"!==typeof e?e:null)||{});var va={},da;for(da in a)a.hasOwnProperty(da)&&
|
||||
(va[da]=a[da]);var wa=!1,fa=!1,oa=!1,Aa=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)wa=!0;else if("WORKER"===a.ENVIRONMENT)fa=!0;else if("NODE"===a.ENVIRONMENT)oa=!0;else if("SHELL"===a.ENVIRONMENT)Aa=!0;else throw Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else wa="object"===typeof window,fa="function"===typeof importScripts,oa="object"===typeof process&&"function"===typeof require&&!wa&&!fa,Aa=!wa&&!oa&&!fa;if(oa){a.print||(a.print=
|
||||
console.log);a.printErr||(a.printErr=console.warn);var Ma,Na;a.read=function(a,b){Ma||(Ma=require("fs"));Na||(Na=require("path"));a=Na.normalize(a);a=Ma.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){h(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 ma))throw a;});a.inspect=function(){return"[Emscripten Module object]"}}else if(Aa)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(wa||fa)a.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},fa&&(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){}),fa&&(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){h(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 va)va.hasOwnProperty(da)&&(a[da]=va[da]);va=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,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=X;X=X+a|0;X=X+15&-16;return b},dynamicAlloc:function(a){var b=u[Y>>2];a=(b+a+15|0)&-16;u[Y>>2]=a;return a>=x&&!Ua()?(u[Y>>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},na=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);Da(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=r(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 z=k[m],n=e[m];"number"!==n&&(n=f[n+"ToC"],c+="var "+n.arguments+" = "+z+";",c+=n.body+";",c+=z+"=("+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 $a="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");var Ia=65536,Xa=16777216,tb=16777216,N,G,ra,Va,u,Wa,xa,ya,X,Oa,T,Ba,Pa,Y;var Qa=X=Oa=T=Ba=Pa=Y=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 Ib(b)?
|
||||
b:!1});try{var Ra=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Ra(new ArrayBuffer(4))}catch(d){Ra=function(a){return a.byteLength}}var Sa=a.TOTAL_STACK||5242880,x=a.TOTAL_MEMORY||16777216;x<Sa&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+x+"! (TOTAL_STACK="+Sa+")");if(a.buffer)var H=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:x/Ia}),H=
|
||||
a.wasmMemory.buffer):H=new ArrayBuffer(x);ba();u[0]=1668509029;ra[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=ra;a.HEAP32=u;a.HEAPU8=G;a.HEAPU16=Va;a.HEAPU32=Wa;a.HEAPF32=xa;a.HEAPF64=ya;var eb=[],La=[],ab=[],gb=[],cb=[],za=!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 kb=
|
||||
new Float32Array(1);Math.fround=function(a){kb[0]=a;return kb[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 pb=Math.abs,sb=Math.ceil,rb=Math.floor,qb=Math.min,ea=0,Ja=null,sa=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(Jb){M(Jb)}}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;Za("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;Ya("wasm-instantiate");if(d.instantiateWasm)try{return d.instantiateWasm(t,g)}catch(Kb){return d.printErr("Module.instantiateWasm callback failed with error: "+Kb),!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=Ea(a,d.usingWasm?Ia:Xa);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"===A?q(a):r(a)};var A="";d.asm=function(a,g,h){if(!g.table){var z=d.wasmTableSize;void 0===z&&(z=1024);var p=d.wasmMaxTableSize;g.table="object"===
|
||||
typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==p?new WebAssembly.Table({initial:z,maximum:p,element:"anyfunc"}):new WebAssembly.Table({initial:z,element:"anyfunc"}):Array(z);d.wasmTable=g.table}g.memoryBase||(g.memoryBase=d.STATIC_BASE);g.tableBase||(g.tableBase=0);var q;z=m.split(",");for(p=0;p<z.length;p++){var w=z[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 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);Qa=n.GLOBAL_BASE;X=Qa+17792;La.push();U=0<=a.wasmJSMethod.indexOf("asmjs")||0<=a.wasmJSMethod.indexOf("interpret-asm2wasm")?"draco_decoder.js.mem":null;a.STATIC_BASE=Qa;a.STATIC_BUMP=17792;var Lb=X;X+=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=Mb;a._memcpy=Nb;var A={varargs:0,get:function(a){A.varargs+=4;return u[A.varargs-4>>2]},getStr:function(){return t(A.get())},get64:function(){var a=A.get(),b=A.get();0<=a?f(0===b):f(-1===b);return a},getZero:function(){f(0===A.get())}},Ca={};a._sbrk=Ob;a._memmove=Pb;var Ta=1;a._llvm_bswap_i32=Qb;gb.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)}});Y=R(1,"i32",2);Oa=T=n.alignMemory(X);Ba=Oa+Sa;Pa=n.alignMemory(Ba);u[Y>>2]=Pa;a.wasmTableSize=468;a.wasmMaxTableSize=468;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:Ra};a.asmLibraryArg={abort:M,assert:f,enlargeMemory:Ua,
|
||||
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(z){if("number"!==typeof z&&"longjmp"!==z)throw z;
|
||||
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(z){if("number"!==typeof z&&"longjmp"!==z)throw z;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(Fa){if("number"!==typeof Fa&&"longjmp"!==Fa)throw Fa;a.setThrew(1,0)}},_pthread_getspecific:function(a){return Ca[a]||0},_pthread_setspecific:function(a,b){if(!(a in Ca))return 22;Ca[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 la?la.uncaught_exception++:la.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.";},_pthread_key_create:function(a,b){if(0==a)return 22;u[a>>2]=Ta;Ca[Ta]=0;Ta++;return 0},_abort:function(){a.abort()},___setErrNo:function(d){a.___errno_location&&(u[a.___errno_location()>>2]=d);return d},
|
||||
___syscall6:function(a,b){A.varargs=b;try{var c=A.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,la.uncaught_exception--);b&&(b.rethrown=!1);C.caught.push(a);C.addRef(C.deAdjust(a));return a},___syscall146:ca,_pthread_once:ua,_emscripten_memcpy_big:function(a,b,c){G.set(G.subarray(b,b+c),a);return a},___gxx_personality_v0:function(){},___syscall140:function(a,
|
||||
b){A.varargs=b;try{var c=A.getStreamFromFD();A.get();var d=A.get(),e=A.get(),f=A.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:ta,
|
||||
___assert_fail:function(a,b,c,e){na=!0;throw"Assertion failed: "+t(a)+", at: "+[b?t(b):"unknown filename",c,e?t(e):"unknown function"]+" at "+ia();},___cxa_pure_virtual:function(){na=!0;throw"Pure virtual function called!";},___cxa_allocate_exception:function(a){return ka(a)},__ZSt18uncaught_exceptionv:la,DYNAMICTOP_PTR:Y,tempDoublePtr:Lb,ABORT:na,STACKTOP:T,STACK_MAX:Ba};var lb=a.asm(a.asmGlobalArg,a.asmLibraryArg,H);a.asm=lb;var Rb=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,
|
||||
arguments)},Sb=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Tb=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Ub=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm._emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},Vb=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,
|
||||
arguments)},Wb=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},Ob=a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)},Nb=a._memcpy=function(){return a.asm._memcpy.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};var Xb=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,
|
||||
arguments)},Yb=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},Zb=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},$b=a._emscripten_bind_Status_ok_0=function(){return a.asm._emscripten_bind_Status_ok_0.apply(null,arguments)},ac=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm._emscripten_bind_Mesh_num_faces_0.apply(null,
|
||||
arguments)};a._emscripten_get_global_libc=function(){return a.asm._emscripten_get_global_libc.apply(null,arguments)};var bc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},cc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)};a.runPostSets=function(){return a.asm.runPostSets.apply(null,
|
||||
arguments)};var dc=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return a.asm._emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)};a.___cxa_can_catch=function(){return a.asm.___cxa_can_catch.apply(null,arguments)};var Ha=a._free=function(){return a.asm._free.apply(null,arguments)},ec=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,arguments)},
|
||||
fc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm._emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},gc=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_stride_0.apply(null,arguments)},Hb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm._emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},hc=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,
|
||||
arguments)},Eb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm._emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},ic=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},jc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},kc=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm._emscripten_bind_Decoder___destroy___0.apply(null,
|
||||
arguments)},lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)};a.getTempRet0=function(){return a.asm.getTempRet0.apply(null,arguments)};a.setThrew=function(){return a.asm.setThrew.apply(null,arguments)};var mc=a._emscripten_bind_MetadataQuerier_HasStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasStringEntry_2.apply(null,
|
||||
arguments)},nc=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm._emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},oc=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm._emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)};a.___cxa_is_pointer_type=function(){return a.asm.___cxa_is_pointer_type.apply(null,arguments)};var yb=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return a.asm._emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,
|
||||
arguments)},pc=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};var qc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},rc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm._emscripten_bind_Mesh_num_points_0.apply(null,
|
||||
arguments)},sc=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm._emscripten_bind_PointCloud_num_attributes_0.apply(null,arguments)},Fb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm._emscripten_bind_Mesh_Mesh_0.apply(null,arguments)},Ab=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm._emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,
|
||||
arguments)},uc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},vc=a._emscripten_bind_MetadataQuerier_HasDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasDoubleEntry_2.apply(null,arguments)},wc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},xc=a._emscripten_bind_Mesh_num_attributes_0=
|
||||
function(){return a.asm._emscripten_bind_Mesh_num_attributes_0.apply(null,arguments)},yc=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,arguments)},zc=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},Qb=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)},Db=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_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)},Mb=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_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,arguments)};a.setTempRet0=function(){return a.asm.setTempRet0.apply(null,arguments)};var Gb=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_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,
|
||||
arguments)},Cb=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)},ka=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)},Ib=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)},Pb=a._memmove=function(){return a.asm._memmove.apply(null,arguments)},vb=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)},zb=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)},wb=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},Bb=
|
||||
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)},xb=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=lb;
|
||||
if(U)if("function"===typeof a.locateFile?U=a.locateFile(U):a.memoryInitializerPrefixURL&&(U=a.memoryInitializerPrefixURL+U),oa||Aa){var wd=a.readBinary(U);G.set(wd,n.GLOBAL_BASE)}else{var nb=function(){a.readAsync(U,mb,function(){throw"could not load memory initializer "+U;})};Ya("memory initializer");var mb=function(d){d.byteLength&&(d=new Uint8Array(d));G.set(d,n.GLOBAL_BASE);a.memoryInitializerRequest&&delete a.memoryInitializerRequest.response;Za("memory initializer")};if(a.memoryInitializerRequest){var ob=
|
||||
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),nb()):mb(d.response)};a.memoryInitializerRequest.response?setTimeout(ob,0):a.memoryInitializerRequest.addEventListener("load",ob)}else nb()}a.then=function(d){if(a.calledRun)d(a);else{var b=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){b&&b();d(a)}}return a};ma.prototype=Error();ma.prototype.constructor=
|
||||
ma;var ub,db=null;sa=function b(){a.calledRun||Ka();a.calledRun||(sa=b)};a.callMain=a.callMain=function(b){function c(){for(var a=0;3>a;a++)f.push(0)}b=b||[];za||(za=!0,ja(La));var e=b.length+1,f=[R(qa(a.thisProgram),"i8",0)];c();for(var h=0;h<e-1;h+=1)f.push(R(qa(b[h]),"i8",0)),c();f.push(0);f=R(f,"i32",0);try{var k=a._main(e,f,0);fb(k,!0)}catch(y){y instanceof ma||("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=Ka;a.exit=a.exit=fb;var hb=[];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 bb=!0;a.noInitialRun&&(bb=!1);Ka();v.prototype=Object.create(v.prototype);v.prototype.constructor=v;v.prototype.__class__=v;v.__cache__={};a.WrapperObject=v;a.getCache=E;a.wrapPointer=V;a.castObject=function(a,c){return V(a.ptr,c)};a.NULL=V(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 l={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(l.needed){for(var b=0;b<l.temps.length;b++)a._free(l.temps[b]);l.temps.length=0;a._free(l.buffer);l.buffer=0;l.size+=l.needed;l.needed=0}l.buffer||(l.size+=128,l.buffer=a._malloc(l.size),f(l.buffer));l.pos=0},alloc:function(b,c){f(l.buffer);b=b.length*c.BYTES_PER_ELEMENT;
|
||||
b=b+7&-8;l.pos+b>=l.size?(f(0<b),l.needed+=b,c=a._malloc(b),l.temps.push(c)):(c=l.buffer+l.pos,l.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!!$b(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 sc(this.ptr)};I.prototype.num_points=I.prototype.num_points=function(){return Xc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Uc(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 Vb(this.ptr)};p.prototype.GetAttributeTransformData=p.prototype.GetAttributeTransformData=function(){return V(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 oc(this.ptr)};p.prototype.normalized=p.prototype.normalized=function(){return!!Sb(this.ptr)};
|
||||
p.prototype.byte_stride=p.prototype.byte_stride=function(){return gc(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(){nc(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 hc(b,a)};B.prototype.range=B.prototype.range=function(){return jd(this.ptr)};B.prototype.__destroy__=B.prototype.__destroy__=function(){pc(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;l.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;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return jc(b,a,c)};q.prototype.HasDoubleEntry=q.prototype.HasDoubleEntry=function(a,c){var b=this.ptr;l.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;l.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;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return!!mc(b,a,c)};q.prototype.GetStringEntry=q.prototype.GetStringEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return t(ic(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)};W.prototype=Object.create(v.prototype);W.prototype.constructor=W;W.prototype.__class__=W;W.__cache__={};a.GeometryAttribute=W;W.prototype.__destroy__=W.prototype.__destroy__=
|
||||
function(){fc(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;l.prepare();if("object"==typeof a&&"object"===typeof a){var e=l.alloc(a,N);l.copy(a,N,e);a=e}c&&"object"===typeof c&&(c=c.ptr);Ub(b,a,c)};P.prototype.__destroy__=P.prototype.__destroy__=function(){Sc(this.ptr)};m.prototype=Object.create(v.prototype);m.prototype.constructor=m;m.prototype.__class__=
|
||||
m;m.__cache__={};a.Decoder=m;m.prototype.GetEncodedGeometryType=m.prototype.GetEncodedGeometryType=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return dc(b,a)};m.prototype.DecodeBufferToPointCloud=m.prototype.DecodeBufferToPointCloud=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return V(bc(b,a,c),D)};m.prototype.DecodeBufferToMesh=m.prototype.DecodeBufferToMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===
|
||||
typeof c&&(c=c.ptr);return V(pd(b,a,c),D)};m.prototype.GetAttributeId=m.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)};m.prototype.GetAttributeIdByName=m.prototype.GetAttributeIdByName=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:Z(c);return Yb(b,a,c)};m.prototype.GetAttributeIdByMetadataEntry=m.prototype.GetAttributeIdByMetadataEntry=function(a,
|
||||
c,e){var b=this.ptr;l.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)};m.prototype.GetAttribute=m.prototype.GetAttribute=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return V(Tc(b,a,c),p)};m.prototype.GetAttributeByUniqueId=m.prototype.GetAttributeByUniqueId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return V(tc(b,
|
||||
a,c),p)};m.prototype.GetMetadata=m.prototype.GetMetadata=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return V(rd(b,a),Q)};m.prototype.GetAttributeMetadata=m.prototype.GetAttributeMetadata=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return V(Ac(b,a,c),Q)};m.prototype.GetFaceFromMesh=m.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)};m.prototype.GetTriangleStripsFromMesh=m.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)};m.prototype.GetAttributeFloat=m.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!!Rb(b,a,c,e)};m.prototype.GetAttributeFloatForAllPoints=m.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!!Tb(b,a,c,e)};m.prototype.GetAttributeIntForAllPoints=m.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)};m.prototype.SkipAttributeTransform=m.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&
|
||||
(a=a.ptr);Hc(b,a)};m.prototype.__destroy__=m.prototype.__destroy__=function(){kc(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 ac(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 rc(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(){qc(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=ec();a.POINT_CLOUD=Zb();a.TRIANGULAR_MESH=Yc();a.ATTRIBUTE_INVALID_TRANSFORM=
|
||||
id();a.ATTRIBUTE_NO_TRANSFORM=cc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Ic();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=lc();a.INVALID=Xb();a.POSITION=Wb();a.NORMAL=sd();a.COLOR=Nc();a.TEX_COORD=Fc();a.GENERIC=od()}a.calledRun?b():ab.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return e};"object"===typeof module&&module.exports&&(module.exports=DracoDecoderModule);
|
||||
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(b,f,n){b!=Array.prototype&&b!=Object.prototype&&(b[f]=n.value)};$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);
|
||||
$jscomp.polyfill=function(b,f,n,D){if(f){n=$jscomp.global;b=b.split(".");for(D=0;D<b.length-1;D++){var g=b[D];g in n||(n[g]={});n=n[g]}b=b[b.length-1];D=n[b];f=f(D);f!=D&&null!=f&&$jscomp.defineProperty(n,b,{configurable:!0,writable:!0,value:f})}};$jscomp.polyfill("Math.imul",function(b){return b?b:function(f,b){f=Number(f);b=Number(b);var n=f&65535,g=b&65535;return n*g+((f>>>16&65535)*g+n*(b>>>16&65535)<<16>>>0)|0}},"es6","es3");
|
||||
$jscomp.polyfill("Math.clz32",function(b){return b?b:function(f){f=Number(f)>>>0;if(0===f)return 32;var b=0;0===(f&4294901760)&&(f<<=16,b+=16);0===(f&4278190080)&&(f<<=8,b+=8);0===(f&4026531840)&&(f<<=4,b+=4);0===(f&3221225472)&&(f<<=2,b+=2);0===(f&2147483648)&&b++;return b}},"es6","es3");$jscomp.polyfill("Math.trunc",function(b){return b?b:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var f=Math.floor(Math.abs(b));return 0>b?-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(b){return $jscomp.SYMBOL_PREFIX+(b||"")+$jscomp.symbolCounter_++};
|
||||
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var b=$jscomp.global.Symbol.iterator;b||(b=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&$jscomp.defineProperty(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(b){var f=0;return $jscomp.iteratorPrototype(function(){return f<b.length?{done:!1,value:b[f++]}:{done:!0}})};
|
||||
$jscomp.iteratorPrototype=function(b){$jscomp.initSymbolIterator();b={next:b};b[$jscomp.global.Symbol.iterator]=function(){return this};return b};$jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();var f=b[Symbol.iterator];return f?f.call(b):$jscomp.arrayIterator(b)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
|
||||
$jscomp.polyfill("Promise",function(b){function f(){this.batch_=null}function n(b){return b instanceof g?b:new g(function(f,R){f(b)})}if(b&&!$jscomp.FORCE_POLYFILL_PROMISE)return b;f.prototype.asyncExecute=function(b){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(b);return this};f.prototype.asyncExecuteBatch_=function(){var b=this;this.asyncExecuteFunction(function(){b.executeBatch_()})};var D=$jscomp.global.setTimeout;f.prototype.asyncExecuteFunction=function(b){D(b,
|
||||
0)};f.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var b=this.batch_;this.batch_=[];for(var f=0;f<b.length;++f){var g=b[f];delete b[f];try{g()}catch(v){this.asyncThrow_(v)}}}this.batch_=null};f.prototype.asyncThrow_=function(b){this.asyncExecuteFunction(function(){throw b;})};var g=function(b){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var f=this.createResolveAndReject_();try{b(f.resolve,f.reject)}catch(u){f.reject(u)}};g.prototype.createResolveAndReject_=
|
||||
function(){function b(b){return function(R){g||(g=!0,b.call(f,R))}}var f=this,g=!1;return{resolve:b(this.resolveTo_),reject:b(this.reject_)}};g.prototype.resolveTo_=function(b){if(b===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof g)this.settleSameAsPromise_(b);else{a:switch(typeof b){case "object":var f=null!=b;break a;case "function":f=!0;break a;default:f=!1}f?this.resolveToNonPromiseObj_(b):this.fulfill_(b)}};g.prototype.resolveToNonPromiseObj_=function(b){var f=
|
||||
void 0;try{f=b.then}catch(u){this.reject_(u);return}"function"==typeof f?this.settleSameAsThenable_(f,b):this.fulfill_(b)};g.prototype.reject_=function(b){this.settle_(2,b)};g.prototype.fulfill_=function(b){this.settle_(1,b)};g.prototype.settle_=function(b,f){if(0!=this.state_)throw Error("Cannot settle("+b+", "+f|"): Promise already settled in state"+this.state_);this.state_=b;this.result_=f;this.executeOnSettledCallbacks_()};g.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var b=
|
||||
this.onSettledCallbacks_,f=0;f<b.length;++f)b[f].call(),b[f]=null;this.onSettledCallbacks_=null}};var ha=new f;g.prototype.settleSameAsPromise_=function(b){var f=this.createResolveAndReject_();b.callWhenSettled_(f.resolve,f.reject)};g.prototype.settleSameAsThenable_=function(b,f){var g=this.createResolveAndReject_();try{b.call(f,g.resolve,g.reject)}catch(v){g.reject(v)}};g.prototype.then=function(b,f){function n(b,f){return"function"==typeof b?function(f){try{v(b(f))}catch(aa){R(aa)}}:f}var v,R,D=
|
||||
new g(function(b,f){v=b;R=f});this.callWhenSettled_(n(b,v),n(f,R));return D};g.prototype.catch=function(b){return this.then(void 0,b)};g.prototype.callWhenSettled_=function(b,f){function g(){switch(n.state_){case 1:b(n.result_);break;case 2:f(n.result_);break;default:throw Error("Unexpected state: "+n.state_);}}var n=this;null==this.onSettledCallbacks_?ha.asyncExecute(g):this.onSettledCallbacks_.push(function(){ha.asyncExecute(g)})};g.resolve=n;g.reject=function(b){return new g(function(f,g){g(b)})};
|
||||
g.race=function(b){return new g(function(f,g){for(var v=$jscomp.makeIterator(b),u=v.next();!u.done;u=v.next())n(u.value).callWhenSettled_(f,g)})};g.all=function(b){var f=$jscomp.makeIterator(b),u=f.next();return u.done?n([]):new g(function(b,g){function D(f){return function(g){v[f]=g;L--;0==L&&b(v)}}var v=[],L=0;do v.push(void 0),L++,n(u.value).callWhenSettled_(D(v.length-1),g),u=f.next();while(!u.done)})};return g},"es6","es3");
|
||||
var DracoDecoderModule=function(b){function f(a,c){a||S("Assertion failed: "+c)}function n(e,c){if(0===c||!e)return"";for(var d=0,l,b=0;;){l=O[e+b>>0];d|=l;if(0==l&&!c)break;b++;if(c&&b==c)break}c||(c=b);l="";if(128>d){for(;0<c;)d=String.fromCharCode.apply(String,O.subarray(e,e+Math.min(c,1024))),l=l?l+d:d,e+=1024,c-=1024;return l}return a.UTF8ToString(e)}function D(a){return a.replace(/__Z[\w\d_]+/g,function(a){return a===a?a:a+" ["+a+"]"})}function g(){a:{var e=Error();if(!e.stack){try{throw Error(0);
|
||||
}catch(c){e=c}if(!e.stack){e="(no stack trace available)";break a}}e=e.stack.toString()}a.extraStackTrace&&(e+="\n"+a.extraStackTrace());return D(e)}function ha(a,c){0<a%c&&(a+=c-a%c);return a}function R(){a.HEAP8=ba=new Int8Array(E);a.HEAP16=ua=new Int16Array(E);a.HEAP32=w=new Int32Array(E);a.HEAPU8=O=new Uint8Array(E);a.HEAPU16=Ja=new Uint16Array(E);a.HEAPU32=Ka=new Uint32Array(E);a.HEAPF32=La=new Float32Array(E);a.HEAPF64=Ma=new Float64Array(E)}function Ha(){var e=a.usingWasm?va:Na,c=2147483648-
|
||||
e;if(w[W>>2]>c)return!1;var d=x;for(x=Math.max(x,db);x<w[W>>2];)x=536870912>=x?ha(2*x,e):Math.min(ha((3*x+2147483648)/4,e),c);e=a.reallocBuffer(x);if(!e||e.byteLength!=x)return x=d,!1;a.buffer=E=e;R();return!0}function u(e){for(;0<e.length;){var c=e.shift();if("function"==typeof c)c();else{var d=c.func;"number"===typeof d?void 0===c.arg?a.dynCall_v(d):a.dynCall_vi(d,c.arg):d(void 0===c.arg?null:c.arg)}}}function v(e){ca++;a.monitorRunDependencies&&a.monitorRunDependencies(ca)}function Ia(e){ca--;
|
||||
a.monitorRunDependencies&&a.monitorRunDependencies(ca);0==ca&&(null!==wa&&(clearInterval(wa),wa=null),oa&&(e=oa,oa=null,e()))}function ia(){return!!ia.uncaught_exception}function ma(){var e=z.last;if(!e)return(m.setTempRet0(0),0)|0;var c=z.infos[e],d=c.type;if(!d)return(m.setTempRet0(0),e)|0;var l=Array.prototype.slice.call(arguments);a.___cxa_is_pointer_type(d);ma.buffer||(ma.buffer=Oa(4));w[ma.buffer>>2]=e;e=ma.buffer;for(var b=0;b<l.length;b++)if(l[b]&&a.___cxa_can_catch(l[b],d,e))return e=w[e>>
|
||||
2],c.adjusted=e,(m.setTempRet0(l[b]),e)|0;e=w[e>>2];return(m.setTempRet0(d),e)|0}function L(e,c){t.varargs=c;try{var d=t.get(),l=t.get(),b=t.get();e=0;L.buffer||(L.buffers=[null,[],[]],L.printChar=function(c,e){var d=L.buffers[c];f(d);if(0===e||10===e){c=1===c?a.print:a.printErr;a:{for(var l=e=0;d[l];)++l;if(16<l-e&&d.subarray&&Pa)e=Pa.decode(d.subarray(e,l));else for(l="";;){var b=d[e++];if(!b){e=l;break a}if(b&128){var g=d[e++]&63;if(192==(b&224))l+=String.fromCharCode((b&31)<<6|g);else{var h=d[e++]&
|
||||
63;if(224==(b&240))b=(b&15)<<12|g<<6|h;else{var F=d[e++]&63;if(240==(b&248))b=(b&7)<<18|g<<12|h<<6|F;else{var k=d[e++]&63;if(248==(b&252))b=(b&3)<<24|g<<18|h<<12|F<<6|k;else{var pa=d[e++]&63;b=(b&1)<<30|g<<24|h<<18|F<<12|k<<6|pa}}}65536>b?l+=String.fromCharCode(b):(b-=65536,l+=String.fromCharCode(55296|b>>10,56320|b&1023))}}else l+=String.fromCharCode(b)}}c(e);d.length=0}else d.push(e)});for(c=0;c<b;c++){for(var g=w[l+8*c>>2],h=w[l+(8*c+4)>>2],k=0;k<h;k++)L.printChar(d,O[g+k]);e+=h}return e}catch(xa){return"undefined"!==
|
||||
typeof FS&&xa instanceof FS.ErrnoError||S(xa),-xa.errno}}function na(e,c){na.seen||(na.seen={});e in na.seen||(a.dynCall_v(c),na.seen[e]=1)}function aa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function ya(e){function c(){if(!a.calledRun&&(a.calledRun=!0,!ja)){Qa||(Qa=!0,u(Ra));u(Sa);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Ta.unshift(a.postRun.shift());
|
||||
u(Ta)}}null===Ua&&(Ua=Date.now());if(!(0<ca)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Va.unshift(a.preRun.shift());u(Va);0<ca||a.calledRun||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);c()},1)):c())}}function S(e){if(a.onAbort)a.onAbort(e);void 0!==e?(a.print(e),a.printErr(e),e=JSON.stringify(e)):e="";ja=!0;var c="abort("+e+") at "+g()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";
|
||||
Wa&&Wa.forEach(function(a){c=a(c,e)});throw c;}function q(){}function B(a){return(a||q).__cache__}function T(a,c){var e=B(c),b=e[a];if(b)return b;b=Object.create((c||q).prototype);b.ptr=a;return e[a]=b}function X(a){if("string"===typeof a){for(var c=0,e=0;e<a.length;++e){var b=a.charCodeAt(e);55296<=b&&57343>=b&&(b=65536+((b&1023)<<10)|a.charCodeAt(++e)&1023);127>=b?++c:c=2047>=b?c+2:65535>=b?c+3:2097151>=b?c+4:67108863>=b?c+5:c+6}c=Array(c+1);e=0;b=c.length;if(0<b){b=e+b-1;for(var f=0;f<a.length;++f){var g=
|
||||
a.charCodeAt(f);55296<=g&&57343>=g&&(g=65536+((g&1023)<<10)|a.charCodeAt(++f)&1023);if(127>=g){if(e>=b)break;c[e++]=g}else{if(2047>=g){if(e+1>=b)break;c[e++]=192|g>>6}else{if(65535>=g){if(e+2>=b)break;c[e++]=224|g>>12}else{if(2097151>=g){if(e+3>=b)break;c[e++]=240|g>>18}else{if(67108863>=g){if(e+4>=b)break;c[e++]=248|g>>24}else{if(e+5>=b)break;c[e++]=252|g>>30;c[e++]=128|g>>24&63}c[e++]=128|g>>18&63}c[e++]=128|g>>12&63}c[e++]=128|g>>6&63}c[e++]=128|g&63}}c[e]=0}a=k.alloc(c,ba);k.copy(c,ba,a)}return a}
|
||||
function A(){throw"cannot construct a Status, no constructor in IDL";}function G(){this.ptr=gb();B(G)[this.ptr]=this}function H(){this.ptr=hb();B(H)[this.ptr]=this}function p(){this.ptr=ib();B(p)[this.ptr]=this}function K(){this.ptr=jb();B(K)[this.ptr]=this}function y(){this.ptr=kb();B(y)[this.ptr]=this}function r(){this.ptr=lb();B(r)[this.ptr]=this}function I(){this.ptr=mb();B(I)[this.ptr]=this}function U(){this.ptr=nb();B(U)[this.ptr]=this}function M(){this.ptr=ob();B(M)[this.ptr]=this}function h(){this.ptr=
|
||||
pb();B(h)[this.ptr]=this}function C(){this.ptr=qb();B(C)[this.ptr]=this}function Y(){throw"cannot construct a VoidPtr, no constructor in IDL";}function J(){this.ptr=rb();B(J)[this.ptr]=this}function N(){this.ptr=sb();B(N)[this.ptr]=this}var a=b=b||{},Xa=!1,Ya=!1;a.onRuntimeInitialized=function(){Xa=!0;if(Ya&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ya=!0;if(Xa&&"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]&&2>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};a||(a=("undefined"!==typeof b?b:null)||{});var qa={},Z;for(Z in a)a.hasOwnProperty(Z)&&(qa[Z]=a[Z]);var ka=!1,fa=!1,la=!1,ra=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)ka=!0;else if("WORKER"===a.ENVIRONMENT)fa=!0;else if("NODE"===a.ENVIRONMENT)la=!0;else if("SHELL"===a.ENVIRONMENT)ra=!0;else throw Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");
|
||||
else ka="object"===typeof window,fa="function"===typeof importScripts,la="object"===typeof process&&"function"===typeof require&&!ka&&!fa,ra=!ka&&!la&&!fa;if(la){a.print||(a.print=console.log);a.printErr||(a.printErr=console.warn);var za,Aa;a.read=function(a,c){za||(za=require("fs"));Aa||(Aa=require("path"));a=Aa.normalize(a);a=za.readFileSync(a);return c?a:a.toString()};a.readBinary=function(e){e=a.read(e,!0);e.buffer||(e=new Uint8Array(e));f(e.buffer);return e};a.thisProgram||(a.thisProgram=1<process.argv.length?
|
||||
process.argv[1].replace(/\\/g,"/"):"unknown-program");a.arguments=process.argv.slice(2);process.on("uncaughtException",function(a){if(!(a instanceof aa))throw a;});a.inspect=function(){return"[Emscripten Module object]"}}else if(ra)a.print||(a.print=print),"undefined"!=typeof printErr&&(a.printErr=printErr),a.read="undefined"!=typeof read?function(a){return read(a)}: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,c){quit(a)});else if(ka||fa)a.read=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);return c.responseText},fa&&(a.readBinary=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)}),a.readAsync=function(a,
|
||||
c,d){var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){200==e.status||0==e.status&&e.response?c(e.response):d()};e.onerror=d;e.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){}),"undefined"===typeof a.setWindowTitle&&(a.setWindowTitle=function(a){document.title=a});else throw Error("Unknown runtime environment. Where are we?");
|
||||
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,c){throw c;});a.print=a.print;a.printErr=a.printErr;a.preRun=[];a.postRun=[];for(Z in qa)qa.hasOwnProperty(Z)&&(a[Z]=qa[Z]);qa=void 0;var m={setTempRet0:function(a){return tempRet0=a},getTempRet0:function(){return tempRet0},stackSave:function(){return P},stackRestore:function(a){P=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]?m.QUANTUM_SIZE:"i"===a[0]?(a=parseInt(a.substr(1)),f(0===a%8),a/8):0}},getNativeFieldSize:function(a){return Math.max(m.getNativeTypeSize(a),m.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(a,c){"double"===c||"i64"===c?a&7&&(f(4===(a&7)),a+=4):f(0===(a&3));return a},getAlignSize:function(a,c,d){return d||"i64"!=a&&"double"!=a?a?Math.min(c||(a?m.getNativeFieldSize(a):
|
||||
0),m.QUANTUM_SIZE):Math.min(c,8):8},dynCall:function(e,c,d){return d&&d.length?a["dynCall_"+e].apply(null,[c].concat(d)):a["dynCall_"+e].call(null,c)},functionPointers:[],addFunction:function(a){for(var c=0;c<m.functionPointers.length;c++)if(!m.functionPointers[c])return m.functionPointers[c]=a,2*(1+c);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.";},removeFunction:function(a){m.functionPointers[(a-2)/2]=null},warnOnce:function(e){m.warnOnce.shown||
|
||||
(m.warnOnce.shown={});m.warnOnce.shown[e]||(m.warnOnce.shown[e]=1,a.printErr(e))},funcWrappers:{},getFuncWrapper:function(a,c){if(a){f(c);m.funcWrappers[c]||(m.funcWrappers[c]={});var d=m.funcWrappers[c];d[a]||(d[a]=1===c.length?function(){return m.dynCall(c,a)}:2===c.length?function(d){return m.dynCall(c,a,[d])}:function(){return m.dynCall(c,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 c=P;P=P+a|0;P=P+15&-16;return c},staticAlloc:function(a){var c=V;V=V+a|0;V=V+15&-16;return c},dynamicAlloc:function(a){var c=w[W>>2];a=(c+a+15|0)&-16;w[W>>2]=a;return a>=x&&!Ha()?(w[W>>2]=c,0):c},alignMemory:function(a,c){return Math.ceil(a/(c?c:16))*(c?c:16)},makeBigInt:function(a,c,d){return d?+(a>>>0)+4294967296*+(c>>>0):+(a>>>0)+4294967296*+(c|0)},GLOBAL_BASE:1024,QUANTUM_SIZE:4,__dummy__:0},ja=0,Pa="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==
|
||||
typeof TextDecoder&&new TextDecoder("utf-16le");var va=65536,Na=16777216,db=16777216,ba,O,ua,Ja,w,Ka,La,Ma,V,Ba,P,sa,Ca,W;var Da=V=Ba=P=sa=Ca=W=0;a.reallocBuffer||(a.reallocBuffer=function(a){try{if(ArrayBuffer.transfer)var c=ArrayBuffer.transfer(E,a);else{var d=ba;c=new ArrayBuffer(a);(new Int8Array(c)).set(d)}}catch(l){return!1}return tb(c)?c:!1});try{var Ea=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Ea(new ArrayBuffer(4))}catch(e){Ea=function(a){return a.byteLength}}var Fa=
|
||||
a.TOTAL_STACK||5242880,x=a.TOTAL_MEMORY||16777216;x<Fa&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+x+"! (TOTAL_STACK="+Fa+")");if(a.buffer)var E=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:x/va}),E=a.wasmMemory.buffer):E=new ArrayBuffer(x);R();w[0]=1668509029;ua[1]=25459;if(115!==O[2]||99!==O[3])throw"Runtime error: expected the system to be little-endian!";a.HEAP=void 0;a.buffer=E;a.HEAP8=
|
||||
ba;a.HEAP16=ua;a.HEAP32=w;a.HEAPU8=O;a.HEAPU16=Ja;a.HEAPU32=Ka;a.HEAPF32=La;a.HEAPF64=Ma;var Va=[],Ra=[],Sa=[],Za=[],Ta=[],Qa=!1;f(Math.imul&&Math.fround&&Math.clz32&&Math.trunc,"this is a legacy browser, build with LEGACY_VM_SUPPORT");var ca=0,wa=null,oa=null;a.preloadedImages={};a.preloadedAudios={};var Q=null;(function(){function e(){try{if(a.wasmBinary)return new Uint8Array(a.wasmBinary);if(a.readBinary)return a.readBinary(b);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)";
|
||||
}catch(eb){S(eb)}}function c(){return a.wasmBinary||!ka&&!fa||"function"!==typeof fetch?new Promise(function(a,c){a(e())}):fetch(b,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+b+"'";return a.arrayBuffer()}).catch(function(){return e()})}function d(d,e,l){function f(c,d){h=c.exports;if(h.memory){c=h.memory;d=a.buffer;c.byteLength<d.byteLength&&a.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(c);Q||d.set(e.subarray(a.STATIC_BASE,a.STATIC_BASE+a.STATIC_BUMP),a.STATIC_BASE);e.set(d);a.buffer=E=c;R()}a.asm=h;a.usingWasm=!0;Ia("wasm-instantiate")}function k(a){f(a.instance,a.module)}function F(d){c().then(function(a){return WebAssembly.instantiate(a,g)}).then(d).catch(function(c){a.printErr("failed to asynchronously prepare wasm: "+c);S(c)})}if("object"!==typeof WebAssembly)return a.printErr("no native wasm support detected"),!1;if(!(a.wasmMemory instanceof
|
||||
WebAssembly.Memory))return a.printErr("no native wasm Memory in use"),!1;e.memory=a.wasmMemory;g.global={NaN:NaN,Infinity:Infinity};g["global.Math"]=d.Math;g.env=e;v("wasm-instantiate");if(a.instantiateWasm)try{return a.instantiateWasm(g,f)}catch(fb){return a.printErr("Module.instantiateWasm callback failed with error: "+fb),!1}a.wasmBinary||"function"!==typeof WebAssembly.instantiateStreaming||0===b.indexOf("data:")||"function"!==typeof fetch?F(k):WebAssembly.instantiateStreaming(fetch(b,{credentials:"same-origin"}),
|
||||
g).then(k).catch(function(c){a.printErr("wasm streaming compile failed: "+c);a.printErr("falling back to ArrayBuffer instantiation");F(k)});return{}}var b="draco_decoder.wasm",f="draco_decoder.temp.asm.js";"function"===typeof a.locateFile&&(a.locateFile("draco_decoder.wast"),b=a.locateFile(b),f=a.locateFile(f));var g={global:null,env:null,asm2wasm:{"f64-rem":function(a,c){return a%c},"debugger":function(){debugger}},parent:a},h=null;a.asmPreload=a.asm;var k=a.reallocBuffer;a.reallocBuffer=function(c){if("asmjs"===
|
||||
m)var d=k(c);else a:{c=ha(c,a.usingWasm?va:Na);var e=a.buffer.byteLength;if(a.usingWasm)try{d=-1!==a.wasmMemory.grow((c-e)/65536)?a.buffer=a.wasmMemory.buffer:null;break a}catch(cd){d=null;break a}d=void 0}return d};var m="";a.asm=function(c,e,b){if(!e.table){var l=a.wasmTableSize;void 0===l&&(l=1024);var f=a.wasmMaxTableSize;e.table="object"===typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==f?new WebAssembly.Table({initial:l,maximum:f,element:"anyfunc"}):new WebAssembly.Table({initial:l,
|
||||
element:"anyfunc"}):Array(l);a.wasmTable=e.table}e.memoryBase||(e.memoryBase=a.STATIC_BASE);e.tableBase||(e.tableBase=0);(c=d(c,e,b))||S("no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods");return c}})();Da=m.GLOBAL_BASE;V=Da+17616;Ra.push();Q=null;a.STATIC_BASE=Da;a.STATIC_BUMP=17616;var ub=V;V+=16;var z={last:0,caught:[],infos:{},deAdjust:function(a){if(!a||z.infos[a])return a;
|
||||
for(var c in z.infos)if(z.infos[c].adjusted===a)return c;return a},addRef:function(a){a&&z.infos[a].refcount++},decRef:function(e){if(e){var c=z.infos[e];f(0<c.refcount);c.refcount--;0!==c.refcount||c.rethrown||(c.destructor&&a.dynCall_vi(c.destructor,e),delete z.infos[e],___cxa_free_exception(e))}},clearRef:function(a){a&&(z.infos[a].refcount=0)}},t={varargs:0,get:function(a){t.varargs+=4;return w[t.varargs-4>>2]},getStr:function(){return n(t.get())},get64:function(){var a=t.get(),c=t.get();0<=a?
|
||||
f(0===c):f(-1===c);return a},getZero:function(){f(0===t.get())}},ta={},Ga=1;Za.push(function(){var e=a._fflush;e&&e(0);if(e=L.printChar){var c=L.buffers;c[1].length&&e(1,10);c[2].length&&e(2,10)}});W=m.staticAlloc(4);Ba=P=m.alignMemory(V);sa=Ba+Fa;Ca=m.alignMemory(sa);w[W>>2]=Ca;a.wasmTableSize=468;a.wasmMaxTableSize=468;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:Ea};a.asmLibraryArg={abort:S,assert:f,enlargeMemory:Ha,getTotalMemory:function(){return x},abortOnCannotGrowMemory:function(){S("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_ii:function(e,c){try{return a.dynCall_ii(e,c)}catch(d){if("number"!==typeof d&&"longjmp"!==d)throw d;a.setThrew(1,0)}},invoke_iii:function(e,c,d){try{return a.dynCall_iii(e,c,d)}catch(l){if("number"!==typeof l&&"longjmp"!==l)throw l;a.setThrew(1,0)}},invoke_iiii:function(e,c,d,b){try{return a.dynCall_iiii(e,c,d,b)}catch(F){if("number"!==typeof F&&"longjmp"!==F)throw F;a.setThrew(1,0)}},invoke_iiiiiii:function(e,c,d,b,f,g,h){try{return a.dynCall_iiiiiii(e,c,d,b,f,g,h)}catch(ea){if("number"!==
|
||||
typeof ea&&"longjmp"!==ea)throw ea;a.setThrew(1,0)}},invoke_v:function(e){try{a.dynCall_v(e)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_vi:function(e,c){try{a.dynCall_vi(e,c)}catch(d){if("number"!==typeof d&&"longjmp"!==d)throw d;a.setThrew(1,0)}},invoke_vii:function(e,c,d){try{a.dynCall_vii(e,c,d)}catch(l){if("number"!==typeof l&&"longjmp"!==l)throw l;a.setThrew(1,0)}},invoke_viii:function(e,c,d,b){try{a.dynCall_viii(e,c,d,b)}catch(F){if("number"!==typeof F&&
|
||||
"longjmp"!==F)throw F;a.setThrew(1,0)}},invoke_viiii:function(e,c,d,b,f){try{a.dynCall_viiii(e,c,d,b,f)}catch(pa){if("number"!==typeof pa&&"longjmp"!==pa)throw pa;a.setThrew(1,0)}},invoke_viiiii:function(e,c,d,b,f,g){try{a.dynCall_viiiii(e,c,d,b,f,g)}catch(da){if("number"!==typeof da&&"longjmp"!==da)throw da;a.setThrew(1,0)}},invoke_viiiiii:function(e,c,d,b,f,g,h){try{a.dynCall_viiiiii(e,c,d,b,f,g,h)}catch(ea){if("number"!==typeof ea&&"longjmp"!==ea)throw ea;a.setThrew(1,0)}},__ZSt18uncaught_exceptionv:ia,
|
||||
___assert_fail:function(a,c,d,b){ja=!0;throw"Assertion failed: "+n(a)+", at: "+[c?n(c):"unknown filename",d,b?n(b):"unknown function"]+" at "+g();},___cxa_allocate_exception:function(a){return Oa(a)},___cxa_begin_catch:function(a){var c=z.infos[a];c&&!c.caught&&(c.caught=!0,ia.uncaught_exception--);c&&(c.rethrown=!1);z.caught.push(a);z.addRef(z.deAdjust(a));return a},___cxa_find_matching_catch:ma,___cxa_pure_virtual:function(){ja=!0;throw"Pure virtual function called!";},___cxa_throw:function(a,c,
|
||||
d){z.infos[a]={ptr:a,adjusted:a,type:c,destructor:d,refcount:0,caught:!1,rethrown:!1};z.last=a;"uncaught_exception"in ia?ia.uncaught_exception++:ia.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(){},___resumeException:function(a){z.last||(z.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.";
|
||||
},___setErrNo:function(b){a.___errno_location&&(w[a.___errno_location()>>2]=b);return b},___syscall140:function(a,c){t.varargs=c;try{var d=t.getStreamFromFD();t.get();var b=t.get(),e=t.get(),f=t.get();FS.llseek(d,b,f);w[e>>2]=d.position;d.getdents&&0===b&&0===f&&(d.getdents=null);return 0}catch(da){return"undefined"!==typeof FS&&da instanceof FS.ErrnoError||S(da),-da.errno}},___syscall146:L,___syscall6:function(a,c){t.varargs=c;try{var d=t.getStreamFromFD();FS.close(d);return 0}catch(l){return"undefined"!==
|
||||
typeof FS&&l instanceof FS.ErrnoError||S(l),-l.errno}},_abort:function(){a.abort()},_emscripten_memcpy_big:function(a,c,d){O.set(O.subarray(c,c+d),a);return a},_pthread_getspecific:function(a){return ta[a]||0},_pthread_key_create:function(a,c){if(0==a)return 22;w[a>>2]=Ga;ta[Ga]=0;Ga++;return 0},_pthread_once:na,_pthread_setspecific:function(a,c){if(!(a in ta))return 22;ta[a]=c;return 0},DYNAMICTOP_PTR:W,tempDoublePtr:ub,ABORT:ja,STACKTOP:P,STACK_MAX:sa};var $a=a.asm(a.asmGlobalArg,a.asmLibraryArg,
|
||||
E);a.asm=$a;a.___cxa_can_catch=function(){return a.asm.___cxa_can_catch.apply(null,arguments)};a.___cxa_is_pointer_type=function(){return a.asm.___cxa_is_pointer_type.apply(null,arguments)};var hb=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},vb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,
|
||||
arguments)},wb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},xb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,arguments)},kb=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,
|
||||
arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},zb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)},Ab=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,
|
||||
arguments)},Bb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},Cb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},jb=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return a.asm._emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,
|
||||
arguments)},Db=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm._emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},Eb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm._emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},ob=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm._emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},Fb=a._emscripten_bind_DecoderBuffer_Init_2=
|
||||
function(){return a.asm._emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},Gb=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm._emscripten_bind_DecoderBuffer___destroy___0.apply(null,arguments)},Hb=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null,arguments)},Ib=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,
|
||||
arguments)},pb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm._emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},Jb=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},Kb=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Lb=a._emscripten_bind_Decoder_GetAttributeFloat_3=
|
||||
function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Mb=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},Nb=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},Ob=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeId_2.apply(null,
|
||||
arguments)},Pb=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},Qb=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null,arguments)},Rb=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null,arguments)},Sb=a._emscripten_bind_Decoder_GetAttribute_2=
|
||||
function(){return a.asm._emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},Tb=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return a.asm._emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},Ub=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm._emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},Vb=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm._emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},
|
||||
Wb=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,arguments)},Xb=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm._emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},Yb=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm._emscripten_bind_Decoder___destroy___0.apply(null,arguments)},mb=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null,
|
||||
arguments)},Zb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},$b=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},ac=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},rb=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm._emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,
|
||||
arguments)},bc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},cc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},dc=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm._emscripten_bind_DracoInt32Array_size_0.apply(null,arguments)},nb=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm._emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,
|
||||
arguments)},ec=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm._emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},qb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm._emscripten_bind_Mesh_Mesh_0.apply(null,arguments)},fc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm._emscripten_bind_Mesh___destroy___0.apply(null,arguments)},gc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm._emscripten_bind_Mesh_num_attributes_0.apply(null,
|
||||
arguments)},hc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm._emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},ic=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm._emscripten_bind_Mesh_num_points_0.apply(null,arguments)},jc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},kc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,
|
||||
arguments)},lc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},mc=a._emscripten_bind_MetadataQuerier_HasDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasDoubleEntry_2.apply(null,arguments)},nc=a._emscripten_bind_MetadataQuerier_HasIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasIntEntry_2.apply(null,arguments)},oc=a._emscripten_bind_MetadataQuerier_HasStringEntry_2=
|
||||
function(){return a.asm._emscripten_bind_MetadataQuerier_HasStringEntry_2.apply(null,arguments)},lb=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm._emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},pc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm._emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},sb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm._emscripten_bind_Metadata_Metadata_0.apply(null,
|
||||
arguments)},qc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm._emscripten_bind_Metadata___destroy___0.apply(null,arguments)},rc=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm._emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return a.asm._emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},sc=a._emscripten_bind_PointAttribute___destroy___0=
|
||||
function(){return a.asm._emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},tc=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm._emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},uc=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},vc=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_stride_0.apply(null,
|
||||
arguments)},wc=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm._emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},xc=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},yc=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm._emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},zc=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,
|
||||
arguments)},Ac=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm._emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},gb=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm._emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},Bc=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Cc=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm._emscripten_bind_PointCloud_num_attributes_0.apply(null,
|
||||
arguments)},Dc=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm._emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},Ec=a._emscripten_bind_Status___destroy___0=function(){return a.asm._emscripten_bind_Status___destroy___0.apply(null,arguments)},Fc=a._emscripten_bind_Status_code_0=function(){return a.asm._emscripten_bind_Status_code_0.apply(null,arguments)},Gc=a._emscripten_bind_Status_error_msg_0=function(){return a.asm._emscripten_bind_Status_error_msg_0.apply(null,arguments)},
|
||||
Hc=a._emscripten_bind_Status_ok_0=function(){return a.asm._emscripten_bind_Status_ok_0.apply(null,arguments)},Ic=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm._emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},Jc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=
|
||||
function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)},Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,
|
||||
arguments)},Nc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,arguments)},Oc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},Pc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,
|
||||
arguments)},Qc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},Rc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)},Sc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=
|
||||
function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},Uc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},Vc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},Wc=a._emscripten_enum_draco_StatusCode_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_ERROR.apply(null,
|
||||
arguments)},Xc=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm._emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Yc=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},Zc=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm._emscripten_enum_draco_StatusCode_OK.apply(null,arguments)},$c=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,
|
||||
arguments)},ad=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)};a._emscripten_get_global_libc=function(){return a.asm._emscripten_get_global_libc.apply(null,arguments)};var tb=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)};a._free=function(){return a.asm._free.apply(null,arguments)};a._llvm_bswap_i32=function(){return a.asm._llvm_bswap_i32.apply(null,
|
||||
arguments)};var Oa=a._malloc=function(){return a.asm._malloc.apply(null,arguments)};a._memcpy=function(){return a.asm._memcpy.apply(null,arguments)};a._memmove=function(){return a.asm._memmove.apply(null,arguments)};a._memset=function(){return a.asm._memset.apply(null,arguments)};a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)};a.establishStackSpace=function(){return a.asm.establishStackSpace.apply(null,arguments)};a.getTempRet0=function(){return a.asm.getTempRet0.apply(null,arguments)};
|
||||
a.runPostSets=function(){return a.asm.runPostSets.apply(null,arguments)};a.setTempRet0=function(){return a.asm.setTempRet0.apply(null,arguments)};a.setThrew=function(){return a.asm.setThrew.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_iii=
|
||||
function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.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_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)};
|
||||
a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};m.stackAlloc=a.stackAlloc;m.stackSave=a.stackSave;m.stackRestore=a.stackRestore;m.establishStackSpace=a.establishStackSpace;m.setTempRet0=a.setTempRet0;m.getTempRet0=a.getTempRet0;a.asm=$a;if(Q)if("function"===typeof a.locateFile?Q=a.locateFile(Q):a.memoryInitializerPrefixURL&&
|
||||
(Q=a.memoryInitializerPrefixURL+Q),la||ra){var bd=a.readBinary(Q);O.set(bd,m.GLOBAL_BASE)}else{var bb=function(){a.readAsync(Q,ab,function(){throw"could not load memory initializer "+Q;})};v("memory initializer");var ab=function(b){b.byteLength&&(b=new Uint8Array(b));O.set(b,m.GLOBAL_BASE);a.memoryInitializerRequest&&delete a.memoryInitializerRequest.response;Ia("memory initializer")};if(a.memoryInitializerRequest){var cb=function(){var b=a.memoryInitializerRequest,c=b.response;200!==b.status&&0!==
|
||||
b.status?(console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+b.status+", retrying "+Q),bb()):ab(c)};a.memoryInitializerRequest.response?setTimeout(cb,0):a.memoryInitializerRequest.addEventListener("load",cb)}else bb()}a.then=function(b){if(a.calledRun)b(a);else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();b(a)}}return a};aa.prototype=Error();aa.prototype.constructor=aa;var Ua=null;oa=function c(){a.calledRun||ya();a.calledRun||(oa=
|
||||
c)};a.run=ya;a.exit=function(c,d){if(!d||!a.noExitRuntime){if(!a.noExitRuntime&&(ja=!0,P=void 0,u(Za),a.onExit))a.onExit(c);la&&process.exit(c);a.quit(c,new aa(c))}};var Wa=[];a.abort=S;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();ya();q.prototype=Object.create(q.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.WrapperObject=q;a.getCache=B;a.wrapPointer=T;a.castObject=function(a,d){return T(a.ptr,d)};a.NULL=
|
||||
T(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";a.__destroy__();delete B(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 k={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(k.needed){for(var c=0;c<k.temps.length;c++)a._free(k.temps[c]);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(c,d){f(k.buffer);c=c.length*d.BYTES_PER_ELEMENT;c=c+7&-8;k.pos+c>=k.size?(f(0<c),k.needed+=c,d=a._malloc(c),k.temps.push(d)):(d=k.buffer+k.pos,k.pos+=c);return d},copy:function(a,d,b){switch(d.BYTES_PER_ELEMENT){case 2:b>>=1;break;case 4:b>>=2;break;case 8:b>>=3}for(var c=0;c<a.length;c++)d[b+c]=a[c]}};A.prototype=Object.create(q.prototype);A.prototype.constructor=A;A.prototype.__class__=A;A.__cache__={};a.Status=A;A.prototype.code=
|
||||
A.prototype.code=function(){return Fc(this.ptr)};A.prototype.ok=A.prototype.ok=function(){return!!Hc(this.ptr)};A.prototype.error_msg=A.prototype.error_msg=function(){return n(Gc(this.ptr))};A.prototype.__destroy__=A.prototype.__destroy__=function(){Ec(this.ptr)};G.prototype=Object.create(q.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.PointCloud=G;G.prototype.num_attributes=G.prototype.num_attributes=function(){return Cc(this.ptr)};G.prototype.num_points=G.prototype.num_points=
|
||||
function(){return Dc(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){Bc(this.ptr)};H.prototype=Object.create(q.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.AttributeOctahedronTransform=H;H.prototype.InitFromAttribute=H.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!vb(c,a)};H.prototype.quantization_bits=H.prototype.quantization_bits=function(){return xb(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=
|
||||
function(){wb(this.ptr)};p.prototype=Object.create(q.prototype);p.prototype.constructor=p;p.prototype.__class__=p;p.__cache__={};a.PointAttribute=p;p.prototype.size=p.prototype.size=function(){return zc(this.ptr)};p.prototype.GetAttributeTransformData=p.prototype.GetAttributeTransformData=function(){return T(rc(this.ptr),K)};p.prototype.attribute_type=p.prototype.attribute_type=function(){return tc(this.ptr)};p.prototype.data_type=p.prototype.data_type=function(){return wc(this.ptr)};p.prototype.num_components=
|
||||
p.prototype.num_components=function(){return yc(this.ptr)};p.prototype.normalized=p.prototype.normalized=function(){return!!xc(this.ptr)};p.prototype.byte_stride=p.prototype.byte_stride=function(){return vc(this.ptr)};p.prototype.byte_offset=p.prototype.byte_offset=function(){return uc(this.ptr)};p.prototype.unique_id=p.prototype.unique_id=function(){return Ac(this.ptr)};p.prototype.__destroy__=p.prototype.__destroy__=function(){sc(this.ptr)};K.prototype=Object.create(q.prototype);K.prototype.constructor=
|
||||
K;K.prototype.__class__=K;K.__cache__={};a.AttributeTransformData=K;K.prototype.transform_type=K.prototype.transform_type=function(){return Eb(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){Db(this.ptr)};y.prototype=Object.create(q.prototype);y.prototype.constructor=y;y.prototype.__class__=y;y.__cache__={};a.AttributeQuantizationTransform=y;y.prototype.InitFromAttribute=y.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!yb(c,a)};
|
||||
y.prototype.quantization_bits=y.prototype.quantization_bits=function(){return Bb(this.ptr)};y.prototype.min_value=y.prototype.min_value=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Ab(c,a)};y.prototype.range=y.prototype.range=function(){return Cb(this.ptr)};y.prototype.__destroy__=y.prototype.__destroy__=function(){zb(this.ptr)};r.prototype=Object.create(q.prototype);r.prototype.constructor=r;r.prototype.__class__=r;r.__cache__={};a.MetadataQuerier=r;r.prototype.HasIntEntry=
|
||||
r.prototype.HasIntEntry=function(a,d){var c=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return!!nc(c,a,d)};r.prototype.GetIntEntry=r.prototype.GetIntEntry=function(a,d){var c=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return kc(c,a,d)};r.prototype.HasDoubleEntry=r.prototype.HasDoubleEntry=function(a,d){var c=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return!!mc(c,
|
||||
a,d)};r.prototype.GetDoubleEntry=r.prototype.GetDoubleEntry=function(a,d){var c=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return jc(c,a,d)};r.prototype.HasStringEntry=r.prototype.HasStringEntry=function(a,d){var c=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return!!oc(c,a,d)};r.prototype.GetStringEntry=r.prototype.GetStringEntry=function(a,d){var c=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);
|
||||
d=d&&"object"===typeof d?d.ptr:X(d);return n(lc(c,a,d))};r.prototype.__destroy__=r.prototype.__destroy__=function(){pc(this.ptr)};I.prototype=Object.create(q.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoFloat32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Zb(c,a)};I.prototype.size=I.prototype.size=function(){return ac(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){$b(this.ptr)};
|
||||
U.prototype=Object.create(q.prototype);U.prototype.constructor=U;U.prototype.__class__=U;U.__cache__={};a.GeometryAttribute=U;U.prototype.__destroy__=U.prototype.__destroy__=function(){ec(this.ptr)};M.prototype=Object.create(q.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DecoderBuffer=M;M.prototype.Init=M.prototype.Init=function(a,d){var c=this.ptr;k.prepare();if("object"==typeof a&&"object"===typeof a){var b=k.alloc(a,ba);k.copy(a,ba,b);a=b}d&&"object"===typeof d&&
|
||||
(d=d.ptr);Fb(c,a,d)};M.prototype.__destroy__=M.prototype.__destroy__=function(){Gb(this.ptr)};h.prototype=Object.create(q.prototype);h.prototype.constructor=h;h.prototype.__class__=h;h.__cache__={};a.Decoder=h;h.prototype.GetEncodedGeometryType=h.prototype.GetEncodedGeometryType=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Tb(c,a)};h.prototype.DecodeBufferToPointCloud=h.prototype.DecodeBufferToPointCloud=function(a,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===
|
||||
typeof d&&(d=d.ptr);return T(Ib(c,a,d),A)};h.prototype.DecodeBufferToMesh=h.prototype.DecodeBufferToMesh=function(a,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);return T(Hb(c,a,d),A)};h.prototype.GetAttributeId=h.prototype.GetAttributeId=function(a,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);d&&"object"===typeof d&&(d=d.ptr);return Ob(c,a,d)};h.prototype.GetAttributeIdByName=h.prototype.GetAttributeIdByName=function(a,d){var c=this.ptr;k.prepare();
|
||||
a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);return Nb(c,a,d)};h.prototype.GetAttributeIdByMetadataEntry=h.prototype.GetAttributeIdByMetadataEntry=function(a,d,b){var c=this.ptr;k.prepare();a&&"object"===typeof a&&(a=a.ptr);d=d&&"object"===typeof d?d.ptr:X(d);b=b&&"object"===typeof b?b.ptr:X(b);return Mb(c,a,d,b)};h.prototype.GetAttribute=h.prototype.GetAttribute=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return T(Sb(c,
|
||||
a,b),p)};h.prototype.GetAttributeByUniqueId=h.prototype.GetAttributeByUniqueId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return T(Jb(c,a,b),p)};h.prototype.GetMetadata=h.prototype.GetMetadata=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return T(Vb(c,a),N)};h.prototype.GetAttributeMetadata=h.prototype.GetAttributeMetadata=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return T(Rb(c,
|
||||
a,b),N)};h.prototype.GetFaceFromMesh=h.prototype.GetFaceFromMesh=function(a,b,f){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Ub(c,a,b,f)};h.prototype.GetTriangleStripsFromMesh=h.prototype.GetTriangleStripsFromMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return Wb(c,a,b)};h.prototype.GetAttributeFloat=h.prototype.GetAttributeFloat=function(a,b,f){var c=this.ptr;
|
||||
a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Lb(c,a,b,f)};h.prototype.GetAttributeFloatForAllPoints=h.prototype.GetAttributeFloatForAllPoints=function(a,b,f){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Kb(c,a,b,f)};h.prototype.GetAttributeIntForAllPoints=h.prototype.GetAttributeIntForAllPoints=function(a,b,f){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);
|
||||
b&&"object"===typeof b&&(b=b.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Qb(c,a,b,f)};h.prototype.GetAttributeInt32ForAllPoints=h.prototype.GetAttributeInt32ForAllPoints=function(a,b,f){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);f&&"object"===typeof f&&(f=f.ptr);return!!Pb(c,a,b,f)};h.prototype.SkipAttributeTransform=h.prototype.SkipAttributeTransform=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Xb(c,a)};h.prototype.__destroy__=h.prototype.__destroy__=
|
||||
function(){Yb(this.ptr)};C.prototype=Object.create(q.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Mesh=C;C.prototype.num_faces=C.prototype.num_faces=function(){return hc(this.ptr)};C.prototype.num_attributes=C.prototype.num_attributes=function(){return gc(this.ptr)};C.prototype.num_points=C.prototype.num_points=function(){return ic(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){fc(this.ptr)};Y.prototype=Object.create(q.prototype);Y.prototype.constructor=
|
||||
Y;Y.prototype.__class__=Y;Y.__cache__={};a.VoidPtr=Y;Y.prototype.__destroy__=Y.prototype.__destroy__=function(){Ic(this.ptr)};J.prototype=Object.create(q.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.DracoInt32Array=J;J.prototype.GetValue=J.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return bc(b,a)};J.prototype.size=J.prototype.size=function(){return dc(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){cc(this.ptr)};
|
||||
N.prototype=Object.create(q.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.Metadata=N;N.prototype.__destroy__=N.prototype.__destroy__=function(){qc(this.ptr)};(function(){function b(){a.OK=Zc();a.ERROR=Wc();a.IO_ERROR=Yc();a.INVALID_PARAMETER=Xc();a.UNSUPPORTED_VERSION=ad();a.UNKNOWN_VERSION=$c();a.INVALID_GEOMETRY_TYPE=Nc();a.POINT_CLOUD=Oc();a.TRIANGULAR_MESH=Pc();a.ATTRIBUTE_INVALID_TRANSFORM=Jc();a.ATTRIBUTE_NO_TRANSFORM=Kc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Mc();
|
||||
a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Lc();a.INVALID=Sc();a.POSITION=Uc();a.NORMAL=Tc();a.COLOR=Qc();a.TEX_COORD=Vc();a.GENERIC=Rc()}a.calledRun?b():Sa.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return b};"object"===typeof module&&module.exports&&(module.exports=DracoDecoderModule);
|
||||
|
@ -118,7 +118,7 @@ THREE.DRACOLoader.prototype = {
|
||||
var scope = this;
|
||||
this.attributeUniqueIdMap = (attributeUniqueIdMap !== undefined) ?
|
||||
attributeUniqueIdMap : {};
|
||||
THREE.DRACOLoader.getDecoder(this,
|
||||
THREE.DRACOLoader.getDecoderModule(
|
||||
function(dracoDecoder) {
|
||||
scope.decodeDracoFileInternal(rawBuffer, dracoDecoder, callback);
|
||||
});
|
||||
@ -333,7 +333,7 @@ THREE.DRACOLoader.prototype = {
|
||||
},
|
||||
|
||||
isVersionSupported: function(version, callback) {
|
||||
THREE.DRACOLoader.getDecoder(this,
|
||||
THREE.DRACOLoader.getDecoderModule(
|
||||
function(decoder) {
|
||||
callback(decoder.isVersionSupported(version));
|
||||
});
|
||||
@ -405,21 +405,20 @@ THREE.DRACOLoader.loadDracoDecoder = function(dracoDecoder) {
|
||||
}
|
||||
}
|
||||
|
||||
THREE.DRACOLoader.decoderCreationCalled = false;
|
||||
|
||||
/**
|
||||
* Creates and returns a singleton instance of the DracoDecoderModule.
|
||||
* The module loading is done asynchronously for WebAssembly. Initialized module
|
||||
* can be accessed through the callback function
|
||||
* |onDracoDecoderModuleLoadedCallback|.
|
||||
*/
|
||||
THREE.DRACOLoader.getDecoder = (function() {
|
||||
var decoder;
|
||||
var decoderCreationCalled = false;
|
||||
|
||||
return function(dracoDecoder, onDracoDecoderModuleLoadedCallback) {
|
||||
if (typeof decoder !== 'undefined') {
|
||||
THREE.DRACOLoader.getDecoderModule = (function() {
|
||||
return function(onDracoDecoderModuleLoadedCallback) {
|
||||
if (typeof THREE.DRACOLoader.decoderModule !== 'undefined') {
|
||||
// Module already initialized.
|
||||
if (typeof onDracoDecoderModuleLoadedCallback !== 'undefined') {
|
||||
onDracoDecoderModuleLoadedCallback(decoder);
|
||||
onDracoDecoderModuleLoadedCallback(THREE.DRACOLoader.decoderModule);
|
||||
}
|
||||
} else {
|
||||
if (typeof DracoDecoderModule === 'undefined') {
|
||||
@ -438,23 +437,40 @@ THREE.DRACOLoader.getDecoder = (function() {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!decoderCreationCalled) {
|
||||
decoderCreationCalled = true;
|
||||
if (!THREE.DRACOLoader.decoderCreationCalled) {
|
||||
THREE.DRACOLoader.decoderCreationCalled = true;
|
||||
THREE.DRACOLoader.dracoDecoderType['onModuleLoaded'] =
|
||||
function(module) {
|
||||
decoder = module;
|
||||
THREE.DRACOLoader.decoderModule = module;
|
||||
};
|
||||
DracoDecoderModule(THREE.DRACOLoader.dracoDecoderType);
|
||||
}
|
||||
}
|
||||
|
||||
// Either the DracoDecoderModule has not been defined or the decoder
|
||||
// has not been created yet. Call getDecoder() again.
|
||||
// has not been created yet. Call getDecoderModule() again.
|
||||
setTimeout(function() {
|
||||
THREE.DRACOLoader.getDecoder(dracoDecoder,
|
||||
THREE.DRACOLoader.getDecoderModule(
|
||||
onDracoDecoderModuleLoadedCallback);
|
||||
}, 10);
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
// Releases the DracoDecoderModule instance associated with the draco loader.
|
||||
// The module will be automatically re-created the next time a new geometry is
|
||||
// loaded by THREE.DRACOLoader.
|
||||
THREE.DRACOLoader.releaseDecoderModule = function() {
|
||||
THREE.DRACOLoader.decoderModule = undefined;
|
||||
THREE.DRACOLoader.decoderCreationCalled = false;
|
||||
if (THREE.DRACOLoader.dracoDecoderType !== undefined &&
|
||||
THREE.DRACOLoader.dracoDecoderType.wasmBinary !== undefined) {
|
||||
// For WASM build we need to preserve the wasmBinary for future use.
|
||||
var wasmBinary = THREE.DRACOLoader.dracoDecoderType.wasmBinary;
|
||||
THREE.DRACOLoader.dracoDecoderType = {};
|
||||
THREE.DRACOLoader.dracoDecoderType.wasmBinary = wasmBinary;
|
||||
} else {
|
||||
THREE.DRACOLoader.dracoDecoderType = {};
|
||||
}
|
||||
}
|
||||
|
226
javascript/example/webgl_loader_draco_advanced.html
Normal file
226
javascript/example/webgl_loader_draco_advanced.html
Normal file
@ -0,0 +1,226 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>three.js webgl - loaders - Draco loader</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Monospace;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
margin: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="page-wrapper">
|
||||
<h1>Open a draco compressed file (.drc):</h1>
|
||||
<div>
|
||||
<input type="file" id="fileInput">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<pre id="decoderType"><pre>
|
||||
</div>
|
||||
<div>
|
||||
<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="geometry_helper.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
// Global Draco decoder type.
|
||||
var dracoLoader;
|
||||
|
||||
createDracoDecoder();
|
||||
|
||||
function createDracoDecoder() {
|
||||
dracoLoader = new THREE.DRACOLoader('../');
|
||||
}
|
||||
|
||||
var camera, cameraTarget, scene, renderer;
|
||||
|
||||
function init() {
|
||||
var container = document.createElement('div');
|
||||
document.body.appendChild(container);
|
||||
|
||||
camera = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, 1, 15);
|
||||
camera.position.set(3, 0.15, 3);
|
||||
cameraTarget = new THREE.Vector3(0, 0, 0);
|
||||
|
||||
scene = new THREE.Scene();
|
||||
scene.fog = new THREE.Fog(0x72645b, 2, 15);
|
||||
|
||||
// Ground
|
||||
var plane = new THREE.Mesh(
|
||||
new THREE.PlaneBufferGeometry(40, 40),
|
||||
new THREE.MeshPhongMaterial({color: 0x999999, specular: 0x101010}));
|
||||
plane.rotation.x = -Math.PI/2;
|
||||
plane.position.y = -0.5;
|
||||
scene.add(plane);
|
||||
plane.receiveShadow = true;
|
||||
|
||||
// Lights
|
||||
scene.add(new THREE.HemisphereLight(0x443333, 0x111122));
|
||||
addShadowedLight(1, 1, 1, 0xffffff, 1.35);
|
||||
addShadowedLight(0.5, 1, -1, 0xffaa00, 1);
|
||||
|
||||
// renderer
|
||||
renderer = new THREE.WebGLRenderer({antialias: true});
|
||||
renderer.setClearColor(scene.fog.color);
|
||||
renderer.setPixelRatio(window.devicePixelRatio);
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
container.appendChild(renderer.domElement);
|
||||
window.addEventListener('resize', onWindowResize, false);
|
||||
}
|
||||
|
||||
function addShadowedLight(x, y, z, color, intensity) {
|
||||
var directionalLight = new THREE.DirectionalLight(color, intensity);
|
||||
directionalLight.position.set(x, y, z);
|
||||
scene.add(directionalLight);
|
||||
}
|
||||
|
||||
function onWindowResize() {
|
||||
camera.aspect = window.innerWidth / window.innerHeight;
|
||||
camera.updateProjectionMatrix();
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
}
|
||||
|
||||
function animate() {
|
||||
requestAnimationFrame(animate);
|
||||
render();
|
||||
}
|
||||
|
||||
function render() {
|
||||
var timer = Date.now() * 0.0005;
|
||||
camera.position.x = Math.sin(timer) * 2.5;
|
||||
camera.position.z = Math.cos(timer) * 2.5;
|
||||
camera.lookAt(cameraTarget);
|
||||
renderer.render(scene, camera);
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
var fileInput = document.getElementById('fileInput');
|
||||
var fileDisplayArea = document.getElementById('fileDisplayArea');
|
||||
|
||||
fileInput.onclick = function() {
|
||||
this.value = '';
|
||||
}
|
||||
|
||||
fileInput.addEventListener('change', function(e) {
|
||||
var file = fileInput.files[0];
|
||||
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
// Enable logging to console output.
|
||||
dracoLoader.setVerbosity(1);
|
||||
|
||||
// To use triangle strips use:
|
||||
// dracoLoader.setDrawMode(THREE.TriangleStripDrawMode);
|
||||
dracoLoader.setDrawMode(THREE.TrianglesDrawMode);
|
||||
|
||||
// Skip dequantization of the position attribute. It will be done on the GPU.
|
||||
dracoLoader.setSkipDequantization('position', true);
|
||||
dracoLoader.decodeDracoFile(reader.result, function(bufferGeometry) {
|
||||
if (dracoLoader.decode_time !== undefined) {
|
||||
fileDisplayArea.innerText = 'Decode time = ' + dracoLoader.decode_time + '\n' +
|
||||
'Import time = ' + dracoLoader.import_time;
|
||||
}
|
||||
var material = new THREE.MeshStandardMaterial({vertexColors: THREE.VertexColors});
|
||||
// If the position attribute is quantized, modify the material to perform
|
||||
// dequantization on the GPU.
|
||||
if (bufferGeometry.attributes['position'].isQuantized) {
|
||||
setDequantizationForMaterial(material, bufferGeometry);
|
||||
}
|
||||
|
||||
var geometry;
|
||||
// Point cloud does not have face indices.
|
||||
if (bufferGeometry.index == null) {
|
||||
geometry = new THREE.Points(bufferGeometry, material);
|
||||
} else {
|
||||
if (bufferGeometry.attributes.normal === undefined) {
|
||||
var geometryHelper = new GeometryHelper();
|
||||
geometryHelper.computeVertexNormals(bufferGeometry);
|
||||
}
|
||||
geometry = new THREE.Mesh(bufferGeometry, material);
|
||||
geometry.drawMode = dracoLoader.drawMode;
|
||||
}
|
||||
// Compute range of the geometry coordinates for proper rendering.
|
||||
bufferGeometry.computeBoundingBox();
|
||||
if (bufferGeometry.attributes['position'].isQuantized) {
|
||||
// If the geometry is quantized, transform the bounding box to the dequantized
|
||||
// coordinates.
|
||||
var posAttribute = bufferGeometry.attributes['position'];
|
||||
var normConstant =
|
||||
posAttribute.maxRange / (1 << posAttribute.numQuantizationBits);
|
||||
var minPos = posAttribute.minValues;
|
||||
bufferGeometry.boundingBox.max.x =
|
||||
minPos[0] + bufferGeometry.boundingBox.max.x * normConstant;
|
||||
bufferGeometry.boundingBox.max.y =
|
||||
minPos[1] + bufferGeometry.boundingBox.max.y * normConstant;
|
||||
bufferGeometry.boundingBox.max.z =
|
||||
minPos[2] + bufferGeometry.boundingBox.max.z * normConstant;
|
||||
bufferGeometry.boundingBox.min.x =
|
||||
minPos[0] + bufferGeometry.boundingBox.min.x * normConstant;
|
||||
bufferGeometry.boundingBox.min.y =
|
||||
minPos[1] + bufferGeometry.boundingBox.min.y * normConstant;
|
||||
bufferGeometry.boundingBox.min.z =
|
||||
minPos[2] + bufferGeometry.boundingBox.min.z * normConstant;
|
||||
}
|
||||
var sizeX = bufferGeometry.boundingBox.max.x - bufferGeometry.boundingBox.min.x;
|
||||
var sizeY = bufferGeometry.boundingBox.max.y - bufferGeometry.boundingBox.min.y;
|
||||
var sizeZ = bufferGeometry.boundingBox.max.z - bufferGeometry.boundingBox.min.z;
|
||||
var diagonalSize = Math.sqrt(sizeX * sizeX + sizeY * sizeY + sizeZ * sizeZ);
|
||||
var scale = 1.0 / diagonalSize;
|
||||
var midX =
|
||||
(bufferGeometry.boundingBox.min.x + bufferGeometry.boundingBox.max.x) / 2;
|
||||
var midY =
|
||||
(bufferGeometry.boundingBox.min.y + bufferGeometry.boundingBox.max.y) / 2;
|
||||
var midZ =
|
||||
(bufferGeometry.boundingBox.min.z + bufferGeometry.boundingBox.max.z) / 2;
|
||||
|
||||
geometry.scale.multiplyScalar(scale);
|
||||
geometry.position.x = -midX * scale;
|
||||
geometry.position.y = -midY * scale;
|
||||
geometry.position.z = -midZ * scale;
|
||||
geometry.castShadow = true;
|
||||
geometry.receiveShadow = true;
|
||||
|
||||
var selectedObject = scene.getObjectByName("my_mesh");
|
||||
scene.remove(selectedObject);
|
||||
geometry.name = "my_mesh";
|
||||
scene.add(geometry);
|
||||
});
|
||||
}
|
||||
reader.readAsArrayBuffer(file);
|
||||
});
|
||||
|
||||
init();
|
||||
animate();
|
||||
}
|
||||
|
||||
function setDequantizationForMaterial(material, bufferGeometry) {
|
||||
material.onBeforeCompile = function(shader) {
|
||||
// Add uniform variables needed for dequantization.
|
||||
var posAttribute = bufferGeometry.attributes['position'];
|
||||
shader.uniforms.normConstant =
|
||||
{ value: posAttribute.maxRange / (1 << posAttribute.numQuantizationBits) };
|
||||
shader.uniforms.minPos = { value: posAttribute.minValues };
|
||||
|
||||
shader.vertexShader = 'uniform float maxRange;\n' +
|
||||
'uniform float normConstant;\n' +
|
||||
'uniform vec3 minPos;\n' +
|
||||
shader.vertexShader;
|
||||
shader.vertexShader = shader.vertexShader.replace(
|
||||
'#include <begin_vertex>',
|
||||
'vec3 transformed = minPos + position * normConstant;'
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "draco3d",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.4",
|
||||
"description": "Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.",
|
||||
"main": "draco3d.js",
|
||||
"scripts": {
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "draco3dgltf",
|
||||
"version": "1.0",
|
||||
"version": "1.2.4",
|
||||
"description": "This package contains a specific version of Draco 3D geometric compression library that is used for glTF Draco mesh compression extension.",
|
||||
"main": "draco3dgltf.js",
|
||||
"scripts": {
|
||||
|
@ -25,15 +25,26 @@ namespace draco {
|
||||
|
||||
// Index of an attribute value entry stored in a GeometryAttribute.
|
||||
DEFINE_NEW_DRACO_INDEX_TYPE(int32_t, AttributeValueIndex)
|
||||
|
||||
// Index of a point in a PointCloud.
|
||||
DEFINE_NEW_DRACO_INDEX_TYPE(int32_t, PointIndex)
|
||||
// Vertex index in a Mesh or CornerTable.
|
||||
DEFINE_NEW_DRACO_INDEX_TYPE(int32_t, VertexIndex);
|
||||
// Corner index that identifies a corner in a Mesh or CornerTable.
|
||||
DEFINE_NEW_DRACO_INDEX_TYPE(int32_t, CornerIndex);
|
||||
// Face index for Mesh and CornerTable.
|
||||
DEFINE_NEW_DRACO_INDEX_TYPE(int32_t, FaceIndex);
|
||||
|
||||
// Constants denoting invalid indices.
|
||||
static constexpr AttributeValueIndex kInvalidAttributeValueIndex(
|
||||
std::numeric_limits<int32_t>::min() / 2);
|
||||
static constexpr PointIndex kInvalidPointIndex(
|
||||
std::numeric_limits<int32_t>::min() / 2);
|
||||
static constexpr VertexIndex kInvalidVertexIndex(
|
||||
std::numeric_limits<int32_t>::min() / 2);
|
||||
static constexpr CornerIndex kInvalidCornerIndex(
|
||||
std::numeric_limits<int32_t>::min() / 2);
|
||||
static constexpr FaceIndex kInvalidFaceIndex(
|
||||
std::numeric_limits<int32_t>::min() / 2);
|
||||
|
||||
} // namespace draco
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "draco/mesh/corner_table_indices.h"
|
||||
#include "draco/attributes/geometry_indices.h"
|
||||
|
||||
namespace draco {
|
||||
|
||||
@ -27,6 +27,13 @@ namespace draco {
|
||||
struct MeshAttributeIndicesEncodingData {
|
||||
MeshAttributeIndicesEncodingData() : num_values(0) {}
|
||||
|
||||
void Initialize(int num_vertices) {
|
||||
vertex_to_encoded_attribute_value_index_map.resize(num_vertices);
|
||||
|
||||
// We expect to store one value for each vertex.
|
||||
encoded_attribute_value_index_to_corner_map.reserve(num_vertices);
|
||||
}
|
||||
|
||||
// Array for storing the corner ids in the order their associated attribute
|
||||
// entries were encoded/decoded. For every encoded attribute value entry we
|
||||
// store exactly one corner. I.e., this is the mapping between an encoded
|
||||
|
@ -15,9 +15,9 @@
|
||||
#ifndef DRACO_COMPRESSION_ATTRIBUTES_MESH_TRAVERSAL_SEQUENCER_H_
|
||||
#define DRACO_COMPRESSION_ATTRIBUTES_MESH_TRAVERSAL_SEQUENCER_H_
|
||||
|
||||
#include "draco/attributes/geometry_indices.h"
|
||||
#include "draco/compression/attributes/mesh_attribute_indices_encoding_data.h"
|
||||
#include "draco/compression/attributes/points_sequencer.h"
|
||||
#include "draco/mesh/corner_table_indices.h"
|
||||
#include "draco/mesh/mesh.h"
|
||||
|
||||
namespace draco {
|
||||
@ -70,6 +70,10 @@ class MeshTraversalSequencer : public PointsSequencer {
|
||||
|
||||
protected:
|
||||
bool GenerateSequenceInternal() override {
|
||||
// Preallocate memory for storing point indices. We expect the number of
|
||||
// points to be the same as the number of corner table vertices.
|
||||
out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
|
||||
|
||||
traverser_.OnTraversalStart();
|
||||
if (corner_order_) {
|
||||
for (uint32_t i = 0; i < corner_order_->size(); ++i) {
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "draco/core/draco_test_base.h"
|
||||
#include "draco/core/draco_test_utils.h"
|
||||
#include "draco/core/vector_d.h"
|
||||
#include "draco/io/obj_decoder.h"
|
||||
#include "draco/mesh/triangle_soup_mesh_builder.h"
|
||||
|
||||
namespace {
|
||||
@ -124,4 +125,22 @@ TEST_F(EncodeTest, TestEncoderQuantization) {
|
||||
VerifyNumQuantizationBits(buffer, 16, 15, 15);
|
||||
}
|
||||
|
||||
TEST_F(EncodeTest, TestLinesObj) {
|
||||
// This test verifies that Encoder can encode file that contains only line
|
||||
// segments (that are ignored).
|
||||
std::unique_ptr<draco::Mesh> mesh(
|
||||
draco::ReadMeshFromTestFile("test_lines.obj"));
|
||||
ASSERT_NE(mesh, nullptr);
|
||||
ASSERT_EQ(mesh->num_faces(), 0);
|
||||
std::unique_ptr<draco::PointCloud> pc(
|
||||
draco::ReadPointCloudFromTestFile("test_lines.obj"));
|
||||
ASSERT_NE(pc, nullptr);
|
||||
|
||||
draco::Encoder encoder;
|
||||
encoder.SetAttributeQuantization(draco::GeometryAttribute::POSITION, 16);
|
||||
|
||||
draco::EncoderBuffer buffer;
|
||||
ASSERT_TRUE(encoder.EncodePointCloudToBuffer(*pc, &buffer).ok());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -49,7 +49,6 @@ Status ExpertEncoder::EncodePointCloudToBuffer(const PointCloud &pc,
|
||||
encoder.reset(new PointCloudSequentialEncoder());
|
||||
} else {
|
||||
// Speed < 10, use POINT_CLOUD_KD_TREE_ENCODING if possible.
|
||||
const PointAttribute *const att = pc.attribute(0);
|
||||
bool kd_tree_possible = true;
|
||||
// Kd-Tree encoder can be currently used only under following conditions:
|
||||
// - Point cloud has one attribute describing positions
|
||||
@ -57,6 +56,10 @@ Status ExpertEncoder::EncodePointCloudToBuffer(const PointCloud &pc,
|
||||
// - Position data type is one of the following:
|
||||
// -float32 and quantization is enabled
|
||||
// -uint32
|
||||
const PointAttribute *const att =
|
||||
pc.GetNamedAttribute(GeometryAttribute::POSITION);
|
||||
if (att == nullptr || pc.num_attributes() != 1)
|
||||
kd_tree_possible = false;
|
||||
if (kd_tree_possible &&
|
||||
att->attribute_type() != GeometryAttribute::POSITION)
|
||||
kd_tree_possible = false;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "draco/compression/mesh/mesh_edgebreaker_decoder.h"
|
||||
#include "draco/compression/mesh/mesh_edgebreaker_traversal_predictive_decoder.h"
|
||||
#include "draco/compression/mesh/mesh_edgebreaker_traversal_valence_decoder.h"
|
||||
#include "draco/mesh/corner_table_iterators.h"
|
||||
#include "draco/mesh/corner_table_traversal_processor.h"
|
||||
#include "draco/mesh/edgebreaker_traverser.h"
|
||||
#include "draco/mesh/prediction_degree_traverser.h"
|
||||
@ -256,14 +257,14 @@ bool MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
|
||||
if (!DecodeVarint(&num_faces, decoder_->buffer()))
|
||||
return false;
|
||||
}
|
||||
if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3)
|
||||
return false; // Draco cannot handle this many faces.
|
||||
|
||||
// Decode topology (connectivity).
|
||||
vertex_traversal_length_.clear();
|
||||
corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
|
||||
if (corner_table_ == nullptr)
|
||||
return false;
|
||||
if (!corner_table_->Reset(num_faces))
|
||||
return false;
|
||||
processed_corner_ids_.clear();
|
||||
processed_corner_ids_.reserve(num_faces);
|
||||
processed_connectivity_corners_.clear();
|
||||
@ -317,6 +318,10 @@ bool MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!corner_table_->Reset(num_faces,
|
||||
num_encoded_vertices_ + num_encoded_split_symbols))
|
||||
return false;
|
||||
|
||||
// Start with all vertices marked as holes (boundaries).
|
||||
// Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
|
||||
// be marked as non hole vertices. We need to allocate the array larger
|
||||
@ -400,14 +405,6 @@ bool MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
|
||||
}
|
||||
traversal_decoder_.Done();
|
||||
|
||||
// Update vertex to corner mapping on boundary vertices as it was not set
|
||||
// correctly in the previous steps.
|
||||
for (int i = 0; i < corner_table_->num_vertices(); ++i) {
|
||||
if (is_vert_hole_[i]) {
|
||||
corner_table_->UpdateVertexToCornerMap(VertexIndex(i));
|
||||
}
|
||||
}
|
||||
|
||||
// Decode attribute connectivity.
|
||||
// Prepare data structure for decoding non-position attribute connectivity.
|
||||
for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
|
||||
@ -420,8 +417,7 @@ bool MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
|
||||
attribute_data_[i].connectivity_data.RecomputeVertices(nullptr, nullptr);
|
||||
}
|
||||
|
||||
pos_encoding_data_.vertex_to_encoded_attribute_value_index_map.resize(
|
||||
corner_table_->num_vertices());
|
||||
pos_encoding_data_.Initialize(corner_table_->num_vertices());
|
||||
for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
|
||||
// For non-position attributes, preallocate the vertex to value mapping
|
||||
// using the maximum number of vertices from the base corner table and the
|
||||
@ -431,11 +427,9 @@ bool MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
|
||||
attribute_data_[i].connectivity_data.num_vertices();
|
||||
if (att_connectivity_verts < corner_table_->num_vertices())
|
||||
att_connectivity_verts = corner_table_->num_vertices();
|
||||
attribute_data_[i]
|
||||
.encoding_data.vertex_to_encoded_attribute_value_index_map.resize(
|
||||
att_connectivity_verts);
|
||||
attribute_data_[i].encoding_data.Initialize(att_connectivity_verts);
|
||||
}
|
||||
if (!AssignPointsToCorners())
|
||||
if (!AssignPointsToCorners(num_connectivity_verts))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@ -465,7 +459,12 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
// id they belong to, so we can address them using this symbol id.
|
||||
std::unordered_map<int, CornerIndex> topology_split_active_corners;
|
||||
|
||||
int num_vertices = 0;
|
||||
// Vector used for storing vertices that were marked as isolated during the
|
||||
// decoding process. Currently used only when the mesh doesn't contain any
|
||||
// non-position connectivity data.
|
||||
std::vector<VertexIndex> invalid_vertices;
|
||||
const bool remove_invalid_vertices = attribute_data_.empty();
|
||||
|
||||
int max_num_vertices = is_vert_hole_.size();
|
||||
int num_faces = 0;
|
||||
for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
|
||||
@ -495,25 +494,28 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
// top of the active stack.
|
||||
if (active_corner_stack.empty())
|
||||
return -1;
|
||||
|
||||
const CornerIndex corner_a = active_corner_stack.back();
|
||||
CornerIndex corner_b = corner_table_->Previous(corner_a);
|
||||
while (corner_table_->Opposite(corner_b) >= 0) {
|
||||
corner_b = corner_table_->Previous(corner_table_->Opposite(corner_b));
|
||||
}
|
||||
const VertexIndex vertex_x =
|
||||
corner_table_->Vertex(corner_table_->Next(corner_a));
|
||||
const CornerIndex corner_b =
|
||||
corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
|
||||
|
||||
// New tip corner.
|
||||
const CornerIndex corner(3 * face.value());
|
||||
// Update opposite corner mappings.
|
||||
SetOppositeCorners(corner_a, corner + 1);
|
||||
SetOppositeCorners(corner_b, corner + 2);
|
||||
const VertexIndex vertex_x =
|
||||
corner_table_->Vertex(corner_table_->Next(corner_a));
|
||||
|
||||
// Update vertex mapping.
|
||||
corner_table_->MapCornerToVertex(corner, vertex_x);
|
||||
corner_table_->MapCornerToVertex(
|
||||
corner + 1, corner_table_->Vertex(corner_table_->Next(corner_b)));
|
||||
corner_table_->MapCornerToVertex(
|
||||
corner + 2, corner_table_->Vertex(corner_table_->Previous(corner_a)));
|
||||
if (num_vertices > max_num_vertices)
|
||||
const VertexIndex vert_a_prev =
|
||||
corner_table_->Vertex(corner_table_->Previous(corner_a));
|
||||
corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
|
||||
corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
|
||||
if (corner_table_->num_vertices() > max_num_vertices)
|
||||
return -1; // Unexpected number of decoded vertices.
|
||||
// Mark the vertex |x| as interior.
|
||||
is_vert_hole_[vertex_x.value()] = false;
|
||||
@ -540,23 +542,32 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
|
||||
// First corner on the new face is either corner "l" or "r".
|
||||
const CornerIndex corner(3 * face.value());
|
||||
CornerIndex opp_corner;
|
||||
CornerIndex opp_corner, corner_l, corner_r;
|
||||
if (symbol == TOPOLOGY_R) {
|
||||
// "r" is the new first corner.
|
||||
opp_corner = corner + 2;
|
||||
corner_l = corner + 1;
|
||||
corner_r = corner;
|
||||
} else {
|
||||
// "l" is the new first corner.
|
||||
opp_corner = corner + 1;
|
||||
corner_l = corner;
|
||||
corner_r = corner + 2;
|
||||
}
|
||||
SetOppositeCorners(opp_corner, corner_a);
|
||||
// Update vertex mapping.
|
||||
corner_table_->MapCornerToVertex(opp_corner, VertexIndex(num_vertices++));
|
||||
const VertexIndex new_vert_index = corner_table_->AddNewVertex();
|
||||
corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
|
||||
corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
|
||||
|
||||
const VertexIndex vertex_r =
|
||||
corner_table_->Vertex(corner_table_->Previous(corner_a));
|
||||
corner_table_->MapCornerToVertex(corner_r, vertex_r);
|
||||
// Update left-most corner on the vertex on the |corner_r|.
|
||||
corner_table_->SetLeftMostCorner(vertex_r, corner_r);
|
||||
|
||||
corner_table_->MapCornerToVertex(
|
||||
corner_table_->Next(opp_corner),
|
||||
corner_table_->Vertex(corner_table_->Previous(corner_a)));
|
||||
corner_table_->MapCornerToVertex(
|
||||
corner_table_->Previous(opp_corner),
|
||||
corner_table_->Vertex(corner_table_->Next(corner_a)));
|
||||
corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
|
||||
active_corner_stack.back() = corner;
|
||||
check_topology_split = true;
|
||||
} else if (symbol == TOPOLOGY_S) {
|
||||
@ -597,13 +608,19 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
corner_table_->MapCornerToVertex(corner, vertex_p);
|
||||
corner_table_->MapCornerToVertex(
|
||||
corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
|
||||
corner_table_->MapCornerToVertex(
|
||||
corner + 2, corner_table_->Vertex(corner_table_->Previous(corner_b)));
|
||||
// Also update the vertex id at corner "n" and all corners that are
|
||||
// connected to it in the CCW direction.
|
||||
const VertexIndex vert_b_prev =
|
||||
corner_table_->Vertex(corner_table_->Previous(corner_b));
|
||||
corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
|
||||
corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
|
||||
CornerIndex corner_n = corner_table_->Next(corner_b);
|
||||
const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
|
||||
traversal_decoder_.MergeVertices(vertex_p, vertex_n);
|
||||
// Update the left most corner on the newly merged vertex.
|
||||
corner_table_->SetLeftMostCorner(vertex_p,
|
||||
corner_table_->LeftMostCorner(vertex_n));
|
||||
|
||||
// Also update the vertex id at corner "n" and all corners that are
|
||||
// connected to it in the CCW direction.
|
||||
while (corner_n >= 0) {
|
||||
corner_table_->MapCornerToVertex(corner_n, vertex_p);
|
||||
corner_n = corner_table_->SwingLeft(corner_n);
|
||||
@ -611,13 +628,21 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
// Make sure the old vertex n is now mapped to an invalid corner (make it
|
||||
// isolated).
|
||||
corner_table_->MakeVertexIsolated(vertex_n);
|
||||
if (remove_invalid_vertices)
|
||||
invalid_vertices.push_back(vertex_n);
|
||||
active_corner_stack.back() = corner;
|
||||
} else if (symbol == TOPOLOGY_E) {
|
||||
const CornerIndex corner(3 * face.value());
|
||||
const VertexIndex first_vert_index = corner_table_->AddNewVertex();
|
||||
// Create three new vertices at the corners of the new face.
|
||||
corner_table_->MapCornerToVertex(corner, VertexIndex(num_vertices++));
|
||||
corner_table_->MapCornerToVertex(corner + 1, VertexIndex(num_vertices++));
|
||||
corner_table_->MapCornerToVertex(corner + 2, VertexIndex(num_vertices++));
|
||||
corner_table_->MapCornerToVertex(corner, first_vert_index);
|
||||
corner_table_->MapCornerToVertex(corner + 1,
|
||||
corner_table_->AddNewVertex());
|
||||
corner_table_->MapCornerToVertex(corner + 2,
|
||||
corner_table_->AddNewVertex());
|
||||
corner_table_->SetLeftMostCorner(first_vert_index, corner);
|
||||
corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
|
||||
corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
|
||||
// Add the tip corner to the active stack.
|
||||
active_corner_stack.push_back(corner);
|
||||
check_topology_split = true;
|
||||
@ -672,7 +697,7 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (num_vertices > max_num_vertices)
|
||||
if (corner_table_->num_vertices() > max_num_vertices)
|
||||
return -1; // Unexpected number of decoded vertices.
|
||||
// Decode start faces and connect them to the faces from the active stack.
|
||||
while (active_corner_stack.size() > 0) {
|
||||
@ -684,8 +709,8 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
// The start face is interior, we need to find three corners that are
|
||||
// opposite to it. The first opposite corner "a" is the corner from the
|
||||
// top of the active corner stack and the remaining two corners "b" and
|
||||
// "c" can be obtained by circulating around vertices "n" and "p" in CW
|
||||
// and CCW directions respectively.
|
||||
// "c" are then the next corners from the left-most corners of vertices
|
||||
// "n" and "x" respectively.
|
||||
//
|
||||
// *-------*
|
||||
// / \ / \
|
||||
@ -695,7 +720,7 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
// / \a . . c/ \
|
||||
// / \ . . / \
|
||||
// / \ . I . / \
|
||||
// *-------n.......*------*
|
||||
// *-------n.......x------*
|
||||
// \ / \ / \ /
|
||||
// \ / \ / \ /
|
||||
// \ / \b/ \ /
|
||||
@ -706,16 +731,20 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
return -1; // More faces than expected added to the mesh.
|
||||
}
|
||||
|
||||
// TODO(ostava): The circulation below should be replaced by functions
|
||||
// that can be reused elsewhere.
|
||||
CornerIndex corner_b = corner_table_->Previous(corner);
|
||||
while (corner_table_->Opposite(corner_b) >= 0) {
|
||||
corner_b = corner_table_->Previous(corner_table_->Opposite(corner_b));
|
||||
}
|
||||
CornerIndex corner_c = corner_table_->Next(corner);
|
||||
while (corner_table_->Opposite(corner_c) >= 0) {
|
||||
corner_c = corner_table_->Next(corner_table_->Opposite(corner_c));
|
||||
}
|
||||
const CornerIndex corner_a = corner;
|
||||
const VertexIndex vert_n =
|
||||
corner_table_->Vertex(corner_table_->Next(corner_a));
|
||||
const CornerIndex corner_b =
|
||||
corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
|
||||
|
||||
const VertexIndex vert_x =
|
||||
corner_table_->Vertex(corner_table_->Next(corner_b));
|
||||
const CornerIndex corner_c =
|
||||
corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
|
||||
|
||||
const VertexIndex vert_p =
|
||||
corner_table_->Vertex(corner_table_->Next(corner_c));
|
||||
|
||||
const FaceIndex face(num_faces++);
|
||||
// The first corner of the initial face is the corner opposite to "a".
|
||||
const CornerIndex new_corner(3 * face.value());
|
||||
@ -724,12 +753,9 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
SetOppositeCorners(new_corner + 2, corner_c);
|
||||
|
||||
// Map new corners to existing vertices.
|
||||
corner_table_->MapCornerToVertex(
|
||||
new_corner, corner_table_->Vertex(corner_table_->Next(corner_b)));
|
||||
corner_table_->MapCornerToVertex(
|
||||
new_corner + 1, corner_table_->Vertex(corner_table_->Next(corner_c)));
|
||||
corner_table_->MapCornerToVertex(
|
||||
new_corner + 2, corner_table_->Vertex(corner_table_->Next(corner)));
|
||||
corner_table_->MapCornerToVertex(new_corner, vert_x);
|
||||
corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
|
||||
corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
|
||||
|
||||
// Mark all three vertices as interior.
|
||||
for (int ci = 0; ci < 3; ++ci) {
|
||||
@ -748,7 +774,37 @@ int MeshEdgeBreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity(
|
||||
}
|
||||
if (num_faces != corner_table_->num_faces())
|
||||
return -1; // Unexpected number of decoded faces.
|
||||
vertex_id_map_.resize(num_vertices);
|
||||
|
||||
int num_vertices = corner_table_->num_vertices();
|
||||
// If any vertex was marked as isolated, we want to remove it from the corner
|
||||
// table to ensure that all vertices in range <0, num_vertices> are valid.
|
||||
for (const VertexIndex invalid_vert : invalid_vertices) {
|
||||
// Find the last valid vertex and swap it with the isolated vertex.
|
||||
VertexIndex src_vert(num_vertices - 1);
|
||||
while (corner_table_->LeftMostCorner(src_vert) < 0) {
|
||||
// The last vertex is invalid, proceed to the previous one.
|
||||
src_vert = VertexIndex(--num_vertices - 1);
|
||||
}
|
||||
if (src_vert < invalid_vert)
|
||||
continue; // No need to swap anything.
|
||||
|
||||
// Remap all corners mapped to |src_vert| to |invalid_vert|.
|
||||
VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
|
||||
for (; !vcit.End(); ++vcit) {
|
||||
const CornerIndex cid = vcit.Corner();
|
||||
corner_table_->MapCornerToVertex(cid, invalid_vert);
|
||||
}
|
||||
corner_table_->SetLeftMostCorner(invalid_vert,
|
||||
corner_table_->LeftMostCorner(src_vert));
|
||||
|
||||
// Make the |src_vert| invalid.
|
||||
corner_table_->MakeVertexIsolated(src_vert);
|
||||
is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
|
||||
is_vert_hole_[src_vert.value()] = false;
|
||||
|
||||
// The last vertex is now invalid.
|
||||
num_vertices--;
|
||||
}
|
||||
return num_vertices;
|
||||
}
|
||||
|
||||
@ -918,34 +974,27 @@ bool MeshEdgeBreakerDecoderImpl<
|
||||
}
|
||||
|
||||
template <class TraversalDecoder>
|
||||
bool MeshEdgeBreakerDecoderImpl<TraversalDecoder>::AssignPointsToCorners() {
|
||||
bool MeshEdgeBreakerDecoderImpl<TraversalDecoder>::AssignPointsToCorners(
|
||||
int num_connectivity_verts) {
|
||||
// Map between the existing and deduplicated point ids.
|
||||
// Note that at this point we have one point id for each corner of the
|
||||
// mesh so there is corner_table_->num_corners() point ids.
|
||||
decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
|
||||
|
||||
if (attribute_data_.size() == 0) {
|
||||
// We have position only. In this case we can simplify the deduplication
|
||||
// because the only thing we need to do is to remove isolated vertices that
|
||||
// were introduced during the decoding.
|
||||
|
||||
int32_t num_points = 0;
|
||||
std::vector<int32_t> vertex_to_point_map(corner_table_->num_vertices(), -1);
|
||||
// Add faces.
|
||||
if (attribute_data_.empty()) {
|
||||
// We have connectivity for position only. In this case all vertex indices
|
||||
// are equal to point indices.
|
||||
for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
|
||||
Mesh::Face face;
|
||||
const CornerIndex start_corner(3 * f.value());
|
||||
for (int c = 0; c < 3; ++c) {
|
||||
// Remap old points to the new ones.
|
||||
const int32_t vert_id =
|
||||
corner_table_->Vertex(CornerIndex(3 * f.value() + c)).value();
|
||||
int32_t &point_id = vertex_to_point_map[vert_id];
|
||||
if (point_id == -1)
|
||||
point_id = num_points++;
|
||||
face[c] = point_id;
|
||||
// Get the vertex index on the corner and use it as a point index.
|
||||
const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
|
||||
face[c] = vert_id;
|
||||
}
|
||||
decoder_->mesh()->SetFace(f, face);
|
||||
}
|
||||
decoder_->point_cloud()->set_num_points(num_points);
|
||||
decoder_->point_cloud()->set_num_points(num_connectivity_verts);
|
||||
return true;
|
||||
}
|
||||
// Else we need to deduplicate multiple attributes.
|
||||
@ -995,7 +1044,7 @@ bool MeshEdgeBreakerDecoderImpl<TraversalDecoder>::AssignPointsToCorners() {
|
||||
// Do a deduplication pass over the corners on the processed vertex.
|
||||
// At this point each corner corresponds to one point id and our goal is to
|
||||
// merge similar points into a single point id.
|
||||
// We do one one pass in a clockwise direction over the corners and we add
|
||||
// We do a single pass in a clockwise direction over the corners and we add
|
||||
// a new point id whenever one of the attributes change.
|
||||
c = deduplication_first_corner;
|
||||
// Create a new point.
|
||||
|
@ -117,7 +117,7 @@ class MeshEdgeBreakerDecoderImpl : public MeshEdgeBreakerDecoderImplInterface {
|
||||
bool DecodeAttributeConnectivitiesOnFace(CornerIndex corner);
|
||||
|
||||
// Initializes mapping between corners and point ids.
|
||||
bool AssignPointsToCorners();
|
||||
bool AssignPointsToCorners(int num_connectivity_verts);
|
||||
|
||||
bool IsFaceVisited(CornerIndex corner_id) const {
|
||||
if (corner_id < 0)
|
||||
@ -158,10 +158,6 @@ class MeshEdgeBreakerDecoderImpl : public MeshEdgeBreakerDecoderImplInterface {
|
||||
// Initial corner for each traversal.
|
||||
std::vector<CornerIndex> init_corners_;
|
||||
|
||||
// Mapping between vertex ids assigned during connectivity decoding and vertex
|
||||
// ids that were used during encoding.
|
||||
std::vector<VertexIndex> vertex_id_map_;
|
||||
|
||||
// Id of the last processed input symbol.
|
||||
int last_symbol_id_;
|
||||
|
||||
|
@ -265,7 +265,7 @@ bool MeshEdgeBreakerEncoderImpl<TraversalEncoder>::EncodeConnectivity() {
|
||||
if (use_single_connectivity_) {
|
||||
corner_table_ = CreateCornerTableFromAllAttributes(mesh_);
|
||||
} else {
|
||||
corner_table_ = CreateCornerTable(mesh_);
|
||||
corner_table_ = CreateCornerTableFromPositionAttribute(mesh_);
|
||||
}
|
||||
if (corner_table_ == nullptr) {
|
||||
// Failed to construct the corner table.
|
||||
|
@ -32,8 +32,7 @@ class MeshEdgebreakerEncodingTest : public ::testing::Test {
|
||||
void TestFile(const std::string &file_name) { TestFile(file_name, -1); }
|
||||
|
||||
void TestFile(const std::string &file_name, int compression_level) {
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromFile(path));
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromTestFile(file_name));
|
||||
ASSERT_NE(mesh, nullptr) << "Failed to load test model " << file_name;
|
||||
|
||||
TestMesh(mesh.get(), compression_level);
|
||||
@ -96,8 +95,7 @@ TEST_F(MeshEdgebreakerEncodingTest, TestEncoderReuse) {
|
||||
// Tests whether the edgebreaker encoder can be reused multiple times to
|
||||
// encode a given mesh.
|
||||
const std::string file_name = "test_pos_color.ply";
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromFile(path));
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromTestFile(file_name));
|
||||
ASSERT_NE(mesh, nullptr) << "Failed to load test model " << file_name;
|
||||
|
||||
MeshEdgeBreakerEncoder encoder;
|
||||
@ -118,8 +116,7 @@ TEST_F(MeshEdgebreakerEncodingTest, TestDecoderReuse) {
|
||||
// Tests whether the edgebreaker decoder can be reused multiple times to
|
||||
// decode a given mesh.
|
||||
const std::string file_name = "test_pos_color.ply";
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromFile(path));
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromTestFile(file_name));
|
||||
ASSERT_NE(mesh, nullptr) << "Failed to load test model " << file_name;
|
||||
|
||||
MeshEdgeBreakerEncoder encoder;
|
||||
@ -155,8 +152,7 @@ TEST_F(MeshEdgebreakerEncodingTest, TestSingleConnectivityEncoding) {
|
||||
// multiple attributes using single connectivity by breaking the mesh along
|
||||
// attribute seams.
|
||||
const std::string file_name = "cube_att.obj";
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromFile(path));
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromTestFile(file_name));
|
||||
ASSERT_NE(mesh, nullptr) << "Failed to load test model " << file_name;
|
||||
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
|
@ -39,14 +39,6 @@ class MeshEncoderTest : public ::testing::TestWithParam<const char *> {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
std::unique_ptr<Mesh> DecodeObj(const std::string &file_name) const {
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
std::unique_ptr<Mesh> mesh(new Mesh());
|
||||
ObjDecoder decoder;
|
||||
if (!decoder.DecodeFromFile(path, mesh.get()))
|
||||
return nullptr;
|
||||
return mesh;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_P(MeshEncoderTest, EncodeGoldenMesh) {
|
||||
@ -64,7 +56,7 @@ TEST_P(MeshEncoderTest, EncodeGoldenMesh) {
|
||||
golden_file_name += '.';
|
||||
golden_file_name += GetParam();
|
||||
golden_file_name += ".1.2.0.drc";
|
||||
const std::unique_ptr<Mesh> mesh(DecodeObj(file_name));
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromTestFile(file_name));
|
||||
ASSERT_NE(mesh, nullptr) << "Failed to load test model " << file_name;
|
||||
|
||||
ExpertEncoder encoder(*mesh.get());
|
||||
|
@ -24,15 +24,6 @@ namespace draco {
|
||||
|
||||
class PointCloudKdTreeEncodingTest : public ::testing::Test {
|
||||
protected:
|
||||
std::unique_ptr<PointCloud> DecodeObj(const std::string &file_name) const {
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
ObjDecoder decoder;
|
||||
std::unique_ptr<PointCloud> pc(new PointCloud());
|
||||
if (!decoder.DecodeFromFile(path, pc.get()))
|
||||
return nullptr;
|
||||
return pc;
|
||||
}
|
||||
|
||||
void ComparePointClouds(const PointCloud &p0, const PointCloud &p1) const {
|
||||
ASSERT_EQ(p0.num_points(), p1.num_points());
|
||||
ASSERT_EQ(p0.num_attributes(), p1.num_attributes());
|
||||
@ -80,7 +71,7 @@ class PointCloudKdTreeEncodingTest : public ::testing::Test {
|
||||
}
|
||||
|
||||
void TestFloatEncoding(const std::string &file_name) {
|
||||
std::unique_ptr<PointCloud> pc = DecodeObj(file_name);
|
||||
std::unique_ptr<PointCloud> pc = ReadPointCloudFromTestFile(file_name);
|
||||
ASSERT_NE(pc, nullptr);
|
||||
|
||||
TestKdTreeEncoding(*pc.get());
|
||||
|
@ -22,15 +22,6 @@ namespace draco {
|
||||
|
||||
class PointCloudSequentialEncodingTest : public ::testing::Test {
|
||||
protected:
|
||||
std::unique_ptr<PointCloud> DecodeObj(const std::string &file_name) const {
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
ObjDecoder decoder;
|
||||
std::unique_ptr<PointCloud> pc(new PointCloud());
|
||||
if (!decoder.DecodeFromFile(path, pc.get()))
|
||||
return nullptr;
|
||||
return pc;
|
||||
}
|
||||
|
||||
std::unique_ptr<PointCloud> EncodeAndDecodePointCloud(const PointCloud *pc) {
|
||||
EncoderBuffer buffer;
|
||||
PointCloudSequentialEncoder encoder;
|
||||
@ -51,7 +42,7 @@ class PointCloudSequentialEncodingTest : public ::testing::Test {
|
||||
}
|
||||
|
||||
void TestEncoding(const std::string &file_name) {
|
||||
std::unique_ptr<PointCloud> pc = DecodeObj(file_name);
|
||||
std::unique_ptr<PointCloud> pc = ReadPointCloudFromTestFile(file_name);
|
||||
ASSERT_NE(pc, nullptr);
|
||||
|
||||
std::unique_ptr<PointCloud> decoded_pc =
|
||||
@ -66,7 +57,7 @@ TEST_F(PointCloudSequentialEncodingTest, DoesEncodeAndDecode) {
|
||||
}
|
||||
|
||||
TEST_F(PointCloudSequentialEncodingTest, EncodingPointCloudWithMetadata) {
|
||||
std::unique_ptr<PointCloud> pc = DecodeObj("test_nm.obj");
|
||||
std::unique_ptr<PointCloud> pc = ReadPointCloudFromTestFile("test_nm.obj");
|
||||
ASSERT_NE(pc, nullptr);
|
||||
// Add metadata to point cloud.
|
||||
std::unique_ptr<GeometryMetadata> metadata =
|
||||
|
@ -16,6 +16,8 @@
|
||||
#define DRACO_CORE_DRACO_TEST_UTILS_H_
|
||||
|
||||
#include "draco/core/draco_test_base.h"
|
||||
#include "draco/io/mesh_io.h"
|
||||
#include "draco/io/point_cloud_io.h"
|
||||
|
||||
namespace draco {
|
||||
|
||||
@ -33,6 +35,26 @@ bool GenerateGoldenFile(const std::string &golden_file_name, const void *data,
|
||||
bool CompareGoldenFile(const std::string &golden_file_name, const void *data,
|
||||
int data_size);
|
||||
|
||||
// Loads a mesh / point cloud specified by a |file_name| that is going to be
|
||||
// automatically converted to the correct path available to the testing
|
||||
// instance.
|
||||
inline std::unique_ptr<Mesh> ReadMeshFromTestFile(
|
||||
const std::string &file_name) {
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
return ReadMeshFromFile(path).value();
|
||||
}
|
||||
inline std::unique_ptr<Mesh> ReadMeshFromTestFile(const std::string &file_name,
|
||||
bool use_metadata) {
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
return ReadMeshFromFile(path, use_metadata).value();
|
||||
}
|
||||
|
||||
inline std::unique_ptr<PointCloud> ReadPointCloudFromTestFile(
|
||||
const std::string &file_name) {
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
return ReadPointCloudFromFile(path).value();
|
||||
}
|
||||
|
||||
} // namespace draco
|
||||
|
||||
#endif // DRACO_CORE_DRACO_TEST_UTILS_H_
|
||||
|
@ -18,7 +18,7 @@
|
||||
namespace draco {
|
||||
|
||||
// Draco version is comprised of <major>.<minor>.<revision>.
|
||||
static const char kDracoVersion[] = "1.2.3";
|
||||
static const char kDracoVersion[] = "1.2.4";
|
||||
|
||||
const char *Version() { return kDracoVersion; }
|
||||
|
||||
|
@ -34,12 +34,12 @@ inline std::string LowercaseFileExtension(const std::string &filename) {
|
||||
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<Mesh> ReadMeshFromFile(const std::string &file_name) {
|
||||
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name) {
|
||||
return ReadMeshFromFile(file_name, false);
|
||||
}
|
||||
|
||||
std::unique_ptr<Mesh> ReadMeshFromFile(const std::string &file_name,
|
||||
bool use_metadata) {
|
||||
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name,
|
||||
bool use_metadata) {
|
||||
std::unique_ptr<Mesh> mesh(new Mesh());
|
||||
// Analyze file extension.
|
||||
const std::string extension = LowercaseFileExtension(file_name);
|
||||
@ -47,26 +47,28 @@ std::unique_ptr<Mesh> ReadMeshFromFile(const std::string &file_name,
|
||||
// Wavefront OBJ file format.
|
||||
ObjDecoder obj_decoder;
|
||||
obj_decoder.set_use_metadata(use_metadata);
|
||||
if (!obj_decoder.DecodeFromFile(file_name, mesh.get()))
|
||||
return nullptr;
|
||||
return mesh;
|
||||
const Status obj_status = obj_decoder.DecodeFromFile(file_name, mesh.get());
|
||||
if (!obj_status.ok())
|
||||
return obj_status;
|
||||
return std::move(mesh);
|
||||
}
|
||||
if (extension == "ply") {
|
||||
// Wavefront PLY file format.
|
||||
PlyDecoder ply_decoder;
|
||||
if (!ply_decoder.DecodeFromFile(file_name, mesh.get()))
|
||||
return nullptr;
|
||||
return mesh;
|
||||
return Status(Status::ERROR, "Unknown error.");
|
||||
return std::move(mesh);
|
||||
}
|
||||
|
||||
// Otherwise not an obj file. Assume the file was encoded with one of the
|
||||
// draco encoding methods.
|
||||
std::ifstream is(file_name.c_str(), std::ios::binary);
|
||||
if (!is)
|
||||
return nullptr;
|
||||
return Status(Status::ERROR, "Invalid input stream.");
|
||||
if (!ReadMeshFromStream(&mesh, is).good())
|
||||
return nullptr; // Error reading the stream.
|
||||
return mesh;
|
||||
return Status(Status::ERROR,
|
||||
"Unknown error."); // Error reading the stream.
|
||||
return std::move(mesh);
|
||||
}
|
||||
|
||||
} // namespace draco
|
||||
|
@ -79,15 +79,15 @@ InStreamT &ReadMeshFromStream(std::unique_ptr<Mesh> *mesh, InStreamT &&is) {
|
||||
// decoder based on the extension of the files. Currently, .obj and .ply files
|
||||
// are supported. Other file extensions are processed by the default
|
||||
// draco::MeshDecoder.
|
||||
// Returns nullptr if the decoding failed.
|
||||
std::unique_ptr<Mesh> ReadMeshFromFile(const std::string &file_name);
|
||||
// Returns nullptr with an error status if the decoding failed.
|
||||
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name);
|
||||
|
||||
// Reads a mesh from a file. The function does the same thing as the previous
|
||||
// one except using metadata to encode additional information when
|
||||
// |use_metadata| is set to true.
|
||||
// Returns nullptr if the decoding failed.
|
||||
std::unique_ptr<Mesh> ReadMeshFromFile(const std::string &file_name,
|
||||
bool use_metadata);
|
||||
// Returns nullptr with an error status if the decoding failed.
|
||||
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name,
|
||||
bool use_metadata);
|
||||
|
||||
} // namespace draco
|
||||
|
||||
|
@ -42,22 +42,23 @@ ObjDecoder::ObjDecoder()
|
||||
out_mesh_(nullptr),
|
||||
out_point_cloud_(nullptr) {}
|
||||
|
||||
bool ObjDecoder::DecodeFromFile(const std::string &file_name, Mesh *out_mesh) {
|
||||
Status ObjDecoder::DecodeFromFile(const std::string &file_name,
|
||||
Mesh *out_mesh) {
|
||||
out_mesh_ = out_mesh;
|
||||
return DecodeFromFile(file_name, static_cast<PointCloud *>(out_mesh));
|
||||
}
|
||||
|
||||
bool ObjDecoder::DecodeFromFile(const std::string &file_name,
|
||||
PointCloud *out_point_cloud) {
|
||||
Status ObjDecoder::DecodeFromFile(const std::string &file_name,
|
||||
PointCloud *out_point_cloud) {
|
||||
std::ifstream file(file_name, std::ios::binary);
|
||||
if (!file)
|
||||
return false;
|
||||
return Status(Status::IO_ERROR);
|
||||
// Read the whole file into a buffer.
|
||||
int64_t file_size = file.tellg();
|
||||
file.seekg(0, std::ios::end);
|
||||
file_size = file.tellg() - file_size;
|
||||
if (file_size == 0)
|
||||
return false;
|
||||
return Status(Status::IO_ERROR);
|
||||
file.seekg(0, std::ios::beg);
|
||||
std::vector<char> data(file_size);
|
||||
file.read(&data[0], file_size);
|
||||
@ -68,19 +69,19 @@ bool ObjDecoder::DecodeFromFile(const std::string &file_name,
|
||||
return DecodeInternal();
|
||||
}
|
||||
|
||||
bool ObjDecoder::DecodeFromBuffer(DecoderBuffer *buffer, Mesh *out_mesh) {
|
||||
Status ObjDecoder::DecodeFromBuffer(DecoderBuffer *buffer, Mesh *out_mesh) {
|
||||
out_mesh_ = out_mesh;
|
||||
return DecodeFromBuffer(buffer, static_cast<PointCloud *>(out_mesh));
|
||||
}
|
||||
|
||||
bool ObjDecoder::DecodeFromBuffer(DecoderBuffer *buffer,
|
||||
PointCloud *out_point_cloud) {
|
||||
Status ObjDecoder::DecodeFromBuffer(DecoderBuffer *buffer,
|
||||
PointCloud *out_point_cloud) {
|
||||
out_point_cloud_ = out_point_cloud;
|
||||
buffer_.Init(buffer->data_head(), buffer->remaining_size());
|
||||
return DecodeInternal();
|
||||
}
|
||||
|
||||
bool ObjDecoder::DecodeInternal() {
|
||||
Status ObjDecoder::DecodeInternal() {
|
||||
// In the first pass, count the number of different elements in the geometry.
|
||||
// In case the desired output is just a point cloud (i.e., when
|
||||
// out_mesh_ == nullptr) the decoder will ignore all information about the
|
||||
@ -90,13 +91,29 @@ bool ObjDecoder::DecodeInternal() {
|
||||
material_name_to_id_.clear();
|
||||
last_sub_obj_id_ = 0;
|
||||
// Parse all lines.
|
||||
bool error = false;
|
||||
while (ParseDefinition(&error) && !error) {
|
||||
Status status(Status::OK);
|
||||
while (ParseDefinition(&status) && status.ok()) {
|
||||
}
|
||||
if (!status.ok())
|
||||
return status;
|
||||
bool use_identity_mapping = false;
|
||||
if (num_obj_faces_ == 0) {
|
||||
// Mesh has no faces. In this case we try to read the geometry as a point
|
||||
// cloud where every attribute entry is a point.
|
||||
|
||||
// Ensure the number of all entries is same for all attributes.
|
||||
if (num_positions_ == 0)
|
||||
return Status(Status::ERROR, "No position attribute");
|
||||
if (num_tex_coords_ > 0 && num_tex_coords_ != num_positions_)
|
||||
return Status(Status::ERROR,
|
||||
"Invalid number of texture coordinates for a point cloud");
|
||||
if (num_normals_ > 0 && num_normals_ != num_positions_)
|
||||
return Status(Status::ERROR,
|
||||
"Invalid number of normals for a point cloud");
|
||||
|
||||
out_mesh_ = nullptr; // Treat the output geometry as a point cloud.
|
||||
use_identity_mapping = true;
|
||||
}
|
||||
if (error)
|
||||
return false;
|
||||
if (num_obj_faces_ == 0)
|
||||
return true; // Point cloud is OK.
|
||||
|
||||
// Initialize point cloud and mesh properties.
|
||||
if (out_mesh_) {
|
||||
@ -104,27 +121,35 @@ bool ObjDecoder::DecodeInternal() {
|
||||
// silently ignore all data about the mesh connectivity.
|
||||
out_mesh_->SetNumFaces(num_obj_faces_);
|
||||
}
|
||||
out_point_cloud_->set_num_points(3 * num_obj_faces_);
|
||||
if (num_obj_faces_ > 0) {
|
||||
out_point_cloud_->set_num_points(3 * num_obj_faces_);
|
||||
} else {
|
||||
out_point_cloud_->set_num_points(num_positions_);
|
||||
}
|
||||
|
||||
// Add attributes if they are present in the input data.
|
||||
if (num_positions_ > 0) {
|
||||
GeometryAttribute va;
|
||||
va.Init(GeometryAttribute::POSITION, nullptr, 3, DT_FLOAT32, false,
|
||||
sizeof(float) * 3, 0);
|
||||
pos_att_id_ = out_point_cloud_->AddAttribute(va, false, num_positions_);
|
||||
pos_att_id_ = out_point_cloud_->AddAttribute(va, use_identity_mapping,
|
||||
num_positions_);
|
||||
}
|
||||
if (num_tex_coords_ > 0) {
|
||||
GeometryAttribute va;
|
||||
va.Init(GeometryAttribute::TEX_COORD, nullptr, 2, DT_FLOAT32, false,
|
||||
sizeof(float) * 2, 0);
|
||||
tex_att_id_ = out_point_cloud_->AddAttribute(va, false, num_tex_coords_);
|
||||
tex_att_id_ = out_point_cloud_->AddAttribute(va, use_identity_mapping,
|
||||
num_tex_coords_);
|
||||
}
|
||||
if (num_normals_ > 0) {
|
||||
GeometryAttribute va;
|
||||
va.Init(GeometryAttribute::NORMAL, nullptr, 3, DT_FLOAT32, false,
|
||||
sizeof(float) * 3, 0);
|
||||
norm_att_id_ = out_point_cloud_->AddAttribute(va, false, num_normals_);
|
||||
norm_att_id_ =
|
||||
out_point_cloud_->AddAttribute(va, use_identity_mapping, num_normals_);
|
||||
}
|
||||
if (num_materials_ > 0) {
|
||||
if (num_materials_ > 0 && num_obj_faces_ > 0) {
|
||||
GeometryAttribute va;
|
||||
if (num_materials_ < 256) {
|
||||
va.Init(GeometryAttribute::GENERIC, nullptr, 1, DT_UINT8, false, 1, 0);
|
||||
@ -159,7 +184,7 @@ bool ObjDecoder::DecodeInternal() {
|
||||
std::move(material_metadata));
|
||||
}
|
||||
}
|
||||
if (!obj_name_to_id_.empty()) {
|
||||
if (!obj_name_to_id_.empty() && num_obj_faces_ > 0) {
|
||||
GeometryAttribute va;
|
||||
if (obj_name_to_id_.size() < 256) {
|
||||
va.Init(GeometryAttribute::GENERIC, nullptr, 1, DT_UINT8, false, 1, 0);
|
||||
@ -195,10 +220,10 @@ bool ObjDecoder::DecodeInternal() {
|
||||
ResetCounters();
|
||||
// Start parsing from the beginning of the buffer again.
|
||||
buffer()->StartDecodingFrom(0);
|
||||
while (ParseDefinition(&error) && !error) {
|
||||
while (ParseDefinition(&status) && status.ok()) {
|
||||
}
|
||||
if (error)
|
||||
return false;
|
||||
if (!status.ok())
|
||||
return status;
|
||||
if (out_mesh_) {
|
||||
// Add faces with identity mapping between vertex and corner indices.
|
||||
// Duplicate vertices will get removed later.
|
||||
@ -215,7 +240,7 @@ bool ObjDecoder::DecodeInternal() {
|
||||
}
|
||||
out_point_cloud_->DeduplicatePointIds();
|
||||
#endif
|
||||
return true;
|
||||
return status;
|
||||
}
|
||||
|
||||
void ObjDecoder::ResetCounters() {
|
||||
@ -227,7 +252,7 @@ void ObjDecoder::ResetCounters() {
|
||||
last_sub_obj_id_ = 0;
|
||||
}
|
||||
|
||||
bool ObjDecoder::ParseDefinition(bool *error) {
|
||||
bool ObjDecoder::ParseDefinition(Status *status) {
|
||||
char c;
|
||||
parser::SkipWhitespace(buffer());
|
||||
if (!buffer()->Peek(&c)) {
|
||||
@ -239,26 +264,26 @@ bool ObjDecoder::ParseDefinition(bool *error) {
|
||||
parser::SkipLine(buffer());
|
||||
return true;
|
||||
}
|
||||
if (ParseVertexPosition(error))
|
||||
if (ParseVertexPosition(status))
|
||||
return true;
|
||||
if (ParseNormal(error))
|
||||
if (ParseNormal(status))
|
||||
return true;
|
||||
if (ParseTexCoord(error))
|
||||
if (ParseTexCoord(status))
|
||||
return true;
|
||||
if (ParseFace(error))
|
||||
if (ParseFace(status))
|
||||
return true;
|
||||
if (ParseMaterial(error))
|
||||
if (ParseMaterial(status))
|
||||
return true;
|
||||
if (ParseMaterialLib(error))
|
||||
if (ParseMaterialLib(status))
|
||||
return true;
|
||||
if (ParseObject(error))
|
||||
if (ParseObject(status))
|
||||
return true;
|
||||
// No known definition was found. Ignore the line.
|
||||
parser::SkipLine(buffer());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ObjDecoder::ParseVertexPosition(bool *error) {
|
||||
bool ObjDecoder::ParseVertexPosition(Status *status) {
|
||||
std::array<char, 2> c;
|
||||
if (!buffer()->Peek(&c)) {
|
||||
return false;
|
||||
@ -273,7 +298,7 @@ bool ObjDecoder::ParseVertexPosition(bool *error) {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
parser::SkipWhitespace(buffer());
|
||||
if (!parser::ParseFloat(buffer(), val + i)) {
|
||||
*error = true;
|
||||
*status = Status(Status::ERROR, "Failed to parse a float number");
|
||||
// The definition is processed so return true.
|
||||
return true;
|
||||
}
|
||||
@ -286,7 +311,7 @@ bool ObjDecoder::ParseVertexPosition(bool *error) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ObjDecoder::ParseNormal(bool *error) {
|
||||
bool ObjDecoder::ParseNormal(Status *status) {
|
||||
std::array<char, 2> c;
|
||||
if (!buffer()->Peek(&c)) {
|
||||
return false;
|
||||
@ -301,7 +326,7 @@ bool ObjDecoder::ParseNormal(bool *error) {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
parser::SkipWhitespace(buffer());
|
||||
if (!parser::ParseFloat(buffer(), val + i)) {
|
||||
*error = true;
|
||||
*status = Status(Status::ERROR, "Failed to parse a float number");
|
||||
// The definition is processed so return true.
|
||||
return true;
|
||||
}
|
||||
@ -314,7 +339,7 @@ bool ObjDecoder::ParseNormal(bool *error) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ObjDecoder::ParseTexCoord(bool *error) {
|
||||
bool ObjDecoder::ParseTexCoord(Status *status) {
|
||||
std::array<char, 2> c;
|
||||
if (!buffer()->Peek(&c)) {
|
||||
return false;
|
||||
@ -329,7 +354,7 @@ bool ObjDecoder::ParseTexCoord(bool *error) {
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
parser::SkipWhitespace(buffer());
|
||||
if (!parser::ParseFloat(buffer(), val + i)) {
|
||||
*error = true;
|
||||
*status = Status(Status::ERROR, "Failed to parse a float number");
|
||||
// The definition is processed so return true.
|
||||
return true;
|
||||
}
|
||||
@ -342,7 +367,7 @@ bool ObjDecoder::ParseTexCoord(bool *error) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ObjDecoder::ParseFace(bool *error) {
|
||||
bool ObjDecoder::ParseFace(Status *status) {
|
||||
char c;
|
||||
if (!buffer()->Peek(&c)) {
|
||||
return false;
|
||||
@ -360,7 +385,7 @@ bool ObjDecoder::ParseFace(bool *error) {
|
||||
if (i == 3) {
|
||||
break; // It's OK if there is no fourth vertex index.
|
||||
}
|
||||
*error = true;
|
||||
*status = Status(Status::ERROR, "Failed to parse vertex indices");
|
||||
return true;
|
||||
}
|
||||
++num_valid_indices;
|
||||
@ -405,7 +430,7 @@ bool ObjDecoder::ParseFace(bool *error) {
|
||||
}
|
||||
}
|
||||
if (num_indices < 3 || num_indices > 4) {
|
||||
*error = true;
|
||||
*status = Status(Status::ERROR, "Invalid number of indices on a face");
|
||||
return false;
|
||||
}
|
||||
// Either one or two new triangles.
|
||||
@ -415,7 +440,7 @@ bool ObjDecoder::ParseFace(bool *error) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ObjDecoder::ParseMaterialLib(bool *error) {
|
||||
bool ObjDecoder::ParseMaterialLib(Status *status) {
|
||||
// Allow only one material library per file for now.
|
||||
if (material_name_to_id_.size() > 0)
|
||||
return false;
|
||||
@ -430,13 +455,13 @@ bool ObjDecoder::ParseMaterialLib(bool *error) {
|
||||
parser::SkipWhitespace(&line_buffer);
|
||||
material_file_name_.clear();
|
||||
if (!parser::ParseString(&line_buffer, &material_file_name_)) {
|
||||
*error = true;
|
||||
*status = Status(Status::ERROR, "Failed to parse material file name");
|
||||
return true;
|
||||
}
|
||||
parser::SkipLine(&line_buffer);
|
||||
|
||||
if (material_file_name_.size() > 0) {
|
||||
if (!ParseMaterialFile(material_file_name_, error)) {
|
||||
if (!ParseMaterialFile(material_file_name_, status)) {
|
||||
// Silently ignore problems with material files for now.
|
||||
return true;
|
||||
}
|
||||
@ -444,7 +469,7 @@ bool ObjDecoder::ParseMaterialLib(bool *error) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ObjDecoder::ParseMaterial(bool * /* error */) {
|
||||
bool ObjDecoder::ParseMaterial(Status * /* status */) {
|
||||
// In second pass, skip when we don't use materials.
|
||||
if (!counting_mode_ && material_att_id_ < 0)
|
||||
return false;
|
||||
@ -473,7 +498,7 @@ bool ObjDecoder::ParseMaterial(bool * /* error */) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ObjDecoder::ParseObject(bool *error) {
|
||||
bool ObjDecoder::ParseObject(Status *status) {
|
||||
std::array<char, 2> c;
|
||||
if (!buffer()->Peek(&c)) {
|
||||
return false;
|
||||
@ -554,32 +579,36 @@ void ObjDecoder::MapPointToVertexIndices(
|
||||
AttributeValueIndex(num_positions_ + indices[0]));
|
||||
}
|
||||
|
||||
if (indices[1] > 0) {
|
||||
out_point_cloud_->attribute(tex_att_id_)
|
||||
->SetPointMapEntry(vert_id, AttributeValueIndex(indices[1] - 1));
|
||||
} else if (indices[1] < 0) {
|
||||
out_point_cloud_->attribute(tex_att_id_)
|
||||
->SetPointMapEntry(vert_id,
|
||||
AttributeValueIndex(num_tex_coords_ + indices[1]));
|
||||
} else if (tex_att_id_ >= 0) {
|
||||
// Texture index not provided but expected. Insert 0 entry as the
|
||||
// default value.
|
||||
out_point_cloud_->attribute(tex_att_id_)
|
||||
->SetPointMapEntry(vert_id, AttributeValueIndex(0));
|
||||
if (tex_att_id_ >= 0) {
|
||||
if (indices[1] > 0) {
|
||||
out_point_cloud_->attribute(tex_att_id_)
|
||||
->SetPointMapEntry(vert_id, AttributeValueIndex(indices[1] - 1));
|
||||
} else if (indices[1] < 0) {
|
||||
out_point_cloud_->attribute(tex_att_id_)
|
||||
->SetPointMapEntry(vert_id,
|
||||
AttributeValueIndex(num_tex_coords_ + indices[1]));
|
||||
} else {
|
||||
// Texture index not provided but expected. Insert 0 entry as the
|
||||
// default value.
|
||||
out_point_cloud_->attribute(tex_att_id_)
|
||||
->SetPointMapEntry(vert_id, AttributeValueIndex(0));
|
||||
}
|
||||
}
|
||||
|
||||
if (indices[2] > 0) {
|
||||
out_point_cloud_->attribute(norm_att_id_)
|
||||
->SetPointMapEntry(vert_id, AttributeValueIndex(indices[2] - 1));
|
||||
} else if (indices[2] < 0) {
|
||||
out_point_cloud_->attribute(norm_att_id_)
|
||||
->SetPointMapEntry(vert_id,
|
||||
AttributeValueIndex(num_normals_ + indices[2]));
|
||||
} else if (norm_att_id_ >= 0) {
|
||||
// Normal index not provided but expected. Insert 0 entry as the default
|
||||
// value.
|
||||
out_point_cloud_->attribute(norm_att_id_)
|
||||
->SetPointMapEntry(vert_id, AttributeValueIndex(0));
|
||||
if (norm_att_id_ >= 0) {
|
||||
if (indices[2] > 0) {
|
||||
out_point_cloud_->attribute(norm_att_id_)
|
||||
->SetPointMapEntry(vert_id, AttributeValueIndex(indices[2] - 1));
|
||||
} else if (indices[2] < 0) {
|
||||
out_point_cloud_->attribute(norm_att_id_)
|
||||
->SetPointMapEntry(vert_id,
|
||||
AttributeValueIndex(num_normals_ + indices[2]));
|
||||
} else {
|
||||
// Normal index not provided but expected. Insert 0 entry as the default
|
||||
// value.
|
||||
out_point_cloud_->attribute(norm_att_id_)
|
||||
->SetPointMapEntry(vert_id, AttributeValueIndex(0));
|
||||
}
|
||||
}
|
||||
|
||||
// Assign material index to the point if it is available.
|
||||
@ -595,7 +624,8 @@ void ObjDecoder::MapPointToVertexIndices(
|
||||
}
|
||||
}
|
||||
|
||||
bool ObjDecoder::ParseMaterialFile(const std::string &file_name, bool *error) {
|
||||
bool ObjDecoder::ParseMaterialFile(const std::string &file_name,
|
||||
Status *status) {
|
||||
// Get the correct path to the |file_name| using the folder from
|
||||
// |input_file_name_| as the root folder.
|
||||
const auto pos = input_file_name_.find_last_of("/\\");
|
||||
@ -623,7 +653,7 @@ bool ObjDecoder::ParseMaterialFile(const std::string &file_name, bool *error) {
|
||||
buffer_.Init(&data[0], file_size);
|
||||
|
||||
num_materials_ = 0;
|
||||
while (ParseMaterialFileDefinition(error)) {
|
||||
while (ParseMaterialFileDefinition(status)) {
|
||||
}
|
||||
|
||||
// Restore the original buffer.
|
||||
@ -631,7 +661,7 @@ bool ObjDecoder::ParseMaterialFile(const std::string &file_name, bool *error) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ObjDecoder::ParseMaterialFileDefinition(bool * /* error */) {
|
||||
bool ObjDecoder::ParseMaterialFileDefinition(Status * /* status */) {
|
||||
char c;
|
||||
parser::SkipWhitespace(buffer());
|
||||
if (!buffer()->Peek(&c)) {
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <unordered_map>
|
||||
|
||||
#include "draco/core/decoder_buffer.h"
|
||||
#include "draco/core/status.h"
|
||||
#include "draco/mesh/mesh.h"
|
||||
|
||||
namespace draco {
|
||||
@ -33,12 +34,12 @@ class ObjDecoder {
|
||||
|
||||
// Decodes an obj file stored in the input file.
|
||||
// Returns nullptr if the decoding failed.
|
||||
bool DecodeFromFile(const std::string &file_name, Mesh *out_mesh);
|
||||
bool DecodeFromFile(const std::string &file_name,
|
||||
PointCloud *out_point_cloud);
|
||||
Status DecodeFromFile(const std::string &file_name, Mesh *out_mesh);
|
||||
Status DecodeFromFile(const std::string &file_name,
|
||||
PointCloud *out_point_cloud);
|
||||
|
||||
bool DecodeFromBuffer(DecoderBuffer *buffer, Mesh *out_mesh);
|
||||
bool DecodeFromBuffer(DecoderBuffer *buffer, PointCloud *out_point_cloud);
|
||||
Status DecodeFromBuffer(DecoderBuffer *buffer, Mesh *out_mesh);
|
||||
Status DecodeFromBuffer(DecoderBuffer *buffer, PointCloud *out_point_cloud);
|
||||
|
||||
// Flag that can be used to turn on/off deduplication of input values.
|
||||
// This should be disabled only when we are sure that the input data does not
|
||||
@ -50,7 +51,7 @@ class ObjDecoder {
|
||||
void set_use_metadata(bool flag) { use_metadata_ = flag; }
|
||||
|
||||
protected:
|
||||
bool DecodeInternal();
|
||||
Status DecodeInternal();
|
||||
DecoderBuffer *buffer() { return &buffer_; }
|
||||
|
||||
private:
|
||||
@ -60,18 +61,18 @@ class ObjDecoder {
|
||||
// Parses the next mesh property definition (position, tex coord, normal, or
|
||||
// face). If the parsed data is unrecognized, it will be skipped.
|
||||
// Returns false when the end of file was reached.
|
||||
bool ParseDefinition(bool *error);
|
||||
bool ParseDefinition(Status *status);
|
||||
|
||||
// Attempts to parse definition of position, normal, tex coord, or face
|
||||
// respectively.
|
||||
// Returns false when the parsed data didn't contain the given definition.
|
||||
bool ParseVertexPosition(bool *error);
|
||||
bool ParseNormal(bool *error);
|
||||
bool ParseTexCoord(bool *error);
|
||||
bool ParseFace(bool *error);
|
||||
bool ParseMaterialLib(bool *error);
|
||||
bool ParseMaterial(bool *error);
|
||||
bool ParseObject(bool *error);
|
||||
bool ParseVertexPosition(Status *status);
|
||||
bool ParseNormal(Status *status);
|
||||
bool ParseTexCoord(Status *status);
|
||||
bool ParseFace(Status *status);
|
||||
bool ParseMaterialLib(Status *status);
|
||||
bool ParseMaterial(Status *status);
|
||||
bool ParseObject(Status *status);
|
||||
|
||||
// Parses triplet of position, tex coords and normal indices.
|
||||
// Returns false on error.
|
||||
@ -83,8 +84,8 @@ class ObjDecoder {
|
||||
const std::array<int32_t, 3> &indices);
|
||||
|
||||
// Parses material file definitions from a separate file.
|
||||
bool ParseMaterialFile(const std::string &file_name, bool *error);
|
||||
bool ParseMaterialFileDefinition(bool *error);
|
||||
bool ParseMaterialFile(const std::string &file_name, Status *status);
|
||||
bool ParseMaterialFileDefinition(Status *status);
|
||||
|
||||
// If set to true, the parser will count the number of various definitions
|
||||
// but it will not parse the actual data or add any new entries to the mesh.
|
||||
|
@ -24,10 +24,17 @@ class ObjDecoderTest : public ::testing::Test {
|
||||
protected:
|
||||
template <class Geometry>
|
||||
std::unique_ptr<Geometry> DecodeObj(const std::string &file_name) const {
|
||||
return DecodeObj<Geometry>(file_name, false);
|
||||
}
|
||||
|
||||
template <class Geometry>
|
||||
std::unique_ptr<Geometry> DecodeObj(const std::string &file_name,
|
||||
bool deduplicate_input_values) const {
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
ObjDecoder decoder;
|
||||
decoder.set_deduplicate_input_values(deduplicate_input_values);
|
||||
std::unique_ptr<Geometry> geometry(new Geometry());
|
||||
if (!decoder.DecodeFromFile(path, geometry.get()))
|
||||
if (!decoder.DecodeFromFile(path, geometry.get()).ok())
|
||||
return nullptr;
|
||||
return geometry;
|
||||
}
|
||||
@ -39,7 +46,7 @@ class ObjDecoderTest : public ::testing::Test {
|
||||
ObjDecoder decoder;
|
||||
decoder.set_use_metadata(true);
|
||||
std::unique_ptr<Geometry> geometry(new Geometry());
|
||||
if (!decoder.DecodeFromFile(path, geometry.get()))
|
||||
if (!decoder.DecodeFromFile(path, geometry.get()).ok())
|
||||
return nullptr;
|
||||
return geometry;
|
||||
}
|
||||
@ -132,6 +139,28 @@ TEST_F(ObjDecoderTest, EmptyNameOBJ) {
|
||||
ASSERT_EQ(mesh->attribute(0)->size(), 3);
|
||||
}
|
||||
|
||||
TEST_F(ObjDecoderTest, PointCloudOBJ) {
|
||||
// Tests that we load an obj file that does not contain any faces.
|
||||
const std::string file_name = "test_lines.obj";
|
||||
const std::unique_ptr<Mesh> mesh(DecodeObj<Mesh>(file_name, false));
|
||||
ASSERT_NE(mesh, nullptr);
|
||||
ASSERT_EQ(mesh->num_faces(), 0);
|
||||
ASSERT_EQ(mesh->num_attributes(), 1);
|
||||
ASSERT_EQ(mesh->attribute(0)->size(), 484);
|
||||
}
|
||||
|
||||
TEST_F(ObjDecoderTest, WrongAttributeMapping) {
|
||||
// Tests that we load an obj file that contains invalid mapping between
|
||||
// attribute indices and values. In such case the invalid indices should be
|
||||
// ignored.
|
||||
const std::string file_name = "test_wrong_attribute_mapping.obj";
|
||||
const std::unique_ptr<Mesh> mesh(DecodeObj<Mesh>(file_name, false));
|
||||
ASSERT_NE(mesh, nullptr);
|
||||
ASSERT_EQ(mesh->num_faces(), 1);
|
||||
ASSERT_EQ(mesh->num_attributes(), 1);
|
||||
ASSERT_EQ(mesh->attribute(0)->size(), 3);
|
||||
}
|
||||
|
||||
TEST_F(ObjDecoderTest, TestObjDecodingAll) {
|
||||
// test if we can read all obj that are currently in test folder.
|
||||
test_decoding("bunny_norm.obj");
|
||||
|
@ -23,17 +23,6 @@ namespace draco {
|
||||
|
||||
class ObjEncoderTest : public ::testing::Test {
|
||||
protected:
|
||||
template <class Geometry>
|
||||
std::unique_ptr<Mesh> DecodeFromObjFile(const std::string &file_name) const {
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
std::unique_ptr<Mesh> mesh(new Mesh());
|
||||
ObjDecoder decoder;
|
||||
decoder.set_use_metadata(true);
|
||||
if (!decoder.DecodeFromFile(path, mesh.get()))
|
||||
return nullptr;
|
||||
return mesh;
|
||||
}
|
||||
|
||||
void CompareMeshes(const Mesh *mesh0, const Mesh *mesh1) {
|
||||
ASSERT_EQ(mesh0->num_faces(), mesh1->num_faces());
|
||||
ASSERT_EQ(mesh0->num_attributes(), mesh1->num_attributes());
|
||||
@ -55,13 +44,13 @@ class ObjEncoderTest : public ::testing::Test {
|
||||
std::unique_ptr<Mesh> decoded_mesh(new Mesh());
|
||||
ObjDecoder decoder;
|
||||
decoder.set_use_metadata(true);
|
||||
if (!decoder.DecodeFromBuffer(&decoder_buffer, decoded_mesh.get()))
|
||||
if (!decoder.DecodeFromBuffer(&decoder_buffer, decoded_mesh.get()).ok())
|
||||
return nullptr;
|
||||
return decoded_mesh;
|
||||
}
|
||||
|
||||
void test_encoding(const std::string &file_name) {
|
||||
const std::unique_ptr<Mesh> mesh(DecodeFromObjFile<Mesh>(file_name));
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromTestFile(file_name, true));
|
||||
|
||||
ASSERT_NE(mesh, nullptr) << "Failed to load test model " << file_name;
|
||||
ASSERT_GT(mesh->num_faces(), 0);
|
||||
@ -74,7 +63,7 @@ class ObjEncoderTest : public ::testing::Test {
|
||||
TEST_F(ObjEncoderTest, HasSubObject) { test_encoding("cube_att_sub_o.obj"); }
|
||||
|
||||
TEST_F(ObjEncoderTest, HasMaterial) {
|
||||
const std::unique_ptr<Mesh> mesh0(DecodeFromObjFile<Mesh>("mat_test.obj"));
|
||||
const std::unique_ptr<Mesh> mesh0(ReadMeshFromTestFile("mat_test.obj", true));
|
||||
ASSERT_NE(mesh0, nullptr);
|
||||
const std::unique_ptr<Mesh> mesh1 = EncodeAndDecodeMesh(mesh0.get());
|
||||
ASSERT_NE(mesh1, nullptr);
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
namespace draco {
|
||||
|
||||
std::unique_ptr<PointCloud> ReadPointCloudFromFile(
|
||||
StatusOr<std::unique_ptr<PointCloud>> ReadPointCloudFromFile(
|
||||
const std::string &file_name) {
|
||||
std::unique_ptr<PointCloud> pc(new PointCloud());
|
||||
// Analyze file extension.
|
||||
@ -32,26 +32,28 @@ std::unique_ptr<PointCloud> ReadPointCloudFromFile(
|
||||
if (extension == ".obj") {
|
||||
// Wavefront OBJ file format.
|
||||
ObjDecoder obj_decoder;
|
||||
if (!obj_decoder.DecodeFromFile(file_name, pc.get()))
|
||||
return nullptr;
|
||||
return pc;
|
||||
const Status obj_status = obj_decoder.DecodeFromFile(file_name, pc.get());
|
||||
if (!obj_status.ok())
|
||||
return obj_status;
|
||||
return std::move(pc);
|
||||
}
|
||||
if (extension == ".ply") {
|
||||
// Wavefront PLY file format.
|
||||
PlyDecoder ply_decoder;
|
||||
if (!ply_decoder.DecodeFromFile(file_name, pc.get()))
|
||||
return nullptr;
|
||||
return pc;
|
||||
return Status(Status::ERROR, "Unknown error.");
|
||||
return std::move(pc);
|
||||
}
|
||||
|
||||
// Otherwise not an obj file. Assume the file was encoded with one of the
|
||||
// draco encoding methods.
|
||||
std::ifstream is(file_name.c_str(), std::ios::binary);
|
||||
if (!is)
|
||||
return nullptr;
|
||||
return Status(Status::ERROR, "Invalid input stream.");
|
||||
if (!ReadPointCloudFromStream(&pc, is).good())
|
||||
return nullptr; // Error reading the stream.
|
||||
return pc;
|
||||
return Status(Status::ERROR,
|
||||
"Unknown error."); // Error reading the stream.
|
||||
return std::move(pc);
|
||||
}
|
||||
|
||||
} // namespace draco
|
||||
|
@ -80,8 +80,8 @@ InStreamT &ReadPointCloudFromStream(std::unique_ptr<PointCloud> *point_cloud,
|
||||
// correct decoder based on the extension of the files. Currently, .obj and .ply
|
||||
// files are supported. Other file extensions are processed by the default
|
||||
// draco::PointCloudDecoder.
|
||||
// Returns nullptr if the decoding failed.
|
||||
std::unique_ptr<PointCloud> ReadPointCloudFromFile(
|
||||
// Returns nullptr with an error status if the decoding failed.
|
||||
StatusOr<std::unique_ptr<PointCloud>> ReadPointCloudFromFile(
|
||||
const std::string &file_name);
|
||||
|
||||
} // namespace draco
|
||||
|
@ -28,7 +28,7 @@ class IoPointCloudIoTest : public ::testing::Test {
|
||||
int expected_num_attributes,
|
||||
const std::string &file_name) {
|
||||
const std::unique_ptr<PointCloud> encoded_pc =
|
||||
ReadPointCloudFromFile(GetTestFileFullPath(file_name));
|
||||
ReadPointCloudFromTestFile(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
|
||||
@ -90,7 +90,7 @@ TEST_F(IoPointCloudIoTest, EncodeKdTreePointCloudTestPosPly) {
|
||||
TEST_F(IoPointCloudIoTest, ObjFileInput) {
|
||||
// Tests whether loading obj point clouds from files works as expected.
|
||||
const std::unique_ptr<PointCloud> pc =
|
||||
ReadPointCloudFromFile(GetTestFileFullPath("test_nm.obj"));
|
||||
ReadPointCloudFromTestFile("test_nm.obj");
|
||||
ASSERT_NE(pc, nullptr) << "Failed to load the obj point cloud.";
|
||||
EXPECT_EQ(pc->num_points(), 97) << "Obj point cloud not loaded properly.";
|
||||
}
|
||||
@ -98,17 +98,17 @@ TEST_F(IoPointCloudIoTest, ObjFileInput) {
|
||||
// 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"));
|
||||
ReadPointCloudFromTestFile("wrong_file_name.obj");
|
||||
ASSERT_EQ(pc, nullptr);
|
||||
}
|
||||
TEST_F(IoPointCloudIoTest, WrongFilePly) {
|
||||
const std::unique_ptr<PointCloud> pc =
|
||||
ReadPointCloudFromFile(GetTestFileFullPath("wrong_file_name.ply"));
|
||||
ReadPointCloudFromTestFile("wrong_file_name.ply");
|
||||
ASSERT_EQ(pc, nullptr);
|
||||
}
|
||||
TEST_F(IoPointCloudIoTest, WrongFile) {
|
||||
const std::unique_ptr<PointCloud> pc =
|
||||
ReadPointCloudFromFile(GetTestFileFullPath("wrong_file_name"));
|
||||
ReadPointCloudFromTestFile("wrong_file_name");
|
||||
ASSERT_EQ(pc, nullptr);
|
||||
}
|
||||
|
||||
|
@ -202,9 +202,9 @@ bool Decoder::GetAttributeFloatForAllPoints(const PointCloud &pc,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Decoder::GetAttributeIntForAllPoints(const PointCloud &pc,
|
||||
const PointAttribute &pa,
|
||||
DracoInt32Array *out_values) {
|
||||
bool Decoder::GetAttributeInt32ForAllPoints(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;
|
||||
@ -224,6 +224,12 @@ bool Decoder::GetAttributeIntForAllPoints(const PointCloud &pc,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Decoder::GetAttributeIntForAllPoints(const PointCloud &pc,
|
||||
const PointAttribute &pa,
|
||||
DracoInt32Array *out_values) {
|
||||
return GetAttributeInt32ForAllPoints(pc, pa, out_values);
|
||||
}
|
||||
|
||||
void Decoder::SkipAttributeTransform(draco_GeometryAttribute_Type att_type) {
|
||||
decoder_.SetSkipAttributeTransform(att_type);
|
||||
}
|
||||
|
@ -74,15 +74,15 @@ class DracoInt32Array {
|
||||
public:
|
||||
DracoInt32Array();
|
||||
|
||||
int GetValue(int index) const;
|
||||
int32_t GetValue(int index) const;
|
||||
bool SetValues(const int *values, int count);
|
||||
|
||||
void SetValue(int index, int val) { values_[index] = val; }
|
||||
void SetValue(int index, int32_t val) { values_[index] = val; }
|
||||
|
||||
int size() const { return values_.size(); }
|
||||
|
||||
private:
|
||||
std::vector<int> values_;
|
||||
std::vector<int32_t> values_;
|
||||
};
|
||||
|
||||
// Class used by emscripten WebIDL Binder [1] to wrap calls to decode Draco
|
||||
@ -152,6 +152,11 @@ class Decoder {
|
||||
|
||||
// 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 GetAttributeInt32ForAllPoints(const draco::PointCloud &pc,
|
||||
const draco::PointAttribute &pa,
|
||||
DracoInt32Array *out_values);
|
||||
|
||||
// Deprecated: Use GetAttributeInt32ForAllPoints() instead.
|
||||
static bool GetAttributeIntForAllPoints(const draco::PointCloud &pc,
|
||||
const draco::PointAttribute &pa,
|
||||
DracoInt32Array *out_values);
|
||||
|
@ -177,9 +177,13 @@ interface Decoder {
|
||||
boolean GetAttributeFloatForAllPoints([Ref, Const] PointCloud pc,
|
||||
[Ref, Const] PointAttribute pa,
|
||||
DracoFloat32Array out_values);
|
||||
// Deprecated.
|
||||
boolean GetAttributeIntForAllPoints([Ref, Const] PointCloud pc,
|
||||
[Ref, Const] PointAttribute pa,
|
||||
DracoInt32Array out_values);
|
||||
boolean GetAttributeInt32ForAllPoints([Ref, Const] PointCloud pc,
|
||||
[Ref, Const] PointAttribute pa,
|
||||
DracoInt32Array out_values);
|
||||
|
||||
void SkipAttributeTransform(draco_GeometryAttribute_Type att_type);
|
||||
};
|
||||
|
@ -64,15 +64,6 @@ interface Metadata {
|
||||
void Metadata();
|
||||
};
|
||||
|
||||
// TODO(zhafang): Move DracoTypedArray to be shared between encoder and decoder
|
||||
// Draco version of typed arrays. The memory of these arrays is allocated on the
|
||||
// emscripten heap.
|
||||
interface DracoFloat32Array {
|
||||
void DracoFloat32Array();
|
||||
float GetValue(long index);
|
||||
long size();
|
||||
};
|
||||
|
||||
interface DracoInt8Array {
|
||||
void DracoInt8Array();
|
||||
long GetValue(long index);
|
||||
@ -100,6 +91,9 @@ interface MeshBuilder {
|
||||
long AddFloatAttributeToMesh(Mesh mesh, draco_GeometryAttribute_Type type,
|
||||
long num_vertices, long num_components,
|
||||
[Const] float[] att_values);
|
||||
long AddInt32AttributeToMesh(Mesh mesh, draco_GeometryAttribute_Type type,
|
||||
long num_vertices, long num_components,
|
||||
[Const] long[] att_values);
|
||||
boolean SetMetadataForAttribute(Mesh mesh, long attribute_id,
|
||||
[Const] Metadata metadata);
|
||||
boolean AddMetadataToMesh(Mesh mesh, [Const] Metadata metadata);
|
||||
|
@ -17,22 +17,9 @@
|
||||
#include "draco/compression/encode.h"
|
||||
#include "draco/mesh/mesh.h"
|
||||
|
||||
DracoFloat32Array::DracoFloat32Array() {}
|
||||
|
||||
float DracoFloat32Array::GetValue(int index) const { return values_[index]; }
|
||||
|
||||
bool DracoFloat32Array::SetValues(const float *values, int count) {
|
||||
if (values) {
|
||||
values_.assign(values, values + count);
|
||||
} else {
|
||||
values_.resize(count);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
DracoInt8Array::DracoInt8Array() {}
|
||||
|
||||
int DracoInt8Array::GetValue(int index) const { return values_[index]; }
|
||||
int8_t DracoInt8Array::GetValue(int index) const { return values_[index]; }
|
||||
|
||||
bool DracoInt8Array::SetValues(const char *values, int count) {
|
||||
values_.assign(values, values + count);
|
||||
@ -93,26 +80,16 @@ int MeshBuilder::AddFloatAttributeToMesh(Mesh *mesh,
|
||||
draco_GeometryAttribute_Type type,
|
||||
long num_vertices, long num_components,
|
||||
const float *att_values) {
|
||||
if (!mesh)
|
||||
return -1;
|
||||
draco::PointAttribute att;
|
||||
att.Init(type, NULL, num_components, draco::DT_FLOAT32,
|
||||
/* normalized */ false,
|
||||
/* stride */ sizeof(float) * num_components, /* byte_offset */ 0);
|
||||
const int att_id =
|
||||
mesh->AddAttribute(att, /* identity_mapping */ true, num_vertices);
|
||||
draco::PointAttribute *const att_ptr = mesh->attribute(att_id);
|
||||
return AddAttributeToMesh(mesh, type, num_vertices, num_components,
|
||||
att_values, draco::DT_FLOAT32);
|
||||
}
|
||||
|
||||
for (draco::PointIndex i(0); i < num_vertices; ++i) {
|
||||
att_ptr->SetAttributeValue(att_ptr->mapped_index(i),
|
||||
&att_values[i.value() * num_components]);
|
||||
}
|
||||
if (mesh->num_points() == 0) {
|
||||
mesh->set_num_points(num_vertices);
|
||||
} else if (mesh->num_points() != num_vertices) {
|
||||
return -1;
|
||||
}
|
||||
return att_id;
|
||||
int MeshBuilder::AddInt32AttributeToMesh(draco::Mesh *mesh,
|
||||
draco_GeometryAttribute_Type type,
|
||||
long num_vertices, long num_components,
|
||||
const int32_t *att_values) {
|
||||
return AddAttributeToMesh(mesh, type, num_vertices, num_components,
|
||||
att_values, draco::DT_INT32);
|
||||
}
|
||||
|
||||
bool MeshBuilder::SetMetadataForAttribute(Mesh *mesh, long attribute_id,
|
||||
|
@ -28,34 +28,16 @@ typedef draco::GeometryAttribute::Type draco_GeometryAttribute_Type;
|
||||
typedef draco::EncodedGeometryType draco_EncodedGeometryType;
|
||||
typedef draco::MeshEncoderMethod draco_MeshEncoderMethod;
|
||||
|
||||
class DracoFloat32Array {
|
||||
public:
|
||||
DracoFloat32Array();
|
||||
float GetValue(int index) const;
|
||||
|
||||
// In case |values| is nullptr, the data is allocated but not initialized.
|
||||
bool SetValues(const float *values, int count);
|
||||
|
||||
// Directly sets a value for a specific index. The array has to be already
|
||||
// allocated at this point (using SetValues() method).
|
||||
void SetValue(int index, float val) { values_[index] = val; }
|
||||
|
||||
size_t size() { return values_.size(); }
|
||||
|
||||
private:
|
||||
std::vector<float> values_;
|
||||
};
|
||||
|
||||
class DracoInt8Array {
|
||||
public:
|
||||
DracoInt8Array();
|
||||
int GetValue(int index) const;
|
||||
int8_t GetValue(int index) const;
|
||||
bool SetValues(const char *values, int count);
|
||||
|
||||
size_t size() { return values_.size(); }
|
||||
|
||||
private:
|
||||
std::vector<int> values_;
|
||||
std::vector<int8_t> values_;
|
||||
};
|
||||
|
||||
class MetadataBuilder {
|
||||
@ -80,9 +62,42 @@ class MeshBuilder {
|
||||
draco_GeometryAttribute_Type type,
|
||||
long num_vertices, long num_components,
|
||||
const float *att_values);
|
||||
int AddInt32AttributeToMesh(draco::Mesh *mesh,
|
||||
draco_GeometryAttribute_Type type,
|
||||
long num_vertices, long num_components,
|
||||
const int32_t *att_values);
|
||||
bool SetMetadataForAttribute(draco::Mesh *mesh, long attribute_id,
|
||||
const draco::Metadata *metadata);
|
||||
bool AddMetadataToMesh(draco::Mesh *mesh, const draco::Metadata *metadata);
|
||||
|
||||
private:
|
||||
template <typename DataTypeT>
|
||||
int AddAttributeToMesh(draco::Mesh *mesh, draco_GeometryAttribute_Type type,
|
||||
long num_vertices, long num_components,
|
||||
const DataTypeT *att_values,
|
||||
draco::DataType draco_data_type) {
|
||||
if (!mesh)
|
||||
return -1;
|
||||
draco::PointAttribute att;
|
||||
att.Init(type, NULL, num_components, draco_data_type,
|
||||
/* normalized */ false,
|
||||
/* stride */ sizeof(DataTypeT) * num_components,
|
||||
/* byte_offset */ 0);
|
||||
const int att_id =
|
||||
mesh->AddAttribute(att, /* identity_mapping */ true, num_vertices);
|
||||
draco::PointAttribute *const att_ptr = mesh->attribute(att_id);
|
||||
|
||||
for (draco::PointIndex i(0); i < num_vertices; ++i) {
|
||||
att_ptr->SetAttributeValue(att_ptr->mapped_index(i),
|
||||
&att_values[i.value() * num_components]);
|
||||
}
|
||||
if (mesh->num_points() == 0) {
|
||||
mesh->set_num_points(num_vertices);
|
||||
} else if (mesh->num_points() != num_vertices) {
|
||||
return -1;
|
||||
}
|
||||
return att_id;
|
||||
}
|
||||
};
|
||||
|
||||
class Encoder {
|
||||
|
@ -50,13 +50,17 @@ bool CornerTable::Initialize(
|
||||
}
|
||||
|
||||
bool CornerTable::Reset(int num_faces) {
|
||||
if (num_faces < 0)
|
||||
return Reset(num_faces, num_faces * 3);
|
||||
}
|
||||
|
||||
bool CornerTable::Reset(int num_faces, int num_vertices) {
|
||||
if (num_faces < 0 || num_vertices < 0)
|
||||
return false;
|
||||
if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3)
|
||||
return false;
|
||||
corner_to_vertex_map_.assign(num_faces * 3, kInvalidVertexIndex);
|
||||
opposite_corners_.assign(num_faces * 3, kInvalidCornerIndex);
|
||||
vertex_corners_.reserve(num_faces * 3);
|
||||
vertex_corners_.reserve(num_vertices);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -15,10 +15,11 @@
|
||||
#ifndef DRACO_MESH_CORNER_TABLE_H_
|
||||
#define DRACO_MESH_CORNER_TABLE_H_
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include "draco/attributes/geometry_indices.h"
|
||||
#include "draco/core/draco_index_type_vector.h"
|
||||
#include "draco/mesh/corner_table_indices.h"
|
||||
|
||||
namespace draco {
|
||||
|
||||
@ -48,6 +49,10 @@ namespace draco {
|
||||
// non-manifold edges and vertices are automatically split.
|
||||
class CornerTable {
|
||||
public:
|
||||
// TODO(hemmer): rename to Face.
|
||||
// Corner table face type.
|
||||
typedef std::array<VertexIndex, 3> FaceType;
|
||||
|
||||
CornerTable();
|
||||
static std::unique_ptr<CornerTable> Create(
|
||||
const IndexTypeVector<FaceIndex, FaceType> &faces);
|
||||
@ -60,6 +65,9 @@ class CornerTable {
|
||||
// Resets the corner table to the given number of invalid faces.
|
||||
bool Reset(int num_faces);
|
||||
|
||||
// Resets the corner table to the given number of invalid faces and vertices.
|
||||
bool Reset(int num_faces, int num_vertices);
|
||||
|
||||
inline int num_vertices() const { return vertex_corners_.size(); }
|
||||
inline int num_corners() const { return corner_to_vertex_map_.size(); }
|
||||
inline int num_faces() const { return corner_to_vertex_map_.size() / 3; }
|
||||
@ -222,11 +230,6 @@ class CornerTable {
|
||||
// Updates mapping between a corner and a vertex.
|
||||
inline void MapCornerToVertex(CornerIndex corner_id, VertexIndex vert_id) {
|
||||
corner_to_vertex_map_[corner_id] = vert_id;
|
||||
if (vert_id >= 0) {
|
||||
if (vertex_corners_.size() <= static_cast<size_t>(vert_id.value()))
|
||||
vertex_corners_.resize(vert_id.value() + 1);
|
||||
vertex_corners_[vert_id] = corner_id;
|
||||
}
|
||||
}
|
||||
|
||||
VertexIndex AddNewVertex() {
|
||||
@ -477,6 +480,10 @@ class FaceAdjacencyIterator
|
||||
CornerIndex corner_;
|
||||
};
|
||||
|
||||
// A special case to denote an invalid corner table triangle.
|
||||
static constexpr CornerTable::FaceType kInvalidFace(
|
||||
{{kInvalidVertexIndex, kInvalidVertexIndex, kInvalidVertexIndex}});
|
||||
|
||||
} // namespace draco
|
||||
|
||||
#endif // DRACO_MESH_CORNER_TABLE_H_
|
||||
|
@ -1,44 +0,0 @@
|
||||
// Copyright 2016 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_MESH_CORNER_TABLE_INDICES_H_
|
||||
#define DRACO_MESH_CORNER_TABLE_INDICES_H_
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "draco/mesh/mesh_indices.h"
|
||||
|
||||
namespace draco {
|
||||
|
||||
// Vertex index in a corner table.
|
||||
DEFINE_NEW_DRACO_INDEX_TYPE(int32_t, VertexIndex);
|
||||
// Corner index that identifies each corner of every corner table face.
|
||||
DEFINE_NEW_DRACO_INDEX_TYPE(int32_t, CornerIndex);
|
||||
|
||||
// Constants denoting invalid indices.
|
||||
static constexpr VertexIndex kInvalidVertexIndex(
|
||||
std::numeric_limits<int32_t>::min() / 2);
|
||||
static constexpr CornerIndex kInvalidCornerIndex(
|
||||
std::numeric_limits<int32_t>::min() / 2);
|
||||
|
||||
// Corner table face type.
|
||||
typedef std::array<VertexIndex, 3> FaceType;
|
||||
|
||||
// A special case to denote an invalid corner table triangle.
|
||||
static constexpr std::array<VertexIndex, 3> kInvalidFace(
|
||||
{{kInvalidVertexIndex, kInvalidVertexIndex, kInvalidVertexIndex}});
|
||||
|
||||
} // namespace draco
|
||||
|
||||
#endif // DRACO_MESH_CORNER_TABLE_INDICES_H_
|
@ -146,8 +146,8 @@ class EdgeBreakerTraverser {
|
||||
processor_.MarkFaceVisited(face_id);
|
||||
traversal_observer_.OnNewFaceVisited(face_id);
|
||||
const VertexIndex vert_id = corner_table_->Vertex(corner_id);
|
||||
const bool on_boundary = corner_table_->IsOnBoundary(vert_id);
|
||||
if (!processor_.IsVertexVisited(vert_id)) {
|
||||
const bool on_boundary = corner_table_->IsOnBoundary(vert_id);
|
||||
processor_.MarkVertexVisited(vert_id);
|
||||
traversal_observer_.OnNewVertexVisited(vert_id, corner_id);
|
||||
if (!on_boundary) {
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "draco/attributes/geometry_indices.h"
|
||||
#include "draco/core/hash_utils.h"
|
||||
#include "draco/core/macros.h"
|
||||
#include "draco/mesh/mesh_indices.h"
|
||||
#include "draco/point_cloud/point_cloud.h"
|
||||
|
||||
namespace draco {
|
||||
@ -87,6 +87,18 @@ class Mesh : public PointCloud {
|
||||
attribute_data_[att_id].element_type = et;
|
||||
}
|
||||
|
||||
// Returns the point id of for a corner |ci|.
|
||||
inline PointIndex CornerToPointId(int ci) const {
|
||||
if (ci == kInvalidCornerIndex.value())
|
||||
return kInvalidPointIndex;
|
||||
return this->face(FaceIndex(ci / 3))[ci % 3];
|
||||
}
|
||||
|
||||
// Returns the point id of a corner |ci|.
|
||||
inline PointIndex CornerToPointId(CornerIndex ci) const {
|
||||
return this->CornerToPointId(ci.value());
|
||||
}
|
||||
|
||||
struct AttributeData {
|
||||
AttributeData() : element_type(MESH_CORNER_ATTRIBUTE) {}
|
||||
MeshAttributeElementType element_type;
|
||||
|
@ -24,21 +24,11 @@
|
||||
|
||||
namespace draco {
|
||||
|
||||
class MeshAreEquivalentTest : public ::testing::Test {
|
||||
protected:
|
||||
std::unique_ptr<Mesh> DecodeObj(const std::string &file_name) const {
|
||||
const std::string path = GetTestFileFullPath(file_name);
|
||||
std::unique_ptr<Mesh> mesh(new Mesh());
|
||||
ObjDecoder decoder;
|
||||
if (!decoder.DecodeFromFile(path, mesh.get()))
|
||||
return nullptr;
|
||||
return mesh;
|
||||
}
|
||||
};
|
||||
class MeshAreEquivalentTest : public ::testing::Test {};
|
||||
|
||||
TEST_F(MeshAreEquivalentTest, TestOnIndenticalMesh) {
|
||||
const std::string file_name = "test_nm.obj";
|
||||
const std::unique_ptr<Mesh> mesh(DecodeObj(file_name));
|
||||
const std::unique_ptr<Mesh> mesh(ReadMeshFromTestFile(file_name));
|
||||
ASSERT_NE(mesh, nullptr) << "Failed to load test model." << file_name;
|
||||
MeshAreEquivalent equiv;
|
||||
ASSERT_TRUE(equiv(*mesh, *mesh));
|
||||
@ -48,9 +38,9 @@ TEST_F(MeshAreEquivalentTest, TestPermutedOneFace) {
|
||||
const std::string file_name_0 = "one_face_123.obj";
|
||||
const std::string file_name_1 = "one_face_312.obj";
|
||||
const std::string file_name_2 = "one_face_321.obj";
|
||||
const std::unique_ptr<Mesh> mesh_0(DecodeObj(file_name_0));
|
||||
const std::unique_ptr<Mesh> mesh_1(DecodeObj(file_name_1));
|
||||
const std::unique_ptr<Mesh> mesh_2(DecodeObj(file_name_2));
|
||||
const std::unique_ptr<Mesh> mesh_0(ReadMeshFromTestFile(file_name_0));
|
||||
const std::unique_ptr<Mesh> mesh_1(ReadMeshFromTestFile(file_name_1));
|
||||
const std::unique_ptr<Mesh> mesh_2(ReadMeshFromTestFile(file_name_2));
|
||||
ASSERT_NE(mesh_0, nullptr) << "Failed to load test model." << file_name_0;
|
||||
ASSERT_NE(mesh_1, nullptr) << "Failed to load test model." << file_name_1;
|
||||
ASSERT_NE(mesh_2, nullptr) << "Failed to load test model." << file_name_2;
|
||||
@ -63,8 +53,8 @@ TEST_F(MeshAreEquivalentTest, TestPermutedOneFace) {
|
||||
TEST_F(MeshAreEquivalentTest, TestPermutedTwoFaces) {
|
||||
const std::string file_name_0 = "two_faces_123.obj";
|
||||
const std::string file_name_1 = "two_faces_312.obj";
|
||||
const std::unique_ptr<Mesh> mesh_0(DecodeObj(file_name_0));
|
||||
const std::unique_ptr<Mesh> mesh_1(DecodeObj(file_name_1));
|
||||
const std::unique_ptr<Mesh> mesh_0(ReadMeshFromTestFile(file_name_0));
|
||||
const std::unique_ptr<Mesh> mesh_1(ReadMeshFromTestFile(file_name_1));
|
||||
ASSERT_NE(mesh_0, nullptr) << "Failed to load test model." << file_name_0;
|
||||
ASSERT_NE(mesh_1, nullptr) << "Failed to load test model." << file_name_1;
|
||||
MeshAreEquivalent equiv;
|
||||
@ -77,8 +67,8 @@ TEST_F(MeshAreEquivalentTest, TestPermutedTwoFaces) {
|
||||
TEST_F(MeshAreEquivalentTest, TestPermutedThreeFaces) {
|
||||
const std::string file_name_0 = "three_faces_123.obj";
|
||||
const std::string file_name_1 = "three_faces_312.obj";
|
||||
const std::unique_ptr<Mesh> mesh_0(DecodeObj(file_name_0));
|
||||
const std::unique_ptr<Mesh> mesh_1(DecodeObj(file_name_1));
|
||||
const std::unique_ptr<Mesh> mesh_0(ReadMeshFromTestFile(file_name_0));
|
||||
const std::unique_ptr<Mesh> mesh_1(ReadMeshFromTestFile(file_name_1));
|
||||
ASSERT_NE(mesh_0, nullptr) << "Failed to load test model." << file_name_0;
|
||||
ASSERT_NE(mesh_1, nullptr) << "Failed to load test model." << file_name_1;
|
||||
MeshAreEquivalent equiv;
|
||||
@ -91,7 +81,7 @@ TEST_F(MeshAreEquivalentTest, TestPermutedThreeFaces) {
|
||||
// to the order of faces and vertices.
|
||||
TEST_F(MeshAreEquivalentTest, TestOnBigMesh) {
|
||||
const std::string file_name = "test_nm.obj";
|
||||
const std::unique_ptr<Mesh> mesh0(DecodeObj(file_name));
|
||||
const std::unique_ptr<Mesh> mesh0(ReadMeshFromTestFile(file_name));
|
||||
ASSERT_NE(mesh0, nullptr) << "Failed to load test model." << file_name;
|
||||
|
||||
std::unique_ptr<Mesh> mesh1;
|
||||
|
@ -68,9 +68,9 @@ bool MeshAttributeCornerTable::InitFromAttribute(const Mesh *mesh,
|
||||
// vertex but divided by the seam edge.
|
||||
act_c = corner_table_->Next(act_c);
|
||||
act_sibling_c = corner_table_->Previous(act_sibling_c);
|
||||
const PointIndex point_id = CornerToPointId(act_c.value(), mesh);
|
||||
const PointIndex point_id = mesh->CornerToPointId(act_c.value());
|
||||
const PointIndex sibling_point_id =
|
||||
CornerToPointId(act_sibling_c.value(), mesh);
|
||||
mesh->CornerToPointId(act_sibling_c.value());
|
||||
if (att->mapped_index(point_id) != att->mapped_index(sibling_point_id)) {
|
||||
no_interior_seams_ = false;
|
||||
is_edge_on_seam_[c] = true;
|
||||
@ -135,7 +135,7 @@ void MeshAttributeCornerTable::RecomputeVerticesInternal(
|
||||
continue; // Isolated vertex?
|
||||
AttributeValueIndex first_vert_id(num_new_vertices++);
|
||||
if (init_vertex_to_attribute_entry_map) {
|
||||
const PointIndex point_id = CornerToPointId(c.value(), mesh);
|
||||
const PointIndex point_id = mesh->CornerToPointId(c.value());
|
||||
vertex_to_attribute_entry_id_map_.push_back(att->mapped_index(point_id));
|
||||
} else {
|
||||
// Identity mapping
|
||||
@ -161,7 +161,7 @@ void MeshAttributeCornerTable::RecomputeVerticesInternal(
|
||||
if (IsCornerOppositeToSeamEdge(corner_table_->Next(act_c))) {
|
||||
first_vert_id = AttributeValueIndex(num_new_vertices++);
|
||||
if (init_vertex_to_attribute_entry_map) {
|
||||
const PointIndex point_id = CornerToPointId(act_c.value(), mesh);
|
||||
const PointIndex point_id = mesh->CornerToPointId(act_c.value());
|
||||
vertex_to_attribute_entry_id_map_.push_back(
|
||||
att->mapped_index(point_id));
|
||||
} else {
|
||||
|
@ -1,31 +0,0 @@
|
||||
// Copyright 2016 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_MESH_MESH_INDICES_H_
|
||||
#define DRACO_MESH_MESH_INDICES_H_
|
||||
|
||||
#include "draco/attributes/geometry_indices.h"
|
||||
|
||||
namespace draco {
|
||||
|
||||
// Face index used in a corner table.
|
||||
DEFINE_NEW_DRACO_INDEX_TYPE(int32_t, FaceIndex);
|
||||
|
||||
// Constants denoting invalid indices.
|
||||
static constexpr FaceIndex kInvalidFaceIndex(
|
||||
std::numeric_limits<int32_t>::min() / 2);
|
||||
|
||||
} // namespace draco
|
||||
|
||||
#endif // DRACO_MESH_MESH_INDICES_H_
|
@ -16,8 +16,9 @@
|
||||
|
||||
namespace draco {
|
||||
|
||||
std::unique_ptr<CornerTable> CreateCornerTable(const Mesh *mesh) {
|
||||
typedef CornerTable CT;
|
||||
std::unique_ptr<CornerTable> CreateCornerTableFromPositionAttribute(
|
||||
const Mesh *mesh) {
|
||||
typedef CornerTable::FaceType FaceType;
|
||||
|
||||
const PointAttribute *const att =
|
||||
mesh->GetNamedAttribute(GeometryAttribute::POSITION);
|
||||
@ -34,11 +35,12 @@ std::unique_ptr<CornerTable> CreateCornerTable(const Mesh *mesh) {
|
||||
faces[FaceIndex(i)] = new_face;
|
||||
}
|
||||
// Build the corner table.
|
||||
return CT::Create(faces);
|
||||
return CornerTable::Create(faces);
|
||||
}
|
||||
|
||||
std::unique_ptr<CornerTable> CreateCornerTableFromAllAttributes(
|
||||
const Mesh *mesh) {
|
||||
typedef CornerTable::FaceType FaceType;
|
||||
IndexTypeVector<FaceIndex, FaceType> faces(mesh->num_faces());
|
||||
FaceType new_face;
|
||||
for (FaceIndex i(0); i < mesh->num_faces(); ++i) {
|
||||
@ -53,21 +55,4 @@ std::unique_ptr<CornerTable> CreateCornerTableFromAllAttributes(
|
||||
// Build the corner table.
|
||||
return CornerTable::Create(faces);
|
||||
}
|
||||
|
||||
PointIndex CornerToPointId(CornerIndex ci, const CornerTable *ct,
|
||||
const Mesh *mesh) {
|
||||
if (!ct->IsValid(ci))
|
||||
return kInvalidPointIndex;
|
||||
|
||||
// Get Face index and local corner index for corner.
|
||||
const FaceIndex fi = ct->Face(ci);
|
||||
const int lci = ct->LocalIndex(ci);
|
||||
// Get the point id.
|
||||
return mesh->face(fi)[lci];
|
||||
}
|
||||
|
||||
PointIndex CornerToPointId(int c, const CornerTable *ct, const Mesh *mesh) {
|
||||
return CornerToPointId(CornerIndex(c), ct, mesh);
|
||||
}
|
||||
|
||||
} // namespace draco
|
||||
|
@ -22,36 +22,18 @@
|
||||
#include "draco/mesh/mesh.h"
|
||||
|
||||
// The file contains functions that use both Mesh and CornerTable as inputs.
|
||||
// TODO(hemmer): We should consider moving the functionality to CornerTable.
|
||||
|
||||
namespace draco {
|
||||
|
||||
// Creates a CornerTable from the position attribute of |mesh|. Returns nullptr
|
||||
// on error.
|
||||
std::unique_ptr<CornerTable> CreateCornerTable(const Mesh *mesh);
|
||||
std::unique_ptr<CornerTable> CreateCornerTableFromPositionAttribute(
|
||||
const Mesh *mesh);
|
||||
|
||||
// Creates a CornerTable from all attributes of |mesh|. Boundaries are
|
||||
// automatically introduced on all attribute seams. Returns nullptr on error.
|
||||
std::unique_ptr<CornerTable> CreateCornerTableFromAllAttributes(
|
||||
const Mesh *mesh);
|
||||
|
||||
// Returns the point id stored on corner |ci|.
|
||||
PointIndex CornerToPointId(CornerIndex ci, const CornerTable *ct,
|
||||
const Mesh *mesh);
|
||||
|
||||
// Returns the point id stored on corner |c|.
|
||||
PointIndex CornerToPointId(int c, const CornerTable *ct, const Mesh *mesh);
|
||||
|
||||
// Returns the point id of |c| without using a corner table.
|
||||
inline PointIndex CornerToPointId(int c, const Mesh *mesh) {
|
||||
return mesh->face(FaceIndex(c / 3))[c % 3];
|
||||
}
|
||||
|
||||
// Returns the point id of |c| without using a corner table.
|
||||
inline PointIndex CornerToPointId(CornerIndex c, const Mesh *mesh) {
|
||||
return CornerToPointId(c.value(), mesh);
|
||||
}
|
||||
|
||||
// Returns true when the given corner lies opposite to an attribute seam.
|
||||
inline bool IsCornerOppositeToAttributeSeam(CornerIndex ci,
|
||||
const PointAttribute &att,
|
||||
@ -63,13 +45,13 @@ inline bool IsCornerOppositeToAttributeSeam(CornerIndex ci,
|
||||
// Compare attribute value indices on both ends of the opposite edge.
|
||||
CornerIndex c0 = ct.Next(ci);
|
||||
CornerIndex c1 = ct.Previous(opp_ci);
|
||||
if (att.mapped_index(CornerToPointId(c0, &mesh)) !=
|
||||
att.mapped_index(CornerToPointId(c1, &mesh)))
|
||||
if (att.mapped_index(mesh.CornerToPointId(c0)) !=
|
||||
att.mapped_index(mesh.CornerToPointId(c1)))
|
||||
return true;
|
||||
c0 = ct.Previous(ci);
|
||||
c1 = ct.Next(opp_ci);
|
||||
if (att.mapped_index(CornerToPointId(c0, &mesh)) !=
|
||||
att.mapped_index(CornerToPointId(c1, &mesh)))
|
||||
if (att.mapped_index(mesh.CornerToPointId(c0)) !=
|
||||
att.mapped_index(mesh.CornerToPointId(c1)))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ class MeshStripifier {
|
||||
num_encoded_faces_ = 0;
|
||||
// TODO(ostava): We may be able to avoid computing the corner table if we
|
||||
// already have it stored somewhere.
|
||||
corner_table_ = CreateCornerTable(mesh_);
|
||||
corner_table_ = CreateCornerTableFromPositionAttribute(mesh_);
|
||||
if (corner_table_ == nullptr)
|
||||
return false;
|
||||
|
||||
@ -137,7 +137,7 @@ class MeshStripifier {
|
||||
}
|
||||
|
||||
PointIndex CornerToPointIndex(CornerIndex ci) const {
|
||||
return CornerToPointId(ci, corner_table_.get(), mesh_);
|
||||
return mesh_->CornerToPointId(ci);
|
||||
}
|
||||
|
||||
// Returns the opposite corner in case the opposite triangle does not lie
|
||||
|
@ -264,20 +264,23 @@ int main(int argc, char **argv) {
|
||||
std::unique_ptr<draco::PointCloud> pc;
|
||||
draco::Mesh *mesh = nullptr;
|
||||
if (!options.is_point_cloud) {
|
||||
std::unique_ptr<draco::Mesh> in_mesh =
|
||||
auto maybe_mesh =
|
||||
draco::ReadMeshFromFile(options.input, options.use_metadata);
|
||||
if (!in_mesh) {
|
||||
printf("Failed loading the input mesh.\n");
|
||||
if (!maybe_mesh.ok()) {
|
||||
printf("Failed loading the input mesh: %s.\n",
|
||||
maybe_mesh.status().error_msg());
|
||||
return -1;
|
||||
}
|
||||
mesh = in_mesh.get();
|
||||
pc = std::move(in_mesh);
|
||||
mesh = maybe_mesh.value().get();
|
||||
pc = std::move(maybe_mesh).value();
|
||||
} else {
|
||||
pc = draco::ReadPointCloudFromFile(options.input);
|
||||
if (!pc) {
|
||||
printf("Failed loading the input point cloud.\n");
|
||||
auto maybe_pc = draco::ReadPointCloudFromFile(options.input);
|
||||
if (!maybe_pc.ok()) {
|
||||
printf("Failed loading the input point cloud: %s.\n",
|
||||
maybe_pc.status().error_msg());
|
||||
return -1;
|
||||
}
|
||||
pc = std::move(maybe_pc).value();
|
||||
}
|
||||
|
||||
if (options.pos_quantization_bits < 0) {
|
||||
|
74
src/draco/unity/draco_unity_plugin.cc
Normal file
74
src/draco/unity/draco_unity_plugin.cc
Normal file
@ -0,0 +1,74 @@
|
||||
// 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.
|
||||
//
|
||||
#include "draco/unity/draco_unity_plugin.h"
|
||||
|
||||
#ifdef BUILD_UNITY_PLUGIN
|
||||
|
||||
namespace draco {
|
||||
|
||||
int DecodeMeshForUnity(char *data, unsigned int length,
|
||||
DracoToUnityMesh **tmp_mesh) {
|
||||
draco::DecoderBuffer buffer;
|
||||
buffer.Init(data, length);
|
||||
auto type_statusor = draco::Decoder::GetEncodedGeometryType(&buffer);
|
||||
if (!type_statusor.ok()) {
|
||||
// TODO(zhafang): Use enum instead.
|
||||
return -1;
|
||||
}
|
||||
const draco::EncodedGeometryType geom_type = type_statusor.value();
|
||||
if (geom_type != draco::TRIANGULAR_MESH) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
draco::Decoder decoder;
|
||||
auto statusor = decoder.DecodeMeshFromBuffer(&buffer);
|
||||
if (!statusor.ok()) {
|
||||
return -3;
|
||||
}
|
||||
std::unique_ptr<draco::Mesh> in_mesh = std::move(statusor).value();
|
||||
|
||||
*tmp_mesh = new DracoToUnityMesh();
|
||||
DracoToUnityMesh *unity_mesh = *tmp_mesh;
|
||||
unity_mesh->num_faces = in_mesh->num_faces();
|
||||
unity_mesh->num_vertices = in_mesh->num_points();
|
||||
|
||||
unity_mesh->indices = new int[in_mesh->num_faces() * 3];
|
||||
for (draco::FaceIndex face_id(0); face_id < in_mesh->num_faces(); ++face_id) {
|
||||
const Mesh::Face &face = in_mesh->face(draco::FaceIndex(face_id));
|
||||
memcpy(unity_mesh->indices + face_id.value() * 3,
|
||||
reinterpret_cast<const int *>(face.data()), sizeof(int) * 3);
|
||||
}
|
||||
|
||||
// TODO(zhafang): Add other attributes.
|
||||
unity_mesh->position = new float[in_mesh->num_points() * 3];
|
||||
const auto pos_att =
|
||||
in_mesh->GetNamedAttribute(draco::GeometryAttribute::POSITION);
|
||||
for (draco::PointIndex i(0); i < in_mesh->num_points(); ++i) {
|
||||
const draco::AttributeValueIndex val_index = pos_att->mapped_index(i);
|
||||
if (!pos_att->ConvertValue<float, 3>(
|
||||
val_index, unity_mesh->position + i.value() * 3)) {
|
||||
delete[] unity_mesh->indices;
|
||||
delete[] unity_mesh->position;
|
||||
delete unity_mesh;
|
||||
return -8;
|
||||
}
|
||||
}
|
||||
|
||||
return in_mesh->num_faces();
|
||||
}
|
||||
|
||||
} // namespace draco
|
||||
|
||||
#endif // BUILD_UNITY_PLUGIN
|
65
src/draco/unity/draco_unity_plugin.h
Normal file
65
src/draco/unity/draco_unity_plugin.h
Normal file
@ -0,0 +1,65 @@
|
||||
// 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_UNITY_DRACO_UNITY_PLUGIN_H_
|
||||
#define DRACO_UNITY_DRACO_UNITY_PLUGIN_H_
|
||||
|
||||
#include "draco/compression/config/compression_shared.h"
|
||||
#include "draco/compression/decode.h"
|
||||
|
||||
#ifdef BUILD_UNITY_PLUGIN
|
||||
|
||||
// If compiling with Visual Studio.
|
||||
#if defined(_MSC_VER)
|
||||
#define EXPORT_API __declspec(dllexport)
|
||||
#else
|
||||
// Other platforms don't need this.
|
||||
#define EXPORT_API
|
||||
#endif // defined(_MSC_VER)
|
||||
|
||||
namespace draco {
|
||||
|
||||
extern "C" {
|
||||
struct EXPORT_API DracoToUnityMesh {
|
||||
DracoToUnityMesh()
|
||||
: num_faces(0),
|
||||
indices(nullptr),
|
||||
num_vertices(0),
|
||||
position(nullptr),
|
||||
normal(nullptr),
|
||||
texcoord(nullptr),
|
||||
color(nullptr) {}
|
||||
|
||||
int num_faces;
|
||||
int *indices;
|
||||
int num_vertices;
|
||||
|
||||
float *position;
|
||||
float *normal;
|
||||
float *texcoord;
|
||||
float *color;
|
||||
};
|
||||
|
||||
/* To use this function, you do not allocate memory for |tmp_mesh|, just
|
||||
* define and pass a null pointer. Otherwise there will be memory leak.
|
||||
*/
|
||||
int EXPORT_API DecodeMeshForUnity(char *data, unsigned int length,
|
||||
DracoToUnityMesh **tmp_mesh);
|
||||
} // extern "C"
|
||||
|
||||
} // namespace draco
|
||||
|
||||
#endif // BUILD_UNITY_PLUGIN
|
||||
|
||||
#endif // DRACO_UNITY_DRACO_UNITY_PLUGIN_H_
|
82
src/draco/unity/draco_unity_plugin_test.cc
Normal file
82
src/draco/unity/draco_unity_plugin_test.cc
Normal file
@ -0,0 +1,82 @@
|
||||
// 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.
|
||||
//
|
||||
#include "third_party/draco/src/draco/unity/draco_unity_plugin.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "draco/core/draco_test_base.h"
|
||||
#include "draco/core/draco_test_utils.h"
|
||||
|
||||
namespace {
|
||||
|
||||
class DracoUnityPluginTest : public ::testing::Test {
|
||||
protected:
|
||||
DracoUnityPluginTest() : unity_mesh_(nullptr) {}
|
||||
|
||||
void TestDecodingToDracoUnityMesh(const std::string &file_name,
|
||||
int expected_num_faces,
|
||||
int expected_num_vertices) {
|
||||
// Tests that decoders can successfully skip attribute transform.
|
||||
std::ifstream input_file(draco::GetTestFileFullPath(file_name),
|
||||
std::ios::binary);
|
||||
ASSERT_TRUE(input_file);
|
||||
|
||||
// Read the file stream into a buffer.
|
||||
std::streampos file_size = 0;
|
||||
input_file.seekg(0, std::ios::end);
|
||||
file_size = input_file.tellg() - file_size;
|
||||
input_file.seekg(0, std::ios::beg);
|
||||
std::vector<char> data(file_size);
|
||||
input_file.read(data.data(), file_size);
|
||||
|
||||
ASSERT_FALSE(data.empty());
|
||||
|
||||
const int num_faces =
|
||||
draco::DecodeMeshForUnity(data.data(), data.size(), &unity_mesh_);
|
||||
|
||||
ASSERT_EQ(num_faces, expected_num_faces);
|
||||
ASSERT_EQ(unity_mesh_->num_faces, expected_num_faces);
|
||||
ASSERT_EQ(unity_mesh_->num_vertices, expected_num_vertices);
|
||||
|
||||
DestroyUnityMesh();
|
||||
}
|
||||
|
||||
// TODO(zhafang): Consider move to draco_unity_plugin.h.
|
||||
void DestroyUnityMesh() {
|
||||
if (unity_mesh_ != nullptr) {
|
||||
if (unity_mesh_->indices != nullptr) {
|
||||
delete[] unity_mesh_->indices;
|
||||
unity_mesh_->indices = nullptr;
|
||||
}
|
||||
if (unity_mesh_->position != nullptr) {
|
||||
delete[] unity_mesh_->position;
|
||||
unity_mesh_->position = nullptr;
|
||||
}
|
||||
}
|
||||
delete unity_mesh_;
|
||||
unity_mesh_ = nullptr;
|
||||
}
|
||||
|
||||
draco::DracoToUnityMesh *unity_mesh_;
|
||||
};
|
||||
|
||||
TEST_F(DracoUnityPluginTest, TestDecodingToDracoUnityMesh) {
|
||||
TestDecodingToDracoUnityMesh("test_nm.obj.edgebreaker.1.0.0.drc", 170, 99);
|
||||
}
|
||||
|
||||
} // namespace
|
727
testdata/test_lines.obj
vendored
Normal file
727
testdata/test_lines.obj
vendored
Normal file
@ -0,0 +1,727 @@
|
||||
o cinenv_ground.001_cinenv_ground.005
|
||||
v 8.108999252319336 0.08423099666833878 3.8017868995666504
|
||||
v 8.063356399536133 0.08423099666833878 3.8017868995666504
|
||||
v 8.063356399536133 0.0021569998934865 3.8017868995666504
|
||||
v 8.108999252319336 0.08423099666833878 3.8017868995666504
|
||||
v 8.063356399536133 0.0021569998934865 3.8017868995666504
|
||||
v 8.108999252319336 0.0021569998934865 3.8017868995666504
|
||||
v 7.513733863830566 0.00647599995136261 0.7569500207901001
|
||||
v 13.33121109008789 0.00647599995136261 0.7569500207901001
|
||||
v 13.33121109008789 0.006477000191807747 0.24776600301265717
|
||||
v 7.513733863830566 0.00647599995136261 0.7569500207901001
|
||||
v 13.33121109008789 0.006477000191807747 0.24776600301265717
|
||||
v 7.513733863830566 0.006477000191807747 0.24776600301265717
|
||||
v 13.822495460510254 0.0063760001212358475 0.7422450184822083
|
||||
v 14.025032043457031 0.0063760001212358475 0.7422450184822083
|
||||
v 14.025032043457031 0.0063760001212358475 0.24776600301265717
|
||||
v 13.822495460510254 0.0063760001212358475 0.7422450184822083
|
||||
v 14.025032043457031 0.0063760001212358475 0.24776600301265717
|
||||
v 13.822495460510254 0.0063760001212358475 0.24776600301265717
|
||||
v 14.025032043457031 0.0063749998807907104 5.408486843109131
|
||||
v 14.025032043457031 0.0063760001212358475 0.7422450184822083
|
||||
v 13.822495460510254 0.0063760001212358475 0.7422450184822083
|
||||
v 14.025032043457031 0.0063749998807907104 5.408486843109131
|
||||
v 13.822495460510254 0.0063760001212358475 0.7422450184822083
|
||||
v 13.822495460510254 0.0063749998807907104 5.408487796783447
|
||||
v 13.329778671264648 0.0027759999502450228 5.4179301261901855
|
||||
v 13.822492599487305 0.0027759999502450228 5.4179301261901855
|
||||
v 13.822492599487305 0.0027759999502450228 0.24776600301265717
|
||||
v 13.329778671264648 0.0027759999502450228 5.4179301261901855
|
||||
v 13.822492599487305 0.0027759999502450228 0.24776600301265717
|
||||
v 13.329778671264648 0.0027759999502450228 0.24776600301265717
|
||||
v 9.434063911437988 0.0034910000395029783 2.5119950771331787
|
||||
v 12.270297050476074 0.0034910000395029783 2.5119950771331787
|
||||
v 12.270297050476074 0.0034910000395029783 0.779774010181427
|
||||
v 9.434063911437988 0.0034910000395029783 2.5119950771331787
|
||||
v 12.270297050476074 0.0034910000395029783 0.779774010181427
|
||||
v 9.434063911437988 0.0034910000395029783 0.779774010181427
|
||||
v 9.434063911437988 0.0034910000395029783 2.5119950771331787
|
||||
v 9.434063911437988 0.0034910000395029783 0.779774010181427
|
||||
v 9.434063911437988 0.002392000053077936 0.779774010181427
|
||||
v 9.434063911437988 0.0034910000395029783 2.5119950771331787
|
||||
v 9.434063911437988 0.002392000053077936 0.779774010181427
|
||||
v 9.434063911437988 0.002391000045463443 2.5119950771331787
|
||||
v 12.270297050476074 0.0034910000395029783 0.779774010181427
|
||||
v 12.270297050476074 0.0034910000395029783 2.5119950771331787
|
||||
v 12.270297050476074 0.002391000045463443 2.5119950771331787
|
||||
v 12.270297050476074 0.0034910000395029783 0.779774010181427
|
||||
v 12.270297050476074 0.002391000045463443 2.5119950771331787
|
||||
v 12.270297050476074 0.002392000053077936 0.779774010181427
|
||||
v 12.270297050476074 0.0034910000395029783 2.5119950771331787
|
||||
v 9.434063911437988 0.0034910000395029783 2.5119950771331787
|
||||
v 9.434063911437988 0.002391000045463443 2.5119950771331787
|
||||
v 12.270297050476074 0.0034910000395029783 2.5119950771331787
|
||||
v 9.434063911437988 0.002391000045463443 2.5119950771331787
|
||||
v 12.270297050476074 0.002391000045463443 2.5119950771331787
|
||||
v 9.434063911437988 0.0034910000395029783 0.779774010181427
|
||||
v 12.270297050476074 0.0034910000395029783 0.779774010181427
|
||||
v 12.270297050476074 0.002392000053077936 0.779774010181427
|
||||
v 9.434063911437988 0.0034910000395029783 0.779774010181427
|
||||
v 12.270297050476074 0.002392000053077936 0.779774010181427
|
||||
v 9.434063911437988 0.002392000053077936 0.779774010181427
|
||||
v 7.5083818435668945 0.0027759999502450228 5.433700084686279
|
||||
v 13.331209182739258 0.0027759999502450228 5.433700084686279
|
||||
v 13.331209182739258 0.0027759999502450228 0.7422450184822083
|
||||
v 7.5083818435668945 0.0027759999502450228 5.433700084686279
|
||||
v 13.331209182739258 0.0027759999502450228 0.7422450184822083
|
||||
v 7.5083818435668945 0.0027759999502450228 0.7422450184822083
|
||||
v 10.114896774291992 0.0045739999040961266 4.214410781860352
|
||||
v 10.114896774291992 0.0028540000785142183 4.214410781860352
|
||||
v 10.114896774291992 0.0028540000785142183 4.548134803771973
|
||||
v 10.114896774291992 0.0045739999040961266 4.214410781860352
|
||||
v 10.114896774291992 0.0028540000785142183 4.548134803771973
|
||||
v 10.114896774291992 0.0045739999040961266 4.548134803771973
|
||||
v 13.021791458129883 0.0028540000785142183 4.214410781860352
|
||||
v 13.021791458129883 0.0045739999040961266 4.214410781860352
|
||||
v 13.021791458129883 0.0045739999040961266 4.548134803771973
|
||||
v 13.021791458129883 0.0028540000785142183 4.214410781860352
|
||||
v 13.021791458129883 0.0045739999040961266 4.548134803771973
|
||||
v 13.021791458129883 0.0028540000785142183 4.548134803771973
|
||||
v 11.776677131652832 0.0045739999040961266 3.2132439613342285
|
||||
v 11.776677131652832 0.0028540000785142183 3.2132439613342285
|
||||
v 11.363393783569336 0.0028540000785142183 3.2132439613342285
|
||||
v 11.776677131652832 0.0045739999040961266 3.2132439613342285
|
||||
v 11.363393783569336 0.0028540000785142183 3.2132439613342285
|
||||
v 11.363393783569336 0.0045739999040961266 3.2132439613342285
|
||||
v 11.776678085327148 0.0045739999040961266 4.214410781860352
|
||||
v 11.776678085327148 0.0045739999040961266 3.8806889057159424
|
||||
v 11.363393783569336 0.0045739999040961266 3.8806889057159424
|
||||
v 11.776678085327148 0.0045739999040961266 4.214410781860352
|
||||
v 11.363393783569336 0.0045739999040961266 3.8806889057159424
|
||||
v 11.363393783569336 0.0045739999040961266 4.214410781860352
|
||||
v 11.776678085327148 0.0028540000785142183 5.215579032897949
|
||||
v 11.776678085327148 0.0045739999040961266 5.215579032897949
|
||||
v 11.363393783569336 0.0045739999040961266 5.215579032897949
|
||||
v 11.776678085327148 0.0028540000785142183 5.215579032897949
|
||||
v 11.363393783569336 0.0045739999040961266 5.215579032897949
|
||||
v 11.363393783569336 0.0028540000785142183 5.215579032897949
|
||||
v 10.114896774291992 0.0045739999040961266 3.2132439613342285
|
||||
v 10.114896774291992 0.0028540000785142183 3.2132439613342285
|
||||
v 10.114896774291992 0.0028540000785142183 3.546967029571533
|
||||
v 10.114896774291992 0.0045739999040961266 3.2132439613342285
|
||||
v 10.114896774291992 0.0028540000785142183 3.546967029571533
|
||||
v 10.114896774291992 0.0045739999040961266 3.546967029571533
|
||||
v 10.114896774291992 0.0045739999040961266 3.546967029571533
|
||||
v 10.114896774291992 0.0028540000785142183 3.546967029571533
|
||||
v 10.114896774291992 0.0028540000785142183 3.8806889057159424
|
||||
v 10.114896774291992 0.0045739999040961266 3.546967029571533
|
||||
v 10.114896774291992 0.0028540000785142183 3.8806889057159424
|
||||
v 10.114896774291992 0.0045739999040961266 3.8806889057159424
|
||||
v 10.114896774291992 0.0045739999040961266 3.8806889057159424
|
||||
v 10.114896774291992 0.0028540000785142183 3.8806889057159424
|
||||
v 10.114896774291992 0.0028540000785142183 4.214410781860352
|
||||
v 10.114896774291992 0.0045739999040961266 3.8806889057159424
|
||||
v 10.114896774291992 0.0028540000785142183 4.214410781860352
|
||||
v 10.114896774291992 0.0045739999040961266 4.214410781860352
|
||||
v 10.114896774291992 0.0028540000785142183 5.215579032897949
|
||||
v 10.114896774291992 0.0045739999040961266 5.215579032897949
|
||||
v 10.114896774291992 0.0045739999040961266 4.881856918334961
|
||||
v 10.114896774291992 0.0028540000785142183 5.215579032897949
|
||||
v 10.114896774291992 0.0045739999040961266 4.881856918334961
|
||||
v 10.114896774291992 0.0028540000785142183 4.881856918334961
|
||||
v 10.114896774291992 0.0028540000785142183 4.881856918334961
|
||||
v 10.114896774291992 0.0045739999040961266 4.881856918334961
|
||||
v 10.114896774291992 0.0045739999040961266 4.548134803771973
|
||||
v 10.114896774291992 0.0028540000785142183 4.881856918334961
|
||||
v 10.114896774291992 0.0045739999040961266 4.548134803771973
|
||||
v 10.114896774291992 0.0028540000785142183 4.548134803771973
|
||||
v 13.021791458129883 0.0028540000785142183 3.2132439613342285
|
||||
v 13.021791458129883 0.0045739999040961266 3.2132439613342285
|
||||
v 13.021791458129883 0.0045739999040961266 3.546967029571533
|
||||
v 13.021791458129883 0.0028540000785142183 3.2132439613342285
|
||||
v 13.021791458129883 0.0045739999040961266 3.546967029571533
|
||||
v 13.021791458129883 0.0028540000785142183 3.546967029571533
|
||||
v 13.021791458129883 0.0028540000785142183 3.546967029571533
|
||||
v 13.021791458129883 0.0045739999040961266 3.546967029571533
|
||||
v 13.021791458129883 0.0045739999040961266 3.8806889057159424
|
||||
v 13.021791458129883 0.0028540000785142183 3.546967029571533
|
||||
v 13.021791458129883 0.0045739999040961266 3.8806889057159424
|
||||
v 13.021791458129883 0.0028540000785142183 3.8806889057159424
|
||||
v 13.021791458129883 0.0028540000785142183 3.8806889057159424
|
||||
v 13.021791458129883 0.0045739999040961266 3.8806889057159424
|
||||
v 13.021791458129883 0.0045739999040961266 4.214410781860352
|
||||
v 13.021791458129883 0.0028540000785142183 3.8806889057159424
|
||||
v 13.021791458129883 0.0045739999040961266 4.214410781860352
|
||||
v 13.021791458129883 0.0028540000785142183 4.214410781860352
|
||||
v 13.021791458129883 0.0045739999040961266 5.215579032897949
|
||||
v 13.021791458129883 0.0028540000785142183 5.215579032897949
|
||||
v 13.021791458129883 0.0028540000785142183 4.881856918334961
|
||||
v 13.021791458129883 0.0045739999040961266 5.215579032897949
|
||||
v 13.021791458129883 0.0028540000785142183 4.881856918334961
|
||||
v 13.021791458129883 0.0045739999040961266 4.881856918334961
|
||||
v 13.021791458129883 0.0045739999040961266 4.881856918334961
|
||||
v 13.021791458129883 0.0028540000785142183 4.881856918334961
|
||||
v 13.021791458129883 0.0028540000785142183 4.548134803771973
|
||||
v 13.021791458129883 0.0045739999040961266 4.881856918334961
|
||||
v 13.021791458129883 0.0028540000785142183 4.548134803771973
|
||||
v 13.021791458129883 0.0045739999040961266 4.548134803771973
|
||||
v 11.776678085327148 0.0045739999040961266 5.215579032897949
|
||||
v 11.776678085327148 0.0045739999040961266 4.881856918334961
|
||||
v 11.363393783569336 0.0045739999040961266 4.881856918334961
|
||||
v 11.776678085327148 0.0045739999040961266 5.215579032897949
|
||||
v 11.363393783569336 0.0045739999040961266 4.881856918334961
|
||||
v 11.363393783569336 0.0045739999040961266 5.215579032897949
|
||||
v 11.776678085327148 0.0045739999040961266 4.881856918334961
|
||||
v 11.776678085327148 0.0045739999040961266 4.548134803771973
|
||||
v 11.363393783569336 0.0045739999040961266 4.548134803771973
|
||||
v 11.776678085327148 0.0045739999040961266 4.881856918334961
|
||||
v 11.363393783569336 0.0045739999040961266 4.548134803771973
|
||||
v 11.363393783569336 0.0045739999040961266 4.881856918334961
|
||||
v 11.776678085327148 0.0045739999040961266 4.548134803771973
|
||||
v 11.776678085327148 0.0045739999040961266 4.214410781860352
|
||||
v 11.363393783569336 0.0045739999040961266 4.214410781860352
|
||||
v 11.776678085327148 0.0045739999040961266 4.548134803771973
|
||||
v 11.363393783569336 0.0045739999040961266 4.214410781860352
|
||||
v 11.363393783569336 0.0045739999040961266 4.548134803771973
|
||||
v 11.363393783569336 0.0045739999040961266 3.2132439613342285
|
||||
v 11.363393783569336 0.0045739999040961266 3.546967029571533
|
||||
v 11.776677131652832 0.0045739999040961266 3.546967029571533
|
||||
v 11.363393783569336 0.0045739999040961266 3.2132439613342285
|
||||
v 11.776677131652832 0.0045739999040961266 3.546967029571533
|
||||
v 11.776677131652832 0.0045739999040961266 3.2132439613342285
|
||||
v 11.363393783569336 0.0045739999040961266 3.546967029571533
|
||||
v 11.363393783569336 0.0045739999040961266 3.8806889057159424
|
||||
v 11.776678085327148 0.0045739999040961266 3.8806889057159424
|
||||
v 11.363393783569336 0.0045739999040961266 3.546967029571533
|
||||
v 11.776678085327148 0.0045739999040961266 3.8806889057159424
|
||||
v 11.776677131652832 0.0045739999040961266 3.546967029571533
|
||||
v 13.021791458129883 0.0045739999040961266 3.2132439613342285
|
||||
v 13.021791458129883 0.0028540000785142183 3.2132439613342285
|
||||
v 12.608508110046387 0.0028540000785142183 3.2132439613342285
|
||||
v 13.021791458129883 0.0045739999040961266 3.2132439613342285
|
||||
v 12.608508110046387 0.0028540000785142183 3.2132439613342285
|
||||
v 12.60850715637207 0.0045739999040961266 3.2132439613342285
|
||||
v 12.60850715637207 0.0045739999040961266 3.2132439613342285
|
||||
v 12.608508110046387 0.0028540000785142183 3.2132439613342285
|
||||
v 12.189961433410645 0.0028540000785142183 3.2132439613342285
|
||||
v 12.60850715637207 0.0045739999040961266 3.2132439613342285
|
||||
v 12.189961433410645 0.0028540000785142183 3.2132439613342285
|
||||
v 12.189961433410645 0.0045739999040961266 3.2132439613342285
|
||||
v 12.189961433410645 0.0045739999040961266 3.2132439613342285
|
||||
v 12.189961433410645 0.0028540000785142183 3.2132439613342285
|
||||
v 11.776677131652832 0.0028540000785142183 3.2132439613342285
|
||||
v 12.189961433410645 0.0045739999040961266 3.2132439613342285
|
||||
v 11.776677131652832 0.0028540000785142183 3.2132439613342285
|
||||
v 11.776677131652832 0.0045739999040961266 3.2132439613342285
|
||||
v 10.114896774291992 0.0028540000785142183 3.2132439613342285
|
||||
v 10.114896774291992 0.0045739999040961266 3.2132439613342285
|
||||
v 10.536825180053711 0.0045739999040961266 3.2132439613342285
|
||||
v 10.114896774291992 0.0028540000785142183 3.2132439613342285
|
||||
v 10.536825180053711 0.0045739999040961266 3.2132439613342285
|
||||
v 10.536827087402344 0.0028540000785142183 3.2132439613342285
|
||||
v 10.536827087402344 0.0028540000785142183 3.2132439613342285
|
||||
v 10.536825180053711 0.0045739999040961266 3.2132439613342285
|
||||
v 10.950108528137207 0.0045739999040961266 3.2132439613342285
|
||||
v 10.536827087402344 0.0028540000785142183 3.2132439613342285
|
||||
v 10.950108528137207 0.0045739999040961266 3.2132439613342285
|
||||
v 10.950108528137207 0.0028540000785142183 3.2132439613342285
|
||||
v 10.950108528137207 0.0028540000785142183 3.2132439613342285
|
||||
v 10.950108528137207 0.0045739999040961266 3.2132439613342285
|
||||
v 11.363393783569336 0.0045739999040961266 3.2132439613342285
|
||||
v 10.950108528137207 0.0028540000785142183 3.2132439613342285
|
||||
v 11.363393783569336 0.0045739999040961266 3.2132439613342285
|
||||
v 11.363393783569336 0.0028540000785142183 3.2132439613342285
|
||||
v 13.021791458129883 0.0045739999040961266 4.214410781860352
|
||||
v 13.021791458129883 0.0045739999040961266 3.8806889057159424
|
||||
v 12.608508110046387 0.0045739999040961266 3.8806889057159424
|
||||
v 13.021791458129883 0.0045739999040961266 4.214410781860352
|
||||
v 12.608508110046387 0.0045739999040961266 3.8806889057159424
|
||||
v 12.60850715637207 0.0045739999040961266 4.214410781860352
|
||||
v 12.60850715637207 0.0045739999040961266 4.214410781860352
|
||||
v 12.608508110046387 0.0045739999040961266 3.8806889057159424
|
||||
v 12.189961433410645 0.0045739999040961266 3.8806889057159424
|
||||
v 12.60850715637207 0.0045739999040961266 4.214410781860352
|
||||
v 12.189961433410645 0.0045739999040961266 3.8806889057159424
|
||||
v 12.189961433410645 0.0045739999040961266 4.214410781860352
|
||||
v 12.189961433410645 0.0045739999040961266 4.214410781860352
|
||||
v 12.189961433410645 0.0045739999040961266 3.8806889057159424
|
||||
v 11.776678085327148 0.0045739999040961266 3.8806889057159424
|
||||
v 12.189961433410645 0.0045739999040961266 4.214410781860352
|
||||
v 11.776678085327148 0.0045739999040961266 3.8806889057159424
|
||||
v 11.776678085327148 0.0045739999040961266 4.214410781860352
|
||||
v 10.114896774291992 0.0045739999040961266 3.8806889057159424
|
||||
v 10.114896774291992 0.0045739999040961266 4.214410781860352
|
||||
v 10.536827087402344 0.0045739999040961266 4.214410781860352
|
||||
v 10.114896774291992 0.0045739999040961266 3.8806889057159424
|
||||
v 10.536827087402344 0.0045739999040961266 4.214410781860352
|
||||
v 10.536827087402344 0.0045739999040961266 3.8806889057159424
|
||||
v 10.536827087402344 0.0045739999040961266 3.8806889057159424
|
||||
v 10.536827087402344 0.0045739999040961266 4.214410781860352
|
||||
v 10.950108528137207 0.0045739999040961266 4.214410781860352
|
||||
v 10.536827087402344 0.0045739999040961266 3.8806889057159424
|
||||
v 10.950108528137207 0.0045739999040961266 4.214410781860352
|
||||
v 10.950108528137207 0.0045739999040961266 3.8806889057159424
|
||||
v 10.950108528137207 0.0045739999040961266 3.8806889057159424
|
||||
v 10.950108528137207 0.0045739999040961266 4.214410781860352
|
||||
v 11.363393783569336 0.0045739999040961266 4.214410781860352
|
||||
v 10.950108528137207 0.0045739999040961266 3.8806889057159424
|
||||
v 11.363393783569336 0.0045739999040961266 4.214410781860352
|
||||
v 11.363393783569336 0.0045739999040961266 3.8806889057159424
|
||||
v 13.021791458129883 0.0028540000785142183 5.215579032897949
|
||||
v 13.021791458129883 0.0045739999040961266 5.215579032897949
|
||||
v 12.60850715637207 0.0045739999040961266 5.215579032897949
|
||||
v 13.021791458129883 0.0028540000785142183 5.215579032897949
|
||||
v 12.60850715637207 0.0045739999040961266 5.215579032897949
|
||||
v 12.60850715637207 0.0028540000785142183 5.215579032897949
|
||||
v 12.60850715637207 0.0028540000785142183 5.215579032897949
|
||||
v 12.60850715637207 0.0045739999040961266 5.215579032897949
|
||||
v 12.189961433410645 0.0045739999040961266 5.215579032897949
|
||||
v 12.60850715637207 0.0028540000785142183 5.215579032897949
|
||||
v 12.189961433410645 0.0045739999040961266 5.215579032897949
|
||||
v 12.189961433410645 0.0028540000785142183 5.215579032897949
|
||||
v 12.189961433410645 0.0028540000785142183 5.215579032897949
|
||||
v 12.189961433410645 0.0045739999040961266 5.215579032897949
|
||||
v 11.776678085327148 0.0045739999040961266 5.215579032897949
|
||||
v 12.189961433410645 0.0028540000785142183 5.215579032897949
|
||||
v 11.776678085327148 0.0045739999040961266 5.215579032897949
|
||||
v 11.776678085327148 0.0028540000785142183 5.215579032897949
|
||||
v 10.114896774291992 0.0045739999040961266 5.215579032897949
|
||||
v 10.114896774291992 0.0028540000785142183 5.215579032897949
|
||||
v 10.536827087402344 0.0028540000785142183 5.215579986572266
|
||||
v 10.114896774291992 0.0045739999040961266 5.215579032897949
|
||||
v 10.536827087402344 0.0028540000785142183 5.215579986572266
|
||||
v 10.536827087402344 0.0045739999040961266 5.215579986572266
|
||||
v 10.536827087402344 0.0045739999040961266 5.215579986572266
|
||||
v 10.536827087402344 0.0028540000785142183 5.215579986572266
|
||||
v 10.950108528137207 0.0028540000785142183 5.215579986572266
|
||||
v 10.536827087402344 0.0045739999040961266 5.215579986572266
|
||||
v 10.950108528137207 0.0028540000785142183 5.215579986572266
|
||||
v 10.950108528137207 0.0045739999040961266 5.215579986572266
|
||||
v 10.950108528137207 0.0045739999040961266 5.215579986572266
|
||||
v 10.950108528137207 0.0028540000785142183 5.215579986572266
|
||||
v 11.363393783569336 0.0028540000785142183 5.215579032897949
|
||||
v 10.950108528137207 0.0045739999040961266 5.215579986572266
|
||||
v 11.363393783569336 0.0028540000785142183 5.215579032897949
|
||||
v 11.363393783569336 0.0045739999040961266 5.215579032897949
|
||||
v 13.021791458129883 0.0045739999040961266 5.215579032897949
|
||||
v 13.021791458129883 0.0045739999040961266 4.881856918334961
|
||||
v 12.60850715637207 0.0045739999040961266 4.881856918334961
|
||||
v 13.021791458129883 0.0045739999040961266 5.215579032897949
|
||||
v 12.60850715637207 0.0045739999040961266 4.881856918334961
|
||||
v 12.60850715637207 0.0045739999040961266 5.215579032897949
|
||||
v 12.60850715637207 0.0045739999040961266 5.215579032897949
|
||||
v 12.60850715637207 0.0045739999040961266 4.881856918334961
|
||||
v 12.189961433410645 0.0045739999040961266 4.881856918334961
|
||||
v 12.60850715637207 0.0045739999040961266 5.215579032897949
|
||||
v 12.189961433410645 0.0045739999040961266 4.881856918334961
|
||||
v 12.189961433410645 0.0045739999040961266 5.215579032897949
|
||||
v 12.189961433410645 0.0045739999040961266 5.215579032897949
|
||||
v 12.189961433410645 0.0045739999040961266 4.881856918334961
|
||||
v 11.776678085327148 0.0045739999040961266 4.881856918334961
|
||||
v 12.189961433410645 0.0045739999040961266 5.215579032897949
|
||||
v 11.776678085327148 0.0045739999040961266 4.881856918334961
|
||||
v 11.776678085327148 0.0045739999040961266 5.215579032897949
|
||||
v 10.114896774291992 0.0045739999040961266 4.881856918334961
|
||||
v 10.114896774291992 0.0045739999040961266 5.215579032897949
|
||||
v 10.536827087402344 0.0045739999040961266 5.215579986572266
|
||||
v 10.114896774291992 0.0045739999040961266 4.881856918334961
|
||||
v 10.536827087402344 0.0045739999040961266 5.215579986572266
|
||||
v 10.536827087402344 0.0045739999040961266 4.881856918334961
|
||||
v 10.536827087402344 0.0045739999040961266 4.881856918334961
|
||||
v 10.536827087402344 0.0045739999040961266 5.215579986572266
|
||||
v 10.950108528137207 0.0045739999040961266 5.215579986572266
|
||||
v 10.536827087402344 0.0045739999040961266 4.881856918334961
|
||||
v 10.950108528137207 0.0045739999040961266 5.215579986572266
|
||||
v 10.950108528137207 0.0045739999040961266 4.881856918334961
|
||||
v 10.950108528137207 0.0045739999040961266 4.881856918334961
|
||||
v 10.950108528137207 0.0045739999040961266 5.215579986572266
|
||||
v 11.363393783569336 0.0045739999040961266 5.215579032897949
|
||||
v 10.950108528137207 0.0045739999040961266 4.881856918334961
|
||||
v 11.363393783569336 0.0045739999040961266 5.215579032897949
|
||||
v 11.363393783569336 0.0045739999040961266 4.881856918334961
|
||||
v 13.021791458129883 0.0045739999040961266 4.881856918334961
|
||||
v 13.021791458129883 0.0045739999040961266 4.548134803771973
|
||||
v 12.60850715637207 0.0045739999040961266 4.548134803771973
|
||||
v 13.021791458129883 0.0045739999040961266 4.881856918334961
|
||||
v 12.60850715637207 0.0045739999040961266 4.548134803771973
|
||||
v 12.60850715637207 0.0045739999040961266 4.881856918334961
|
||||
v 12.60850715637207 0.0045739999040961266 4.881856918334961
|
||||
v 12.60850715637207 0.0045739999040961266 4.548134803771973
|
||||
v 12.189961433410645 0.0045739999040961266 4.548134803771973
|
||||
v 12.60850715637207 0.0045739999040961266 4.881856918334961
|
||||
v 12.189961433410645 0.0045739999040961266 4.548134803771973
|
||||
v 12.189961433410645 0.0045739999040961266 4.881856918334961
|
||||
v 12.189961433410645 0.0045739999040961266 4.881856918334961
|
||||
v 12.189961433410645 0.0045739999040961266 4.548134803771973
|
||||
v 11.776678085327148 0.0045739999040961266 4.548134803771973
|
||||
v 12.189961433410645 0.0045739999040961266 4.881856918334961
|
||||
v 11.776678085327148 0.0045739999040961266 4.548134803771973
|
||||
v 11.776678085327148 0.0045739999040961266 4.881856918334961
|
||||
v 10.114896774291992 0.0045739999040961266 4.548134803771973
|
||||
v 10.114896774291992 0.0045739999040961266 4.881856918334961
|
||||
v 10.536827087402344 0.0045739999040961266 4.881856918334961
|
||||
v 10.114896774291992 0.0045739999040961266 4.548134803771973
|
||||
v 10.536827087402344 0.0045739999040961266 4.881856918334961
|
||||
v 10.536827087402344 0.0045739999040961266 4.548134803771973
|
||||
v 10.536827087402344 0.0045739999040961266 4.548134803771973
|
||||
v 10.536827087402344 0.0045739999040961266 4.881856918334961
|
||||
v 10.950108528137207 0.0045739999040961266 4.881856918334961
|
||||
v 10.536827087402344 0.0045739999040961266 4.548134803771973
|
||||
v 10.950108528137207 0.0045739999040961266 4.881856918334961
|
||||
v 10.950108528137207 0.0045739999040961266 4.548134803771973
|
||||
v 10.950108528137207 0.0045739999040961266 4.548134803771973
|
||||
v 10.950108528137207 0.0045739999040961266 4.881856918334961
|
||||
v 11.363393783569336 0.0045739999040961266 4.881856918334961
|
||||
v 10.950108528137207 0.0045739999040961266 4.548134803771973
|
||||
v 11.363393783569336 0.0045739999040961266 4.881856918334961
|
||||
v 11.363393783569336 0.0045739999040961266 4.548134803771973
|
||||
v 13.021791458129883 0.0045739999040961266 4.548134803771973
|
||||
v 13.021791458129883 0.0045739999040961266 4.214410781860352
|
||||
v 12.60850715637207 0.0045739999040961266 4.214410781860352
|
||||
v 13.021791458129883 0.0045739999040961266 4.548134803771973
|
||||
v 12.60850715637207 0.0045739999040961266 4.214410781860352
|
||||
v 12.60850715637207 0.0045739999040961266 4.548134803771973
|
||||
v 12.60850715637207 0.0045739999040961266 4.548134803771973
|
||||
v 12.60850715637207 0.0045739999040961266 4.214410781860352
|
||||
v 12.189961433410645 0.0045739999040961266 4.214410781860352
|
||||
v 12.60850715637207 0.0045739999040961266 4.548134803771973
|
||||
v 12.189961433410645 0.0045739999040961266 4.214410781860352
|
||||
v 12.189961433410645 0.0045739999040961266 4.548134803771973
|
||||
v 12.189961433410645 0.0045739999040961266 4.548134803771973
|
||||
v 12.189961433410645 0.0045739999040961266 4.214410781860352
|
||||
v 11.776678085327148 0.0045739999040961266 4.214410781860352
|
||||
v 12.189961433410645 0.0045739999040961266 4.548134803771973
|
||||
v 11.776678085327148 0.0045739999040961266 4.214410781860352
|
||||
v 11.776678085327148 0.0045739999040961266 4.548134803771973
|
||||
v 10.114896774291992 0.0045739999040961266 4.214410781860352
|
||||
v 10.114896774291992 0.0045739999040961266 4.548134803771973
|
||||
v 10.536827087402344 0.0045739999040961266 4.548134803771973
|
||||
v 10.114896774291992 0.0045739999040961266 4.214410781860352
|
||||
v 10.536827087402344 0.0045739999040961266 4.548134803771973
|
||||
v 10.536827087402344 0.0045739999040961266 4.214410781860352
|
||||
v 10.536827087402344 0.0045739999040961266 4.214410781860352
|
||||
v 10.536827087402344 0.0045739999040961266 4.548134803771973
|
||||
v 10.950108528137207 0.0045739999040961266 4.548134803771973
|
||||
v 10.536827087402344 0.0045739999040961266 4.214410781860352
|
||||
v 10.950108528137207 0.0045739999040961266 4.548134803771973
|
||||
v 10.950108528137207 0.0045739999040961266 4.214410781860352
|
||||
v 10.950108528137207 0.0045739999040961266 4.214410781860352
|
||||
v 10.950108528137207 0.0045739999040961266 4.548134803771973
|
||||
v 11.363393783569336 0.0045739999040961266 4.548134803771973
|
||||
v 10.950108528137207 0.0045739999040961266 4.214410781860352
|
||||
v 11.363393783569336 0.0045739999040961266 4.548134803771973
|
||||
v 11.363393783569336 0.0045739999040961266 4.214410781860352
|
||||
v 10.114896774291992 0.0045739999040961266 3.2132439613342285
|
||||
v 10.114896774291992 0.0045739999040961266 3.546967029571533
|
||||
v 10.536827087402344 0.0045739999040961266 3.546967029571533
|
||||
v 10.114896774291992 0.0045739999040961266 3.2132439613342285
|
||||
v 10.536827087402344 0.0045739999040961266 3.546967029571533
|
||||
v 10.536825180053711 0.0045739999040961266 3.2132439613342285
|
||||
v 10.536825180053711 0.0045739999040961266 3.2132439613342285
|
||||
v 10.536827087402344 0.0045739999040961266 3.546967029571533
|
||||
v 10.950108528137207 0.0045739999040961266 3.546967029571533
|
||||
v 10.536825180053711 0.0045739999040961266 3.2132439613342285
|
||||
v 10.950108528137207 0.0045739999040961266 3.546967029571533
|
||||
v 10.950108528137207 0.0045739999040961266 3.2132439613342285
|
||||
v 10.950108528137207 0.0045739999040961266 3.2132439613342285
|
||||
v 10.950108528137207 0.0045739999040961266 3.546967029571533
|
||||
v 11.363393783569336 0.0045739999040961266 3.546967029571533
|
||||
v 10.950108528137207 0.0045739999040961266 3.2132439613342285
|
||||
v 11.363393783569336 0.0045739999040961266 3.546967029571533
|
||||
v 11.363393783569336 0.0045739999040961266 3.2132439613342285
|
||||
v 13.021791458129883 0.0045739999040961266 3.546967029571533
|
||||
v 13.021791458129883 0.0045739999040961266 3.2132439613342285
|
||||
v 12.60850715637207 0.0045739999040961266 3.2132439613342285
|
||||
v 13.021791458129883 0.0045739999040961266 3.546967029571533
|
||||
v 12.60850715637207 0.0045739999040961266 3.2132439613342285
|
||||
v 12.608508110046387 0.0045739999040961266 3.546967029571533
|
||||
v 12.608508110046387 0.0045739999040961266 3.546967029571533
|
||||
v 12.60850715637207 0.0045739999040961266 3.2132439613342285
|
||||
v 12.189961433410645 0.0045739999040961266 3.2132439613342285
|
||||
v 12.608508110046387 0.0045739999040961266 3.546967029571533
|
||||
v 12.189961433410645 0.0045739999040961266 3.2132439613342285
|
||||
v 12.189961433410645 0.0045739999040961266 3.546967029571533
|
||||
v 12.189961433410645 0.0045739999040961266 3.546967029571533
|
||||
v 12.189961433410645 0.0045739999040961266 3.2132439613342285
|
||||
v 11.776677131652832 0.0045739999040961266 3.2132439613342285
|
||||
v 12.189961433410645 0.0045739999040961266 3.546967029571533
|
||||
v 11.776677131652832 0.0045739999040961266 3.2132439613342285
|
||||
v 11.776677131652832 0.0045739999040961266 3.546967029571533
|
||||
v 10.114896774291992 0.0045739999040961266 3.546967029571533
|
||||
v 10.114896774291992 0.0045739999040961266 3.8806889057159424
|
||||
v 10.536827087402344 0.0045739999040961266 3.8806889057159424
|
||||
v 10.114896774291992 0.0045739999040961266 3.546967029571533
|
||||
v 10.536827087402344 0.0045739999040961266 3.8806889057159424
|
||||
v 10.536827087402344 0.0045739999040961266 3.546967029571533
|
||||
v 10.536827087402344 0.0045739999040961266 3.546967029571533
|
||||
v 10.536827087402344 0.0045739999040961266 3.8806889057159424
|
||||
v 10.950108528137207 0.0045739999040961266 3.8806889057159424
|
||||
v 10.536827087402344 0.0045739999040961266 3.546967029571533
|
||||
v 10.950108528137207 0.0045739999040961266 3.8806889057159424
|
||||
v 10.950108528137207 0.0045739999040961266 3.546967029571533
|
||||
v 10.950108528137207 0.0045739999040961266 3.546967029571533
|
||||
v 10.950108528137207 0.0045739999040961266 3.8806889057159424
|
||||
v 11.363393783569336 0.0045739999040961266 3.8806889057159424
|
||||
v 10.950108528137207 0.0045739999040961266 3.546967029571533
|
||||
v 11.363393783569336 0.0045739999040961266 3.8806889057159424
|
||||
v 11.363393783569336 0.0045739999040961266 3.546967029571533
|
||||
v 13.021791458129883 0.0045739999040961266 3.8806889057159424
|
||||
v 13.021791458129883 0.0045739999040961266 3.546967029571533
|
||||
v 12.608508110046387 0.0045739999040961266 3.546967029571533
|
||||
v 13.021791458129883 0.0045739999040961266 3.8806889057159424
|
||||
v 12.608508110046387 0.0045739999040961266 3.546967029571533
|
||||
v 12.608508110046387 0.0045739999040961266 3.8806889057159424
|
||||
v 12.608508110046387 0.0045739999040961266 3.8806889057159424
|
||||
v 12.608508110046387 0.0045739999040961266 3.546967029571533
|
||||
v 12.189961433410645 0.0045739999040961266 3.546967029571533
|
||||
v 12.608508110046387 0.0045739999040961266 3.8806889057159424
|
||||
v 12.189961433410645 0.0045739999040961266 3.546967029571533
|
||||
v 12.189961433410645 0.0045739999040961266 3.8806889057159424
|
||||
v 12.189961433410645 0.0045739999040961266 3.8806889057159424
|
||||
v 12.189961433410645 0.0045739999040961266 3.546967029571533
|
||||
v 11.776677131652832 0.0045739999040961266 3.546967029571533
|
||||
v 12.189961433410645 0.0045739999040961266 3.8806889057159424
|
||||
v 11.776677131652832 0.0045739999040961266 3.546967029571533
|
||||
v 11.776678085327148 0.0045739999040961266 3.8806889057159424
|
||||
v 14.025032043457031 0.0063749998807907104 5.408486843109131
|
||||
v 14.025032043457031 0.0063760001212358475 0.7422450184822083
|
||||
v 7.51373291015625 0.00647599995136261 0.7569500207901001
|
||||
v 13.331209182739258 0.00647599995136261 0.7569500207901001
|
||||
v 13.331209182739258 0.00647599995136261 0.7569500207901001
|
||||
v 13.331209182739258 0.006477000191807747 0.24776600301265717
|
||||
v 13.331209182739258 0.006477000191807747 0.24776600301265717
|
||||
v 7.51373291015625 0.006477000191807747 0.24776600301265717
|
||||
v 13.822495460510254 0.0063760001212358475 0.7422450184822083
|
||||
v 13.822495460510254 0.0063749998807907104 5.408487796783447
|
||||
l 1 2
|
||||
l 3 4
|
||||
l 5 6
|
||||
l 7 8
|
||||
l 9 10
|
||||
l 11 12
|
||||
l 13 14
|
||||
l 15 16
|
||||
l 17 18
|
||||
l 19 20
|
||||
l 21 22
|
||||
l 23 24
|
||||
l 25 26
|
||||
l 27 28
|
||||
l 29 30
|
||||
l 31 32
|
||||
l 33 34
|
||||
l 35 36
|
||||
l 37 38
|
||||
l 39 40
|
||||
l 41 42
|
||||
l 43 44
|
||||
l 45 46
|
||||
l 47 48
|
||||
l 49 50
|
||||
l 51 52
|
||||
l 53 54
|
||||
l 55 56
|
||||
l 57 58
|
||||
l 59 60
|
||||
l 61 62
|
||||
l 63 64
|
||||
l 65 66
|
||||
l 67 68
|
||||
l 69 70
|
||||
l 71 72
|
||||
l 73 74
|
||||
l 75 76
|
||||
l 77 78
|
||||
l 79 80
|
||||
l 81 82
|
||||
l 83 84
|
||||
l 85 86
|
||||
l 87 88
|
||||
l 89 90
|
||||
l 91 92
|
||||
l 93 94
|
||||
l 95 96
|
||||
l 97 98
|
||||
l 99 100
|
||||
l 101 102
|
||||
l 103 104
|
||||
l 105 106
|
||||
l 107 108
|
||||
l 109 110
|
||||
l 111 112
|
||||
l 113 114
|
||||
l 115 116
|
||||
l 117 118
|
||||
l 119 120
|
||||
l 121 122
|
||||
l 123 124
|
||||
l 125 126
|
||||
l 127 128
|
||||
l 129 130
|
||||
l 131 132
|
||||
l 133 134
|
||||
l 135 136
|
||||
l 137 138
|
||||
l 139 140
|
||||
l 141 142
|
||||
l 143 144
|
||||
l 145 146
|
||||
l 147 148
|
||||
l 149 150
|
||||
l 151 152
|
||||
l 153 154
|
||||
l 155 156
|
||||
l 157 158
|
||||
l 159 160
|
||||
l 161 162
|
||||
l 163 164
|
||||
l 165 166
|
||||
l 167 168
|
||||
l 169 170
|
||||
l 171 172
|
||||
l 173 174
|
||||
l 175 176
|
||||
l 177 178
|
||||
l 179 180
|
||||
l 181 182
|
||||
l 183 184
|
||||
l 185 186
|
||||
l 187 188
|
||||
l 189 190
|
||||
l 191 192
|
||||
l 193 194
|
||||
l 195 196
|
||||
l 197 198
|
||||
l 199 200
|
||||
l 201 202
|
||||
l 203 204
|
||||
l 205 206
|
||||
l 207 208
|
||||
l 209 210
|
||||
l 211 212
|
||||
l 213 214
|
||||
l 215 216
|
||||
l 217 218
|
||||
l 219 220
|
||||
l 221 222
|
||||
l 223 224
|
||||
l 225 226
|
||||
l 227 228
|
||||
l 229 230
|
||||
l 231 232
|
||||
l 233 234
|
||||
l 235 236
|
||||
l 237 238
|
||||
l 239 240
|
||||
l 241 242
|
||||
l 243 244
|
||||
l 245 246
|
||||
l 247 248
|
||||
l 249 250
|
||||
l 251 252
|
||||
l 253 254
|
||||
l 255 256
|
||||
l 257 258
|
||||
l 259 260
|
||||
l 261 262
|
||||
l 263 264
|
||||
l 265 266
|
||||
l 267 268
|
||||
l 269 270
|
||||
l 271 272
|
||||
l 273 274
|
||||
l 275 276
|
||||
l 277 278
|
||||
l 279 280
|
||||
l 281 282
|
||||
l 283 284
|
||||
l 285 286
|
||||
l 287 288
|
||||
l 289 290
|
||||
l 291 292
|
||||
l 293 294
|
||||
l 295 296
|
||||
l 297 298
|
||||
l 299 300
|
||||
l 301 302
|
||||
l 303 304
|
||||
l 305 306
|
||||
l 307 308
|
||||
l 309 310
|
||||
l 311 312
|
||||
l 313 314
|
||||
l 315 316
|
||||
l 317 318
|
||||
l 319 320
|
||||
l 321 322
|
||||
l 323 324
|
||||
l 325 326
|
||||
l 327 328
|
||||
l 329 330
|
||||
l 331 332
|
||||
l 333 334
|
||||
l 335 336
|
||||
l 337 338
|
||||
l 339 340
|
||||
l 341 342
|
||||
l 343 344
|
||||
l 345 346
|
||||
l 347 348
|
||||
l 349 350
|
||||
l 351 352
|
||||
l 353 354
|
||||
l 355 356
|
||||
l 357 358
|
||||
l 359 360
|
||||
l 361 362
|
||||
l 363 364
|
||||
l 365 366
|
||||
l 367 368
|
||||
l 369 370
|
||||
l 371 372
|
||||
l 373 374
|
||||
l 375 376
|
||||
l 377 378
|
||||
l 379 380
|
||||
l 381 382
|
||||
l 383 384
|
||||
l 385 386
|
||||
l 387 388
|
||||
l 389 390
|
||||
l 391 392
|
||||
l 393 394
|
||||
l 395 396
|
||||
l 397 398
|
||||
l 399 400
|
||||
l 401 402
|
||||
l 403 404
|
||||
l 405 406
|
||||
l 407 408
|
||||
l 409 410
|
||||
l 411 412
|
||||
l 413 414
|
||||
l 415 416
|
||||
l 417 418
|
||||
l 419 420
|
||||
l 421 422
|
||||
l 423 424
|
||||
l 425 426
|
||||
l 427 428
|
||||
l 429 430
|
||||
l 431 432
|
||||
l 433 434
|
||||
l 435 436
|
||||
l 437 438
|
||||
l 439 440
|
||||
l 441 442
|
||||
l 443 444
|
||||
l 445 446
|
||||
l 447 448
|
||||
l 449 450
|
||||
l 451 452
|
||||
l 453 454
|
||||
l 455 456
|
||||
l 457 458
|
||||
l 459 460
|
||||
l 461 462
|
||||
l 463 464
|
||||
l 465 466
|
||||
l 467 468
|
||||
l 469 470
|
||||
l 471 472
|
||||
l 473 474
|
||||
l 475 476
|
||||
l 477 478
|
||||
l 479 480
|
||||
l 481 482
|
||||
l 483 484
|
4
testdata/test_wrong_attribute_mapping.obj
vendored
Normal file
4
testdata/test_wrong_attribute_mapping.obj
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
v -2123.6666666666665 4247.3333333333285 -2123.6662124922086
|
||||
v -2123.6666666666665 4057.111265328756 -578.4722681813771
|
||||
v -578.4721995601915 4057.1112017592336 -2123.6661341002864
|
||||
f 1//1 2//2 3//3
|
45
unity/DracoDecodingObject.cs
Normal file
45
unity/DracoDecodingObject.cs
Normal file
@ -0,0 +1,45 @@
|
||||
// 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.
|
||||
//
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
public class DracoDecodingObject : MonoBehaviour {
|
||||
|
||||
// This function will be used when the GameObject is initialized.
|
||||
void Start() {
|
||||
|
||||
// If the original mesh exceeds the limit of number of verices, the
|
||||
// loader will split it to a list of smaller meshes.
|
||||
List<Mesh> mesh = new List<Mesh>();
|
||||
DracoMeshLoader dracoLoader = new DracoMeshLoader();
|
||||
/*
|
||||
* Here we use the compressed Bunny model as example.
|
||||
* It's in unity/Resources/bunny.drc.bytes.
|
||||
* Please see README.md for details.
|
||||
*/
|
||||
int numFaces = dracoLoader.LoadMeshFromAsset("bunny", ref mesh);
|
||||
|
||||
/* Note: You need to add MeshFilter (and MeshRenderer) to your GameObject.
|
||||
* Or you can do something like the following in script:
|
||||
* AddComponent<MeshFilter>();
|
||||
*/
|
||||
if (numFaces > 0) {
|
||||
GetComponent<MeshFilter>().mesh = mesh[0];
|
||||
}
|
||||
}
|
||||
}
|
211
unity/DracoMeshLoader.cs
Normal file
211
unity/DracoMeshLoader.cs
Normal file
@ -0,0 +1,211 @@
|
||||
// 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.
|
||||
//
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
public unsafe class DracoMeshLoader {
|
||||
// Must stay the order to be consistent with C++ interface.
|
||||
[StructLayout(LayoutKind.Sequential)] private struct DracoToUnityMesh {
|
||||
public int numFaces;
|
||||
public IntPtr indices;
|
||||
public int numVertices;
|
||||
public IntPtr position;
|
||||
// TODO(zhafang): Add other attributes.
|
||||
// public int numNormal;
|
||||
public float[] normal;
|
||||
// public int numColor;
|
||||
public float[] color;
|
||||
public float[] texcoord;
|
||||
}
|
||||
|
||||
private struct DecodedMesh {
|
||||
public int[] faces;
|
||||
public Vector3[] vertices;
|
||||
}
|
||||
|
||||
[DllImport("dracodec_unity")] private static extern int DecodeMeshForUnity(
|
||||
byte[] buffer, int length, DracoToUnityMesh **tmpMesh);
|
||||
|
||||
static private int maxNumVerticesPerMesh = 60000;
|
||||
|
||||
// Unity only support maximum 65534 vertices per mesh. So large meshes need
|
||||
// to be splitted.
|
||||
private void SplitMesh(DecodedMesh mesh, ref List<DecodedMesh> splittedMeshes) {
|
||||
List<int> facesLeft = new List<int>();
|
||||
for (int i = 0; i < mesh.faces.Length; ++i) {
|
||||
facesLeft.Add(mesh.faces[i]);
|
||||
}
|
||||
int numSubMeshes = 0;
|
||||
|
||||
List<int> newCorners = new List<int>();
|
||||
Dictionary<int, int> indexToNewIndex = new Dictionary<int, int>();
|
||||
List<int> tmpLeftFaces = new List<int>();
|
||||
List<int> facesExtracted = new List<int>();
|
||||
List<Vector3> verticesExtracted = new List<Vector3>();
|
||||
|
||||
while (facesLeft.Count > 0) {
|
||||
Debug.Log("Faces left: " + facesLeft.Count.ToString());
|
||||
numSubMeshes++;
|
||||
tmpLeftFaces.Clear();
|
||||
facesExtracted.Clear();
|
||||
verticesExtracted.Clear();
|
||||
|
||||
int uniqueCornerId = 0;
|
||||
indexToNewIndex.Clear();
|
||||
for (int face = 0; face < facesLeft.Count / 3; ++face) {
|
||||
newCorners.Clear();
|
||||
// If all indices has appeared or there's still space for more vertices.
|
||||
for (int corner = 0; corner < 3; ++corner) {
|
||||
if (!indexToNewIndex.ContainsKey(facesLeft[face * 3 + corner])) {
|
||||
newCorners.Add(facesLeft[face * 3 + corner]);
|
||||
}
|
||||
}
|
||||
if (newCorners.Count + uniqueCornerId > maxNumVerticesPerMesh) {
|
||||
// Save face for the next sub-mesh.
|
||||
for (int corner = 0; corner < 3; ++corner) {
|
||||
tmpLeftFaces.Add(facesLeft[face * 3 + corner]);
|
||||
}
|
||||
} else {
|
||||
// Add new corners.
|
||||
for (int i = 0; i < newCorners.Count; ++i) {
|
||||
indexToNewIndex.Add(newCorners[i], uniqueCornerId);
|
||||
verticesExtracted.Add(mesh.vertices[newCorners[i]]);
|
||||
uniqueCornerId++;
|
||||
}
|
||||
// Add face to this sub-mesh.
|
||||
for (int corner = 0; corner < 3; ++corner) {
|
||||
facesExtracted.Add(
|
||||
indexToNewIndex[facesLeft[face * 3 + corner]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DecodedMesh subMesh = new DecodedMesh();
|
||||
subMesh.faces = facesExtracted.ToArray();
|
||||
subMesh.vertices = verticesExtracted.ToArray();
|
||||
splittedMeshes.Add(subMesh);
|
||||
|
||||
facesLeft = tmpLeftFaces;
|
||||
}
|
||||
}
|
||||
|
||||
private float ReadFloatFromIntPtr(IntPtr data, int offset) {
|
||||
byte[] byteArray = new byte[4];
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
byteArray[j] = Marshal.ReadByte(data, offset + j);
|
||||
}
|
||||
return BitConverter.ToSingle(byteArray, 0);
|
||||
}
|
||||
|
||||
// TODO(zhafang): Add back LoadFromURL.
|
||||
public int LoadMeshFromAsset(string assetName, ref List<Mesh> meshes) {
|
||||
TextAsset asset = Resources.Load(assetName, typeof(TextAsset)) as TextAsset;
|
||||
if (asset == null) {
|
||||
Debug.Log("Didn't load file!");
|
||||
return -1;
|
||||
}
|
||||
byte[] encodedData = asset.bytes;
|
||||
Debug.Log(encodedData.Length.ToString());
|
||||
if (encodedData.Length == 0) {
|
||||
Debug.Log("Didn't load encoded data!");
|
||||
return -1;
|
||||
}
|
||||
return DecodeMesh(encodedData, ref meshes);
|
||||
}
|
||||
|
||||
public unsafe int DecodeMesh(byte[] data, ref List<Mesh> meshes) {
|
||||
DracoToUnityMesh *tmpMesh;
|
||||
if (DecodeMeshForUnity(data, data.Length, &tmpMesh) <= 0) {
|
||||
Debug.Log("Failed: Decoding error.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Debug.Log("Num indices: " + tmpMesh -> numFaces.ToString());
|
||||
Debug.Log("Num vertices: " + tmpMesh -> numVertices.ToString());
|
||||
|
||||
int numFaces = tmpMesh -> numFaces;
|
||||
int[] newTriangles = new int[tmpMesh -> numFaces * 3];
|
||||
for (int i = 0; i < tmpMesh -> numFaces; ++i) {
|
||||
newTriangles[i * 3] = Marshal.ReadInt32(tmpMesh -> indices, i * 3 * 4);
|
||||
newTriangles[i * 3 + 1] =
|
||||
Marshal.ReadInt32(tmpMesh -> indices, i * 3 * 4 + 4);
|
||||
newTriangles[i * 3 + 2] =
|
||||
Marshal.ReadInt32(tmpMesh -> indices, i * 3 * 4 + 8);
|
||||
}
|
||||
|
||||
// For floating point numbers, there's no Marshal functions could directly
|
||||
// read from the unmanaged data.
|
||||
// TODO(zhafang): Find better way to read float numbers.
|
||||
Vector3[] newVertices = new Vector3[tmpMesh -> numVertices];
|
||||
int byteStridePerValue = 4;
|
||||
int numValuePerVertex = 3;
|
||||
int byteStridePerVertex = byteStridePerValue * numValuePerVertex;
|
||||
/*
|
||||
* TODO(zhafang): Change to:
|
||||
* float[] pos = new float[3];
|
||||
* for (int i = 0; i < tmpMesh -> numVertices; ++i) {
|
||||
* Marshal.Copy(tmpMesh->position, pos, 3 * i, 3);
|
||||
* for (int j = 0; j < 3; ++j) {
|
||||
* newVertices[i][j] = pos[j];
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
for (int i = 0; i < tmpMesh -> numVertices; ++i) {
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
newVertices[i][j] =
|
||||
ReadFloatFromIntPtr(
|
||||
tmpMesh -> position,
|
||||
i * byteStridePerVertex + byteStridePerValue * j);
|
||||
}
|
||||
}
|
||||
Marshal.FreeCoTaskMem(tmpMesh -> indices);
|
||||
Marshal.FreeCoTaskMem(tmpMesh -> position);
|
||||
Marshal.FreeCoTaskMem((IntPtr) tmpMesh);
|
||||
|
||||
if (newVertices.Length > maxNumVerticesPerMesh) {
|
||||
// Unity only support maximum 65534 vertices per mesh. So large meshes
|
||||
// need to be splitted.
|
||||
DecodedMesh decodedMesh = new DecodedMesh();
|
||||
decodedMesh.vertices = newVertices;
|
||||
decodedMesh.faces = newTriangles;
|
||||
List<DecodedMesh> splittedMeshes = new List<DecodedMesh>();
|
||||
|
||||
SplitMesh(decodedMesh, ref splittedMeshes);
|
||||
for (int i = 0; i < splittedMeshes.Count; ++i) {
|
||||
Mesh mesh = new Mesh();
|
||||
mesh.vertices = splittedMeshes[i].vertices;
|
||||
mesh.triangles = splittedMeshes[i].faces;
|
||||
|
||||
mesh.RecalculateBounds();
|
||||
mesh.RecalculateNormals();
|
||||
meshes.Add(mesh);
|
||||
}
|
||||
} else {
|
||||
Mesh mesh = new Mesh();
|
||||
mesh.vertices = newVertices;
|
||||
mesh.triangles = newTriangles;
|
||||
|
||||
mesh.RecalculateBounds();
|
||||
mesh.RecalculateNormals();
|
||||
meshes.Add(mesh);
|
||||
}
|
||||
// TODO(zhafang): Resize mesh to the a proper scale.
|
||||
|
||||
return numFaces;
|
||||
}
|
||||
}
|
70
unity/Editor/DracoFileImporter.cs
Normal file
70
unity/Editor/DracoFileImporter.cs
Normal file
@ -0,0 +1,70 @@
|
||||
// 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.
|
||||
//
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
public class DracoFileImporter : AssetPostprocessor {
|
||||
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets,
|
||||
string[] movedAssets, string[] movedFromAssetPaths) {
|
||||
foreach(string str in importedAssets) {
|
||||
// Compressed file must be renamed to ".drc.bytes".
|
||||
if (str.IndexOf(".drc.bytes") == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the original mesh exceeds the limit of number of verices, the
|
||||
// loader will split it to a list of smaller meshes.
|
||||
List<Mesh> meshes = new List<Mesh>();
|
||||
DracoMeshLoader dracoLoader = new DracoMeshLoader();
|
||||
|
||||
// The decoded mesh will be named without ".drc.bytes"
|
||||
str.LastIndexOf('/');
|
||||
int length = str.Length - ".drc.bytes".Length - str.LastIndexOf('/') - 1;
|
||||
string fileName = str.Substring(str.LastIndexOf('/') + 1, length);
|
||||
|
||||
int numFaces = dracoLoader.LoadMeshFromAsset(fileName + ".drc", ref meshes);
|
||||
if (numFaces > 0) {
|
||||
// Create mesh assets. Combine the smaller meshes to a single asset.
|
||||
// TODO: Figure out how to combine to an unseen object as .obj files.
|
||||
AssetDatabase.CreateAsset (meshes [0], "Assets/Resources/" + fileName + ".asset");
|
||||
AssetDatabase.SaveAssets ();
|
||||
for (int i = 1; i < meshes.Count; ++i) {
|
||||
AssetDatabase.AddObjectToAsset(meshes [i], meshes [0]);
|
||||
AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath (meshes [i]));
|
||||
}
|
||||
|
||||
// Also create a Prefab for easy usage.
|
||||
GameObject newAsset = new GameObject();
|
||||
newAsset.hideFlags = HideFlags.HideInHierarchy;
|
||||
for (int i = 0; i < meshes.Count; ++i) {
|
||||
GameObject subObject = new GameObject();
|
||||
subObject.hideFlags = HideFlags.HideInHierarchy;
|
||||
subObject.AddComponent<MeshFilter>();
|
||||
subObject.AddComponent<MeshRenderer>();
|
||||
subObject.GetComponent<MeshFilter>().mesh =
|
||||
UnityEngine.Object.Instantiate(meshes[i]);
|
||||
subObject.transform.parent = newAsset.transform;
|
||||
}
|
||||
PrefabUtility.CreatePrefab("Assets/Resources/" + fileName + ".prefab", newAsset);
|
||||
} else {
|
||||
// TODO: Throw exception?
|
||||
Debug.Log("Error: Decodeing Draco file failed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
unity/Plugin/Android/arm64-v8a/libdracodec_unity.so
Executable file
BIN
unity/Plugin/Android/arm64-v8a/libdracodec_unity.so
Executable file
Binary file not shown.
BIN
unity/Plugin/Android/armeabi-v7a/libdracodec_unity.so
Executable file
BIN
unity/Plugin/Android/armeabi-v7a/libdracodec_unity.so
Executable file
Binary file not shown.
44
unity/Plugin/dracodec_unity.bundle/Contents/Info.plist
Normal file
44
unity/Plugin/dracodec_unity.bundle/Contents/Info.plist
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>16G29</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>dracodec_unity</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string></string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>8E3004b</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>16E185</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.12</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0833</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>8E3004b</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
BIN
unity/Plugin/dracodec_unity.bundle/Contents/MacOS/dracodec_unity
Executable file
BIN
unity/Plugin/dracodec_unity.bundle/Contents/MacOS/dracodec_unity
Executable file
Binary file not shown.
BIN
unity/Plugin/dracodec_unity.dll
Normal file
BIN
unity/Plugin/dracodec_unity.dll
Normal file
Binary file not shown.
142
unity/README.md
Normal file
142
unity/README.md
Normal file
@ -0,0 +1,142 @@
|
||||
Description
|
||||
===========
|
||||
|
||||
This folder contains resources for using Draco within Unity development.
|
||||
Currently we support two types of usages:
|
||||
* Import Draco compressed mesh as assets during design time.
|
||||
* Load/decode Draco files in runtime.
|
||||
|
||||
Prerequisite
|
||||
============
|
||||
|
||||
To start, you need to have the Draco unity plugin. You can either use the
|
||||
prebuilt libraries provided in this folder or build from source.
|
||||
Note that the plugin library for different platforms has different file extension.
|
||||
|
||||
| Platform | Library name |
|
||||
| -------- | ------------ |
|
||||
| Mac OS | dracodec_unity.bundle |
|
||||
| Android | libdracodec_unity.so |
|
||||
| Windows | dracodec_unity.dll |
|
||||
|
||||
Prebuilt Library
|
||||
----------------
|
||||
|
||||
We have built library for several platforms:
|
||||
|
||||
| Platform | Tested Environment |
|
||||
| -------- | ------------------ |
|
||||
| .bundle | macOS Sierra + Xcode 8.3.3 |
|
||||
| armeabi-v7a(.so) | Android 8.1.0 |
|
||||
| .dll | Win10 + Visual Studio 2017 |
|
||||
|
||||
Build From Source
|
||||
-----------------
|
||||
You can build the plugins on your own for OSX/Win/Android. Source code for the wrapper is here: [src/draco/unity/](../src/draco/unity). Following is detailed building instruction.
|
||||
|
||||
Mac OS X
|
||||
--------
|
||||
On Mac OS X, run the following command to generate Xcode projects. It is the same as building Draco but with the addition of `-DBUILD_UNITY_PLUGIN=ON` flag:
|
||||
|
||||
~~~~~ bash
|
||||
$ cmake path/to/draco -G Xcode -DBUILD_UNITY_PLUGIN=ON
|
||||
~~~~~
|
||||
|
||||
Then open the project use Xcode and build.
|
||||
You should be able to find the library under:
|
||||
|
||||
~~~~ bash
|
||||
path/to/build/Debug(or Release)/dracodec_unity.bundle
|
||||
~~~~
|
||||
|
||||
Windows
|
||||
-------
|
||||
Similar to OS X build, you need to build Draco with the additional `-DBUILD_UNITY_PLUGIN=ON` flag, for example:
|
||||
|
||||
~~~~~ bash
|
||||
C:\Users\nobody> cmake path/to/draco -G "Visual Studio 14 2015" -DBUILD_UNITY_PLUGIN=ON
|
||||
~~~~~
|
||||
|
||||
Or to generate 64-bit version:
|
||||
|
||||
~~~~~ bash
|
||||
C:\Users\nobody> cmake path/to/draco -G "Visual Studio 14 2015 Win64" -DBUILD_UNITY_PLUGIN=ON
|
||||
~~~~~
|
||||
|
||||
Android
|
||||
-------
|
||||
|
||||
You should first follow the [Android Studio Project Integration](../README.md#android-studio-project-integration) to build Draco within an Android project. Then, to build the plugin for Unity, just add the following flag to build.gradle.
|
||||
|
||||
~~~~ bash
|
||||
cppFlags "-DBUILD_UNITY_PLUGIN"
|
||||
~~~~
|
||||
|
||||
You should be able to find the plugin library under:
|
||||
|
||||
~~~~ bash
|
||||
path/to/your/project/build/intermediates/cmake/debug(or release)/obj/your_platform/libdracodec_unity.so
|
||||
~~~~
|
||||
|
||||
Change file extension
|
||||
---------------------
|
||||
Because Unity can not recognize un-native file extension, you need to change your compressed .drc file to .drc.bytes so that Unity will recognize it as binary file. For example, if you have file `bunny.drc` then change the file name to `bunny.drc.bytes`.
|
||||
|
||||
Copy Library to Your Project
|
||||
----------------------------
|
||||
Copy the plugin library to your Unity project in `Assets/Plugins/`.
|
||||
For Android:
|
||||
|
||||
~~~~ bash
|
||||
cp path/to/your/libdracodec_unity.so path/to/your/Unity/Project/Assets/Plugins/Android/
|
||||
~~~~
|
||||
|
||||
For Mac:
|
||||
|
||||
~~~~ bash
|
||||
cp path/to/your/dracodec_unity.bundle path/to/your/Unity/Project/Assets/Plugins/
|
||||
~~~~
|
||||
|
||||
For Win:
|
||||
|
||||
~~~~ bash
|
||||
cp path/to/your/dracodec_unity.dll path/to/your/Unity/Project/Assets/Plugins/
|
||||
~~~~
|
||||
|
||||
|
||||
Copy Unity Script to Your Project
|
||||
---------------------------------
|
||||
Copy the scripts in this folder to your project.
|
||||
Copy wrapper:
|
||||
|
||||
~~~~ bash
|
||||
cp DracoMeshLoader.cs path/to/your/Unity/Project/Assets/
|
||||
~~~~
|
||||
|
||||
Copy extened AssetPostProcessor which enables loading (This file is only used for import Draco files):
|
||||
|
||||
~~~~ bash
|
||||
cp DracoFileImporter.cs path/to/your/Unity/Project/Assets/Editor/
|
||||
~~~~
|
||||
|
||||
---
|
||||
|
||||
Load Draco Assets in Runtime
|
||||
============================
|
||||
For example, please see [DracoDecodingObject.cs](DracoDecodingObject.cs) for usage. To start, you can create an empty GameObject and attach this script to it.
|
||||
|
||||
Enable Library in Script Debugging
|
||||
----------------------------------
|
||||
If you have library for the platform you are working on, e.g. `dracodec_unity.bundle` for Mac or `dracodec_unity.dll` for Windows. You should be able to use the plugin in debugging mode.
|
||||
|
||||
---
|
||||
|
||||
Import Compressed Draco Assets
|
||||
==============================
|
||||
In this section we will describe how to import Draco files (.drc) to Unity as
|
||||
other 3D formats in design time, e.g. obj, fbx.
|
||||
To note that importing Draco files doesn't mean the Unity project will export Draco files as models. It will not save space when exported to package.
|
||||
|
||||
If you have followed the previous steps, you just need to copy your asset, e.g. `bunny.drc.bytes`, to `Your/Unity/Project/Assets/Resources`, the project will automatically load the file and add the models to the project.
|
||||
|
||||
---
|
Loading…
x
Reference in New Issue
Block a user