@babylonjs/viewer 7.35.1 → 7.35.2-alpha

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 (599) hide show
  1. package/assets/photoStudio.env +0 -0
  2. package/dist/babylon-viewer.esm.js +2 -0
  3. package/dist/babylon-viewer.esm.js.map +1 -0
  4. package/dist/babylon-viewer.esm.min.js +2 -0
  5. package/dist/babylon-viewer.esm.min.js.map +1 -0
  6. package/dist/chunks/EXT_lights_image_based-I6dGStsg.esm.min.js +2 -0
  7. package/dist/chunks/EXT_lights_image_based-I6dGStsg.esm.min.js.map +1 -0
  8. package/dist/chunks/EXT_lights_image_based-gqNsOFez.esm.js +171 -0
  9. package/dist/chunks/EXT_lights_image_based-gqNsOFez.esm.js.map +1 -0
  10. package/dist/chunks/EXT_mesh_gpu_instancing-DFS6xr5n.esm.min.js +2 -0
  11. package/dist/chunks/EXT_mesh_gpu_instancing-DFS6xr5n.esm.min.js.map +1 -0
  12. package/dist/chunks/EXT_mesh_gpu_instancing-lOryCKIX.esm.js +86 -0
  13. package/dist/chunks/EXT_mesh_gpu_instancing-lOryCKIX.esm.js.map +1 -0
  14. package/dist/chunks/EXT_meshopt_compression-BQZ0hBff.esm.js +134 -0
  15. package/dist/chunks/EXT_meshopt_compression-BQZ0hBff.esm.js.map +1 -0
  16. package/dist/chunks/EXT_meshopt_compression-Dv_WoTzw.esm.min.js +2 -0
  17. package/dist/chunks/EXT_meshopt_compression-Dv_WoTzw.esm.min.js.map +1 -0
  18. package/dist/chunks/EXT_texture_avif-BLib9ZsW.esm.js +44 -0
  19. package/dist/chunks/EXT_texture_avif-BLib9ZsW.esm.js.map +1 -0
  20. package/dist/chunks/EXT_texture_avif-BMUg03OA.esm.min.js +2 -0
  21. package/dist/chunks/EXT_texture_avif-BMUg03OA.esm.min.js.map +1 -0
  22. package/dist/chunks/EXT_texture_webp-DPJIMXIs.esm.js +43 -0
  23. package/dist/chunks/EXT_texture_webp-DPJIMXIs.esm.js.map +1 -0
  24. package/dist/chunks/EXT_texture_webp-DPzL7RO5.esm.min.js +2 -0
  25. package/dist/chunks/EXT_texture_webp-DPzL7RO5.esm.min.js.map +1 -0
  26. package/dist/chunks/ExtrasAsMetadata-CL0k4Btm.esm.js +64 -0
  27. package/dist/chunks/ExtrasAsMetadata-CL0k4Btm.esm.js.map +1 -0
  28. package/dist/chunks/ExtrasAsMetadata-O8gteBcK.esm.min.js +2 -0
  29. package/dist/chunks/ExtrasAsMetadata-O8gteBcK.esm.min.js.map +1 -0
  30. package/dist/chunks/KHR_animation_pointer-BFyC08_R.esm.js +343 -0
  31. package/dist/chunks/KHR_animation_pointer-BFyC08_R.esm.js.map +1 -0
  32. package/dist/chunks/KHR_animation_pointer-BZvneRZ7.esm.min.js +2 -0
  33. package/dist/chunks/KHR_animation_pointer-BZvneRZ7.esm.min.js.map +1 -0
  34. package/dist/chunks/KHR_draco_mesh_compression-CjzLflHM.esm.js +610 -0
  35. package/dist/chunks/KHR_draco_mesh_compression-CjzLflHM.esm.js.map +1 -0
  36. package/dist/chunks/KHR_draco_mesh_compression-sHuqiNW-.esm.min.js +2 -0
  37. package/dist/chunks/KHR_draco_mesh_compression-sHuqiNW-.esm.min.js.map +1 -0
  38. package/dist/chunks/KHR_interactivity-CA1NQ9Fc.esm.js +4033 -0
  39. package/dist/chunks/KHR_interactivity-CA1NQ9Fc.esm.js.map +1 -0
  40. package/dist/chunks/KHR_interactivity-CVvexOkD.esm.min.js +2 -0
  41. package/dist/chunks/KHR_interactivity-CVvexOkD.esm.min.js.map +1 -0
  42. package/dist/chunks/KHR_lights_punctual-CIEvgNk7.esm.js +1253 -0
  43. package/dist/chunks/KHR_lights_punctual-CIEvgNk7.esm.js.map +1 -0
  44. package/dist/chunks/KHR_lights_punctual-CTm7ey2n.esm.min.js +2 -0
  45. package/dist/chunks/KHR_lights_punctual-CTm7ey2n.esm.min.js.map +1 -0
  46. package/dist/chunks/KHR_materials_anisotropy-B8l2iZjl.esm.min.js +2 -0
  47. package/dist/chunks/KHR_materials_anisotropy-B8l2iZjl.esm.min.js.map +1 -0
  48. package/dist/chunks/KHR_materials_anisotropy-vnjucfaw.esm.js +65 -0
  49. package/dist/chunks/KHR_materials_anisotropy-vnjucfaw.esm.js.map +1 -0
  50. package/dist/chunks/KHR_materials_clearcoat-BhZGttd-.esm.js +96 -0
  51. package/dist/chunks/KHR_materials_clearcoat-BhZGttd-.esm.js.map +1 -0
  52. package/dist/chunks/KHR_materials_clearcoat-BlhYeFYN.esm.min.js +2 -0
  53. package/dist/chunks/KHR_materials_clearcoat-BlhYeFYN.esm.min.js.map +1 -0
  54. package/dist/chunks/KHR_materials_diffuse_transmission-DJiKAnah.esm.js +97 -0
  55. package/dist/chunks/KHR_materials_diffuse_transmission-DJiKAnah.esm.js.map +1 -0
  56. package/dist/chunks/KHR_materials_diffuse_transmission-DmzdysxQ.esm.min.js +2 -0
  57. package/dist/chunks/KHR_materials_diffuse_transmission-DmzdysxQ.esm.min.js.map +1 -0
  58. package/dist/chunks/KHR_materials_dispersion-B1e8i3BQ.esm.js +62 -0
  59. package/dist/chunks/KHR_materials_dispersion-B1e8i3BQ.esm.js.map +1 -0
  60. package/dist/chunks/KHR_materials_dispersion-B_uhZ_r0.esm.min.js +2 -0
  61. package/dist/chunks/KHR_materials_dispersion-B_uhZ_r0.esm.min.js.map +1 -0
  62. package/dist/chunks/KHR_materials_emissive_strength-Bdc1fhX3.esm.js +55 -0
  63. package/dist/chunks/KHR_materials_emissive_strength-Bdc1fhX3.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_emissive_strength-CujgLUsQ.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_emissive_strength-CujgLUsQ.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_ior-DAITk5f0.esm.js +64 -0
  67. package/dist/chunks/KHR_materials_ior-DAITk5f0.esm.js.map +1 -0
  68. package/dist/chunks/KHR_materials_ior-DDjIIueh.esm.min.js +2 -0
  69. package/dist/chunks/KHR_materials_ior-DDjIIueh.esm.min.js.map +1 -0
  70. package/dist/chunks/KHR_materials_iridescence-Bs4XQdUc.esm.js +72 -0
  71. package/dist/chunks/KHR_materials_iridescence-Bs4XQdUc.esm.js.map +1 -0
  72. package/dist/chunks/KHR_materials_iridescence-CofsEJxf.esm.min.js +2 -0
  73. package/dist/chunks/KHR_materials_iridescence-CofsEJxf.esm.min.js.map +1 -0
  74. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D2cm0Qti.esm.js +81 -0
  75. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D2cm0Qti.esm.js.map +1 -0
  76. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Na22WakQ.esm.min.js +2 -0
  77. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Na22WakQ.esm.min.js.map +1 -0
  78. package/dist/chunks/KHR_materials_sheen-BCY5GSrv.esm.js +85 -0
  79. package/dist/chunks/KHR_materials_sheen-BCY5GSrv.esm.js.map +1 -0
  80. package/dist/chunks/KHR_materials_sheen-BEHiRviB.esm.min.js +2 -0
  81. package/dist/chunks/KHR_materials_sheen-BEHiRviB.esm.min.js.map +1 -0
  82. package/dist/chunks/KHR_materials_specular-BFt2dwLj.esm.js +75 -0
  83. package/dist/chunks/KHR_materials_specular-BFt2dwLj.esm.js.map +1 -0
  84. package/dist/chunks/KHR_materials_specular-BGIPQ1rQ.esm.min.js +2 -0
  85. package/dist/chunks/KHR_materials_specular-BGIPQ1rQ.esm.min.js.map +1 -0
  86. package/dist/chunks/KHR_materials_transmission-BgbdeIB3.esm.js +307 -0
  87. package/dist/chunks/KHR_materials_transmission-BgbdeIB3.esm.js.map +1 -0
  88. package/dist/chunks/KHR_materials_transmission-C-tRBJu4.esm.min.js +2 -0
  89. package/dist/chunks/KHR_materials_transmission-C-tRBJu4.esm.min.js.map +1 -0
  90. package/dist/chunks/KHR_materials_unlit-CcRsVA_x.esm.min.js +2 -0
  91. package/dist/chunks/KHR_materials_unlit-CcRsVA_x.esm.min.js.map +1 -0
  92. package/dist/chunks/KHR_materials_unlit-DNhfBz4E.esm.js +74 -0
  93. package/dist/chunks/KHR_materials_unlit-DNhfBz4E.esm.js.map +1 -0
  94. package/dist/chunks/KHR_materials_variants-77adpgBk.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_variants-77adpgBk.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_variants-CSaSbOzl.esm.js +238 -0
  97. package/dist/chunks/KHR_materials_variants-CSaSbOzl.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_volume-AOCoYNKI.esm.min.js +2 -0
  99. package/dist/chunks/KHR_materials_volume-AOCoYNKI.esm.min.js.map +1 -0
  100. package/dist/chunks/KHR_materials_volume-BWHhpmNH.esm.js +87 -0
  101. package/dist/chunks/KHR_materials_volume-BWHhpmNH.esm.js.map +1 -0
  102. package/dist/chunks/KHR_mesh_quantization-BB7EL2M1.esm.min.js +2 -0
  103. package/dist/chunks/KHR_mesh_quantization-BB7EL2M1.esm.min.js.map +1 -0
  104. package/dist/chunks/KHR_mesh_quantization-D2-xHrHe.esm.js +26 -0
  105. package/dist/chunks/KHR_mesh_quantization-D2-xHrHe.esm.js.map +1 -0
  106. package/dist/chunks/KHR_node_visibility-Di8sseTY.esm.min.js +2 -0
  107. package/dist/chunks/KHR_node_visibility-Di8sseTY.esm.min.js.map +1 -0
  108. package/dist/chunks/KHR_node_visibility-qzuskO3u.esm.js +46 -0
  109. package/dist/chunks/KHR_node_visibility-qzuskO3u.esm.js.map +1 -0
  110. package/dist/chunks/KHR_texture_basisu-BUP7AAVF.esm.min.js +2 -0
  111. package/dist/chunks/KHR_texture_basisu-BUP7AAVF.esm.min.js.map +1 -0
  112. package/dist/chunks/KHR_texture_basisu-C60Bt2Ic.esm.js +43 -0
  113. package/dist/chunks/KHR_texture_basisu-C60Bt2Ic.esm.js.map +1 -0
  114. package/dist/chunks/KHR_texture_transform-BUOLLEYP.esm.min.js +2 -0
  115. package/dist/chunks/KHR_texture_transform-BUOLLEYP.esm.min.js.map +1 -0
  116. package/dist/chunks/KHR_texture_transform-Dg-cPDyd.esm.js +63 -0
  117. package/dist/chunks/KHR_texture_transform-Dg-cPDyd.esm.js.map +1 -0
  118. package/dist/chunks/KHR_xmp_json_ld-CsFE0gfF.esm.min.js +2 -0
  119. package/dist/chunks/KHR_xmp_json_ld-CsFE0gfF.esm.min.js.map +1 -0
  120. package/dist/chunks/KHR_xmp_json_ld-DgCKwEEO.esm.js +51 -0
  121. package/dist/chunks/KHR_xmp_json_ld-DgCKwEEO.esm.js.map +1 -0
  122. package/dist/chunks/MSFT_audio_emitter-VHBse1UH.esm.js +2207 -0
  123. package/dist/chunks/MSFT_audio_emitter-VHBse1UH.esm.js.map +1 -0
  124. package/dist/chunks/MSFT_audio_emitter-iFlly5g-.esm.min.js +2 -0
  125. package/dist/chunks/MSFT_audio_emitter-iFlly5g-.esm.min.js.map +1 -0
  126. package/dist/chunks/MSFT_lod-Bwsctx65.esm.js +337 -0
  127. package/dist/chunks/MSFT_lod-Bwsctx65.esm.js.map +1 -0
  128. package/dist/chunks/MSFT_lod-CbiRs9Kc.esm.min.js +2 -0
  129. package/dist/chunks/MSFT_lod-CbiRs9Kc.esm.min.js.map +1 -0
  130. package/dist/chunks/MSFT_minecraftMesh-Dl6WKmxG.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_minecraftMesh-Dl6WKmxG.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_minecraftMesh-MBaTkra4.esm.js +46 -0
  133. package/dist/chunks/MSFT_minecraftMesh-MBaTkra4.esm.js.map +1 -0
  134. package/dist/chunks/MSFT_sRGBFactors-DJvNL0IJ.esm.js +47 -0
  135. package/dist/chunks/MSFT_sRGBFactors-DJvNL0IJ.esm.js.map +1 -0
  136. package/dist/chunks/MSFT_sRGBFactors-Drf21tSs.esm.min.js +2 -0
  137. package/dist/chunks/MSFT_sRGBFactors-Drf21tSs.esm.min.js.map +1 -0
  138. package/dist/chunks/animationGroup-CgbfLDgX.esm.min.js +2 -0
  139. package/dist/chunks/animationGroup-CgbfLDgX.esm.min.js.map +1 -0
  140. package/dist/chunks/animationGroup-eowyl97W.esm.js +2482 -0
  141. package/dist/chunks/animationGroup-eowyl97W.esm.js.map +1 -0
  142. package/dist/chunks/assetContainer-Bsqe9swA.esm.min.js +2 -0
  143. package/dist/chunks/assetContainer-Bsqe9swA.esm.min.js.map +1 -0
  144. package/dist/chunks/assetContainer-DO29qm5j.esm.js +1720 -0
  145. package/dist/chunks/assetContainer-DO29qm5j.esm.js.map +1 -0
  146. package/dist/chunks/audioEngine-ByiWmXaG.esm.js +305 -0
  147. package/dist/chunks/audioEngine-ByiWmXaG.esm.js.map +1 -0
  148. package/dist/chunks/audioEngine-Tyl5gl5Y.esm.min.js +2 -0
  149. package/dist/chunks/audioEngine-Tyl5gl5Y.esm.min.js.map +1 -0
  150. package/dist/chunks/bakedVertexAnimation-BxUlezN-.esm.min.js +2 -0
  151. package/dist/chunks/bakedVertexAnimation-BxUlezN-.esm.min.js.map +1 -0
  152. package/dist/chunks/bakedVertexAnimation-Co7tF_AI.esm.js +114 -0
  153. package/dist/chunks/bakedVertexAnimation-Co7tF_AI.esm.js.map +1 -0
  154. package/dist/chunks/basisTextureLoader-C6h2HrT5.esm.min.js +2 -0
  155. package/dist/chunks/basisTextureLoader-C6h2HrT5.esm.min.js.map +1 -0
  156. package/dist/chunks/basisTextureLoader-CFdjlTQv.esm.js +600 -0
  157. package/dist/chunks/basisTextureLoader-CFdjlTQv.esm.js.map +1 -0
  158. package/dist/chunks/dds--AOY6KMC.esm.js +540 -0
  159. package/dist/chunks/dds--AOY6KMC.esm.js.map +1 -0
  160. package/dist/chunks/dds-mtdSIG7y.esm.min.js +2 -0
  161. package/dist/chunks/dds-mtdSIG7y.esm.min.js.map +1 -0
  162. package/dist/chunks/ddsTextureLoader-CS64tfyO.esm.min.js +2 -0
  163. package/dist/chunks/ddsTextureLoader-CS64tfyO.esm.min.js.map +1 -0
  164. package/dist/chunks/ddsTextureLoader-Cm3kvldL.esm.js +88 -0
  165. package/dist/chunks/ddsTextureLoader-Cm3kvldL.esm.js.map +1 -0
  166. package/dist/chunks/decalFragment-B_EoELPt.esm.min.js +2 -0
  167. package/dist/chunks/decalFragment-B_EoELPt.esm.min.js.map +1 -0
  168. package/dist/chunks/decalFragment-CrQo80qe.esm.js +18 -0
  169. package/dist/chunks/decalFragment-CrQo80qe.esm.js.map +1 -0
  170. package/dist/chunks/default.fragment-B7BZK7Wn.esm.js +433 -0
  171. package/dist/chunks/default.fragment-B7BZK7Wn.esm.js.map +1 -0
  172. package/dist/chunks/default.fragment-CDe0T1Vr.esm.min.js +2 -0
  173. package/dist/chunks/default.fragment-CDe0T1Vr.esm.min.js.map +1 -0
  174. package/dist/chunks/default.fragment-DE-fL82A.esm.min.js +2 -0
  175. package/dist/chunks/default.fragment-DE-fL82A.esm.min.js.map +1 -0
  176. package/dist/chunks/default.fragment-OyO2ek5x.esm.js +497 -0
  177. package/dist/chunks/default.fragment-OyO2ek5x.esm.js.map +1 -0
  178. package/dist/chunks/default.vertex-CNUfzDP1.esm.js +181 -0
  179. package/dist/chunks/default.vertex-CNUfzDP1.esm.js.map +1 -0
  180. package/dist/chunks/default.vertex-CfR6AC0W.esm.js +201 -0
  181. package/dist/chunks/default.vertex-CfR6AC0W.esm.js.map +1 -0
  182. package/dist/chunks/default.vertex-CxON4TPV.esm.min.js +2 -0
  183. package/dist/chunks/default.vertex-CxON4TPV.esm.min.js.map +1 -0
  184. package/dist/chunks/default.vertex-vn2_ZsRf.esm.min.js +2 -0
  185. package/dist/chunks/default.vertex-vn2_ZsRf.esm.min.js.map +1 -0
  186. package/dist/chunks/defaultUboDeclaration-DOEnRk8l.esm.min.js +2 -0
  187. package/dist/chunks/defaultUboDeclaration-DOEnRk8l.esm.min.js.map +1 -0
  188. package/dist/chunks/defaultUboDeclaration-D_cdCN09.esm.js +15 -0
  189. package/dist/chunks/defaultUboDeclaration-D_cdCN09.esm.js.map +1 -0
  190. package/dist/chunks/defaultUboDeclaration-DulGgNIT.esm.js +13 -0
  191. package/dist/chunks/defaultUboDeclaration-DulGgNIT.esm.js.map +1 -0
  192. package/dist/chunks/defaultUboDeclaration-DuvDKzIc.esm.min.js +2 -0
  193. package/dist/chunks/defaultUboDeclaration-DuvDKzIc.esm.min.js.map +1 -0
  194. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
  195. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
  196. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
  197. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
  198. package/dist/chunks/dumpTools-CDmW-p2A.esm.js +200 -0
  199. package/dist/chunks/dumpTools-CDmW-p2A.esm.js.map +1 -0
  200. package/dist/chunks/dumpTools-hJHAozcu.esm.min.js +2 -0
  201. package/dist/chunks/dumpTools-hJHAozcu.esm.min.js.map +1 -0
  202. package/dist/chunks/engine-CfBkxMlv.esm.min.js +2 -0
  203. package/dist/chunks/engine-CfBkxMlv.esm.min.js.map +1 -0
  204. package/dist/chunks/engine-DaA20vkg.esm.js +2187 -0
  205. package/dist/chunks/engine-DaA20vkg.esm.js.map +1 -0
  206. package/dist/chunks/engine.common-B1nX1uOv.esm.min.js +2 -0
  207. package/dist/chunks/engine.common-B1nX1uOv.esm.min.js.map +1 -0
  208. package/dist/chunks/engine.common-Da03TQs0.esm.js +1103 -0
  209. package/dist/chunks/engine.common-Da03TQs0.esm.js.map +1 -0
  210. package/dist/chunks/envTextureLoader-BRXi1pZo.esm.js +64 -0
  211. package/dist/chunks/envTextureLoader-BRXi1pZo.esm.js.map +1 -0
  212. package/dist/chunks/envTextureLoader-CS1eu96I.esm.min.js +2 -0
  213. package/dist/chunks/envTextureLoader-CS1eu96I.esm.min.js.map +1 -0
  214. package/dist/chunks/environmentTextureTools-BCSQExyv.esm.js +382 -0
  215. package/dist/chunks/environmentTextureTools-BCSQExyv.esm.js.map +1 -0
  216. package/dist/chunks/environmentTextureTools-DaBia0zg.esm.min.js +2 -0
  217. package/dist/chunks/environmentTextureTools-DaBia0zg.esm.min.js.map +1 -0
  218. package/dist/chunks/exrTextureLoader-DOcIuOg9.esm.min.js +2 -0
  219. package/dist/chunks/exrTextureLoader-DOcIuOg9.esm.min.js.map +1 -0
  220. package/dist/chunks/exrTextureLoader-NVzNFU10.esm.js +1682 -0
  221. package/dist/chunks/exrTextureLoader-NVzNFU10.esm.js.map +1 -0
  222. package/dist/chunks/fogFragment-7C9DmW8b.esm.js +102 -0
  223. package/dist/chunks/fogFragment-7C9DmW8b.esm.js.map +1 -0
  224. package/dist/chunks/fogFragment-B9F5aJAx.esm.min.js +2 -0
  225. package/dist/chunks/fogFragment-B9F5aJAx.esm.min.js.map +1 -0
  226. package/dist/chunks/fogFragment-BnQp0Spj.esm.js +101 -0
  227. package/dist/chunks/fogFragment-BnQp0Spj.esm.js.map +1 -0
  228. package/dist/chunks/fogFragment-Rqu9S2gV.esm.min.js +2 -0
  229. package/dist/chunks/fogFragment-Rqu9S2gV.esm.min.js.map +1 -0
  230. package/dist/chunks/fresnelFunction--bGC1bW6.esm.min.js +2 -0
  231. package/dist/chunks/fresnelFunction--bGC1bW6.esm.min.js.map +1 -0
  232. package/dist/chunks/fresnelFunction-YurpC61U.esm.js +12 -0
  233. package/dist/chunks/fresnelFunction-YurpC61U.esm.js.map +1 -0
  234. package/dist/chunks/glTFLoader--eb4oZZe.esm.min.js +2 -0
  235. package/dist/chunks/glTFLoader--eb4oZZe.esm.min.js.map +1 -0
  236. package/dist/chunks/glTFLoader-DDABr3tc.esm.js +7595 -0
  237. package/dist/chunks/glTFLoader-DDABr3tc.esm.js.map +1 -0
  238. package/dist/chunks/glTFLoaderAnimation-C_jvKQZc.esm.min.js +2 -0
  239. package/dist/chunks/glTFLoaderAnimation-C_jvKQZc.esm.min.js.map +1 -0
  240. package/dist/chunks/glTFLoaderAnimation-Ce1T-HK4.esm.js +77 -0
  241. package/dist/chunks/glTFLoaderAnimation-Ce1T-HK4.esm.js.map +1 -0
  242. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  243. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  244. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  245. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  246. package/dist/chunks/harmonicsFunctions-BVJDExzF.esm.js +35 -0
  247. package/dist/chunks/harmonicsFunctions-BVJDExzF.esm.js.map +1 -0
  248. package/dist/chunks/harmonicsFunctions-Cpf19SYh.esm.min.js +2 -0
  249. package/dist/chunks/harmonicsFunctions-Cpf19SYh.esm.min.js.map +1 -0
  250. package/dist/chunks/harmonicsFunctions-EwGi7mvH.esm.js +34 -0
  251. package/dist/chunks/harmonicsFunctions-EwGi7mvH.esm.js.map +1 -0
  252. package/dist/chunks/harmonicsFunctions-sCDYMnE7.esm.min.js +2 -0
  253. package/dist/chunks/harmonicsFunctions-sCDYMnE7.esm.min.js.map +1 -0
  254. package/dist/chunks/hdrTextureLoader-CHt5g_Ro.esm.js +252 -0
  255. package/dist/chunks/hdrTextureLoader-CHt5g_Ro.esm.js.map +1 -0
  256. package/dist/chunks/hdrTextureLoader-CcljcQGM.esm.min.js +2 -0
  257. package/dist/chunks/hdrTextureLoader-CcljcQGM.esm.min.js.map +1 -0
  258. package/dist/chunks/helperFunctions-BLQP90J_.esm.min.js +2 -0
  259. package/dist/chunks/helperFunctions-BLQP90J_.esm.min.js.map +1 -0
  260. package/dist/chunks/helperFunctions-BeWEDUrw.esm.js +108 -0
  261. package/dist/chunks/helperFunctions-BeWEDUrw.esm.js.map +1 -0
  262. package/dist/chunks/helperFunctions-CkmR3WUA.esm.min.js +2 -0
  263. package/dist/chunks/helperFunctions-CkmR3WUA.esm.min.js.map +1 -0
  264. package/dist/chunks/helperFunctions-Vnio5Zy4.esm.js +80 -0
  265. package/dist/chunks/helperFunctions-Vnio5Zy4.esm.js.map +1 -0
  266. package/dist/chunks/index-CVMH5-nD.esm.js +74148 -0
  267. package/dist/chunks/index-CVMH5-nD.esm.js.map +1 -0
  268. package/dist/chunks/index-bkYfr-SD.esm.min.js +57 -0
  269. package/dist/chunks/index-bkYfr-SD.esm.min.js.map +1 -0
  270. package/dist/chunks/ktxTextureLoader-CmYn3AjU.esm.min.js +2 -0
  271. package/dist/chunks/ktxTextureLoader-CmYn3AjU.esm.min.js.map +1 -0
  272. package/dist/chunks/ktxTextureLoader-Ct4ygDpl.esm.js +814 -0
  273. package/dist/chunks/ktxTextureLoader-Ct4ygDpl.esm.js.map +1 -0
  274. package/dist/chunks/logDepthDeclaration-CCVJgklB.esm.js +11 -0
  275. package/dist/chunks/logDepthDeclaration-CCVJgklB.esm.js.map +1 -0
  276. package/dist/chunks/logDepthDeclaration-CmefuysH.esm.min.js +2 -0
  277. package/dist/chunks/logDepthDeclaration-CmefuysH.esm.min.js.map +1 -0
  278. package/dist/chunks/logDepthDeclaration-kbT8jgiS.esm.js +35 -0
  279. package/dist/chunks/logDepthDeclaration-kbT8jgiS.esm.js.map +1 -0
  280. package/dist/chunks/logDepthDeclaration-utQE6RQm.esm.min.js +2 -0
  281. package/dist/chunks/logDepthDeclaration-utQE6RQm.esm.min.js.map +1 -0
  282. package/dist/chunks/logDepthVertex-BwAXuZcJ.esm.js +77 -0
  283. package/dist/chunks/logDepthVertex-BwAXuZcJ.esm.js.map +1 -0
  284. package/dist/chunks/logDepthVertex-CIU5ihJc.esm.min.js +2 -0
  285. package/dist/chunks/logDepthVertex-CIU5ihJc.esm.min.js.map +1 -0
  286. package/dist/chunks/logDepthVertex-DBdj3JQF.esm.js +77 -0
  287. package/dist/chunks/logDepthVertex-DBdj3JQF.esm.js.map +1 -0
  288. package/dist/chunks/logDepthVertex-L5SVOP7a.esm.min.js +2 -0
  289. package/dist/chunks/logDepthVertex-L5SVOP7a.esm.min.js.map +1 -0
  290. package/dist/chunks/mainUVVaryingDeclaration-BjN3rZcV.esm.js +11 -0
  291. package/dist/chunks/mainUVVaryingDeclaration-BjN3rZcV.esm.js.map +1 -0
  292. package/dist/chunks/mainUVVaryingDeclaration-CS8fR4k6.esm.min.js +2 -0
  293. package/dist/chunks/mainUVVaryingDeclaration-CS8fR4k6.esm.min.js.map +1 -0
  294. package/dist/chunks/mainUVVaryingDeclaration-F_ldv7kC.esm.min.js +2 -0
  295. package/dist/chunks/mainUVVaryingDeclaration-F_ldv7kC.esm.min.js.map +1 -0
  296. package/dist/chunks/mainUVVaryingDeclaration-JJ1eiwN7.esm.js +11 -0
  297. package/dist/chunks/mainUVVaryingDeclaration-JJ1eiwN7.esm.js.map +1 -0
  298. package/dist/chunks/meshUboDeclaration-Cqhjf76p.esm.min.js +2 -0
  299. package/dist/chunks/meshUboDeclaration-Cqhjf76p.esm.min.js.map +1 -0
  300. package/dist/chunks/meshUboDeclaration-TC3Qb9qA.esm.js +24 -0
  301. package/dist/chunks/meshUboDeclaration-TC3Qb9qA.esm.js.map +1 -0
  302. package/dist/chunks/objFileLoader-DUbUzdM7.esm.js +1338 -0
  303. package/dist/chunks/objFileLoader-DUbUzdM7.esm.js.map +1 -0
  304. package/dist/chunks/objFileLoader-cuX0R9Ll.esm.min.js +2 -0
  305. package/dist/chunks/objFileLoader-cuX0R9Ll.esm.min.js.map +1 -0
  306. package/dist/chunks/oitFragment-BuvtdYuN.esm.min.js +2 -0
  307. package/dist/chunks/oitFragment-BuvtdYuN.esm.min.js.map +1 -0
  308. package/dist/chunks/oitFragment-CsHXm-hs.esm.min.js +2 -0
  309. package/dist/chunks/oitFragment-CsHXm-hs.esm.min.js.map +1 -0
  310. package/dist/chunks/oitFragment-Jsj4VCRm.esm.js +1051 -0
  311. package/dist/chunks/oitFragment-Jsj4VCRm.esm.js.map +1 -0
  312. package/dist/chunks/oitFragment-bE1j7vLE.esm.js +1210 -0
  313. package/dist/chunks/oitFragment-bE1j7vLE.esm.js.map +1 -0
  314. package/dist/chunks/pass.fragment-7Tm4v4I5.esm.min.js +2 -0
  315. package/dist/chunks/pass.fragment-7Tm4v4I5.esm.min.js.map +1 -0
  316. package/dist/chunks/pass.fragment-Bim4VPEO.esm.js +15 -0
  317. package/dist/chunks/pass.fragment-Bim4VPEO.esm.js.map +1 -0
  318. package/dist/chunks/pass.fragment-CYz9acmH.esm.js +15 -0
  319. package/dist/chunks/pass.fragment-CYz9acmH.esm.js.map +1 -0
  320. package/dist/chunks/pass.fragment-CzPpw3iK.esm.min.js +2 -0
  321. package/dist/chunks/pass.fragment-CzPpw3iK.esm.min.js.map +1 -0
  322. package/dist/chunks/pbr.fragment-C0EyEtjU.esm.js +3218 -0
  323. package/dist/chunks/pbr.fragment-C0EyEtjU.esm.js.map +1 -0
  324. package/dist/chunks/pbr.fragment-D7KGHlr3.esm.min.js +2 -0
  325. package/dist/chunks/pbr.fragment-D7KGHlr3.esm.min.js.map +1 -0
  326. package/dist/chunks/pbr.fragment-DRo704mz.esm.js +3164 -0
  327. package/dist/chunks/pbr.fragment-DRo704mz.esm.js.map +1 -0
  328. package/dist/chunks/pbr.fragment-Dw30RsZq.esm.min.js +2 -0
  329. package/dist/chunks/pbr.fragment-Dw30RsZq.esm.min.js.map +1 -0
  330. package/dist/chunks/pbr.vertex-BFjD6j1a.esm.min.js +2 -0
  331. package/dist/chunks/pbr.vertex-BFjD6j1a.esm.min.js.map +1 -0
  332. package/dist/chunks/pbr.vertex-BNL0Ih3S.esm.js +214 -0
  333. package/dist/chunks/pbr.vertex-BNL0Ih3S.esm.js.map +1 -0
  334. package/dist/chunks/pbr.vertex-DCYsZj4K.esm.js +338 -0
  335. package/dist/chunks/pbr.vertex-DCYsZj4K.esm.js.map +1 -0
  336. package/dist/chunks/pbr.vertex-DQWB7B3n.esm.min.js +2 -0
  337. package/dist/chunks/pbr.vertex-DQWB7B3n.esm.min.js.map +1 -0
  338. package/dist/chunks/postprocess.vertex-BKTxzIr3.esm.js +20 -0
  339. package/dist/chunks/postprocess.vertex-BKTxzIr3.esm.js.map +1 -0
  340. package/dist/chunks/postprocess.vertex-BLM-tBsI.esm.min.js +2 -0
  341. package/dist/chunks/postprocess.vertex-BLM-tBsI.esm.min.js.map +1 -0
  342. package/dist/chunks/rawTexture-B4sxPzau.esm.js +191 -0
  343. package/dist/chunks/rawTexture-B4sxPzau.esm.js.map +1 -0
  344. package/dist/chunks/rawTexture-C8eTjsTL.esm.min.js +2 -0
  345. package/dist/chunks/rawTexture-C8eTjsTL.esm.min.js.map +1 -0
  346. package/dist/chunks/rgbdDecode.fragment-B1JRUB2c.esm.js +17 -0
  347. package/dist/chunks/rgbdDecode.fragment-B1JRUB2c.esm.js.map +1 -0
  348. package/dist/chunks/rgbdDecode.fragment-BQDhe3Gm.esm.min.js +2 -0
  349. package/dist/chunks/rgbdDecode.fragment-BQDhe3Gm.esm.min.js.map +1 -0
  350. package/dist/chunks/rgbdDecode.fragment-Bqwzk3c0.esm.js +17 -0
  351. package/dist/chunks/rgbdDecode.fragment-Bqwzk3c0.esm.js.map +1 -0
  352. package/dist/chunks/rgbdDecode.fragment-De929itq.esm.min.js +2 -0
  353. package/dist/chunks/rgbdDecode.fragment-De929itq.esm.min.js.map +1 -0
  354. package/dist/chunks/rgbdEncode.fragment-B2mbOgZ1.esm.js +17 -0
  355. package/dist/chunks/rgbdEncode.fragment-B2mbOgZ1.esm.js.map +1 -0
  356. package/dist/chunks/rgbdEncode.fragment-BR4bMAPw.esm.min.js +2 -0
  357. package/dist/chunks/rgbdEncode.fragment-BR4bMAPw.esm.min.js.map +1 -0
  358. package/dist/chunks/rgbdEncode.fragment-CnnkzvSU.esm.min.js +2 -0
  359. package/dist/chunks/rgbdEncode.fragment-CnnkzvSU.esm.min.js.map +1 -0
  360. package/dist/chunks/rgbdEncode.fragment-DdsDf_tZ.esm.js +17 -0
  361. package/dist/chunks/rgbdEncode.fragment-DdsDf_tZ.esm.js.map +1 -0
  362. package/dist/chunks/splatFileLoader-ByV2g6RW.esm.js +3947 -0
  363. package/dist/chunks/splatFileLoader-ByV2g6RW.esm.js.map +1 -0
  364. package/dist/chunks/splatFileLoader-DZtkydoO.esm.min.js +2 -0
  365. package/dist/chunks/splatFileLoader-DZtkydoO.esm.min.js.map +1 -0
  366. package/dist/chunks/standardMaterial-DUti--Yk.esm.js +1805 -0
  367. package/dist/chunks/standardMaterial-DUti--Yk.esm.js.map +1 -0
  368. package/dist/chunks/standardMaterial-DxPZ0yEO.esm.min.js +2 -0
  369. package/dist/chunks/standardMaterial-DxPZ0yEO.esm.min.js.map +1 -0
  370. package/dist/chunks/stlFileLoader-BddM0ohC.esm.js +238 -0
  371. package/dist/chunks/stlFileLoader-BddM0ohC.esm.js.map +1 -0
  372. package/dist/chunks/stlFileLoader-Daj_Ow9k.esm.min.js +2 -0
  373. package/dist/chunks/stlFileLoader-Daj_Ow9k.esm.min.js.map +1 -0
  374. package/dist/chunks/tgaTextureLoader-DDmm8z9e.esm.js +349 -0
  375. package/dist/chunks/tgaTextureLoader-DDmm8z9e.esm.js.map +1 -0
  376. package/dist/chunks/tgaTextureLoader-NZ1m7gDb.esm.min.js +2 -0
  377. package/dist/chunks/tgaTextureLoader-NZ1m7gDb.esm.min.js.map +1 -0
  378. package/dist/chunks/thinEngine-CvGTeAY9.esm.js +3723 -0
  379. package/dist/chunks/thinEngine-CvGTeAY9.esm.js.map +1 -0
  380. package/dist/chunks/thinEngine-Czvj0W_2.esm.min.js +2 -0
  381. package/dist/chunks/thinEngine-Czvj0W_2.esm.min.js.map +1 -0
  382. package/dist/chunks/thinInstanceMesh-BGeYKYJu.esm.js +314 -0
  383. package/dist/chunks/thinInstanceMesh-BGeYKYJu.esm.js.map +1 -0
  384. package/dist/chunks/thinInstanceMesh-Byk1sPWi.esm.min.js +2 -0
  385. package/dist/chunks/thinInstanceMesh-Byk1sPWi.esm.min.js.map +1 -0
  386. package/dist/chunks/vertexColorMixing-5MVqrbuQ.esm.js +412 -0
  387. package/dist/chunks/vertexColorMixing-5MVqrbuQ.esm.js.map +1 -0
  388. package/dist/chunks/vertexColorMixing-BTHtPksv.esm.min.js +2 -0
  389. package/dist/chunks/vertexColorMixing-BTHtPksv.esm.min.js.map +1 -0
  390. package/dist/chunks/vertexColorMixing-C-JxO1th.esm.js +522 -0
  391. package/dist/chunks/vertexColorMixing-C-JxO1th.esm.js.map +1 -0
  392. package/dist/chunks/vertexColorMixing-DpW1_vsz.esm.min.js +2 -0
  393. package/dist/chunks/vertexColorMixing-DpW1_vsz.esm.min.js.map +1 -0
  394. package/dist/chunks/webgpuEngine-Dz_96swZ.esm.min.js +2 -0
  395. package/dist/chunks/webgpuEngine-Dz_96swZ.esm.min.js.map +1 -0
  396. package/dist/chunks/webgpuEngine-iwYQqIrX.esm.js +11465 -0
  397. package/dist/chunks/webgpuEngine-iwYQqIrX.esm.js.map +1 -0
  398. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  399. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  400. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  401. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  402. package/docs/ViewerDefault.jpg +0 -0
  403. package/docs/ViewerParts.jpg +0 -0
  404. package/docs/ViewerSlots.jpg +0 -0
  405. package/docs/ViewerStyled.jpg +0 -0
  406. package/lib/index.d.ts +534 -0
  407. package/lib/index.js +1939 -0
  408. package/lib/index.js.map +1 -0
  409. package/package.json +18 -27
  410. package/readme.md +145 -21
  411. package/configuration/configuration.d.ts +0 -107
  412. package/configuration/configuration.js +0 -16
  413. package/configuration/configuration.js.map +0 -1
  414. package/configuration/configurationCompatibility.d.ts +0 -8
  415. package/configuration/configurationCompatibility.js +0 -66
  416. package/configuration/configurationCompatibility.js.map +0 -1
  417. package/configuration/configurationContainer.d.ts +0 -10
  418. package/configuration/configurationContainer.js +0 -10
  419. package/configuration/configurationContainer.js.map +0 -1
  420. package/configuration/globals.d.ts +0 -6
  421. package/configuration/globals.js +0 -18
  422. package/configuration/globals.js.map +0 -1
  423. package/configuration/index.d.ts +0 -2
  424. package/configuration/index.js +0 -4
  425. package/configuration/index.js.map +0 -1
  426. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  427. package/configuration/interfaces/cameraConfiguration.js +0 -2
  428. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  429. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  430. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  431. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  432. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  433. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  434. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  435. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  436. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  437. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  438. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  439. package/configuration/interfaces/groundConfiguration.js +0 -2
  440. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  441. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  442. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  443. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  444. package/configuration/interfaces/index.d.ts +0 -15
  445. package/configuration/interfaces/index.js +0 -16
  446. package/configuration/interfaces/index.js.map +0 -1
  447. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  448. package/configuration/interfaces/lightConfiguration.js +0 -2
  449. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  450. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  451. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  452. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  453. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  454. package/configuration/interfaces/modelConfiguration.js +0 -2
  455. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  456. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  457. package/configuration/interfaces/observersConfiguration.js +0 -2
  458. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  459. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  460. package/configuration/interfaces/sceneConfiguration.js +0 -2
  461. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  462. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  463. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  464. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  465. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  466. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  467. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  468. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  469. package/configuration/interfaces/templateConfiguration.js +0 -2
  470. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  471. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  472. package/configuration/interfaces/vrConfiguration.js +0 -2
  473. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  474. package/configuration/loader.d.ts +0 -4
  475. package/configuration/loader.js +0 -17
  476. package/configuration/loader.js.map +0 -1
  477. package/configuration/mappers.d.ts +0 -43
  478. package/configuration/mappers.js +0 -193
  479. package/configuration/mappers.js.map +0 -1
  480. package/configuration/renderOnlyLoader.d.ts +0 -33
  481. package/configuration/renderOnlyLoader.js +0 -162
  482. package/configuration/renderOnlyLoader.js.map +0 -1
  483. package/configuration/types/default.d.ts +0 -6
  484. package/configuration/types/default.js +0 -121
  485. package/configuration/types/default.js.map +0 -1
  486. package/configuration/types/environmentMap.d.ts +0 -5
  487. package/configuration/types/environmentMap.js +0 -14
  488. package/configuration/types/environmentMap.js.map +0 -1
  489. package/configuration/types/extended.d.ts +0 -6
  490. package/configuration/types/extended.js +0 -317
  491. package/configuration/types/extended.js.map +0 -1
  492. package/configuration/types/index.d.ts +0 -14
  493. package/configuration/types/index.js +0 -51
  494. package/configuration/types/index.js.map +0 -1
  495. package/configuration/types/minimal.d.ts +0 -6
  496. package/configuration/types/minimal.js +0 -43
  497. package/configuration/types/minimal.js.map +0 -1
  498. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  499. package/configuration/types/renderOnlyDefault.js +0 -31
  500. package/configuration/types/renderOnlyDefault.js.map +0 -1
  501. package/configuration/types/shadowLight.d.ts +0 -9
  502. package/configuration/types/shadowLight.js +0 -64
  503. package/configuration/types/shadowLight.js.map +0 -1
  504. package/helper/index.d.ts +0 -29
  505. package/helper/index.js +0 -66
  506. package/helper/index.js.map +0 -1
  507. package/index.d.ts +0 -30
  508. package/index.js +0 -46
  509. package/index.js.map +0 -1
  510. package/initializer.d.ts +0 -11
  511. package/initializer.js +0 -35
  512. package/initializer.js.map +0 -1
  513. package/interfaces.d.ts +0 -5
  514. package/interfaces.js +0 -7
  515. package/interfaces.js.map +0 -1
  516. package/labs/environmentSerializer.d.ts +0 -126
  517. package/labs/environmentSerializer.js +0 -191
  518. package/labs/environmentSerializer.js.map +0 -1
  519. package/labs/texture.d.ts +0 -183
  520. package/labs/texture.js +0 -351
  521. package/labs/texture.js.map +0 -1
  522. package/labs/viewerLabs.d.ts +0 -51
  523. package/labs/viewerLabs.js +0 -134
  524. package/labs/viewerLabs.js.map +0 -1
  525. package/loader/modelLoader.d.ts +0 -56
  526. package/loader/modelLoader.js +0 -202
  527. package/loader/modelLoader.js.map +0 -1
  528. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  529. package/loader/plugins/applyMaterialConfig.js +0 -16
  530. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  531. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  532. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  533. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  534. package/loader/plugins/index.d.ts +0 -19
  535. package/loader/plugins/index.js +0 -44
  536. package/loader/plugins/index.js.map +0 -1
  537. package/loader/plugins/loaderPlugin.d.ts +0 -24
  538. package/loader/plugins/loaderPlugin.js +0 -2
  539. package/loader/plugins/loaderPlugin.js.map +0 -1
  540. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  541. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  542. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  543. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  544. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  545. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  546. package/managers/observablesManager.d.ts +0 -66
  547. package/managers/observablesManager.js +0 -35
  548. package/managers/observablesManager.js.map +0 -1
  549. package/managers/sceneManager.d.ts +0 -245
  550. package/managers/sceneManager.js +0 -1375
  551. package/managers/sceneManager.js.map +0 -1
  552. package/managers/telemetryManager.d.ts +0 -78
  553. package/managers/telemetryManager.js +0 -117
  554. package/managers/telemetryManager.js.map +0 -1
  555. package/model/modelAnimation.d.ts +0 -215
  556. package/model/modelAnimation.js +0 -237
  557. package/model/modelAnimation.js.map +0 -1
  558. package/model/viewerModel.d.ts +0 -233
  559. package/model/viewerModel.js +0 -673
  560. package/model/viewerModel.js.map +0 -1
  561. package/optimizer/custom/extended.d.ts +0 -13
  562. package/optimizer/custom/extended.js +0 -101
  563. package/optimizer/custom/extended.js.map +0 -1
  564. package/optimizer/custom/index.d.ts +0 -9
  565. package/optimizer/custom/index.js +0 -26
  566. package/optimizer/custom/index.js.map +0 -1
  567. package/renderOnlyIndex.d.ts +0 -11
  568. package/renderOnlyIndex.js +0 -18
  569. package/renderOnlyIndex.js.map +0 -1
  570. package/templating/eventManager.d.ts +0 -35
  571. package/templating/eventManager.js +0 -66
  572. package/templating/eventManager.js.map +0 -1
  573. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  574. package/templating/plugins/hdButtonPlugin.js +0 -22
  575. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  576. package/templating/plugins/printButton.d.ts +0 -9
  577. package/templating/plugins/printButton.js +0 -41
  578. package/templating/plugins/printButton.js.map +0 -1
  579. package/templating/templateManager.d.ts +0 -197
  580. package/templating/templateManager.js +0 -561
  581. package/templating/templateManager.js.map +0 -1
  582. package/templating/viewerTemplatePlugin.d.ts +0 -21
  583. package/templating/viewerTemplatePlugin.js +0 -69
  584. package/templating/viewerTemplatePlugin.js.map +0 -1
  585. package/viewer/defaultViewer.d.ts +0 -130
  586. package/viewer/defaultViewer.js +0 -672
  587. package/viewer/defaultViewer.js.map +0 -1
  588. package/viewer/renderOnlyViewer.d.ts +0 -9
  589. package/viewer/renderOnlyViewer.js +0 -46
  590. package/viewer/renderOnlyViewer.js.map +0 -1
  591. package/viewer/viewer.d.ts +0 -258
  592. package/viewer/viewer.js +0 -783
  593. package/viewer/viewer.js.map +0 -1
  594. package/viewer/viewerManager.d.ts +0 -58
  595. package/viewer/viewerManager.js +0 -91
  596. package/viewer/viewerManager.js.map +0 -1
  597. package/viewer/viewerWithTemplate.d.ts +0 -9
  598. package/viewer/viewerWithTemplate.js +0 -20
  599. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -0,0 +1,1103 @@
1
+ import { n as PrecisionDate, C as Constants, A as AbstractEngine, o as IsWindowObjectExist, p as IsDocumentAvailable, E as EngineStore } from './index-CVMH5-nD.esm.js';
2
+
3
+ /**
4
+ * Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
5
+ */
6
+ class PerformanceMonitor {
7
+ /**
8
+ * constructor
9
+ * @param frameSampleSize The number of samples required to saturate the sliding window
10
+ */
11
+ constructor(frameSampleSize = 30) {
12
+ this._enabled = true;
13
+ this._rollingFrameTime = new RollingAverage(frameSampleSize);
14
+ }
15
+ /**
16
+ * Samples current frame
17
+ * @param timeMs A timestamp in milliseconds of the current frame to compare with other frames
18
+ */
19
+ sampleFrame(timeMs = PrecisionDate.Now) {
20
+ if (!this._enabled) {
21
+ return;
22
+ }
23
+ if (this._lastFrameTimeMs != null) {
24
+ const dt = timeMs - this._lastFrameTimeMs;
25
+ this._rollingFrameTime.add(dt);
26
+ }
27
+ this._lastFrameTimeMs = timeMs;
28
+ }
29
+ /**
30
+ * Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
31
+ */
32
+ get averageFrameTime() {
33
+ return this._rollingFrameTime.average;
34
+ }
35
+ /**
36
+ * Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
37
+ */
38
+ get averageFrameTimeVariance() {
39
+ return this._rollingFrameTime.variance;
40
+ }
41
+ /**
42
+ * Returns the frame time of the most recent frame
43
+ */
44
+ get instantaneousFrameTime() {
45
+ return this._rollingFrameTime.history(0);
46
+ }
47
+ /**
48
+ * Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)
49
+ */
50
+ get averageFPS() {
51
+ return 1000.0 / this._rollingFrameTime.average;
52
+ }
53
+ /**
54
+ * Returns the average framerate in frames per second using the most recent frame time
55
+ */
56
+ get instantaneousFPS() {
57
+ const history = this._rollingFrameTime.history(0);
58
+ if (history === 0) {
59
+ return 0;
60
+ }
61
+ return 1000.0 / history;
62
+ }
63
+ /**
64
+ * Returns true if enough samples have been taken to completely fill the sliding window
65
+ */
66
+ get isSaturated() {
67
+ return this._rollingFrameTime.isSaturated();
68
+ }
69
+ /**
70
+ * Enables contributions to the sliding window sample set
71
+ */
72
+ enable() {
73
+ this._enabled = true;
74
+ }
75
+ /**
76
+ * Disables contributions to the sliding window sample set
77
+ * Samples will not be interpolated over the disabled period
78
+ */
79
+ disable() {
80
+ this._enabled = false;
81
+ //clear last sample to avoid interpolating over the disabled period when next enabled
82
+ this._lastFrameTimeMs = null;
83
+ }
84
+ /**
85
+ * Returns true if sampling is enabled
86
+ */
87
+ get isEnabled() {
88
+ return this._enabled;
89
+ }
90
+ /**
91
+ * Resets performance monitor
92
+ */
93
+ reset() {
94
+ //clear last sample to avoid interpolating over the disabled period when next enabled
95
+ this._lastFrameTimeMs = null;
96
+ //wipe record
97
+ this._rollingFrameTime.reset();
98
+ }
99
+ }
100
+ /**
101
+ * RollingAverage
102
+ *
103
+ * Utility to efficiently compute the rolling average and variance over a sliding window of samples
104
+ */
105
+ class RollingAverage {
106
+ /**
107
+ * constructor
108
+ * @param length The number of samples required to saturate the sliding window
109
+ */
110
+ constructor(length) {
111
+ this._samples = new Array(length);
112
+ this.reset();
113
+ }
114
+ /**
115
+ * Adds a sample to the sample set
116
+ * @param v The sample value
117
+ */
118
+ add(v) {
119
+ //http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
120
+ let delta;
121
+ //we need to check if we've already wrapped round
122
+ if (this.isSaturated()) {
123
+ //remove bottom of stack from mean
124
+ const bottomValue = this._samples[this._pos];
125
+ delta = bottomValue - this.average;
126
+ this.average -= delta / (this._sampleCount - 1);
127
+ this._m2 -= delta * (bottomValue - this.average);
128
+ }
129
+ else {
130
+ this._sampleCount++;
131
+ }
132
+ //add new value to mean
133
+ delta = v - this.average;
134
+ this.average += delta / this._sampleCount;
135
+ this._m2 += delta * (v - this.average);
136
+ //set the new variance
137
+ this.variance = this._m2 / (this._sampleCount - 1);
138
+ this._samples[this._pos] = v;
139
+ this._pos++;
140
+ this._pos %= this._samples.length; //positive wrap around
141
+ }
142
+ /**
143
+ * Returns previously added values or null if outside of history or outside the sliding window domain
144
+ * @param i Index in history. For example, pass 0 for the most recent value and 1 for the value before that
145
+ * @returns Value previously recorded with add() or null if outside of range
146
+ */
147
+ history(i) {
148
+ if (i >= this._sampleCount || i >= this._samples.length) {
149
+ return 0;
150
+ }
151
+ const i0 = this._wrapPosition(this._pos - 1.0);
152
+ return this._samples[this._wrapPosition(i0 - i)];
153
+ }
154
+ /**
155
+ * Returns true if enough samples have been taken to completely fill the sliding window
156
+ * @returns true if sample-set saturated
157
+ */
158
+ isSaturated() {
159
+ return this._sampleCount >= this._samples.length;
160
+ }
161
+ /**
162
+ * Resets the rolling average (equivalent to 0 samples taken so far)
163
+ */
164
+ reset() {
165
+ this.average = 0;
166
+ this.variance = 0;
167
+ this._sampleCount = 0;
168
+ this._pos = 0;
169
+ this._m2 = 0;
170
+ }
171
+ /**
172
+ * Wraps a value around the sample range boundaries
173
+ * @param i Position in sample range, for example if the sample length is 5, and i is -3, then 2 will be returned.
174
+ * @returns Wrapped position in sample range
175
+ */
176
+ _wrapPosition(i) {
177
+ const max = this._samples.length;
178
+ return ((i % max) + max) % max;
179
+ }
180
+ }
181
+
182
+ /**
183
+ * Wrapper around a render target (either single or multi textures)
184
+ */
185
+ class RenderTargetWrapper {
186
+ /**
187
+ * Gets the depth/stencil texture (if created by a createDepthStencilTexture() call)
188
+ */
189
+ get depthStencilTexture() {
190
+ return this._depthStencilTexture;
191
+ }
192
+ /**
193
+ * Indicates if the depth/stencil texture has a stencil aspect
194
+ */
195
+ get depthStencilTextureWithStencil() {
196
+ return this._depthStencilTextureWithStencil;
197
+ }
198
+ /**
199
+ * Defines if the render target wrapper is for a cube texture or if false a 2d texture
200
+ */
201
+ get isCube() {
202
+ return this._isCube;
203
+ }
204
+ /**
205
+ * Defines if the render target wrapper is for a single or multi target render wrapper
206
+ */
207
+ get isMulti() {
208
+ return this._isMulti;
209
+ }
210
+ /**
211
+ * Defines if the render target wrapper is for a single or an array of textures
212
+ */
213
+ get is2DArray() {
214
+ return this.layers > 0;
215
+ }
216
+ /**
217
+ * Defines if the render target wrapper is for a 3D texture
218
+ */
219
+ get is3D() {
220
+ return this.depth > 0;
221
+ }
222
+ /**
223
+ * Gets the size of the render target wrapper (used for cubes, as width=height in this case)
224
+ */
225
+ get size() {
226
+ return this.width;
227
+ }
228
+ /**
229
+ * Gets the width of the render target wrapper
230
+ */
231
+ get width() {
232
+ return this._size.width || this._size;
233
+ }
234
+ /**
235
+ * Gets the height of the render target wrapper
236
+ */
237
+ get height() {
238
+ return this._size.height || this._size;
239
+ }
240
+ /**
241
+ * Gets the number of layers of the render target wrapper (only used if is2DArray is true and wrapper is not a multi render target)
242
+ */
243
+ get layers() {
244
+ return this._size.layers || 0;
245
+ }
246
+ /**
247
+ * Gets the depth of the render target wrapper (only used if is3D is true and wrapper is not a multi render target)
248
+ */
249
+ get depth() {
250
+ return this._size.depth || 0;
251
+ }
252
+ /**
253
+ * Gets the render texture. If this is a multi render target, gets the first texture
254
+ */
255
+ get texture() {
256
+ return this._textures?.[0] ?? null;
257
+ }
258
+ /**
259
+ * Gets the list of render textures. If we are not in a multi render target, the list will be null (use the texture getter instead)
260
+ */
261
+ get textures() {
262
+ return this._textures;
263
+ }
264
+ /**
265
+ * Gets the face indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null
266
+ */
267
+ get faceIndices() {
268
+ return this._faceIndices;
269
+ }
270
+ /**
271
+ * Gets the layer indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null
272
+ */
273
+ get layerIndices() {
274
+ return this._layerIndices;
275
+ }
276
+ /**
277
+ * Gets the base array layer of a texture in the textures array
278
+ * This is an number that is calculated based on the layer and face indices set for this texture at that index
279
+ * @param index The index of the texture in the textures array to get the base array layer for
280
+ * @returns the base array layer of the texture at the given index
281
+ */
282
+ getBaseArrayLayer(index) {
283
+ if (!this._textures) {
284
+ return -1;
285
+ }
286
+ const texture = this._textures[index];
287
+ const layerIndex = this._layerIndices?.[index] ?? 0;
288
+ const faceIndex = this._faceIndices?.[index] ?? 0;
289
+ return texture.isCube ? layerIndex * 6 + faceIndex : texture.is3D ? 0 : layerIndex;
290
+ }
291
+ /**
292
+ * Gets the sample count of the render target
293
+ */
294
+ get samples() {
295
+ return this._samples;
296
+ }
297
+ /**
298
+ * Sets the sample count of the render target
299
+ * @param value sample count
300
+ * @param initializeBuffers If set to true, the engine will make an initializing call to drawBuffers (only used when isMulti=true).
301
+ * @param force true to force calling the update sample count engine function even if the current sample count is equal to value
302
+ * @returns the sample count that has been set
303
+ */
304
+ setSamples(value, initializeBuffers = true, force = false) {
305
+ if (this.samples === value && !force) {
306
+ return value;
307
+ }
308
+ const result = this._isMulti
309
+ ? this._engine.updateMultipleRenderTargetTextureSampleCount(this, value, initializeBuffers)
310
+ : this._engine.updateRenderTargetTextureSampleCount(this, value);
311
+ this._samples = value;
312
+ return result;
313
+ }
314
+ /**
315
+ * Initializes the render target wrapper
316
+ * @param isMulti true if the wrapper is a multi render target
317
+ * @param isCube true if the wrapper should render to a cube texture
318
+ * @param size size of the render target (width/height/layers)
319
+ * @param engine engine used to create the render target
320
+ * @param label defines the label to use for the wrapper (for debugging purpose only)
321
+ */
322
+ constructor(isMulti, isCube, size, engine, label) {
323
+ this._textures = null;
324
+ this._faceIndices = null;
325
+ this._layerIndices = null;
326
+ /** @internal */
327
+ this._samples = 1;
328
+ /** @internal */
329
+ this._attachments = null;
330
+ /** @internal */
331
+ this._generateStencilBuffer = false;
332
+ /** @internal */
333
+ this._generateDepthBuffer = false;
334
+ /** @internal */
335
+ this._depthStencilTextureWithStencil = false;
336
+ this._isMulti = isMulti;
337
+ this._isCube = isCube;
338
+ this._size = size;
339
+ this._engine = engine;
340
+ this._depthStencilTexture = null;
341
+ this.label = label;
342
+ }
343
+ /**
344
+ * Sets the render target texture(s)
345
+ * @param textures texture(s) to set
346
+ */
347
+ setTextures(textures) {
348
+ if (Array.isArray(textures)) {
349
+ this._textures = textures;
350
+ }
351
+ else if (textures) {
352
+ this._textures = [textures];
353
+ }
354
+ else {
355
+ this._textures = null;
356
+ }
357
+ }
358
+ /**
359
+ * Set a texture in the textures array
360
+ * @param texture The texture to set
361
+ * @param index The index in the textures array to set
362
+ * @param disposePrevious If this function should dispose the previous texture
363
+ */
364
+ setTexture(texture, index = 0, disposePrevious = true) {
365
+ if (!this._textures) {
366
+ this._textures = [];
367
+ }
368
+ if (this._textures[index] === texture) {
369
+ return;
370
+ }
371
+ if (this._textures[index] && disposePrevious) {
372
+ this._textures[index].dispose();
373
+ }
374
+ this._textures[index] = texture;
375
+ }
376
+ /**
377
+ * Sets the layer and face indices of every render target texture bound to each color attachment
378
+ * @param layers The layers of each texture to be set
379
+ * @param faces The faces of each texture to be set
380
+ */
381
+ setLayerAndFaceIndices(layers, faces) {
382
+ this._layerIndices = layers;
383
+ this._faceIndices = faces;
384
+ }
385
+ /**
386
+ * Sets the layer and face indices of a texture in the textures array that should be bound to each color attachment
387
+ * @param index The index of the texture in the textures array to modify
388
+ * @param layer The layer of the texture to be set
389
+ * @param face The face of the texture to be set
390
+ */
391
+ setLayerAndFaceIndex(index = 0, layer, face) {
392
+ if (!this._layerIndices) {
393
+ this._layerIndices = [];
394
+ }
395
+ if (!this._faceIndices) {
396
+ this._faceIndices = [];
397
+ }
398
+ if (layer !== undefined && layer >= 0) {
399
+ this._layerIndices[index] = layer;
400
+ }
401
+ if (face !== undefined && face >= 0) {
402
+ this._faceIndices[index] = face;
403
+ }
404
+ }
405
+ /**
406
+ * Creates the depth/stencil texture
407
+ * @param comparisonFunction Comparison function to use for the texture
408
+ * @param bilinearFiltering true if bilinear filtering should be used when sampling the texture
409
+ * @param generateStencil Not used anymore. "format" will be used to determine if stencil should be created
410
+ * @param samples sample count to use when creating the texture (default: 1)
411
+ * @param format format of the depth texture (default: Constants.TEXTUREFORMAT_DEPTH32_FLOAT)
412
+ * @param label defines the label to use for the texture (for debugging purpose only)
413
+ * @returns the depth/stencil created texture
414
+ */
415
+ createDepthStencilTexture(comparisonFunction = 0, bilinearFiltering = true, generateStencil = false, samples = 1, format = Constants.TEXTUREFORMAT_DEPTH32_FLOAT, label) {
416
+ this._depthStencilTexture?.dispose();
417
+ this._depthStencilTextureWithStencil = generateStencil;
418
+ this._depthStencilTextureLabel = label;
419
+ this._depthStencilTexture = this._engine.createDepthStencilTexture(this._size, {
420
+ bilinearFiltering,
421
+ comparisonFunction,
422
+ generateStencil,
423
+ isCube: this._isCube,
424
+ samples,
425
+ depthTextureFormat: format,
426
+ label,
427
+ }, this);
428
+ return this._depthStencilTexture;
429
+ }
430
+ /**
431
+ * @deprecated Use shareDepth instead
432
+ * @param renderTarget Destination renderTarget
433
+ */
434
+ _shareDepth(renderTarget) {
435
+ this.shareDepth(renderTarget);
436
+ }
437
+ /**
438
+ * Shares the depth buffer of this render target with another render target.
439
+ * @param renderTarget Destination renderTarget
440
+ */
441
+ shareDepth(renderTarget) {
442
+ if (this._depthStencilTexture) {
443
+ if (renderTarget._depthStencilTexture) {
444
+ renderTarget._depthStencilTexture.dispose();
445
+ }
446
+ renderTarget._depthStencilTexture = this._depthStencilTexture;
447
+ renderTarget._depthStencilTextureWithStencil = this._depthStencilTextureWithStencil;
448
+ this._depthStencilTexture.incrementReferences();
449
+ }
450
+ }
451
+ /**
452
+ * @internal
453
+ */
454
+ _swapAndDie(target) {
455
+ if (this.texture) {
456
+ this.texture._swapAndDie(target);
457
+ }
458
+ this._textures = null;
459
+ this.dispose(true);
460
+ }
461
+ _cloneRenderTargetWrapper() {
462
+ let rtw = null;
463
+ if (this._isMulti) {
464
+ const textureArray = this.textures;
465
+ if (textureArray && textureArray.length > 0) {
466
+ let generateDepthTexture = false;
467
+ let textureCount = textureArray.length;
468
+ let depthTextureFormat = -1;
469
+ const lastTextureSource = textureArray[textureArray.length - 1]._source;
470
+ if (lastTextureSource === 14 /* InternalTextureSource.Depth */ || lastTextureSource === 12 /* InternalTextureSource.DepthStencil */) {
471
+ generateDepthTexture = true;
472
+ depthTextureFormat = textureArray[textureArray.length - 1].format;
473
+ textureCount--;
474
+ }
475
+ const samplingModes = [];
476
+ const types = [];
477
+ const formats = [];
478
+ const targetTypes = [];
479
+ const faceIndex = [];
480
+ const layerIndex = [];
481
+ const layerCounts = [];
482
+ const internalTexture2Index = {};
483
+ for (let i = 0; i < textureCount; ++i) {
484
+ const texture = textureArray[i];
485
+ samplingModes.push(texture.samplingMode);
486
+ types.push(texture.type);
487
+ formats.push(texture.format);
488
+ const index = internalTexture2Index[texture.uniqueId];
489
+ if (index !== undefined) {
490
+ targetTypes.push(-1);
491
+ layerCounts.push(0);
492
+ }
493
+ else {
494
+ internalTexture2Index[texture.uniqueId] = i;
495
+ if (texture.is2DArray) {
496
+ targetTypes.push(Constants.TEXTURE_2D_ARRAY);
497
+ layerCounts.push(texture.depth);
498
+ }
499
+ else if (texture.isCube) {
500
+ targetTypes.push(Constants.TEXTURE_CUBE_MAP);
501
+ layerCounts.push(0);
502
+ } /*else if (texture.isCubeArray) {
503
+ targetTypes.push(Constants.TEXTURE_CUBE_MAP_ARRAY);
504
+ layerCounts.push(texture.depth);
505
+ }*/
506
+ else if (texture.is3D) {
507
+ targetTypes.push(Constants.TEXTURE_3D);
508
+ layerCounts.push(texture.depth);
509
+ }
510
+ else {
511
+ targetTypes.push(Constants.TEXTURE_2D);
512
+ layerCounts.push(0);
513
+ }
514
+ }
515
+ if (this._faceIndices) {
516
+ faceIndex.push(this._faceIndices[i] ?? 0);
517
+ }
518
+ if (this._layerIndices) {
519
+ layerIndex.push(this._layerIndices[i] ?? 0);
520
+ }
521
+ }
522
+ const optionsMRT = {
523
+ samplingModes,
524
+ generateMipMaps: textureArray[0].generateMipMaps,
525
+ generateDepthBuffer: this._generateDepthBuffer,
526
+ generateStencilBuffer: this._generateStencilBuffer,
527
+ generateDepthTexture,
528
+ depthTextureFormat,
529
+ types,
530
+ formats,
531
+ textureCount,
532
+ targetTypes,
533
+ faceIndex,
534
+ layerIndex,
535
+ layerCounts,
536
+ label: this.label,
537
+ };
538
+ const size = {
539
+ width: this.width,
540
+ height: this.height,
541
+ depth: this.depth,
542
+ };
543
+ rtw = this._engine.createMultipleRenderTarget(size, optionsMRT);
544
+ for (let i = 0; i < textureCount; ++i) {
545
+ if (targetTypes[i] !== -1) {
546
+ continue;
547
+ }
548
+ const index = internalTexture2Index[textureArray[i].uniqueId];
549
+ rtw.setTexture(rtw.textures[index], i);
550
+ }
551
+ }
552
+ }
553
+ else {
554
+ const options = {};
555
+ options.generateDepthBuffer = this._generateDepthBuffer;
556
+ options.generateMipMaps = this.texture?.generateMipMaps ?? false;
557
+ options.generateStencilBuffer = this._generateStencilBuffer;
558
+ options.samplingMode = this.texture?.samplingMode;
559
+ options.type = this.texture?.type;
560
+ options.format = this.texture?.format;
561
+ options.noColorAttachment = !this._textures;
562
+ options.label = this.label;
563
+ if (this.isCube) {
564
+ rtw = this._engine.createRenderTargetCubeTexture(this.width, options);
565
+ }
566
+ else {
567
+ const size = {
568
+ width: this.width,
569
+ height: this.height,
570
+ layers: this.is2DArray || this.is3D ? this.texture?.depth : undefined,
571
+ };
572
+ rtw = this._engine.createRenderTargetTexture(size, options);
573
+ }
574
+ if (rtw.texture) {
575
+ rtw.texture.isReady = true;
576
+ }
577
+ }
578
+ return rtw;
579
+ }
580
+ _swapRenderTargetWrapper(target) {
581
+ if (this._textures && target._textures) {
582
+ for (let i = 0; i < this._textures.length; ++i) {
583
+ this._textures[i]._swapAndDie(target._textures[i], false);
584
+ target._textures[i].isReady = true;
585
+ }
586
+ }
587
+ if (this._depthStencilTexture && target._depthStencilTexture) {
588
+ this._depthStencilTexture._swapAndDie(target._depthStencilTexture);
589
+ target._depthStencilTexture.isReady = true;
590
+ }
591
+ this._textures = null;
592
+ this._depthStencilTexture = null;
593
+ }
594
+ /** @internal */
595
+ _rebuild() {
596
+ const rtw = this._cloneRenderTargetWrapper();
597
+ if (!rtw) {
598
+ return;
599
+ }
600
+ if (this._depthStencilTexture) {
601
+ const samplingMode = this._depthStencilTexture.samplingMode;
602
+ const format = this._depthStencilTexture.format;
603
+ const bilinear = samplingMode === Constants.TEXTURE_BILINEAR_SAMPLINGMODE ||
604
+ samplingMode === Constants.TEXTURE_TRILINEAR_SAMPLINGMODE ||
605
+ samplingMode === Constants.TEXTURE_LINEAR_LINEAR_MIPNEAREST;
606
+ rtw.createDepthStencilTexture(this._depthStencilTexture._comparisonFunction, bilinear, this._depthStencilTextureWithStencil, this._depthStencilTexture.samples, format, this._depthStencilTextureLabel);
607
+ }
608
+ if (this.samples > 1) {
609
+ rtw.setSamples(this.samples);
610
+ }
611
+ rtw._swapRenderTargetWrapper(this);
612
+ rtw.dispose();
613
+ }
614
+ /**
615
+ * Releases the internal render textures
616
+ */
617
+ releaseTextures() {
618
+ if (this._textures) {
619
+ for (let i = 0; i < this._textures?.length ?? 0; ++i) {
620
+ this._textures[i].dispose();
621
+ }
622
+ }
623
+ this._textures = null;
624
+ }
625
+ /**
626
+ * Disposes the whole render target wrapper
627
+ * @param disposeOnlyFramebuffers true if only the frame buffers should be released (used for the WebGL engine). If false, all the textures will also be released
628
+ */
629
+ dispose(disposeOnlyFramebuffers = false) {
630
+ if (!disposeOnlyFramebuffers) {
631
+ this._depthStencilTexture?.dispose();
632
+ this._depthStencilTexture = null;
633
+ this.releaseTextures();
634
+ }
635
+ this._engine._releaseRenderTargetWrapper(this);
636
+ }
637
+ }
638
+
639
+ AbstractEngine.prototype.createDepthStencilTexture = function (size, options, rtWrapper) {
640
+ if (options.isCube) {
641
+ const width = size.width || size;
642
+ return this._createDepthStencilCubeTexture(width, options);
643
+ }
644
+ else {
645
+ return this._createDepthStencilTexture(size, options, rtWrapper);
646
+ }
647
+ };
648
+
649
+ AbstractEngine.prototype.displayLoadingUI = function () {
650
+ if (!IsWindowObjectExist()) {
651
+ return;
652
+ }
653
+ const loadingScreen = this.loadingScreen;
654
+ if (loadingScreen) {
655
+ loadingScreen.displayLoadingUI();
656
+ }
657
+ };
658
+ AbstractEngine.prototype.hideLoadingUI = function () {
659
+ if (!IsWindowObjectExist()) {
660
+ return;
661
+ }
662
+ const loadingScreen = this._loadingScreen;
663
+ if (loadingScreen) {
664
+ loadingScreen.hideLoadingUI();
665
+ }
666
+ };
667
+ Object.defineProperty(AbstractEngine.prototype, "loadingScreen", {
668
+ get: function () {
669
+ if (!this._loadingScreen && this._renderingCanvas) {
670
+ this._loadingScreen = AbstractEngine.DefaultLoadingScreenFactory(this._renderingCanvas);
671
+ }
672
+ return this._loadingScreen;
673
+ },
674
+ set: function (value) {
675
+ this._loadingScreen = value;
676
+ },
677
+ enumerable: true,
678
+ configurable: true,
679
+ });
680
+ Object.defineProperty(AbstractEngine.prototype, "loadingUIText", {
681
+ set: function (value) {
682
+ this.loadingScreen.loadingUIText = value;
683
+ },
684
+ enumerable: true,
685
+ configurable: true,
686
+ });
687
+ Object.defineProperty(AbstractEngine.prototype, "loadingUIBackgroundColor", {
688
+ set: function (value) {
689
+ this.loadingScreen.loadingUIBackgroundColor = value;
690
+ },
691
+ enumerable: true,
692
+ configurable: true,
693
+ });
694
+
695
+ AbstractEngine.prototype.getInputElement = function () {
696
+ return this._renderingCanvas;
697
+ };
698
+ AbstractEngine.prototype.getRenderingCanvasClientRect = function () {
699
+ if (!this._renderingCanvas) {
700
+ return null;
701
+ }
702
+ return this._renderingCanvas.getBoundingClientRect();
703
+ };
704
+ AbstractEngine.prototype.getInputElementClientRect = function () {
705
+ if (!this._renderingCanvas) {
706
+ return null;
707
+ }
708
+ return this.getInputElement().getBoundingClientRect();
709
+ };
710
+ AbstractEngine.prototype.getAspectRatio = function (viewportOwner, useScreen = false) {
711
+ const viewport = viewportOwner.viewport;
712
+ return (this.getRenderWidth(useScreen) * viewport.width) / (this.getRenderHeight(useScreen) * viewport.height);
713
+ };
714
+ AbstractEngine.prototype.getScreenAspectRatio = function () {
715
+ return this.getRenderWidth(true) / this.getRenderHeight(true);
716
+ };
717
+ AbstractEngine.prototype._verifyPointerLock = function () {
718
+ this._onPointerLockChange?.();
719
+ };
720
+
721
+ AbstractEngine.prototype.setAlphaEquation = function (equation) {
722
+ if (this._alphaEquation === equation) {
723
+ return;
724
+ }
725
+ switch (equation) {
726
+ case Constants.ALPHA_EQUATION_ADD:
727
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_ADD, Constants.GL_ALPHA_EQUATION_ADD);
728
+ break;
729
+ case Constants.ALPHA_EQUATION_SUBSTRACT:
730
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_SUBTRACT, Constants.GL_ALPHA_EQUATION_SUBTRACT);
731
+ break;
732
+ case Constants.ALPHA_EQUATION_REVERSE_SUBTRACT:
733
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_REVERSE_SUBTRACT, Constants.GL_ALPHA_EQUATION_REVERSE_SUBTRACT);
734
+ break;
735
+ case Constants.ALPHA_EQUATION_MAX:
736
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_MAX, Constants.GL_ALPHA_EQUATION_MAX);
737
+ break;
738
+ case Constants.ALPHA_EQUATION_MIN:
739
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_MIN, Constants.GL_ALPHA_EQUATION_MIN);
740
+ break;
741
+ case Constants.ALPHA_EQUATION_DARKEN:
742
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_MIN, Constants.GL_ALPHA_EQUATION_ADD);
743
+ break;
744
+ }
745
+ this._alphaEquation = equation;
746
+ };
747
+
748
+ AbstractEngine.prototype.getInputElement = function () {
749
+ return this._renderingCanvas;
750
+ };
751
+ AbstractEngine.prototype.getDepthFunction = function () {
752
+ return this._depthCullingState.depthFunc;
753
+ };
754
+ AbstractEngine.prototype.setDepthFunction = function (depthFunc) {
755
+ this._depthCullingState.depthFunc = depthFunc;
756
+ };
757
+ AbstractEngine.prototype.setDepthFunctionToGreater = function () {
758
+ this.setDepthFunction(Constants.GREATER);
759
+ };
760
+ AbstractEngine.prototype.setDepthFunctionToGreaterOrEqual = function () {
761
+ this.setDepthFunction(Constants.GEQUAL);
762
+ };
763
+ AbstractEngine.prototype.setDepthFunctionToLess = function () {
764
+ this.setDepthFunction(Constants.LESS);
765
+ };
766
+ AbstractEngine.prototype.setDepthFunctionToLessOrEqual = function () {
767
+ this.setDepthFunction(Constants.LEQUAL);
768
+ };
769
+ AbstractEngine.prototype.getDepthWrite = function () {
770
+ return this._depthCullingState.depthMask;
771
+ };
772
+ AbstractEngine.prototype.setDepthWrite = function (enable) {
773
+ this._depthCullingState.depthMask = enable;
774
+ };
775
+ AbstractEngine.prototype.getStencilBuffer = function () {
776
+ return this._stencilState.stencilTest;
777
+ };
778
+ AbstractEngine.prototype.setStencilBuffer = function (enable) {
779
+ this._stencilState.stencilTest = enable;
780
+ };
781
+ AbstractEngine.prototype.getStencilMask = function () {
782
+ return this._stencilState.stencilMask;
783
+ };
784
+ AbstractEngine.prototype.setStencilMask = function (mask) {
785
+ this._stencilState.stencilMask = mask;
786
+ };
787
+ AbstractEngine.prototype.getStencilFunction = function () {
788
+ return this._stencilState.stencilFunc;
789
+ };
790
+ AbstractEngine.prototype.getStencilFunctionReference = function () {
791
+ return this._stencilState.stencilFuncRef;
792
+ };
793
+ AbstractEngine.prototype.getStencilFunctionMask = function () {
794
+ return this._stencilState.stencilFuncMask;
795
+ };
796
+ AbstractEngine.prototype.setStencilFunction = function (stencilFunc) {
797
+ this._stencilState.stencilFunc = stencilFunc;
798
+ };
799
+ AbstractEngine.prototype.setStencilFunctionReference = function (reference) {
800
+ this._stencilState.stencilFuncRef = reference;
801
+ };
802
+ AbstractEngine.prototype.setStencilFunctionMask = function (mask) {
803
+ this._stencilState.stencilFuncMask = mask;
804
+ };
805
+ AbstractEngine.prototype.getStencilOperationFail = function () {
806
+ return this._stencilState.stencilOpStencilFail;
807
+ };
808
+ AbstractEngine.prototype.getStencilOperationDepthFail = function () {
809
+ return this._stencilState.stencilOpDepthFail;
810
+ };
811
+ AbstractEngine.prototype.getStencilOperationPass = function () {
812
+ return this._stencilState.stencilOpStencilDepthPass;
813
+ };
814
+ AbstractEngine.prototype.setStencilOperationFail = function (operation) {
815
+ this._stencilState.stencilOpStencilFail = operation;
816
+ };
817
+ AbstractEngine.prototype.setStencilOperationDepthFail = function (operation) {
818
+ this._stencilState.stencilOpDepthFail = operation;
819
+ };
820
+ AbstractEngine.prototype.setStencilOperationPass = function (operation) {
821
+ this._stencilState.stencilOpStencilDepthPass = operation;
822
+ };
823
+ AbstractEngine.prototype.cacheStencilState = function () {
824
+ this._cachedStencilBuffer = this.getStencilBuffer();
825
+ this._cachedStencilFunction = this.getStencilFunction();
826
+ this._cachedStencilMask = this.getStencilMask();
827
+ this._cachedStencilOperationPass = this.getStencilOperationPass();
828
+ this._cachedStencilOperationFail = this.getStencilOperationFail();
829
+ this._cachedStencilOperationDepthFail = this.getStencilOperationDepthFail();
830
+ this._cachedStencilReference = this.getStencilFunctionReference();
831
+ };
832
+ AbstractEngine.prototype.restoreStencilState = function () {
833
+ this.setStencilFunction(this._cachedStencilFunction);
834
+ this.setStencilMask(this._cachedStencilMask);
835
+ this.setStencilBuffer(this._cachedStencilBuffer);
836
+ this.setStencilOperationPass(this._cachedStencilOperationPass);
837
+ this.setStencilOperationFail(this._cachedStencilOperationFail);
838
+ this.setStencilOperationDepthFail(this._cachedStencilOperationDepthFail);
839
+ this.setStencilFunctionReference(this._cachedStencilReference);
840
+ };
841
+ AbstractEngine.prototype.setAlphaConstants = function (r, g, b, a) {
842
+ this._alphaState.setAlphaBlendConstants(r, g, b, a);
843
+ };
844
+ AbstractEngine.prototype.getAlphaMode = function () {
845
+ return this._alphaMode;
846
+ };
847
+ AbstractEngine.prototype.getAlphaEquation = function () {
848
+ return this._alphaEquation;
849
+ };
850
+
851
+ AbstractEngine.prototype.getRenderPassNames = function () {
852
+ return this._renderPassNames;
853
+ };
854
+ AbstractEngine.prototype.getCurrentRenderPassName = function () {
855
+ return this._renderPassNames[this.currentRenderPassId];
856
+ };
857
+ AbstractEngine.prototype.createRenderPassId = function (name) {
858
+ // Note: render pass id == 0 is always for the main render pass
859
+ const id = ++AbstractEngine._RenderPassIdCounter;
860
+ this._renderPassNames[id] = name ?? "NONAME";
861
+ return id;
862
+ };
863
+ AbstractEngine.prototype.releaseRenderPassId = function (id) {
864
+ this._renderPassNames[id] = undefined;
865
+ for (let s = 0; s < this.scenes.length; ++s) {
866
+ const scene = this.scenes[s];
867
+ for (let m = 0; m < scene.meshes.length; ++m) {
868
+ const mesh = scene.meshes[m];
869
+ if (mesh.subMeshes) {
870
+ for (let b = 0; b < mesh.subMeshes.length; ++b) {
871
+ const subMesh = mesh.subMeshes[b];
872
+ subMesh._removeDrawWrapper(id);
873
+ }
874
+ }
875
+ }
876
+ }
877
+ };
878
+
879
+ /** @internal */
880
+ function _DisableTouchAction(canvas) {
881
+ if (!canvas || !canvas.setAttribute) {
882
+ return;
883
+ }
884
+ canvas.setAttribute("touch-action", "none");
885
+ canvas.style.touchAction = "none";
886
+ canvas.style.webkitTapHighlightColor = "transparent";
887
+ }
888
+ /** @internal */
889
+ function _CommonInit(commonEngine, canvas, creationOptions) {
890
+ commonEngine._onCanvasFocus = () => {
891
+ commonEngine.onCanvasFocusObservable.notifyObservers(commonEngine);
892
+ };
893
+ commonEngine._onCanvasBlur = () => {
894
+ commonEngine.onCanvasBlurObservable.notifyObservers(commonEngine);
895
+ };
896
+ commonEngine._onCanvasContextMenu = (evt) => {
897
+ if (commonEngine.disableContextMenu) {
898
+ evt.preventDefault();
899
+ }
900
+ };
901
+ canvas.addEventListener("focus", commonEngine._onCanvasFocus);
902
+ canvas.addEventListener("blur", commonEngine._onCanvasBlur);
903
+ canvas.addEventListener("contextmenu", commonEngine._onCanvasContextMenu);
904
+ commonEngine._onBlur = () => {
905
+ if (commonEngine.disablePerformanceMonitorInBackground) {
906
+ commonEngine.performanceMonitor.disable();
907
+ }
908
+ commonEngine._windowIsBackground = true;
909
+ };
910
+ commonEngine._onFocus = () => {
911
+ if (commonEngine.disablePerformanceMonitorInBackground) {
912
+ commonEngine.performanceMonitor.enable();
913
+ }
914
+ commonEngine._windowIsBackground = false;
915
+ };
916
+ commonEngine._onCanvasPointerOut = (ev) => {
917
+ // Check that the element at the point of the pointer out isn't the canvas and if it isn't, notify observers
918
+ // Note: This is a workaround for a bug with Safari
919
+ if (document.elementFromPoint(ev.clientX, ev.clientY) !== canvas) {
920
+ commonEngine.onCanvasPointerOutObservable.notifyObservers(ev);
921
+ }
922
+ };
923
+ const hostWindow = commonEngine.getHostWindow(); // it calls IsWindowObjectExist()
924
+ if (hostWindow && typeof hostWindow.addEventListener === "function") {
925
+ hostWindow.addEventListener("blur", commonEngine._onBlur);
926
+ hostWindow.addEventListener("focus", commonEngine._onFocus);
927
+ }
928
+ canvas.addEventListener("pointerout", commonEngine._onCanvasPointerOut);
929
+ if (!creationOptions.doNotHandleTouchAction) {
930
+ _DisableTouchAction(canvas);
931
+ }
932
+ // Create Audio Engine if needed.
933
+ if (!AbstractEngine.audioEngine && creationOptions.audioEngine && AbstractEngine.AudioEngineFactory) {
934
+ AbstractEngine.audioEngine = AbstractEngine.AudioEngineFactory(commonEngine.getRenderingCanvas(), commonEngine.getAudioContext(), commonEngine.getAudioDestination());
935
+ }
936
+ if (IsDocumentAvailable()) {
937
+ // Fullscreen
938
+ commonEngine._onFullscreenChange = () => {
939
+ commonEngine.isFullscreen = !!document.fullscreenElement;
940
+ // Pointer lock
941
+ if (commonEngine.isFullscreen && commonEngine._pointerLockRequested && canvas) {
942
+ RequestPointerlock(canvas);
943
+ }
944
+ };
945
+ document.addEventListener("fullscreenchange", commonEngine._onFullscreenChange, false);
946
+ document.addEventListener("webkitfullscreenchange", commonEngine._onFullscreenChange, false);
947
+ // Pointer lock
948
+ commonEngine._onPointerLockChange = () => {
949
+ commonEngine.isPointerLock = document.pointerLockElement === canvas;
950
+ };
951
+ document.addEventListener("pointerlockchange", commonEngine._onPointerLockChange, false);
952
+ document.addEventListener("webkitpointerlockchange", commonEngine._onPointerLockChange, false);
953
+ }
954
+ commonEngine.enableOfflineSupport = AbstractEngine.OfflineProviderFactory !== undefined;
955
+ commonEngine._deterministicLockstep = !!creationOptions.deterministicLockstep;
956
+ commonEngine._lockstepMaxSteps = creationOptions.lockstepMaxSteps || 0;
957
+ commonEngine._timeStep = creationOptions.timeStep || 1 / 60;
958
+ }
959
+ /** @internal */
960
+ function _CommonDispose(commonEngine, canvas) {
961
+ // Release audio engine
962
+ if (EngineStore.Instances.length === 1 && AbstractEngine.audioEngine) {
963
+ AbstractEngine.audioEngine.dispose();
964
+ AbstractEngine.audioEngine = null;
965
+ }
966
+ // Events
967
+ const hostWindow = commonEngine.getHostWindow(); // it calls IsWindowObjectExist()
968
+ if (hostWindow && typeof hostWindow.removeEventListener === "function") {
969
+ hostWindow.removeEventListener("blur", commonEngine._onBlur);
970
+ hostWindow.removeEventListener("focus", commonEngine._onFocus);
971
+ }
972
+ if (canvas) {
973
+ canvas.removeEventListener("focus", commonEngine._onCanvasFocus);
974
+ canvas.removeEventListener("blur", commonEngine._onCanvasBlur);
975
+ canvas.removeEventListener("pointerout", commonEngine._onCanvasPointerOut);
976
+ canvas.removeEventListener("contextmenu", commonEngine._onCanvasContextMenu);
977
+ }
978
+ if (IsDocumentAvailable()) {
979
+ document.removeEventListener("fullscreenchange", commonEngine._onFullscreenChange);
980
+ document.removeEventListener("mozfullscreenchange", commonEngine._onFullscreenChange);
981
+ document.removeEventListener("webkitfullscreenchange", commonEngine._onFullscreenChange);
982
+ document.removeEventListener("msfullscreenchange", commonEngine._onFullscreenChange);
983
+ document.removeEventListener("pointerlockchange", commonEngine._onPointerLockChange);
984
+ document.removeEventListener("mspointerlockchange", commonEngine._onPointerLockChange);
985
+ document.removeEventListener("mozpointerlockchange", commonEngine._onPointerLockChange);
986
+ document.removeEventListener("webkitpointerlockchange", commonEngine._onPointerLockChange);
987
+ }
988
+ }
989
+ /**
990
+ * Get Font size information
991
+ * @param font font name
992
+ * @returns an object containing ascent, height and descent
993
+ */
994
+ function GetFontOffset(font) {
995
+ const text = document.createElement("span");
996
+ text.textContent = "Hg";
997
+ text.style.font = font;
998
+ const block = document.createElement("div");
999
+ block.style.display = "inline-block";
1000
+ block.style.width = "1px";
1001
+ block.style.height = "0px";
1002
+ block.style.verticalAlign = "bottom";
1003
+ const div = document.createElement("div");
1004
+ div.style.whiteSpace = "nowrap";
1005
+ div.appendChild(text);
1006
+ div.appendChild(block);
1007
+ document.body.appendChild(div);
1008
+ let fontAscent = 0;
1009
+ let fontHeight = 0;
1010
+ try {
1011
+ fontHeight = block.getBoundingClientRect().top - text.getBoundingClientRect().top;
1012
+ block.style.verticalAlign = "baseline";
1013
+ fontAscent = block.getBoundingClientRect().top - text.getBoundingClientRect().top;
1014
+ }
1015
+ finally {
1016
+ document.body.removeChild(div);
1017
+ }
1018
+ return { ascent: fontAscent, height: fontHeight, descent: fontHeight - fontAscent };
1019
+ }
1020
+ /** @internal */
1021
+ function CreateImageBitmapFromSource(engine, imageSource, options) {
1022
+ const promise = new Promise((resolve, reject) => {
1023
+ const image = new Image();
1024
+ image.onload = () => {
1025
+ image.decode().then(() => {
1026
+ engine.createImageBitmap(image, options).then((imageBitmap) => {
1027
+ resolve(imageBitmap);
1028
+ });
1029
+ });
1030
+ };
1031
+ image.onerror = () => {
1032
+ reject(`Error loading image ${image.src}`);
1033
+ };
1034
+ image.src = imageSource;
1035
+ });
1036
+ return promise;
1037
+ }
1038
+ /** @internal */
1039
+ function ResizeImageBitmap(engine, image, bufferWidth, bufferHeight) {
1040
+ const canvas = engine.createCanvas(bufferWidth, bufferHeight);
1041
+ const context = canvas.getContext("2d");
1042
+ if (!context) {
1043
+ throw new Error("Unable to get 2d context for resizeImageBitmap");
1044
+ }
1045
+ context.drawImage(image, 0, 0);
1046
+ // Create VertexData from map data
1047
+ // Cast is due to wrong definition in lib.d.ts from ts 1.3 - https://github.com/Microsoft/TypeScript/issues/949
1048
+ const buffer = context.getImageData(0, 0, bufferWidth, bufferHeight).data;
1049
+ return buffer;
1050
+ }
1051
+ /**
1052
+ * Ask the browser to promote the current element to fullscreen rendering mode
1053
+ * @param element defines the DOM element to promote
1054
+ */
1055
+ function RequestFullscreen(element) {
1056
+ const requestFunction = element.requestFullscreen || element.webkitRequestFullscreen;
1057
+ if (!requestFunction) {
1058
+ return;
1059
+ }
1060
+ requestFunction.call(element);
1061
+ }
1062
+ /**
1063
+ * Asks the browser to exit fullscreen mode
1064
+ */
1065
+ function ExitFullscreen() {
1066
+ const anyDoc = document;
1067
+ if (document.exitFullscreen) {
1068
+ document.exitFullscreen();
1069
+ }
1070
+ else if (anyDoc.webkitCancelFullScreen) {
1071
+ anyDoc.webkitCancelFullScreen();
1072
+ }
1073
+ }
1074
+ /**
1075
+ * Ask the browser to promote the current element to pointerlock mode
1076
+ * @param element defines the DOM element to promote
1077
+ */
1078
+ function RequestPointerlock(element) {
1079
+ if (element.requestPointerLock) {
1080
+ // In some browsers, requestPointerLock returns a promise.
1081
+ // Handle possible rejections to avoid an unhandled top-level exception.
1082
+ const promise = element.requestPointerLock();
1083
+ if (promise instanceof Promise)
1084
+ promise
1085
+ .then(() => {
1086
+ element.focus();
1087
+ })
1088
+ .catch(() => { });
1089
+ else
1090
+ element.focus();
1091
+ }
1092
+ }
1093
+ /**
1094
+ * Asks the browser to exit pointerlock mode
1095
+ */
1096
+ function ExitPointerlock() {
1097
+ if (document.exitPointerLock) {
1098
+ document.exitPointerLock();
1099
+ }
1100
+ }
1101
+
1102
+ export { CreateImageBitmapFromSource as C, ExitFullscreen as E, GetFontOffset as G, PerformanceMonitor as P, RenderTargetWrapper as R, _CommonInit as _, ResizeImageBitmap as a, RequestFullscreen as b, RequestPointerlock as c, ExitPointerlock as d, _CommonDispose as e };
1103
+ //# sourceMappingURL=engine.common-Da03TQs0.esm.js.map