@babylonjs/core 7.40.2 → 7.40.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/Audio/sound.js +5 -10
  2. package/Audio/sound.js.map +1 -1
  3. package/Compute/computeEffect.js +6 -14
  4. package/Compute/computeEffect.js.map +1 -1
  5. package/Compute/computeShader.js +2 -9
  6. package/Compute/computeShader.js.map +1 -1
  7. package/Culling/Helper/computeShaderBoundingHelper.js +5 -6
  8. package/Culling/Helper/computeShaderBoundingHelper.js.map +1 -1
  9. package/Engines/abstractEngine.d.ts +7 -0
  10. package/Engines/abstractEngine.js +7 -2
  11. package/Engines/abstractEngine.js.map +1 -1
  12. package/Engines/engine.js +6 -8
  13. package/Engines/engine.js.map +1 -1
  14. package/Engines/thinEngine.js +6 -1
  15. package/Engines/thinEngine.js.map +1 -1
  16. package/Engines/webgpuEngine.js +6 -1
  17. package/Engines/webgpuEngine.js.map +1 -1
  18. package/FrameGraph/frameGraph.js +4 -9
  19. package/FrameGraph/frameGraph.js.map +1 -1
  20. package/Layers/effectLayer.js +2 -0
  21. package/Layers/effectLayer.js.map +1 -1
  22. package/Layers/glowLayer.js +4 -0
  23. package/Layers/glowLayer.js.map +1 -1
  24. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.d.ts +5 -0
  25. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +33 -0
  26. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  27. package/Materials/Node/Blocks/PBR/reflectionBlock.js +2 -4
  28. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  29. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.d.ts +10 -2
  30. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +48 -2
  31. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  32. package/Materials/Node/Blocks/meshAttributeExistsBlock.js +3 -0
  33. package/Materials/Node/Blocks/meshAttributeExistsBlock.js.map +1 -1
  34. package/Materials/Node/nodeMaterial.d.ts +6 -0
  35. package/Materials/Node/nodeMaterial.js +17 -1
  36. package/Materials/Node/nodeMaterial.js.map +1 -1
  37. package/Materials/PBR/pbrBaseMaterial.d.ts +1 -0
  38. package/Materials/PBR/pbrBaseMaterial.js +3 -4
  39. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  40. package/Materials/Textures/Procedurals/proceduralTexture.d.ts +3 -2
  41. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  42. package/Materials/Textures/colorGradingTexture.js +5 -2
  43. package/Materials/Textures/colorGradingTexture.js.map +1 -1
  44. package/Materials/effect.functions.d.ts +0 -1
  45. package/Materials/effect.functions.js +0 -19
  46. package/Materials/effect.functions.js.map +1 -1
  47. package/Materials/effect.js +3 -2
  48. package/Materials/effect.js.map +1 -1
  49. package/Materials/effect.webgl.functions.js +2 -1
  50. package/Materials/effect.webgl.functions.js.map +1 -1
  51. package/Materials/material.d.ts +4 -0
  52. package/Materials/material.js +8 -0
  53. package/Materials/material.js.map +1 -1
  54. package/Materials/materialHelper.functions.js +2 -0
  55. package/Materials/materialHelper.functions.js.map +1 -1
  56. package/Materials/shaderMaterial.js +4 -0
  57. package/Materials/shaderMaterial.js.map +1 -1
  58. package/Materials/standardMaterial.d.ts +1 -0
  59. package/Materials/standardMaterial.js +1 -0
  60. package/Materials/standardMaterial.js.map +1 -1
  61. package/Meshes/Compression/dracoCodec.d.ts +83 -0
  62. package/Meshes/Compression/dracoCodec.js +107 -0
  63. package/Meshes/Compression/dracoCodec.js.map +1 -0
  64. package/Meshes/Compression/dracoCompression.d.ts +17 -63
  65. package/Meshes/Compression/dracoCompression.js +22 -200
  66. package/Meshes/Compression/dracoCompression.js.map +1 -1
  67. package/Meshes/Compression/dracoDecoder.d.ts +103 -0
  68. package/Meshes/Compression/dracoDecoder.js +216 -0
  69. package/Meshes/Compression/dracoDecoder.js.map +1 -0
  70. package/Meshes/Compression/index.d.ts +1 -0
  71. package/Meshes/Compression/index.js +1 -0
  72. package/Meshes/Compression/index.js.map +1 -1
  73. package/Meshes/abstractMesh.d.ts +5 -0
  74. package/Meshes/abstractMesh.js +15 -0
  75. package/Meshes/abstractMesh.js.map +1 -1
  76. package/Meshes/index.d.ts +1 -0
  77. package/Meshes/index.js +1 -0
  78. package/Meshes/index.js.map +1 -1
  79. package/Meshes/mesh.js +23 -0
  80. package/Meshes/mesh.js.map +1 -1
  81. package/Meshes/mesh.vertexData.functions.d.ts +6 -0
  82. package/Meshes/mesh.vertexData.functions.js +65 -0
  83. package/Meshes/mesh.vertexData.functions.js.map +1 -0
  84. package/Misc/bitArray.d.ts +26 -0
  85. package/Misc/bitArray.js +53 -0
  86. package/Misc/bitArray.js.map +1 -0
  87. package/Misc/index.d.ts +1 -0
  88. package/Misc/index.js +1 -0
  89. package/Misc/index.js.map +1 -1
  90. package/Misc/screenshotTools.d.ts +3 -3
  91. package/Misc/screenshotTools.js +10 -12
  92. package/Misc/screenshotTools.js.map +1 -1
  93. package/Misc/timingTools.d.ts +4 -0
  94. package/Misc/timingTools.js +38 -0
  95. package/Misc/timingTools.js.map +1 -1
  96. package/Misc/webRequest.d.ts +1 -1
  97. package/Misc/webRequest.js +1 -1
  98. package/Misc/webRequest.js.map +1 -1
  99. package/Morph/morphTarget.d.ts +15 -0
  100. package/Morph/morphTarget.js +35 -0
  101. package/Morph/morphTarget.js.map +1 -1
  102. package/Morph/morphTargetManager.d.ts +9 -0
  103. package/Morph/morphTargetManager.js +23 -0
  104. package/Morph/morphTargetManager.js.map +1 -1
  105. package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +7 -5
  106. package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
  107. package/Rendering/iblCdfGenerator.d.ts +14 -19
  108. package/Rendering/iblCdfGenerator.js +64 -57
  109. package/Rendering/iblCdfGenerator.js.map +1 -1
  110. package/Rendering/index.d.ts +6 -6
  111. package/Rendering/index.js +6 -6
  112. package/Rendering/index.js.map +1 -1
  113. package/Shaders/ShadersInclude/hdrFilteringFunctions.js +6 -6
  114. package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  115. package/Shaders/ShadersInclude/helperFunctions.js +1 -0
  116. package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
  117. package/Shaders/ShadersInclude/morphTargetsVertex.js +7 -1
  118. package/Shaders/ShadersInclude/morphTargetsVertex.js.map +1 -1
  119. package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js +3 -0
  120. package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
  121. package/Shaders/ShadersInclude/pbrBlockReflection.js +2 -3
  122. package/Shaders/ShadersInclude/pbrBlockReflection.js.map +1 -1
  123. package/Shaders/ShadersInclude/pbrBlockSubSurface.js +2 -3
  124. package/Shaders/ShadersInclude/pbrBlockSubSurface.js.map +1 -1
  125. package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -1
  126. package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
  127. package/Shaders/ShadersInclude/samplerVertexImplementation.js +1 -1
  128. package/Shaders/ShadersInclude/samplerVertexImplementation.js.map +1 -1
  129. package/Shaders/default.vertex.js +10 -1
  130. package/Shaders/default.vertex.js.map +1 -1
  131. package/Shaders/depth.vertex.js +4 -1
  132. package/Shaders/depth.vertex.js.map +1 -1
  133. package/Shaders/geometry.vertex.js +9 -6
  134. package/Shaders/geometry.vertex.js.map +1 -1
  135. package/Shaders/glowMapGeneration.vertex.js +6 -3
  136. package/Shaders/glowMapGeneration.vertex.js.map +1 -1
  137. package/Shaders/{iblIcdfx.fragment.d.ts → iblCdfDebug.fragment.d.ts} +1 -1
  138. package/Shaders/{importanceSamplingDebug.fragment.js → iblCdfDebug.fragment.js} +12 -11
  139. package/Shaders/iblCdfDebug.fragment.js.map +1 -0
  140. package/Shaders/iblCdfy.fragment.d.ts +1 -0
  141. package/Shaders/iblCdfy.fragment.js +4 -4
  142. package/Shaders/iblCdfy.fragment.js.map +1 -1
  143. package/Shaders/iblIcdf.fragment.d.ts +6 -0
  144. package/Shaders/iblIcdf.fragment.js +43 -0
  145. package/Shaders/iblIcdf.fragment.js.map +1 -0
  146. package/Shaders/iblScaledLuminance.fragment.d.ts +6 -0
  147. package/Shaders/iblScaledLuminance.fragment.js +25 -0
  148. package/Shaders/iblScaledLuminance.fragment.js.map +1 -0
  149. package/Shaders/iblShadowVoxelTracing.fragment.js +2 -2
  150. package/Shaders/iblShadowVoxelTracing.fragment.js.map +1 -1
  151. package/Shaders/outline.vertex.js +4 -1
  152. package/Shaders/outline.vertex.js.map +1 -1
  153. package/Shaders/pbr.fragment.js +2 -4
  154. package/Shaders/pbr.fragment.js.map +1 -1
  155. package/Shaders/pbr.vertex.js +10 -1
  156. package/Shaders/pbr.vertex.js.map +1 -1
  157. package/Shaders/shadowMap.vertex.js +4 -1
  158. package/Shaders/shadowMap.vertex.js.map +1 -1
  159. package/Shaders/volumetricLightScatteringPass.vertex.js +4 -1
  160. package/Shaders/volumetricLightScatteringPass.vertex.js.map +1 -1
  161. package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +8 -6
  162. package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  163. package/ShadersWGSL/ShadersInclude/helperFunctions.js +1 -0
  164. package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
  165. package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js +7 -1
  166. package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js.map +1 -1
  167. package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js +3 -0
  168. package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
  169. package/ShadersWGSL/ShadersInclude/pbrBlockReflection.js +4 -8
  170. package/ShadersWGSL/ShadersInclude/pbrBlockReflection.js.map +1 -1
  171. package/ShadersWGSL/ShadersInclude/pbrBlockSubSurface.js +4 -8
  172. package/ShadersWGSL/ShadersInclude/pbrBlockSubSurface.js.map +1 -1
  173. package/ShadersWGSL/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -1
  174. package/ShadersWGSL/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
  175. package/ShadersWGSL/ShadersInclude/samplerVertexImplementation.js +1 -1
  176. package/ShadersWGSL/ShadersInclude/samplerVertexImplementation.js.map +1 -1
  177. package/ShadersWGSL/default.vertex.js +10 -1
  178. package/ShadersWGSL/default.vertex.js.map +1 -1
  179. package/ShadersWGSL/depth.vertex.js +4 -1
  180. package/ShadersWGSL/depth.vertex.js.map +1 -1
  181. package/ShadersWGSL/geometry.vertex.js +9 -6
  182. package/ShadersWGSL/geometry.vertex.js.map +1 -1
  183. package/ShadersWGSL/glowMapGeneration.vertex.js +6 -3
  184. package/ShadersWGSL/glowMapGeneration.vertex.js.map +1 -1
  185. package/ShadersWGSL/glowMapMerge.fragment.js +3 -2
  186. package/ShadersWGSL/glowMapMerge.fragment.js.map +1 -1
  187. package/ShadersWGSL/{iblIcdfy.fragment.d.ts → iblCdfDebug.fragment.d.ts} +1 -1
  188. package/ShadersWGSL/{importanceSamplingDebug.fragment.js → iblCdfDebug.fragment.js} +11 -10
  189. package/ShadersWGSL/iblCdfDebug.fragment.js.map +1 -0
  190. package/ShadersWGSL/iblCdfy.fragment.js +8 -7
  191. package/ShadersWGSL/iblCdfy.fragment.js.map +1 -1
  192. package/ShadersWGSL/iblIcdf.fragment.d.ts +6 -0
  193. package/ShadersWGSL/iblIcdf.fragment.js +43 -0
  194. package/ShadersWGSL/iblIcdf.fragment.js.map +1 -0
  195. package/ShadersWGSL/iblScaledLuminance.fragment.d.ts +6 -0
  196. package/ShadersWGSL/iblScaledLuminance.fragment.js +24 -0
  197. package/ShadersWGSL/iblScaledLuminance.fragment.js.map +1 -0
  198. package/ShadersWGSL/iblShadowVoxelTracing.fragment.js +3 -3
  199. package/ShadersWGSL/iblShadowVoxelTracing.fragment.js.map +1 -1
  200. package/ShadersWGSL/outline.vertex.js +4 -1
  201. package/ShadersWGSL/outline.vertex.js.map +1 -1
  202. package/ShadersWGSL/pbr.fragment.js +4 -8
  203. package/ShadersWGSL/pbr.fragment.js.map +1 -1
  204. package/ShadersWGSL/pbr.vertex.js +10 -1
  205. package/ShadersWGSL/pbr.vertex.js.map +1 -1
  206. package/ShadersWGSL/shadowMap.vertex.js +4 -1
  207. package/ShadersWGSL/shadowMap.vertex.js.map +1 -1
  208. package/assets/Draco/draco_encoder.js +38 -0
  209. package/assets/Draco/draco_encoder.wasm +0 -0
  210. package/assets/Draco/draco_encoder_wasm_wrapper.js +96 -0
  211. package/package.json +1 -1
  212. package/Shaders/iblIcdfx.fragment.js +0 -19
  213. package/Shaders/iblIcdfx.fragment.js.map +0 -1
  214. package/Shaders/iblIcdfy.fragment.d.ts +0 -5
  215. package/Shaders/iblIcdfy.fragment.js +0 -19
  216. package/Shaders/iblIcdfy.fragment.js.map +0 -1
  217. package/Shaders/importanceSamplingDebug.fragment.d.ts +0 -5
  218. package/Shaders/importanceSamplingDebug.fragment.js.map +0 -1
  219. package/ShadersWGSL/iblIcdfx.fragment.d.ts +0 -5
  220. package/ShadersWGSL/iblIcdfx.fragment.js +0 -18
  221. package/ShadersWGSL/iblIcdfx.fragment.js.map +0 -1
  222. package/ShadersWGSL/iblIcdfy.fragment.js +0 -17
  223. package/ShadersWGSL/iblIcdfy.fragment.js.map +0 -1
  224. package/ShadersWGSL/importanceSamplingDebug.fragment.d.ts +0 -5
  225. package/ShadersWGSL/importanceSamplingDebug.fragment.js.map +0 -1
Binary file
@@ -0,0 +1,96 @@
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.owns=function(l,p){return Object.prototype.hasOwnProperty.call(l,p)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
2
+ $jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(l,p,m){if(l==Array.prototype||l==Object.prototype)return l;l[p]=m.value;return l};$jscomp.getGlobal=function(l){l=["object"==typeof globalThis&&globalThis,l,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var p=0;p<l.length;++p){var m=l[p];if(m&&m.Math==Math)return m}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
3
+ $jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(l,p){var m=$jscomp.propertyToPolyfillSymbol[p];if(null==m)return l[p];m=l[m];return void 0!==m?m:l[p]};
4
+ $jscomp.polyfill=function(l,p,m,r){p&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(l,p,m,r):$jscomp.polyfillUnisolated(l,p,m,r))};$jscomp.polyfillUnisolated=function(l,p,m,r){m=$jscomp.global;l=l.split(".");for(r=0;r<l.length-1;r++){var k=l[r];if(!(k in m))return;m=m[k]}l=l[l.length-1];r=m[l];p=p(r);p!=r&&null!=p&&$jscomp.defineProperty(m,l,{configurable:!0,writable:!0,value:p})};
5
+ $jscomp.polyfillIsolated=function(l,p,m,r){var k=l.split(".");l=1===k.length;r=k[0];r=!l&&r in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var C=0;C<k.length-1;C++){var h=k[C];if(!(h in r))return;r=r[h]}k=k[k.length-1];m=$jscomp.IS_SYMBOL_NATIVE&&"es6"===m?r[k]:null;p=p(m);null!=p&&(l?$jscomp.defineProperty($jscomp.polyfills,k,{configurable:!0,writable:!0,value:p}):p!==m&&(void 0===$jscomp.propertyToPolyfillSymbol[k]&&(m=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[k]=$jscomp.IS_SYMBOL_NATIVE?
6
+ $jscomp.global.Symbol(k):$jscomp.POLYFILL_PREFIX+m+"$"+k),$jscomp.defineProperty(r,$jscomp.propertyToPolyfillSymbol[k],{configurable:!0,writable:!0,value:p})))};$jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(l,p){for(var m=1;m<arguments.length;m++){var r=arguments[m];if(r)for(var k in r)$jscomp.owns(r,k)&&(l[k]=r[k])}return l};$jscomp.polyfill("Object.assign",function(l){return l||$jscomp.assign},"es6","es3");
7
+ $jscomp.arrayIteratorImpl=function(l){var p=0;return function(){return p<l.length?{done:!1,value:l[p++]}:{done:!0}}};$jscomp.arrayIterator=function(l){return{next:$jscomp.arrayIteratorImpl(l)}};$jscomp.makeIterator=function(l){var p="undefined"!=typeof Symbol&&Symbol.iterator&&l[Symbol.iterator];return p?p.call(l):$jscomp.arrayIterator(l)};
8
+ $jscomp.polyfill("Promise",function(l){function p(){this.batch_=null}function m(h){return h instanceof k?h:new k(function(q,v){q(h)})}if(l&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return l;p.prototype.asyncExecute=function(h){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(h)};
9
+ var r=$jscomp.global.setTimeout;p.prototype.asyncExecuteFunction=function(h){r(h,0)};p.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var h=this.batch_;this.batch_=[];for(var q=0;q<h.length;++q){var v=h[q];h[q]=null;try{v()}catch(D){this.asyncThrow_(D)}}}this.batch_=null};p.prototype.asyncThrow_=function(h){this.asyncExecuteFunction(function(){throw h;})};var k=function(h){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var q=this.createResolveAndReject_();
10
+ try{h(q.resolve,q.reject)}catch(v){q.reject(v)}};k.prototype.createResolveAndReject_=function(){function h(D){return function(G){v||(v=!0,D.call(q,G))}}var q=this,v=!1;return{resolve:h(this.resolveTo_),reject:h(this.reject_)}};k.prototype.resolveTo_=function(h){if(h===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(h instanceof k)this.settleSameAsPromise_(h);else{a:switch(typeof h){case "object":var q=null!=h;break a;case "function":q=!0;break a;default:q=!1}q?this.resolveToNonPromiseObj_(h):
11
+ this.fulfill_(h)}};k.prototype.resolveToNonPromiseObj_=function(h){var q=void 0;try{q=h.then}catch(v){this.reject_(v);return}"function"==typeof q?this.settleSameAsThenable_(q,h):this.fulfill_(h)};k.prototype.reject_=function(h){this.settle_(2,h)};k.prototype.fulfill_=function(h){this.settle_(1,h)};k.prototype.settle_=function(h,q){if(0!=this.state_)throw Error("Cannot settle("+h+", "+q+"): Promise already settled in state"+this.state_);this.state_=h;this.result_=q;2===this.state_&&this.scheduleUnhandledRejectionCheck_();
12
+ this.executeOnSettledCallbacks_()};k.prototype.scheduleUnhandledRejectionCheck_=function(){var h=this;r(function(){if(h.notifyUnhandledRejection_()){var q=$jscomp.global.console;"undefined"!==typeof q&&q.error(h.result_)}},1)};k.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var h=$jscomp.global.CustomEvent,q=$jscomp.global.Event,v=$jscomp.global.dispatchEvent;if("undefined"===typeof v)return!0;"function"===typeof h?h=new h("unhandledrejection",{cancelable:!0}):
13
+ "function"===typeof q?h=new q("unhandledrejection",{cancelable:!0}):(h=$jscomp.global.document.createEvent("CustomEvent"),h.initCustomEvent("unhandledrejection",!1,!0,h));h.promise=this;h.reason=this.result_;return v(h)};k.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var h=0;h<this.onSettledCallbacks_.length;++h)C.asyncExecute(this.onSettledCallbacks_[h]);this.onSettledCallbacks_=null}};var C=new p;k.prototype.settleSameAsPromise_=function(h){var q=this.createResolveAndReject_();
14
+ h.callWhenSettled_(q.resolve,q.reject)};k.prototype.settleSameAsThenable_=function(h,q){var v=this.createResolveAndReject_();try{h.call(q,v.resolve,v.reject)}catch(D){v.reject(D)}};k.prototype.then=function(h,q){function v(B,L){return"function"==typeof B?function(P){try{D(B(P))}catch(S){G(S)}}:L}var D,G,y=new k(function(B,L){D=B;G=L});this.callWhenSettled_(v(h,D),v(q,G));return y};k.prototype.catch=function(h){return this.then(void 0,h)};k.prototype.callWhenSettled_=function(h,q){function v(){switch(D.state_){case 1:h(D.result_);
15
+ break;case 2:q(D.result_);break;default:throw Error("Unexpected state: "+D.state_);}}var D=this;null==this.onSettledCallbacks_?C.asyncExecute(v):this.onSettledCallbacks_.push(v);this.isRejectionHandled_=!0};k.resolve=m;k.reject=function(h){return new k(function(q,v){v(h)})};k.race=function(h){return new k(function(q,v){for(var D=$jscomp.makeIterator(h),G=D.next();!G.done;G=D.next())m(G.value).callWhenSettled_(q,v)})};k.all=function(h){var q=$jscomp.makeIterator(h),v=q.next();return v.done?m([]):new k(function(D,
16
+ G){function y(P){return function(S){B[P]=S;L--;0==L&&D(B)}}var B=[],L=0;do B.push(void 0),L++,m(v.value).callWhenSettled_(y(B.length-1),G),v=q.next();while(!v.done)})};return k},"es6","es3");$jscomp.checkStringArgs=function(l,p,m){if(null==l)throw new TypeError("The 'this' value for String.prototype."+m+" must not be null or undefined");if(p instanceof RegExp)throw new TypeError("First argument to String.prototype."+m+" must not be a regular expression");return l+""};
17
+ $jscomp.polyfill("String.prototype.startsWith",function(l){return l?l:function(p,m){var r=$jscomp.checkStringArgs(this,p,"startsWith");p+="";var k=r.length,C=p.length;m=Math.max(0,Math.min(m|0,r.length));for(var h=0;h<C&&m<k;)if(r[m++]!=p[h++])return!1;return h>=C}},"es6","es3");
18
+ $jscomp.polyfill("Array.prototype.copyWithin",function(l){function p(m){m=Number(m);return Infinity===m||-Infinity===m?m:m|0}return l?l:function(m,r,k){var C=this.length;m=p(m);r=p(r);k=void 0===k?C:p(k);m=0>m?Math.max(C+m,0):Math.min(m,C);r=0>r?Math.max(C+r,0):Math.min(r,C);k=0>k?Math.max(C+k,0):Math.min(k,C);if(m<r)for(;r<k;)r in this?this[m++]=this[r++]:(delete this[m++],r++);else for(k=Math.min(k,C+r-m),m+=k-r;k>r;)--k in this?this[--m]=this[k]:delete this[--m];return this}},"es6","es3");
19
+ $jscomp.typedArrayCopyWithin=function(l){return l?l:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
20
+ $jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
21
+ var DracoEncoderModule=function(){var l="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(l=l||__filename);return function(p){function m(f){return a.locateFile?a.locateFile(f,M):M+f}function r(f){pa=f;a.HEAP8=Q=new Int8Array(f);a.HEAP16=fa=new Int16Array(f);a.HEAP32=K=new Int32Array(f);a.HEAPU8=ha=new Uint8Array(f);a.HEAPU16=new Uint16Array(f);a.HEAPU32=new Uint32Array(f);a.HEAPF32=ia=new Float32Array(f);a.HEAPF64=new Float64Array(f)}
22
+ function k(f){if(a.onAbort)a.onAbort(f);f="Aborted("+f+")";V(f);qa=!0;f=new WebAssembly.RuntimeError(f+". Build with -s ASSERTIONS=1 for more info.");ja(f);throw f;}function C(f){try{if(f==J&&W)return new Uint8Array(W);if(ka)return ka(f);throw"both async and sync fetching of the wasm failed";}catch(b){k(b)}}function h(){if(!W&&(ra||X)){if("function"===typeof fetch&&!J.startsWith("file://"))return fetch(J,{credentials:"same-origin"}).then(function(f){if(!f.ok)throw"failed to load wasm binary file at '"+
23
+ J+"'";return f.arrayBuffer()}).catch(function(){return C(J)});if(la)return new Promise(function(f,b){la(J,function(c){f(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return C(J)})}function q(f){for(;0<f.length;){var b=f.shift();if("function"==typeof b)b(a);else{var c=b.func;"number"===typeof c?void 0===b.arg?v(c)():v(c)(b.arg):c(void 0===b.arg?null:b.arg)}}}function v(f){var b=aa[f];b||(f>=aa.length&&(aa.length=f+1),aa[f]=b=sa.get(f));return b}function D(f){this.excPtr=f;this.ptr=
24
+ f-16;this.set_type=function(b){K[this.ptr+4>>2]=b};this.get_type=function(){return K[this.ptr+4>>2]};this.set_destructor=function(b){K[this.ptr+8>>2]=b};this.get_destructor=function(){return K[this.ptr+8>>2]};this.set_refcount=function(b){K[this.ptr>>2]=b};this.set_caught=function(b){Q[this.ptr+12>>0]=b?1:0};this.get_caught=function(){return 0!=Q[this.ptr+12>>0]};this.set_rethrown=function(b){Q[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=Q[this.ptr+13>>0]};this.init=function(b,c){this.set_type(b);
25
+ this.set_destructor(c);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){K[this.ptr>>2]+=1};this.release_ref=function(){var b=K[this.ptr>>2];K[this.ptr>>2]=b-1;return 1===b}}function G(f){function b(){if(!ba&&(ba=!0,a.calledRun=!0,!qa)){ta=!0;q(ma);ua(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)va.unshift(a.postRun.shift());q(va)}}if(!(0<T)){if(a.preRun)for("function"==
26
+ typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)wa.unshift(a.preRun.shift());q(wa);0<T||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function y(){}function B(f){return(f||y).__cache__}function L(f,b){var c=B(b),d=c[f];if(d)return d;d=Object.create((b||y).prototype);d.ptr=f;return c[f]=d}function P(f){if("string"===typeof f){for(var b=0,c=0;c<f.length;++c){var d=f.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<
27
+ 10)|f.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}b=Array(b+1);c=0;d=b.length;if(0<d){d=c+d-1;for(var e=0;e<f.length;++e){var g=f.charCodeAt(e);if(55296<=g&&57343>=g){var t=f.charCodeAt(++e);g=65536+((g&1023)<<10)|t&1023}if(127>=g){if(c>=d)break;b[c++]=g}else{if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6}else{if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>>12&63}b[c++]=128|g>>6&63}b[c++]=128|g&63}}b[c]=0}f=n.alloc(b,Q);n.copy(b,Q,
28
+ f);return f}return f}function S(f){if("object"===typeof f){var b=n.alloc(f,Q);n.copy(f,Q,b);return b}return f}function ca(f){if("object"===typeof f){var b=n.alloc(f,fa);n.copy(f,fa,b);return b}return f}function U(f){if("object"===typeof f){var b=n.alloc(f,K);n.copy(f,K,b);return b}return f}function Y(f){if("object"===typeof f){var b=n.alloc(f,ia);n.copy(f,ia,b);return b}return f}function R(){throw"cannot construct a VoidPtr, no constructor in IDL";}function N(){this.ptr=xa();B(N)[this.ptr]=this}function z(){this.ptr=
29
+ ya();B(z)[this.ptr]=this}function H(){this.ptr=za();B(H)[this.ptr]=this}function E(){this.ptr=Aa();B(E)[this.ptr]=this}function O(){this.ptr=Ba();B(O)[this.ptr]=this}function I(){this.ptr=Ca();B(I)[this.ptr]=this}function F(){this.ptr=Da();B(F)[this.ptr]=this}function w(){this.ptr=Ea();B(w)[this.ptr]=this}function u(){this.ptr=Fa();B(u)[this.ptr]=this}function x(){this.ptr=Ga();B(x)[this.ptr]=this}function A(f){f&&"object"===typeof f&&(f=f.ptr);this.ptr=Ha(f);B(A)[this.ptr]=this}p=p||{};var a="undefined"!==
30
+ typeof p?p:{},Ia=Object.assign,ua,ja;a.ready=new Promise(function(f,b){ua=f;ja=b});var Ja=!1,Ka=!1;a.onRuntimeInitialized=function(){Ja=!0;if(Ka&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ka=!0;if(Ja&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(f){if("string"!==typeof f)return!1;f=f.split(".");return 2>f.length||3<f.length?!1:1==f[0]&&0<=f[1]&&5>=f[1]?!0:0!=f[0]||10<f[1]?!1:!0};var La=Ia({},a),ra="object"===typeof window,
31
+ X="function"===typeof importScripts,M="",na,da;if("object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node){M=X?require("path").dirname(M)+"/":__dirname+"/";var Ma=function(){da||(na=require("fs"),da=require("path"))};var Na=function(f,b){Ma();f=da.normalize(f);return na.readFileSync(f,b?null:"utf8")};var ka=function(f){f=Na(f,!0);f.buffer||(f=new Uint8Array(f));return f};var la=function(f,b,c){Ma();f=da.normalize(f);na.readFile(f,function(d,e){d?c(d):
32
+ b(e.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/");process.argv.slice(2);a.inspect=function(){return"[Emscripten Module object]"}}else if(ra||X)X?M=self.location.href:"undefined"!==typeof document&&document.currentScript&&(M=document.currentScript.src),l&&(M=l),M=0!==M.indexOf("blob:")?M.substr(0,M.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Na=function(f){var b=new XMLHttpRequest;b.open("GET",f,!1);b.send(null);return b.responseText},X&&(ka=function(f){var b=new XMLHttpRequest;
33
+ b.open("GET",f,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),la=function(f,b,c){var d=new XMLHttpRequest;d.open("GET",f,!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)};a.print||console.log.bind(console);var V=a.printErr||console.warn.bind(console);Ia(a,La);La=null;var W;a.wasmBinary&&(W=a.wasmBinary);"object"!==typeof WebAssembly&&k("no native wasm support detected");var ea,
34
+ qa=!1,pa,Q,ha,fa,K,ia,sa,wa=[],ma=[],va=[],ta=!1,T=0,oa=null,Z=null;a.preloadedImages={};a.preloadedAudios={};var J="draco_encoder.wasm";J.startsWith("data:application/octet-stream;base64,")||(J=m(J));var aa=[],rc=0,sc={e:function(f){return Oa(f+16)+16},d:function(f,b,c){(new D(f)).init(b,c);rc++;throw f;},a:function(){k("")},c:function(f,b,c){ha.copyWithin(f,b,b+c)},b:function(f){var b=ha.length;f>>>=0;if(2147483648<f)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,f+100663296);var e=
35
+ Math,g=e.min;d=Math.max(f,d);0<d%65536&&(d+=65536-d%65536);e=g.call(e,2147483648,d);a:{try{ea.grow(e-pa.byteLength+65535>>>16);r(ea.buffer);var t=1;break a}catch(tc){}t=void 0}if(t)return!0}return!1}};(function(){function f(e,g){a.asm=e.exports;ea=a.asm.f;r(ea.buffer);sa=a.asm.h;ma.unshift(a.asm.g);T--;a.monitorRunDependencies&&a.monitorRunDependencies(T);0==T&&(null!==oa&&(clearInterval(oa),oa=null),Z&&(e=Z,Z=null,e()))}function b(e){f(e.instance)}function c(e){return h().then(function(g){return WebAssembly.instantiate(g,
36
+ d)}).then(function(g){return g}).then(e,function(g){V("failed to asynchronously prepare wasm: "+g);k(g)})}var d={a:sc};T++;a.monitorRunDependencies&&a.monitorRunDependencies(T);if(a.instantiateWasm)try{return a.instantiateWasm(d,f)}catch(e){return V("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return W||"function"!==typeof WebAssembly.instantiateStreaming||J.startsWith("data:application/octet-stream;base64,")||J.startsWith("file://")||"function"!==typeof fetch?c(b):fetch(J,
37
+ {credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(g){V("wasm streaming compile failed: "+g);V("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ja);return{}})();a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.g).apply(null,arguments)};var Pa=a._emscripten_bind_VoidPtr___destroy___0=function(){return(Pa=a._emscripten_bind_VoidPtr___destroy___0=a.asm.i).apply(null,arguments)},xa=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=
38
+ function(){return(xa=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=a.asm.j).apply(null,arguments)},Qa=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(Qa=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.k).apply(null,arguments)},ya=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(ya=a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.l).apply(null,arguments)},Ra=a._emscripten_bind_PointAttribute_size_0=function(){return(Ra=a._emscripten_bind_PointAttribute_size_0=
39
+ a.asm.m).apply(null,arguments)},Sa=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(Sa=a._emscripten_bind_PointAttribute_attribute_type_0=a.asm.n).apply(null,arguments)},Ta=a._emscripten_bind_PointAttribute_data_type_0=function(){return(Ta=a._emscripten_bind_PointAttribute_data_type_0=a.asm.o).apply(null,arguments)},Ua=a._emscripten_bind_PointAttribute_num_components_0=function(){return(Ua=a._emscripten_bind_PointAttribute_num_components_0=a.asm.p).apply(null,arguments)},Va=a._emscripten_bind_PointAttribute_normalized_0=
40
+ function(){return(Va=a._emscripten_bind_PointAttribute_normalized_0=a.asm.q).apply(null,arguments)},Wa=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return(Wa=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.r).apply(null,arguments)},Xa=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(Xa=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.s).apply(null,arguments)},Ya=a._emscripten_bind_PointAttribute_unique_id_0=function(){return(Ya=a._emscripten_bind_PointAttribute_unique_id_0=
41
+ a.asm.t).apply(null,arguments)},Za=a._emscripten_bind_PointAttribute___destroy___0=function(){return(Za=a._emscripten_bind_PointAttribute___destroy___0=a.asm.u).apply(null,arguments)},za=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(za=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.v).apply(null,arguments)},$a=a._emscripten_bind_PointCloud_num_attributes_0=function(){return($a=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.w).apply(null,arguments)},ab=a._emscripten_bind_PointCloud_num_points_0=
42
+ function(){return(ab=a._emscripten_bind_PointCloud_num_points_0=a.asm.x).apply(null,arguments)},bb=a._emscripten_bind_PointCloud___destroy___0=function(){return(bb=a._emscripten_bind_PointCloud___destroy___0=a.asm.y).apply(null,arguments)},Aa=a._emscripten_bind_Mesh_Mesh_0=function(){return(Aa=a._emscripten_bind_Mesh_Mesh_0=a.asm.z).apply(null,arguments)},cb=a._emscripten_bind_Mesh_num_faces_0=function(){return(cb=a._emscripten_bind_Mesh_num_faces_0=a.asm.A).apply(null,arguments)},db=a._emscripten_bind_Mesh_num_attributes_0=
43
+ function(){return(db=a._emscripten_bind_Mesh_num_attributes_0=a.asm.B).apply(null,arguments)},eb=a._emscripten_bind_Mesh_num_points_0=function(){return(eb=a._emscripten_bind_Mesh_num_points_0=a.asm.C).apply(null,arguments)},fb=a._emscripten_bind_Mesh_set_num_points_1=function(){return(fb=a._emscripten_bind_Mesh_set_num_points_1=a.asm.D).apply(null,arguments)},gb=a._emscripten_bind_Mesh___destroy___0=function(){return(gb=a._emscripten_bind_Mesh___destroy___0=a.asm.E).apply(null,arguments)},Ba=a._emscripten_bind_Metadata_Metadata_0=
44
+ function(){return(Ba=a._emscripten_bind_Metadata_Metadata_0=a.asm.F).apply(null,arguments)},hb=a._emscripten_bind_Metadata___destroy___0=function(){return(hb=a._emscripten_bind_Metadata___destroy___0=a.asm.G).apply(null,arguments)},Ca=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ca=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.H).apply(null,arguments)},ib=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(ib=a._emscripten_bind_DracoInt8Array_GetValue_1=
45
+ a.asm.I).apply(null,arguments)},jb=a._emscripten_bind_DracoInt8Array_size_0=function(){return(jb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.J).apply(null,arguments)},kb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(kb=a._emscripten_bind_DracoInt8Array___destroy___0=a.asm.K).apply(null,arguments)},Da=a._emscripten_bind_MetadataBuilder_MetadataBuilder_0=function(){return(Da=a._emscripten_bind_MetadataBuilder_MetadataBuilder_0=a.asm.L).apply(null,arguments)},lb=a._emscripten_bind_MetadataBuilder_AddStringEntry_3=
46
+ function(){return(lb=a._emscripten_bind_MetadataBuilder_AddStringEntry_3=a.asm.M).apply(null,arguments)},mb=a._emscripten_bind_MetadataBuilder_AddIntEntry_3=function(){return(mb=a._emscripten_bind_MetadataBuilder_AddIntEntry_3=a.asm.N).apply(null,arguments)},nb=a._emscripten_bind_MetadataBuilder_AddIntEntryArray_4=function(){return(nb=a._emscripten_bind_MetadataBuilder_AddIntEntryArray_4=a.asm.O).apply(null,arguments)},ob=a._emscripten_bind_MetadataBuilder_AddDoubleEntry_3=function(){return(ob=a._emscripten_bind_MetadataBuilder_AddDoubleEntry_3=
47
+ a.asm.P).apply(null,arguments)},pb=a._emscripten_bind_MetadataBuilder___destroy___0=function(){return(pb=a._emscripten_bind_MetadataBuilder___destroy___0=a.asm.Q).apply(null,arguments)},Ea=a._emscripten_bind_PointCloudBuilder_PointCloudBuilder_0=function(){return(Ea=a._emscripten_bind_PointCloudBuilder_PointCloudBuilder_0=a.asm.R).apply(null,arguments)},qb=a._emscripten_bind_PointCloudBuilder_AddFloatAttribute_5=function(){return(qb=a._emscripten_bind_PointCloudBuilder_AddFloatAttribute_5=a.asm.S).apply(null,
48
+ arguments)},rb=a._emscripten_bind_PointCloudBuilder_AddInt8Attribute_5=function(){return(rb=a._emscripten_bind_PointCloudBuilder_AddInt8Attribute_5=a.asm.T).apply(null,arguments)},sb=a._emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5=function(){return(sb=a._emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5=a.asm.U).apply(null,arguments)},tb=a._emscripten_bind_PointCloudBuilder_AddInt16Attribute_5=function(){return(tb=a._emscripten_bind_PointCloudBuilder_AddInt16Attribute_5=a.asm.V).apply(null,
49
+ arguments)},ub=a._emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5=function(){return(ub=a._emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5=a.asm.W).apply(null,arguments)},vb=a._emscripten_bind_PointCloudBuilder_AddInt32Attribute_5=function(){return(vb=a._emscripten_bind_PointCloudBuilder_AddInt32Attribute_5=a.asm.X).apply(null,arguments)},wb=a._emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5=function(){return(wb=a._emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5=a.asm.Y).apply(null,
50
+ arguments)},xb=a._emscripten_bind_PointCloudBuilder_AddMetadata_2=function(){return(xb=a._emscripten_bind_PointCloudBuilder_AddMetadata_2=a.asm.Z).apply(null,arguments)},yb=a._emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3=function(){return(yb=a._emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3=a.asm._).apply(null,arguments)},zb=a._emscripten_bind_PointCloudBuilder___destroy___0=function(){return(zb=a._emscripten_bind_PointCloudBuilder___destroy___0=a.asm.$).apply(null,arguments)},
51
+ Fa=a._emscripten_bind_MeshBuilder_MeshBuilder_0=function(){return(Fa=a._emscripten_bind_MeshBuilder_MeshBuilder_0=a.asm.aa).apply(null,arguments)},Ab=a._emscripten_bind_MeshBuilder_AddFacesToMesh_3=function(){return(Ab=a._emscripten_bind_MeshBuilder_AddFacesToMesh_3=a.asm.ba).apply(null,arguments)},Bb=a._emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5=function(){return(Bb=a._emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5=a.asm.ca).apply(null,arguments)},Cb=a._emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5=
52
+ function(){return(Cb=a._emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5=a.asm.da).apply(null,arguments)},Db=a._emscripten_bind_MeshBuilder_AddMetadataToMesh_2=function(){return(Db=a._emscripten_bind_MeshBuilder_AddMetadataToMesh_2=a.asm.ea).apply(null,arguments)},Eb=a._emscripten_bind_MeshBuilder_AddFloatAttribute_5=function(){return(Eb=a._emscripten_bind_MeshBuilder_AddFloatAttribute_5=a.asm.fa).apply(null,arguments)},Fb=a._emscripten_bind_MeshBuilder_AddInt8Attribute_5=function(){return(Fb=
53
+ a._emscripten_bind_MeshBuilder_AddInt8Attribute_5=a.asm.ga).apply(null,arguments)},Gb=a._emscripten_bind_MeshBuilder_AddUInt8Attribute_5=function(){return(Gb=a._emscripten_bind_MeshBuilder_AddUInt8Attribute_5=a.asm.ha).apply(null,arguments)},Hb=a._emscripten_bind_MeshBuilder_AddInt16Attribute_5=function(){return(Hb=a._emscripten_bind_MeshBuilder_AddInt16Attribute_5=a.asm.ia).apply(null,arguments)},Ib=a._emscripten_bind_MeshBuilder_AddUInt16Attribute_5=function(){return(Ib=a._emscripten_bind_MeshBuilder_AddUInt16Attribute_5=
54
+ a.asm.ja).apply(null,arguments)},Jb=a._emscripten_bind_MeshBuilder_AddInt32Attribute_5=function(){return(Jb=a._emscripten_bind_MeshBuilder_AddInt32Attribute_5=a.asm.ka).apply(null,arguments)},Kb=a._emscripten_bind_MeshBuilder_AddUInt32Attribute_5=function(){return(Kb=a._emscripten_bind_MeshBuilder_AddUInt32Attribute_5=a.asm.la).apply(null,arguments)},Lb=a._emscripten_bind_MeshBuilder_AddMetadata_2=function(){return(Lb=a._emscripten_bind_MeshBuilder_AddMetadata_2=a.asm.ma).apply(null,arguments)},Mb=
55
+ a._emscripten_bind_MeshBuilder_SetMetadataForAttribute_3=function(){return(Mb=a._emscripten_bind_MeshBuilder_SetMetadataForAttribute_3=a.asm.na).apply(null,arguments)},Nb=a._emscripten_bind_MeshBuilder___destroy___0=function(){return(Nb=a._emscripten_bind_MeshBuilder___destroy___0=a.asm.oa).apply(null,arguments)},Ga=a._emscripten_bind_Encoder_Encoder_0=function(){return(Ga=a._emscripten_bind_Encoder_Encoder_0=a.asm.pa).apply(null,arguments)},Ob=a._emscripten_bind_Encoder_SetEncodingMethod_1=function(){return(Ob=
56
+ a._emscripten_bind_Encoder_SetEncodingMethod_1=a.asm.qa).apply(null,arguments)},Pb=a._emscripten_bind_Encoder_SetAttributeQuantization_2=function(){return(Pb=a._emscripten_bind_Encoder_SetAttributeQuantization_2=a.asm.ra).apply(null,arguments)},Qb=a._emscripten_bind_Encoder_SetAttributeExplicitQuantization_5=function(){return(Qb=a._emscripten_bind_Encoder_SetAttributeExplicitQuantization_5=a.asm.sa).apply(null,arguments)},Rb=a._emscripten_bind_Encoder_SetSpeedOptions_2=function(){return(Rb=a._emscripten_bind_Encoder_SetSpeedOptions_2=
57
+ a.asm.ta).apply(null,arguments)},Sb=a._emscripten_bind_Encoder_SetTrackEncodedProperties_1=function(){return(Sb=a._emscripten_bind_Encoder_SetTrackEncodedProperties_1=a.asm.ua).apply(null,arguments)},Tb=a._emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2=function(){return(Tb=a._emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2=a.asm.va).apply(null,arguments)},Ub=a._emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3=function(){return(Ub=a._emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3=
58
+ a.asm.wa).apply(null,arguments)},Vb=a._emscripten_bind_Encoder_GetNumberOfEncodedPoints_0=function(){return(Vb=a._emscripten_bind_Encoder_GetNumberOfEncodedPoints_0=a.asm.xa).apply(null,arguments)},Wb=a._emscripten_bind_Encoder_GetNumberOfEncodedFaces_0=function(){return(Wb=a._emscripten_bind_Encoder_GetNumberOfEncodedFaces_0=a.asm.ya).apply(null,arguments)},Xb=a._emscripten_bind_Encoder___destroy___0=function(){return(Xb=a._emscripten_bind_Encoder___destroy___0=a.asm.za).apply(null,arguments)},Ha=
59
+ a._emscripten_bind_ExpertEncoder_ExpertEncoder_1=function(){return(Ha=a._emscripten_bind_ExpertEncoder_ExpertEncoder_1=a.asm.Aa).apply(null,arguments)},Yb=a._emscripten_bind_ExpertEncoder_SetEncodingMethod_1=function(){return(Yb=a._emscripten_bind_ExpertEncoder_SetEncodingMethod_1=a.asm.Ba).apply(null,arguments)},Zb=a._emscripten_bind_ExpertEncoder_SetAttributeQuantization_2=function(){return(Zb=a._emscripten_bind_ExpertEncoder_SetAttributeQuantization_2=a.asm.Ca).apply(null,arguments)},$b=a._emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5=
60
+ function(){return($b=a._emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5=a.asm.Da).apply(null,arguments)},ac=a._emscripten_bind_ExpertEncoder_SetSpeedOptions_2=function(){return(ac=a._emscripten_bind_ExpertEncoder_SetSpeedOptions_2=a.asm.Ea).apply(null,arguments)},bc=a._emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1=function(){return(bc=a._emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1=a.asm.Fa).apply(null,arguments)},cc=a._emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2=
61
+ function(){return(cc=a._emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2=a.asm.Ga).apply(null,arguments)},dc=a._emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0=function(){return(dc=a._emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0=a.asm.Ha).apply(null,arguments)},ec=a._emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0=function(){return(ec=a._emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0=a.asm.Ia).apply(null,arguments)},fc=a._emscripten_bind_ExpertEncoder___destroy___0=
62
+ function(){return(fc=a._emscripten_bind_ExpertEncoder___destroy___0=a.asm.Ja).apply(null,arguments)},gc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(gc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.Ka).apply(null,arguments)},hc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(hc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=a.asm.La).apply(null,arguments)},ic=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(ic=
63
+ a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.Ma).apply(null,arguments)},jc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(jc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.Na).apply(null,arguments)},kc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(kc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=a.asm.Oa).apply(null,arguments)},lc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(lc=
64
+ a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.Pa).apply(null,arguments)},mc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(mc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.Qa).apply(null,arguments)},nc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(nc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=a.asm.Ra).apply(null,arguments)},oc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=
65
+ function(){return(oc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.Sa).apply(null,arguments)},pc=a._emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING=function(){return(pc=a._emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING=a.asm.Ta).apply(null,arguments)},qc=a._emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING=function(){return(qc=a._emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING=a.asm.Ua).apply(null,arguments)},
66
+ Oa=a._malloc=function(){return(Oa=a._malloc=a.asm.Va).apply(null,arguments)};a._free=function(){return(a._free=a.asm.Wa).apply(null,arguments)};var ba;Z=function b(){ba||G();ba||(Z=b)};a.run=G;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();G();y.prototype=Object.create(y.prototype);y.prototype.constructor=y;y.prototype.__class__=y;y.__cache__={};a.WrapperObject=y;a.getCache=B;a.wrapPointer=L;a.castObject=function(b,c){return L(b.ptr,c)};
67
+ a.NULL=L(0);a.destroy=function(b){if(!b.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";b.__destroy__();delete B(b.__class__)[b.ptr]};a.compare=function(b,c){return b.ptr===c.ptr};a.getPointer=function(b){return b.ptr};a.getClass=function(b){return b.__class__};var n={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(n.needed){for(var b=0;b<n.temps.length;b++)a._free(n.temps[b]);n.temps.length=0;a._free(n.buffer);n.buffer=0;n.size+=n.needed;n.needed=0}n.buffer||
68
+ (n.size+=128,n.buffer=a._malloc(n.size),n.buffer||k(void 0));n.pos=0},alloc:function(b,c){n.buffer||k(void 0);b=b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;n.pos+b>=n.size?(0<b||k(void 0),n.needed+=b,c=a._malloc(b),n.temps.push(c)):(c=n.buffer+n.pos,n.pos+=b);return c},copy:function(b,c,d){d>>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var e=0;e<b.length;e++)c[d+e]=b[e]}};R.prototype=Object.create(y.prototype);R.prototype.constructor=R;R.prototype.__class__=
69
+ R;R.__cache__={};a.VoidPtr=R;R.prototype.__destroy__=R.prototype.__destroy__=function(){Pa(this.ptr)};N.prototype=Object.create(y.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.GeometryAttribute=N;N.prototype.__destroy__=N.prototype.__destroy__=function(){Qa(this.ptr)};z.prototype=Object.create(y.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.PointAttribute=z;z.prototype.size=z.prototype.size=function(){return Ra(this.ptr)};z.prototype.attribute_type=
70
+ z.prototype.attribute_type=function(){return Sa(this.ptr)};z.prototype.data_type=z.prototype.data_type=function(){return Ta(this.ptr)};z.prototype.num_components=z.prototype.num_components=function(){return Ua(this.ptr)};z.prototype.normalized=z.prototype.normalized=function(){return!!Va(this.ptr)};z.prototype.byte_stride=z.prototype.byte_stride=function(){return Wa(this.ptr)};z.prototype.byte_offset=z.prototype.byte_offset=function(){return Xa(this.ptr)};z.prototype.unique_id=z.prototype.unique_id=
71
+ function(){return Ya(this.ptr)};z.prototype.__destroy__=z.prototype.__destroy__=function(){Za(this.ptr)};H.prototype=Object.create(y.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.PointCloud=H;H.prototype.num_attributes=H.prototype.num_attributes=function(){return $a(this.ptr)};H.prototype.num_points=H.prototype.num_points=function(){return ab(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){bb(this.ptr)};E.prototype=Object.create(y.prototype);E.prototype.constructor=
72
+ E;E.prototype.__class__=E;E.__cache__={};a.Mesh=E;E.prototype.num_faces=E.prototype.num_faces=function(){return cb(this.ptr)};E.prototype.num_attributes=E.prototype.num_attributes=function(){return db(this.ptr)};E.prototype.num_points=E.prototype.num_points=function(){return eb(this.ptr)};E.prototype.set_num_points=E.prototype.set_num_points=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);fb(c,b)};E.prototype.__destroy__=E.prototype.__destroy__=function(){gb(this.ptr)};O.prototype=Object.create(y.prototype);
73
+ O.prototype.constructor=O;O.prototype.__class__=O;O.__cache__={};a.Metadata=O;O.prototype.__destroy__=O.prototype.__destroy__=function(){hb(this.ptr)};I.prototype=Object.create(y.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoInt8Array=I;I.prototype.GetValue=I.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return ib(c,b)};I.prototype.size=I.prototype.size=function(){return jb(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=
74
+ function(){kb(this.ptr)};F.prototype=Object.create(y.prototype);F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.MetadataBuilder=F;F.prototype.AddStringEntry=F.prototype.AddStringEntry=function(b,c,d){var e=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:P(c);d=d&&"object"===typeof d?d.ptr:P(d);return!!lb(e,b,c,d)};F.prototype.AddIntEntry=F.prototype.AddIntEntry=function(b,c,d){var e=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&
75
+ "object"===typeof c?c.ptr:P(c);d&&"object"===typeof d&&(d=d.ptr);return!!mb(e,b,c,d)};F.prototype.AddIntEntryArray=F.prototype.AddIntEntryArray=function(b,c,d,e){var g=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:P(c);"object"==typeof d&&(d=U(d));e&&"object"===typeof e&&(e=e.ptr);return!!nb(g,b,c,d,e)};F.prototype.AddDoubleEntry=F.prototype.AddDoubleEntry=function(b,c,d){var e=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?
76
+ c.ptr:P(c);d&&"object"===typeof d&&(d=d.ptr);return!!ob(e,b,c,d)};F.prototype.__destroy__=F.prototype.__destroy__=function(){pb(this.ptr)};w.prototype=Object.create(y.prototype);w.prototype.constructor=w;w.prototype.__class__=w;w.__cache__={};a.PointCloudBuilder=w;w.prototype.AddFloatAttribute=w.prototype.AddFloatAttribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=
77
+ e.ptr);"object"==typeof g&&(g=Y(g));return qb(t,b,c,d,e,g)};w.prototype.AddInt8Attribute=w.prototype.AddInt8Attribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=S(g));return rb(t,b,c,d,e,g)};w.prototype.AddUInt8Attribute=w.prototype.AddUInt8Attribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===
78
+ typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=S(g));return sb(t,b,c,d,e,g)};w.prototype.AddInt16Attribute=w.prototype.AddInt16Attribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=ca(g));return tb(t,b,c,d,e,g)};w.prototype.AddUInt16Attribute=w.prototype.AddUInt16Attribute=function(b,
79
+ c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=ca(g));return ub(t,b,c,d,e,g)};w.prototype.AddInt32Attribute=w.prototype.AddInt32Attribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=U(g));return vb(t,
80
+ b,c,d,e,g)};w.prototype.AddUInt32Attribute=w.prototype.AddUInt32Attribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=U(g));return wb(t,b,c,d,e,g)};w.prototype.AddMetadata=w.prototype.AddMetadata=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return!!xb(d,b,c)};w.prototype.SetMetadataForAttribute=
81
+ w.prototype.SetMetadataForAttribute=function(b,c,d){var e=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!yb(e,b,c,d)};w.prototype.__destroy__=w.prototype.__destroy__=function(){zb(this.ptr)};u.prototype=Object.create(y.prototype);u.prototype.constructor=u;u.prototype.__class__=u;u.__cache__={};a.MeshBuilder=u;u.prototype.AddFacesToMesh=u.prototype.AddFacesToMesh=function(b,c,d){var e=this.ptr;n.prepare();b&&"object"===typeof b&&
82
+ (b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);"object"==typeof d&&(d=U(d));return!!Ab(e,b,c,d)};u.prototype.AddFloatAttributeToMesh=u.prototype.AddFloatAttributeToMesh=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=Y(g));return Bb(t,b,c,d,e,g)};u.prototype.AddInt32AttributeToMesh=u.prototype.AddInt32AttributeToMesh=function(b,c,d,e,g){var t=this.ptr;
83
+ n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=U(g));return Cb(t,b,c,d,e,g)};u.prototype.AddMetadataToMesh=u.prototype.AddMetadataToMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return!!Db(d,b,c)};u.prototype.AddFloatAttribute=u.prototype.AddFloatAttribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&
84
+ (b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=Y(g));return Eb(t,b,c,d,e,g)};u.prototype.AddInt8Attribute=u.prototype.AddInt8Attribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=S(g));return Fb(t,b,c,d,e,g)};u.prototype.AddUInt8Attribute=u.prototype.AddUInt8Attribute=
85
+ function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=S(g));return Gb(t,b,c,d,e,g)};u.prototype.AddInt16Attribute=u.prototype.AddInt16Attribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=
86
+ ca(g));return Hb(t,b,c,d,e,g)};u.prototype.AddUInt16Attribute=u.prototype.AddUInt16Attribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=ca(g));return Ib(t,b,c,d,e,g)};u.prototype.AddInt32Attribute=u.prototype.AddInt32Attribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);
87
+ d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=U(g));return Jb(t,b,c,d,e,g)};u.prototype.AddUInt32Attribute=u.prototype.AddUInt32Attribute=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);e&&"object"===typeof e&&(e=e.ptr);"object"==typeof g&&(g=U(g));return Kb(t,b,c,d,e,g)};u.prototype.AddMetadata=u.prototype.AddMetadata=function(b,c){var d=this.ptr;b&&"object"===
88
+ typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return!!Lb(d,b,c)};u.prototype.SetMetadataForAttribute=u.prototype.SetMetadataForAttribute=function(b,c,d){var e=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Mb(e,b,c,d)};u.prototype.__destroy__=u.prototype.__destroy__=function(){Nb(this.ptr)};x.prototype=Object.create(y.prototype);x.prototype.constructor=x;x.prototype.__class__=x;x.__cache__={};a.Encoder=x;x.prototype.SetEncodingMethod=
89
+ x.prototype.SetEncodingMethod=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);Ob(c,b)};x.prototype.SetAttributeQuantization=x.prototype.SetAttributeQuantization=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);Pb(d,b,c)};x.prototype.SetAttributeExplicitQuantization=x.prototype.SetAttributeExplicitQuantization=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===
90
+ typeof d&&(d=d.ptr);"object"==typeof e&&(e=Y(e));g&&"object"===typeof g&&(g=g.ptr);Qb(t,b,c,d,e,g)};x.prototype.SetSpeedOptions=x.prototype.SetSpeedOptions=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);Rb(d,b,c)};x.prototype.SetTrackEncodedProperties=x.prototype.SetTrackEncodedProperties=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);Sb(c,b)};x.prototype.EncodeMeshToDracoBuffer=x.prototype.EncodeMeshToDracoBuffer=function(b,c){var d=
91
+ this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return Tb(d,b,c)};x.prototype.EncodePointCloudToDracoBuffer=x.prototype.EncodePointCloudToDracoBuffer=function(b,c,d){var e=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return Ub(e,b,c,d)};x.prototype.GetNumberOfEncodedPoints=x.prototype.GetNumberOfEncodedPoints=function(){return Vb(this.ptr)};x.prototype.GetNumberOfEncodedFaces=x.prototype.GetNumberOfEncodedFaces=
92
+ function(){return Wb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){Xb(this.ptr)};A.prototype=Object.create(y.prototype);A.prototype.constructor=A;A.prototype.__class__=A;A.__cache__={};a.ExpertEncoder=A;A.prototype.SetEncodingMethod=A.prototype.SetEncodingMethod=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);Yb(c,b)};A.prototype.SetAttributeQuantization=A.prototype.SetAttributeQuantization=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===
93
+ typeof c&&(c=c.ptr);Zb(d,b,c)};A.prototype.SetAttributeExplicitQuantization=A.prototype.SetAttributeExplicitQuantization=function(b,c,d,e,g){var t=this.ptr;n.prepare();b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);"object"==typeof e&&(e=Y(e));g&&"object"===typeof g&&(g=g.ptr);$b(t,b,c,d,e,g)};A.prototype.SetSpeedOptions=A.prototype.SetSpeedOptions=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);
94
+ ac(d,b,c)};A.prototype.SetTrackEncodedProperties=A.prototype.SetTrackEncodedProperties=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);bc(c,b)};A.prototype.EncodeToDracoBuffer=A.prototype.EncodeToDracoBuffer=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return cc(d,b,c)};A.prototype.GetNumberOfEncodedPoints=A.prototype.GetNumberOfEncodedPoints=function(){return dc(this.ptr)};A.prototype.GetNumberOfEncodedFaces=A.prototype.GetNumberOfEncodedFaces=
95
+ function(){return ec(this.ptr)};A.prototype.__destroy__=A.prototype.__destroy__=function(){fc(this.ptr)};(function(){function b(){a.INVALID=gc();a.POSITION=hc();a.NORMAL=ic();a.COLOR=jc();a.TEX_COORD=kc();a.GENERIC=lc();a.INVALID_GEOMETRY_TYPE=mc();a.POINT_CLOUD=nc();a.TRIANGULAR_MESH=oc();a.MESH_SEQUENTIAL_ENCODING=pc();a.MESH_EDGEBREAKER_ENCODING=qc()}ta?b():ma.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return p.ready}}();
96
+ "object"===typeof exports&&"object"===typeof module?module.exports=DracoEncoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoEncoderModule}):"object"===typeof exports&&(exports.DracoEncoderModule=DracoEncoderModule);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/core",
3
- "version": "7.40.2",
3
+ "version": "7.40.4",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,19 +0,0 @@
1
- // Do not edit.
2
- import { ShaderStore } from "../Engines/shaderStore.js";
3
- const name = "iblIcdfxPixelShader";
4
- const shader = `precision highp sampler2D;
5
- #define PI 3.1415927
6
- varying vec2 vUV;uniform sampler2D cdfx;float fetchCDF(int x) {return texelFetch(cdfx,ivec2(x,0),0).x;}
7
- float bisect(int size,float targetValue)
8
- {int a=0,b=size-1;while (b-a>1) {int c=a+b>>1;if (fetchCDF(c)<targetValue)
9
- a=c;else
10
- b=c;}
11
- return mix(float(a),float(b),(targetValue-fetchCDF(a))/(fetchCDF(b)-fetchCDF(a)))/float(size-1);}
12
- void main(void) {ivec2 cdfSize=textureSize(cdfx,0);int cdfWidth=cdfSize.x;int icdfWidth=cdfWidth-1;ivec2 currentPixel=ivec2(gl_FragCoord.xy);if (currentPixel.x==0)
13
- {gl_FragColor=vec4(0.0);}
14
- else if (currentPixel.x==icdfWidth-1) {gl_FragColor=vec4(1.0);} else {float targetValue=fetchCDF(cdfWidth-1)*vUV.x;gl_FragColor=vec4(vec3(bisect(cdfWidth,targetValue)),1.0);}}`;
15
- // Sideeffect
16
- ShaderStore.ShadersStore[name] = shader;
17
- /** @internal */
18
- export const iblIcdfxPixelShader = { name, shader };
19
- //# sourceMappingURL=iblIcdfx.fragment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iblIcdfx.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/iblIcdfx.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,MAAM,GAAG;;;;;;;;;;gLAUiK,CAAC;AACjL,aAAa;AACb,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"iblIcdfxPixelShader\";\nconst shader = `precision highp sampler2D;\n#define PI 3.1415927\nvarying vec2 vUV;uniform sampler2D cdfx;float fetchCDF(int x) {return texelFetch(cdfx,ivec2(x,0),0).x;}\nfloat bisect(int size,float targetValue)\n{int a=0,b=size-1;while (b-a>1) {int c=a+b>>1;if (fetchCDF(c)<targetValue)\na=c;else\nb=c;}\nreturn mix(float(a),float(b),(targetValue-fetchCDF(a))/(fetchCDF(b)-fetchCDF(a)))/float(size-1);}\nvoid main(void) {ivec2 cdfSize=textureSize(cdfx,0);int cdfWidth=cdfSize.x;int icdfWidth=cdfWidth-1;ivec2 currentPixel=ivec2(gl_FragCoord.xy);if (currentPixel.x==0)\n{gl_FragColor=vec4(0.0);}\nelse if (currentPixel.x==icdfWidth-1) {gl_FragColor=vec4(1.0);} else {float targetValue=fetchCDF(cdfWidth-1)*vUV.x;gl_FragColor=vec4(vec3(bisect(cdfWidth,targetValue)),1.0);}}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const iblIcdfxPixelShader = { name, shader };\n"]}
@@ -1,5 +0,0 @@
1
- /** @internal */
2
- export declare const iblIcdfyPixelShader: {
3
- name: string;
4
- shader: string;
5
- };
@@ -1,19 +0,0 @@
1
- // Do not edit.
2
- import { ShaderStore } from "../Engines/shaderStore.js";
3
- const name = "iblIcdfyPixelShader";
4
- const shader = `precision highp sampler2D;
5
- #define PI 3.1415927
6
- varying vec2 vUV;uniform sampler2D cdfy;float fetchCDF(int y,int invocationId) {return texelFetch(cdfy,ivec2(invocationId,y),0).x;}
7
- float bisect(int size,float targetValue,int invocationId)
8
- {int a=0,b=size-1;while (b-a>1) {int c=a+b>>1;if (fetchCDF(c,invocationId)<targetValue)
9
- a=c;else
10
- b=c;}
11
- return mix(float(a),float(b),(targetValue-fetchCDF(a,invocationId))/(fetchCDF(b,invocationId)-fetchCDF(a,invocationId)))/float(size-1);}
12
- void main(void) {ivec2 cdfSize=textureSize(cdfy,0);int cdfHeight=cdfSize.y;ivec2 currentPixel=ivec2(gl_FragCoord.xy);if (currentPixel.y==0)
13
- {gl_FragColor=vec4(0.0);}
14
- else if (currentPixel.y==cdfHeight-2) {gl_FragColor=vec4(1.0);} else {float targetValue=fetchCDF(cdfHeight-1,currentPixel.x)*vUV.y;gl_FragColor=vec4(vec3(bisect(cdfHeight,targetValue,currentPixel.x)),1.0);}}`;
15
- // Sideeffect
16
- ShaderStore.ShadersStore[name] = shader;
17
- /** @internal */
18
- export const iblIcdfyPixelShader = { name, shader };
19
- //# sourceMappingURL=iblIcdfy.fragment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iblIcdfy.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/iblIcdfy.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,MAAM,GAAG;;;;;;;;;;gNAUiM,CAAC;AACjN,aAAa;AACb,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"iblIcdfyPixelShader\";\nconst shader = `precision highp sampler2D;\n#define PI 3.1415927\nvarying vec2 vUV;uniform sampler2D cdfy;float fetchCDF(int y,int invocationId) {return texelFetch(cdfy,ivec2(invocationId,y),0).x;}\nfloat bisect(int size,float targetValue,int invocationId)\n{int a=0,b=size-1;while (b-a>1) {int c=a+b>>1;if (fetchCDF(c,invocationId)<targetValue)\na=c;else\nb=c;}\nreturn mix(float(a),float(b),(targetValue-fetchCDF(a,invocationId))/(fetchCDF(b,invocationId)-fetchCDF(a,invocationId)))/float(size-1);}\nvoid main(void) {ivec2 cdfSize=textureSize(cdfy,0);int cdfHeight=cdfSize.y;ivec2 currentPixel=ivec2(gl_FragCoord.xy);if (currentPixel.y==0)\n{gl_FragColor=vec4(0.0);}\nelse if (currentPixel.y==cdfHeight-2) {gl_FragColor=vec4(1.0);} else {float targetValue=fetchCDF(cdfHeight-1,currentPixel.x)*vUV.y;gl_FragColor=vec4(vec3(bisect(cdfHeight,targetValue,currentPixel.x)),1.0);}}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const iblIcdfyPixelShader = { name, shader };\n"]}
@@ -1,5 +0,0 @@
1
- /** @internal */
2
- export declare const importanceSamplingDebugPixelShader: {
3
- name: string;
4
- shader: string;
5
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"importanceSamplingDebug.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/importanceSamplingDebug.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,oCAAoC,CAAC;AAClD,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCd,CAAC;AACF,aAAa;AACb,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC,gBAAgB;AAChB,MAAM,CAAC,MAAM,kCAAkC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"importanceSamplingDebugPixelShader\";\nconst shader = `precision highp samplerCube;\n#define PI 3.1415927\nvarying vec2 vUV;uniform sampler2D cdfy;uniform sampler2D icdfy;uniform sampler2D cdfx;uniform sampler2D icdfx;\n#ifdef IBL_USE_CUBE_MAP\nuniform samplerCube iblSource;\n#else\nuniform sampler2D iblSource;\n#endif\nuniform sampler2D textureSampler;\n#define cdfyVSize 0.4\n#define cdfxVSize 0.1\n#define cdfyHSize 0.5\nuniform vec4 sizeParams;\n#define offsetX sizeParams.x\n#define offsetY sizeParams.y\n#define widthScale sizeParams.z\n#define heightScale sizeParams.w\n#ifdef IBL_USE_CUBE_MAP\nvec3 equirectangularToCubemapDirection(vec2 uv) {float longitude=uv.x*2.0*PI-PI;float latitude=PI*0.5-uv.y*PI;vec3 direction;direction.x=cos(latitude)*sin(longitude);direction.y=sin(latitude);direction.z=cos(latitude)*cos(longitude);return direction;}\n#endif\nvoid main(void) {vec3 colour=vec3(0.0);vec2 uv =\nvec2((offsetX+vUV.x)*widthScale,(offsetY+vUV.y)*heightScale);vec3 backgroundColour=texture2D(textureSampler,vUV).rgb;const float iblStart=1.0-cdfyVSize;const float cdfyStart=1.0-2.0*cdfyVSize;const float cdfxStart=1.0-2.0*cdfyVSize-cdfxVSize;const float icdfxStart=1.0-2.0*cdfyVSize-2.0*cdfxVSize;\n#ifdef IBL_USE_CUBE_MAP\nvec3 direction=equirectangularToCubemapDirection(\n(uv-vec2(0.0,iblStart))*vec2(1.0,1.0/cdfyVSize));vec3 iblColour=textureCubeLodEXT(iblSource,direction,0.0).rgb;\n#else\nvec3 iblColour=texture2D(iblSource,(uv-vec2(0.0,iblStart)) *\nvec2(1.0,1.0/cdfyVSize))\n.rgb;\n#endif\nfloat cdfyColour =\ntexture2D(cdfy,(uv-vec2(0.0,cdfyStart))*vec2(2.0,1.0/cdfyVSize))\n.r;float icdfyColour =\ntexture2D(icdfy,(uv-vec2(0.5,cdfyStart))*vec2(2.0,1.0/cdfyVSize))\n.r;float cdfxColour =\ntexture2D(cdfx,(uv-vec2(0.0,cdfxStart))*vec2(1.0,1.0/cdfxVSize))\n.r;float icdfxColour=texture2D(icdfx,(uv-vec2(0.0,icdfxStart)) *\nvec2(1.0,1.0/cdfxVSize))\n.r;if (uv.x<0.0 || uv.x>1.0 || uv.y<0.0 || uv.y>1.0) {colour=backgroundColour;} else if (uv.y>iblStart) {colour+=iblColour;} else if (uv.y>cdfyStart && uv.x<0.5) {colour.r+=0.003*cdfyColour;} else if (uv.y>cdfyStart && uv.x>0.5) {colour.r+=icdfyColour;} else if (uv.y>cdfxStart) {colour.r+=0.00003*cdfxColour;} else if (uv.y>icdfxStart) {colour.r+=icdfxColour;}\ngl_FragColor=vec4(colour,1.0);glFragColor.rgb=mix(gl_FragColor.rgb,backgroundColour,0.5);}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const importanceSamplingDebugPixelShader = { name, shader };\n"]}
@@ -1,5 +0,0 @@
1
- /** @internal */
2
- export declare const iblIcdfxPixelShaderWGSL: {
3
- name: string;
4
- shader: string;
5
- };
@@ -1,18 +0,0 @@
1
- // Do not edit.
2
- import { ShaderStore } from "../Engines/shaderStore.js";
3
- const name = "iblIcdfxPixelShader";
4
- const shader = `#define PI 3.1415927
5
- varying vUV: vec2f;var cdfx: texture_2d<f32>;fn fetchCDF(x: u32)->f32 {return textureLoad(cdfx, vec2u(x,0),0).x;}
6
- fn bisect(size: u32,targetValue: f32)->f32
7
- {var a: u32=0;var b=size-1;while (b-a>1) {var c: u32=(a+b)>>1;if (fetchCDF(c)<targetValue) {a=c;}
8
- else {b=c;}}
9
- return mix( f32(a), f32(b),(targetValue-fetchCDF(a))/(fetchCDF(b)-fetchCDF(a)))/ f32(size-1);}
10
- @fragment
11
- fn main(input: FragmentInputs)->FragmentOutputs {var cdfSize: vec2u=textureDimensions(cdfx,0);var cdfWidth: u32=cdfSize.x;var icdfWidth: u32=cdfWidth-1;var currentPixel: vec2u= vec2u(fragmentInputs.position.xy);if (currentPixel.x==0)
12
- {fragmentOutputs.color= vec4f(0.0);}
13
- else if (currentPixel.x==icdfWidth-1) {fragmentOutputs.color= vec4f(1.0);} else {var targetValue: f32=fetchCDF(cdfWidth-1)*input.vUV.x;fragmentOutputs.color= vec4f( vec3f(bisect(cdfWidth,targetValue)),1.0);}}`;
14
- // Sideeffect
15
- ShaderStore.ShadersStoreWGSL[name] = shader;
16
- /** @internal */
17
- export const iblIcdfxPixelShaderWGSL = { name, shader };
18
- //# sourceMappingURL=iblIcdfx.fragment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iblIcdfx.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/iblIcdfx.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,MAAM,GAAG;;;;;;;;;iNASkM,CAAC;AAClN,aAAa;AACb,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,gBAAgB;AAChB,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"iblIcdfxPixelShader\";\nconst shader = `#define PI 3.1415927\nvarying vUV: vec2f;var cdfx: texture_2d<f32>;fn fetchCDF(x: u32)->f32 {return textureLoad(cdfx, vec2u(x,0),0).x;}\nfn bisect(size: u32,targetValue: f32)->f32\n{var a: u32=0;var b=size-1;while (b-a>1) {var c: u32=(a+b)>>1;if (fetchCDF(c)<targetValue) {a=c;}\nelse {b=c;}}\nreturn mix( f32(a), f32(b),(targetValue-fetchCDF(a))/(fetchCDF(b)-fetchCDF(a)))/ f32(size-1);}\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var cdfSize: vec2u=textureDimensions(cdfx,0);var cdfWidth: u32=cdfSize.x;var icdfWidth: u32=cdfWidth-1;var currentPixel: vec2u= vec2u(fragmentInputs.position.xy);if (currentPixel.x==0)\n{fragmentOutputs.color= vec4f(0.0);}\nelse if (currentPixel.x==icdfWidth-1) {fragmentOutputs.color= vec4f(1.0);} else {var targetValue: f32=fetchCDF(cdfWidth-1)*input.vUV.x;fragmentOutputs.color= vec4f( vec3f(bisect(cdfWidth,targetValue)),1.0);}}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const iblIcdfxPixelShaderWGSL = { name, shader };\n"]}
@@ -1,17 +0,0 @@
1
- // Do not edit.
2
- import { ShaderStore } from "../Engines/shaderStore.js";
3
- const name = "iblIcdfyPixelShader";
4
- const shader = `#define PI 3.1415927
5
- varying vUV: vec2f;var cdfy: texture_2d<f32>;fn fetchCDF(y: u32,invocationId: u32)->f32 {return textureLoad(cdfy, vec2u(invocationId,y),0).x;}
6
- fn bisect(size: u32,targetValue: f32,invocationId: u32)->f32
7
- {var a: u32=0;var b=size-1;while (b-a>1) {var c=(a+b)>>1;if (fetchCDF(c,invocationId)<targetValue) {a=c;}
8
- else {b=c;}}
9
- return mix( f32(a), f32(b),(targetValue-fetchCDF(a,invocationId))/(fetchCDF(b,invocationId)-fetchCDF(a,invocationId)))/ f32(size-1);}
10
- @fragment
11
- fn main(input: FragmentInputs)->FragmentOutputs {var cdfSize: vec2u=textureDimensions(cdfy,0);var cdfHeight: u32=cdfSize.y;var currentPixel: vec2u= vec2u(fragmentInputs.position.xy);if (currentPixel.y==0) {fragmentOutputs.color= vec4f(0.0);}
12
- else if (currentPixel.y==cdfHeight-2) {fragmentOutputs.color= vec4f(1.0);} else {var targetValue: f32=fetchCDF(cdfHeight-1,currentPixel.x)*input.vUV.y;fragmentOutputs.color= vec4f( vec3f(bisect(cdfHeight,targetValue,currentPixel.x)),1.0);}}`;
13
- // Sideeffect
14
- ShaderStore.ShadersStoreWGSL[name] = shader;
15
- /** @internal */
16
- export const iblIcdfyPixelShaderWGSL = { name, shader };
17
- //# sourceMappingURL=iblIcdfy.fragment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iblIcdfy.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/iblIcdfy.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,MAAM,GAAG;;;;;;;;iPAQkO,CAAC;AAClP,aAAa;AACb,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,gBAAgB;AAChB,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"iblIcdfyPixelShader\";\nconst shader = `#define PI 3.1415927\nvarying vUV: vec2f;var cdfy: texture_2d<f32>;fn fetchCDF(y: u32,invocationId: u32)->f32 {return textureLoad(cdfy, vec2u(invocationId,y),0).x;}\nfn bisect(size: u32,targetValue: f32,invocationId: u32)->f32\n{var a: u32=0;var b=size-1;while (b-a>1) {var c=(a+b)>>1;if (fetchCDF(c,invocationId)<targetValue) {a=c;}\nelse {b=c;}}\nreturn mix( f32(a), f32(b),(targetValue-fetchCDF(a,invocationId))/(fetchCDF(b,invocationId)-fetchCDF(a,invocationId)))/ f32(size-1);}\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var cdfSize: vec2u=textureDimensions(cdfy,0);var cdfHeight: u32=cdfSize.y;var currentPixel: vec2u= vec2u(fragmentInputs.position.xy);if (currentPixel.y==0) {fragmentOutputs.color= vec4f(0.0);}\nelse if (currentPixel.y==cdfHeight-2) {fragmentOutputs.color= vec4f(1.0);} else {var targetValue: f32=fetchCDF(cdfHeight-1,currentPixel.x)*input.vUV.y;fragmentOutputs.color= vec4f( vec3f(bisect(cdfHeight,targetValue,currentPixel.x)),1.0);}}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const iblIcdfyPixelShaderWGSL = { name, shader };\n"]}
@@ -1,5 +0,0 @@
1
- /** @internal */
2
- export declare const importanceSamplingDebugPixelShaderWGSL: {
3
- name: string;
4
- shader: string;
5
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"importanceSamplingDebug.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/importanceSamplingDebug.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,oCAAoC,CAAC;AAClD,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oEAgCqD,CAAC;AACrE,aAAa;AACb,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"importanceSamplingDebugPixelShader\";\nconst shader = `#define PI 3.1415927\nvarying vUV: vec2f;var cdfySampler: sampler;var cdfy: texture_2d<f32>;var icdfySampler: sampler;var icdfy: texture_2d<f32>;var cdfxSampler: sampler;var cdfx: texture_2d<f32>;var icdfxSampler: sampler;var icdfx: texture_2d<f32>;\n#ifdef IBL_USE_CUBE_MAP\nvar iblSourceSampler: sampler;var iblSource: texture_cube<f32>;\n#else\nvar iblSourceSampler: sampler;var iblSource: texture_2d<f32>;\n#endif\nvar textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#define cdfyVSize 0.4\n#define cdfxVSize 0.1\n#define cdfyHSize 0.5\nuniform sizeParams: vec4f;\n#ifdef IBL_USE_CUBE_MAP\nfn equirectangularToCubemapDirection(uv: vec2f)->vec3f {var longitude: f32=uv.x*2.0*PI-PI;var latitude: f32=PI*0.5-uv.y*PI;var direction: vec3f;direction.x=cos(latitude)*sin(longitude);direction.y=sin(latitude);direction.z=cos(latitude)*cos(longitude);return direction;}\n#endif\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs { \nvar colour: vec3f= vec3f(0.0);var uv: vec2f =\nvec2f((uniforms.sizeParams.x+input.vUV.x)*uniforms.sizeParams.z,(uniforms.sizeParams.y+input.vUV.y)*uniforms.sizeParams.w);var backgroundColour: vec3f=textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb;const iblStart: f32=1.0-cdfyVSize;const cdfyStart: f32=1.0-2.0*cdfyVSize;const cdfxStart: f32=1.0-2.0*cdfyVSize-cdfxVSize;const icdfxStart: f32=1.0-2.0*cdfyVSize-2.0*cdfxVSize;\n#ifdef IBL_USE_CUBE_MAP\nvar direction: vec3f=equirectangularToCubemapDirection(\n(uv- vec2f(0.0,iblStart))* vec2f(1.0,1.0/cdfyVSize));var iblColour: vec3f=textureSampleLevel(iblSource,iblSourceSampler,direction,0.0).rgb;\n#else\nvar iblColour: vec3f=textureSample(iblSource,iblSourceSampler,(uv- vec2f(0.0,iblStart)) *\nvec2f(1.0,1.0/cdfyVSize))\n.rgb;\n#endif\nvar cdfyColour: f32 =\ntextureSample(cdfy,cdfySampler,(uv- vec2f(0.0,cdfyStart))* vec2f(2.0,1.0/cdfyVSize)).r;var icdfyColour: f32 =\ntextureSample(icdfy,icdfySampler,(uv- vec2f(0.5,cdfyStart))* vec2f(2.0,1.0/cdfyVSize)).r;var cdfxColour: f32 =\ntextureSample(cdfx,cdfxSampler,(uv- vec2f(0.0,cdfxStart))* vec2f(1.0,1.0/cdfxVSize)).r;var icdfxColour: f32=textureSample(icdfx,icdfxSampler,(uv- vec2f(0.0,icdfxStart)) *\nvec2f(1.0,1.0/cdfxVSize)).r;if (uv.x<0.0 || uv.x>1.0 || uv.y<0.0 || uv.y>1.0) {colour=backgroundColour;} else if (uv.y>iblStart) {colour+=iblColour;} else if (uv.y>cdfyStart && uv.x<0.5) {colour.r+=0.003*cdfyColour;} else if (uv.y>cdfyStart && uv.x>0.5) {colour.r+=icdfyColour;} else if (uv.y>cdfxStart) {colour.r+=0.00003*cdfxColour;} else if (uv.y>icdfxStart) {colour.r+=icdfxColour;}\nfragmentOutputs.color =vec4(mix(colour,backgroundColour,0.5),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const importanceSamplingDebugPixelShaderWGSL = { name, shader };\n"]}