@babylonjs/viewer 7.30.0 → 7.30.1-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 (587) 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-B8QkHePo.esm.js +172 -0
  7. package/dist/chunks/EXT_lights_image_based-B8QkHePo.esm.js.map +1 -0
  8. package/dist/chunks/EXT_lights_image_based-BSiU8YlV.esm.min.js +2 -0
  9. package/dist/chunks/EXT_lights_image_based-BSiU8YlV.esm.min.js.map +1 -0
  10. package/dist/chunks/EXT_mesh_gpu_instancing-hZ-8qY7C.esm.min.js +2 -0
  11. package/dist/chunks/EXT_mesh_gpu_instancing-hZ-8qY7C.esm.min.js.map +1 -0
  12. package/dist/chunks/EXT_mesh_gpu_instancing-wJVTdqxC.esm.js +86 -0
  13. package/dist/chunks/EXT_mesh_gpu_instancing-wJVTdqxC.esm.js.map +1 -0
  14. package/dist/chunks/EXT_meshopt_compression-B2B6s_wQ.esm.min.js +2 -0
  15. package/dist/chunks/EXT_meshopt_compression-B2B6s_wQ.esm.min.js.map +1 -0
  16. package/dist/chunks/EXT_meshopt_compression-NtmqtMgU.esm.js +134 -0
  17. package/dist/chunks/EXT_meshopt_compression-NtmqtMgU.esm.js.map +1 -0
  18. package/dist/chunks/EXT_texture_avif-CHILVmx8.esm.js +44 -0
  19. package/dist/chunks/EXT_texture_avif-CHILVmx8.esm.js.map +1 -0
  20. package/dist/chunks/EXT_texture_avif-CS00cTRS.esm.min.js +2 -0
  21. package/dist/chunks/EXT_texture_avif-CS00cTRS.esm.min.js.map +1 -0
  22. package/dist/chunks/EXT_texture_webp-Bkq-q6FG.esm.min.js +2 -0
  23. package/dist/chunks/EXT_texture_webp-Bkq-q6FG.esm.min.js.map +1 -0
  24. package/dist/chunks/EXT_texture_webp-DN0lE3ZI.esm.js +43 -0
  25. package/dist/chunks/EXT_texture_webp-DN0lE3ZI.esm.js.map +1 -0
  26. package/dist/chunks/ExtrasAsMetadata-BBYH2MWy.esm.js +64 -0
  27. package/dist/chunks/ExtrasAsMetadata-BBYH2MWy.esm.js.map +1 -0
  28. package/dist/chunks/ExtrasAsMetadata-DIPrXR0e.esm.min.js +2 -0
  29. package/dist/chunks/ExtrasAsMetadata-DIPrXR0e.esm.min.js.map +1 -0
  30. package/dist/chunks/KHR_animation_pointer-Bi9FNmzm.esm.js +343 -0
  31. package/dist/chunks/KHR_animation_pointer-Bi9FNmzm.esm.js.map +1 -0
  32. package/dist/chunks/KHR_animation_pointer-cRE1VpCW.esm.min.js +2 -0
  33. package/dist/chunks/KHR_animation_pointer-cRE1VpCW.esm.min.js.map +1 -0
  34. package/dist/chunks/KHR_draco_mesh_compression-B7X-Y-9y.esm.js +610 -0
  35. package/dist/chunks/KHR_draco_mesh_compression-B7X-Y-9y.esm.js.map +1 -0
  36. package/dist/chunks/KHR_draco_mesh_compression-C3N7uxkp.esm.min.js +2 -0
  37. package/dist/chunks/KHR_draco_mesh_compression-C3N7uxkp.esm.min.js.map +1 -0
  38. package/dist/chunks/KHR_interactivity-C0idLGI_.esm.min.js +2 -0
  39. package/dist/chunks/KHR_interactivity-C0idLGI_.esm.min.js.map +1 -0
  40. package/dist/chunks/KHR_interactivity-DP9ukTBy.esm.js +4033 -0
  41. package/dist/chunks/KHR_interactivity-DP9ukTBy.esm.js.map +1 -0
  42. package/dist/chunks/KHR_lights_punctual-Brv0Wuoh.esm.js +1253 -0
  43. package/dist/chunks/KHR_lights_punctual-Brv0Wuoh.esm.js.map +1 -0
  44. package/dist/chunks/KHR_lights_punctual-D5rY7e9I.esm.min.js +2 -0
  45. package/dist/chunks/KHR_lights_punctual-D5rY7e9I.esm.min.js.map +1 -0
  46. package/dist/chunks/KHR_materials_anisotropy-CNTB-Obv.esm.min.js +2 -0
  47. package/dist/chunks/KHR_materials_anisotropy-CNTB-Obv.esm.min.js.map +1 -0
  48. package/dist/chunks/KHR_materials_anisotropy-uViUcrBX.esm.js +64 -0
  49. package/dist/chunks/KHR_materials_anisotropy-uViUcrBX.esm.js.map +1 -0
  50. package/dist/chunks/KHR_materials_clearcoat-C3xAVuBX.esm.min.js +2 -0
  51. package/dist/chunks/KHR_materials_clearcoat-C3xAVuBX.esm.min.js.map +1 -0
  52. package/dist/chunks/KHR_materials_clearcoat-CGnx-Def.esm.js +96 -0
  53. package/dist/chunks/KHR_materials_clearcoat-CGnx-Def.esm.js.map +1 -0
  54. package/dist/chunks/KHR_materials_diffuse_transmission-C6jtnXQp.esm.js +97 -0
  55. package/dist/chunks/KHR_materials_diffuse_transmission-C6jtnXQp.esm.js.map +1 -0
  56. package/dist/chunks/KHR_materials_diffuse_transmission-Chq7fNC6.esm.min.js +2 -0
  57. package/dist/chunks/KHR_materials_diffuse_transmission-Chq7fNC6.esm.min.js.map +1 -0
  58. package/dist/chunks/KHR_materials_dispersion-CdwDEjkD.esm.min.js +2 -0
  59. package/dist/chunks/KHR_materials_dispersion-CdwDEjkD.esm.min.js.map +1 -0
  60. package/dist/chunks/KHR_materials_dispersion-i3C5_tOQ.esm.js +62 -0
  61. package/dist/chunks/KHR_materials_dispersion-i3C5_tOQ.esm.js.map +1 -0
  62. package/dist/chunks/KHR_materials_emissive_strength-Ci0aHrSf.esm.js +55 -0
  63. package/dist/chunks/KHR_materials_emissive_strength-Ci0aHrSf.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_emissive_strength-oOS672hJ.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_emissive_strength-oOS672hJ.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_ior-BczbilaN.esm.min.js +2 -0
  67. package/dist/chunks/KHR_materials_ior-BczbilaN.esm.min.js.map +1 -0
  68. package/dist/chunks/KHR_materials_ior-DAgTpEPO.esm.js +64 -0
  69. package/dist/chunks/KHR_materials_ior-DAgTpEPO.esm.js.map +1 -0
  70. package/dist/chunks/KHR_materials_iridescence-BvH-DyMM.esm.js +72 -0
  71. package/dist/chunks/KHR_materials_iridescence-BvH-DyMM.esm.js.map +1 -0
  72. package/dist/chunks/KHR_materials_iridescence-Cs329Tec.esm.min.js +2 -0
  73. package/dist/chunks/KHR_materials_iridescence-Cs329Tec.esm.min.js.map +1 -0
  74. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BAoCWbDD.esm.js +81 -0
  75. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BAoCWbDD.esm.js.map +1 -0
  76. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-RptdeCpW.esm.min.js +2 -0
  77. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-RptdeCpW.esm.min.js.map +1 -0
  78. package/dist/chunks/KHR_materials_sheen-C48YqGyP.esm.js +85 -0
  79. package/dist/chunks/KHR_materials_sheen-C48YqGyP.esm.js.map +1 -0
  80. package/dist/chunks/KHR_materials_sheen-CENbfA8s.esm.min.js +2 -0
  81. package/dist/chunks/KHR_materials_sheen-CENbfA8s.esm.min.js.map +1 -0
  82. package/dist/chunks/KHR_materials_specular-BVunKKIv.esm.js +75 -0
  83. package/dist/chunks/KHR_materials_specular-BVunKKIv.esm.js.map +1 -0
  84. package/dist/chunks/KHR_materials_specular-DzkwSxAP.esm.min.js +2 -0
  85. package/dist/chunks/KHR_materials_specular-DzkwSxAP.esm.min.js.map +1 -0
  86. package/dist/chunks/KHR_materials_transmission-BTHUpaVT.esm.min.js +2 -0
  87. package/dist/chunks/KHR_materials_transmission-BTHUpaVT.esm.min.js.map +1 -0
  88. package/dist/chunks/KHR_materials_transmission-BgZKGZqg.esm.js +307 -0
  89. package/dist/chunks/KHR_materials_transmission-BgZKGZqg.esm.js.map +1 -0
  90. package/dist/chunks/KHR_materials_unlit-CU2DPO94.esm.js +74 -0
  91. package/dist/chunks/KHR_materials_unlit-CU2DPO94.esm.js.map +1 -0
  92. package/dist/chunks/KHR_materials_unlit-qeFFDJsN.esm.min.js +2 -0
  93. package/dist/chunks/KHR_materials_unlit-qeFFDJsN.esm.min.js.map +1 -0
  94. package/dist/chunks/KHR_materials_variants-BYcHAfKt.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_variants-BYcHAfKt.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_variants-DfibokCz.esm.js +238 -0
  97. package/dist/chunks/KHR_materials_variants-DfibokCz.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_volume-BLgQKdLc.esm.min.js +2 -0
  99. package/dist/chunks/KHR_materials_volume-BLgQKdLc.esm.min.js.map +1 -0
  100. package/dist/chunks/KHR_materials_volume-CeusrX5Q.esm.js +87 -0
  101. package/dist/chunks/KHR_materials_volume-CeusrX5Q.esm.js.map +1 -0
  102. package/dist/chunks/KHR_mesh_quantization-B1lFBE4i.esm.min.js +2 -0
  103. package/dist/chunks/KHR_mesh_quantization-B1lFBE4i.esm.min.js.map +1 -0
  104. package/dist/chunks/KHR_mesh_quantization-CTlthm9b.esm.js +26 -0
  105. package/dist/chunks/KHR_mesh_quantization-CTlthm9b.esm.js.map +1 -0
  106. package/dist/chunks/KHR_texture_basisu-DxfhU-WD.esm.min.js +2 -0
  107. package/dist/chunks/KHR_texture_basisu-DxfhU-WD.esm.min.js.map +1 -0
  108. package/dist/chunks/KHR_texture_basisu-kee0jVUy.esm.js +43 -0
  109. package/dist/chunks/KHR_texture_basisu-kee0jVUy.esm.js.map +1 -0
  110. package/dist/chunks/KHR_texture_transform-9DUjN2OI.esm.js +63 -0
  111. package/dist/chunks/KHR_texture_transform-9DUjN2OI.esm.js.map +1 -0
  112. package/dist/chunks/KHR_texture_transform-DbQFyzy6.esm.min.js +2 -0
  113. package/dist/chunks/KHR_texture_transform-DbQFyzy6.esm.min.js.map +1 -0
  114. package/dist/chunks/KHR_xmp_json_ld-CXJGx-sA.esm.js +51 -0
  115. package/dist/chunks/KHR_xmp_json_ld-CXJGx-sA.esm.js.map +1 -0
  116. package/dist/chunks/KHR_xmp_json_ld-tRIKOwLG.esm.min.js +2 -0
  117. package/dist/chunks/KHR_xmp_json_ld-tRIKOwLG.esm.min.js.map +1 -0
  118. package/dist/chunks/MSFT_audio_emitter-CI0Nml3O.esm.js +2207 -0
  119. package/dist/chunks/MSFT_audio_emitter-CI0Nml3O.esm.js.map +1 -0
  120. package/dist/chunks/MSFT_audio_emitter-DpCifHwR.esm.min.js +2 -0
  121. package/dist/chunks/MSFT_audio_emitter-DpCifHwR.esm.min.js.map +1 -0
  122. package/dist/chunks/MSFT_lod-B9ex3lVq.esm.js +337 -0
  123. package/dist/chunks/MSFT_lod-B9ex3lVq.esm.js.map +1 -0
  124. package/dist/chunks/MSFT_lod-z8dJ8Drm.esm.min.js +2 -0
  125. package/dist/chunks/MSFT_lod-z8dJ8Drm.esm.min.js.map +1 -0
  126. package/dist/chunks/MSFT_minecraftMesh-CtBZz4pl.esm.min.js +2 -0
  127. package/dist/chunks/MSFT_minecraftMesh-CtBZz4pl.esm.min.js.map +1 -0
  128. package/dist/chunks/MSFT_minecraftMesh-nf1sPsge.esm.js +46 -0
  129. package/dist/chunks/MSFT_minecraftMesh-nf1sPsge.esm.js.map +1 -0
  130. package/dist/chunks/MSFT_sRGBFactors-CRYLn1p6.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_sRGBFactors-CRYLn1p6.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_sRGBFactors-CeWD8LAk.esm.js +47 -0
  133. package/dist/chunks/MSFT_sRGBFactors-CeWD8LAk.esm.js.map +1 -0
  134. package/dist/chunks/animationGroup-B_9qZnYC.esm.min.js +2 -0
  135. package/dist/chunks/animationGroup-B_9qZnYC.esm.min.js.map +1 -0
  136. package/dist/chunks/animationGroup-Caf5e8cG.esm.js +2479 -0
  137. package/dist/chunks/animationGroup-Caf5e8cG.esm.js.map +1 -0
  138. package/dist/chunks/assetContainer-B2UWLifX.esm.min.js +2 -0
  139. package/dist/chunks/assetContainer-B2UWLifX.esm.min.js.map +1 -0
  140. package/dist/chunks/assetContainer-C3VbcE_z.esm.js +1720 -0
  141. package/dist/chunks/assetContainer-C3VbcE_z.esm.js.map +1 -0
  142. package/dist/chunks/audioEngine-BsSa5q28.esm.js +305 -0
  143. package/dist/chunks/audioEngine-BsSa5q28.esm.js.map +1 -0
  144. package/dist/chunks/audioEngine-Q9RaM40V.esm.min.js +2 -0
  145. package/dist/chunks/audioEngine-Q9RaM40V.esm.min.js.map +1 -0
  146. package/dist/chunks/bakedVertexAnimation-Dl6TUwlE.esm.min.js +2 -0
  147. package/dist/chunks/bakedVertexAnimation-Dl6TUwlE.esm.min.js.map +1 -0
  148. package/dist/chunks/bakedVertexAnimation-FeXNV03T.esm.js +119 -0
  149. package/dist/chunks/bakedVertexAnimation-FeXNV03T.esm.js.map +1 -0
  150. package/dist/chunks/basisTextureLoader-BDG3XE5Y.esm.min.js +2 -0
  151. package/dist/chunks/basisTextureLoader-BDG3XE5Y.esm.min.js.map +1 -0
  152. package/dist/chunks/basisTextureLoader-DfZMofRb.esm.js +600 -0
  153. package/dist/chunks/basisTextureLoader-DfZMofRb.esm.js.map +1 -0
  154. package/dist/chunks/dds-Igr2kHF_.esm.min.js +2 -0
  155. package/dist/chunks/dds-Igr2kHF_.esm.min.js.map +1 -0
  156. package/dist/chunks/dds-o4OMNRtH.esm.js +540 -0
  157. package/dist/chunks/dds-o4OMNRtH.esm.js.map +1 -0
  158. package/dist/chunks/ddsTextureLoader-CnyOXLtf.esm.min.js +2 -0
  159. package/dist/chunks/ddsTextureLoader-CnyOXLtf.esm.min.js.map +1 -0
  160. package/dist/chunks/ddsTextureLoader-VMzKzLn-.esm.js +88 -0
  161. package/dist/chunks/ddsTextureLoader-VMzKzLn-.esm.js.map +1 -0
  162. package/dist/chunks/decalFragment-Dd54mbG2.esm.min.js +2 -0
  163. package/dist/chunks/decalFragment-Dd54mbG2.esm.min.js.map +1 -0
  164. package/dist/chunks/decalFragment-DfryH-xh.esm.js +18 -0
  165. package/dist/chunks/decalFragment-DfryH-xh.esm.js.map +1 -0
  166. package/dist/chunks/default.fragment-CnYfGMJp.esm.js +449 -0
  167. package/dist/chunks/default.fragment-CnYfGMJp.esm.js.map +1 -0
  168. package/dist/chunks/default.fragment-CsdUsRw_.esm.min.js +2 -0
  169. package/dist/chunks/default.fragment-CsdUsRw_.esm.min.js.map +1 -0
  170. package/dist/chunks/default.fragment-D0ITB58w.esm.js +515 -0
  171. package/dist/chunks/default.fragment-D0ITB58w.esm.js.map +1 -0
  172. package/dist/chunks/default.fragment-D6IvjaEp.esm.min.js +2 -0
  173. package/dist/chunks/default.fragment-D6IvjaEp.esm.min.js.map +1 -0
  174. package/dist/chunks/default.vertex-Ch_6OmJk.esm.min.js +2 -0
  175. package/dist/chunks/default.vertex-Ch_6OmJk.esm.min.js.map +1 -0
  176. package/dist/chunks/default.vertex-DqT17MVn.esm.js +199 -0
  177. package/dist/chunks/default.vertex-DqT17MVn.esm.js.map +1 -0
  178. package/dist/chunks/default.vertex-ld9hqDyj.esm.js +180 -0
  179. package/dist/chunks/default.vertex-ld9hqDyj.esm.js.map +1 -0
  180. package/dist/chunks/default.vertex-wi8elnOd.esm.min.js +2 -0
  181. package/dist/chunks/default.vertex-wi8elnOd.esm.min.js.map +1 -0
  182. package/dist/chunks/defaultUboDeclaration--F3dwx1S.esm.js +15 -0
  183. package/dist/chunks/defaultUboDeclaration--F3dwx1S.esm.js.map +1 -0
  184. package/dist/chunks/defaultUboDeclaration-B1N9B5Gl.esm.min.js +2 -0
  185. package/dist/chunks/defaultUboDeclaration-B1N9B5Gl.esm.min.js.map +1 -0
  186. package/dist/chunks/defaultUboDeclaration-CVb37fjo.esm.min.js +2 -0
  187. package/dist/chunks/defaultUboDeclaration-CVb37fjo.esm.min.js.map +1 -0
  188. package/dist/chunks/defaultUboDeclaration-OtAuvsYL.esm.js +13 -0
  189. package/dist/chunks/defaultUboDeclaration-OtAuvsYL.esm.js.map +1 -0
  190. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
  191. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
  192. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
  193. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
  194. package/dist/chunks/dumpTools-Cd98CM01.esm.js +402 -0
  195. package/dist/chunks/dumpTools-Cd98CM01.esm.js.map +1 -0
  196. package/dist/chunks/dumpTools-kyQtrfmm.esm.min.js +2 -0
  197. package/dist/chunks/dumpTools-kyQtrfmm.esm.min.js.map +1 -0
  198. package/dist/chunks/engine-B3yxhwnS.esm.js +2174 -0
  199. package/dist/chunks/engine-B3yxhwnS.esm.js.map +1 -0
  200. package/dist/chunks/engine-CPXcFlBT.esm.min.js +2 -0
  201. package/dist/chunks/engine-CPXcFlBT.esm.min.js.map +1 -0
  202. package/dist/chunks/engine.common-B6M8bu3t.esm.js +1088 -0
  203. package/dist/chunks/engine.common-B6M8bu3t.esm.js.map +1 -0
  204. package/dist/chunks/engine.common-cpembRo8.esm.min.js +2 -0
  205. package/dist/chunks/engine.common-cpembRo8.esm.min.js.map +1 -0
  206. package/dist/chunks/envTextureLoader-BtwI9GPN.esm.js +65 -0
  207. package/dist/chunks/envTextureLoader-BtwI9GPN.esm.js.map +1 -0
  208. package/dist/chunks/envTextureLoader-D9erruFA.esm.min.js +2 -0
  209. package/dist/chunks/envTextureLoader-D9erruFA.esm.min.js.map +1 -0
  210. package/dist/chunks/environmentTextureTools-BCJKgGWI.esm.min.js +2 -0
  211. package/dist/chunks/environmentTextureTools-BCJKgGWI.esm.min.js.map +1 -0
  212. package/dist/chunks/environmentTextureTools-DIr7XYmL.esm.js +382 -0
  213. package/dist/chunks/environmentTextureTools-DIr7XYmL.esm.js.map +1 -0
  214. package/dist/chunks/exrTextureLoader-BIpKPFKS.esm.js +1682 -0
  215. package/dist/chunks/exrTextureLoader-BIpKPFKS.esm.js.map +1 -0
  216. package/dist/chunks/exrTextureLoader-D4DP8CEI.esm.min.js +2 -0
  217. package/dist/chunks/exrTextureLoader-D4DP8CEI.esm.min.js.map +1 -0
  218. package/dist/chunks/fogFragment-CT1rtmII.esm.js +102 -0
  219. package/dist/chunks/fogFragment-CT1rtmII.esm.js.map +1 -0
  220. package/dist/chunks/fogFragment-Caucp7gO.esm.min.js +2 -0
  221. package/dist/chunks/fogFragment-Caucp7gO.esm.min.js.map +1 -0
  222. package/dist/chunks/fresnelFunction-C-YnVKZy.esm.js +12 -0
  223. package/dist/chunks/fresnelFunction-C-YnVKZy.esm.js.map +1 -0
  224. package/dist/chunks/fresnelFunction-DXV-Gn3X.esm.min.js +2 -0
  225. package/dist/chunks/fresnelFunction-DXV-Gn3X.esm.min.js.map +1 -0
  226. package/dist/chunks/glTFLoader-BUEhZ_Yx.esm.js +7577 -0
  227. package/dist/chunks/glTFLoader-BUEhZ_Yx.esm.js.map +1 -0
  228. package/dist/chunks/glTFLoader-Bikb9kQP.esm.min.js +2 -0
  229. package/dist/chunks/glTFLoader-Bikb9kQP.esm.min.js.map +1 -0
  230. package/dist/chunks/glTFLoaderAnimation-DoayKrau.esm.min.js +2 -0
  231. package/dist/chunks/glTFLoaderAnimation-DoayKrau.esm.min.js.map +1 -0
  232. package/dist/chunks/glTFLoaderAnimation-DrC2hKeR.esm.js +77 -0
  233. package/dist/chunks/glTFLoaderAnimation-DrC2hKeR.esm.js.map +1 -0
  234. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  235. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  236. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  237. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  238. package/dist/chunks/harmonicsFunctions-CvPMLLnj.esm.js +34 -0
  239. package/dist/chunks/harmonicsFunctions-CvPMLLnj.esm.js.map +1 -0
  240. package/dist/chunks/harmonicsFunctions-D36-AdS5.esm.js +35 -0
  241. package/dist/chunks/harmonicsFunctions-D36-AdS5.esm.js.map +1 -0
  242. package/dist/chunks/harmonicsFunctions-DZ2FogZq.esm.min.js +2 -0
  243. package/dist/chunks/harmonicsFunctions-DZ2FogZq.esm.min.js.map +1 -0
  244. package/dist/chunks/harmonicsFunctions-Dqm6bWBy.esm.min.js +2 -0
  245. package/dist/chunks/harmonicsFunctions-Dqm6bWBy.esm.min.js.map +1 -0
  246. package/dist/chunks/hdrTextureLoader-CiuIhL8I.esm.js +252 -0
  247. package/dist/chunks/hdrTextureLoader-CiuIhL8I.esm.js.map +1 -0
  248. package/dist/chunks/hdrTextureLoader-QQ6TEFPn.esm.min.js +2 -0
  249. package/dist/chunks/hdrTextureLoader-QQ6TEFPn.esm.min.js.map +1 -0
  250. package/dist/chunks/helperFunctions-BmpTMP9U.esm.min.js +2 -0
  251. package/dist/chunks/helperFunctions-BmpTMP9U.esm.min.js.map +1 -0
  252. package/dist/chunks/helperFunctions-Cb7U87AV.esm.js +108 -0
  253. package/dist/chunks/helperFunctions-Cb7U87AV.esm.js.map +1 -0
  254. package/dist/chunks/helperFunctions-DbJ3JhM0.esm.js +80 -0
  255. package/dist/chunks/helperFunctions-DbJ3JhM0.esm.js.map +1 -0
  256. package/dist/chunks/helperFunctions-M382PZ6f.esm.min.js +2 -0
  257. package/dist/chunks/helperFunctions-M382PZ6f.esm.min.js.map +1 -0
  258. package/dist/chunks/index-CIyiNmMD.esm.min.js +57 -0
  259. package/dist/chunks/index-CIyiNmMD.esm.min.js.map +1 -0
  260. package/dist/chunks/index-DV_mRp0V.esm.js +72045 -0
  261. package/dist/chunks/index-DV_mRp0V.esm.js.map +1 -0
  262. package/dist/chunks/ktxTextureLoader-B1e7g2Se.esm.js +814 -0
  263. package/dist/chunks/ktxTextureLoader-B1e7g2Se.esm.js.map +1 -0
  264. package/dist/chunks/ktxTextureLoader-CfLNNmBj.esm.min.js +2 -0
  265. package/dist/chunks/ktxTextureLoader-CfLNNmBj.esm.min.js.map +1 -0
  266. package/dist/chunks/logDepthDeclaration-AKRPAXbv.esm.js +20 -0
  267. package/dist/chunks/logDepthDeclaration-AKRPAXbv.esm.js.map +1 -0
  268. package/dist/chunks/logDepthDeclaration-BFlc1Sz5.esm.js +35 -0
  269. package/dist/chunks/logDepthDeclaration-BFlc1Sz5.esm.js.map +1 -0
  270. package/dist/chunks/logDepthDeclaration-BkU1fH0B.esm.min.js +2 -0
  271. package/dist/chunks/logDepthDeclaration-BkU1fH0B.esm.min.js.map +1 -0
  272. package/dist/chunks/logDepthDeclaration-C6GKSjog.esm.min.js +2 -0
  273. package/dist/chunks/logDepthDeclaration-C6GKSjog.esm.min.js.map +1 -0
  274. package/dist/chunks/logDepthVertex-BOQAtuDj.esm.js +77 -0
  275. package/dist/chunks/logDepthVertex-BOQAtuDj.esm.js.map +1 -0
  276. package/dist/chunks/logDepthVertex-Co2KvxUo.esm.min.js +2 -0
  277. package/dist/chunks/logDepthVertex-Co2KvxUo.esm.min.js.map +1 -0
  278. package/dist/chunks/logDepthVertex-H_MJJ_GQ.esm.min.js +2 -0
  279. package/dist/chunks/logDepthVertex-H_MJJ_GQ.esm.min.js.map +1 -0
  280. package/dist/chunks/logDepthVertex-u512xo4x.esm.js +488 -0
  281. package/dist/chunks/logDepthVertex-u512xo4x.esm.js.map +1 -0
  282. package/dist/chunks/mainUVVaryingDeclaration-BeDhg2oD.esm.js +11 -0
  283. package/dist/chunks/mainUVVaryingDeclaration-BeDhg2oD.esm.js.map +1 -0
  284. package/dist/chunks/mainUVVaryingDeclaration-C3OpRYwk.esm.min.js +2 -0
  285. package/dist/chunks/mainUVVaryingDeclaration-C3OpRYwk.esm.min.js.map +1 -0
  286. package/dist/chunks/meshUboDeclaration-DS9O2grO.esm.min.js +2 -0
  287. package/dist/chunks/meshUboDeclaration-DS9O2grO.esm.min.js.map +1 -0
  288. package/dist/chunks/meshUboDeclaration-Dj2hscRy.esm.js +24 -0
  289. package/dist/chunks/meshUboDeclaration-Dj2hscRy.esm.js.map +1 -0
  290. package/dist/chunks/objFileLoader-BbMgApzR.esm.min.js +2 -0
  291. package/dist/chunks/objFileLoader-BbMgApzR.esm.min.js.map +1 -0
  292. package/dist/chunks/objFileLoader-BpsC8pGC.esm.js +1338 -0
  293. package/dist/chunks/objFileLoader-BpsC8pGC.esm.js.map +1 -0
  294. package/dist/chunks/oitFragment-BlZOVBNE.esm.js +1210 -0
  295. package/dist/chunks/oitFragment-BlZOVBNE.esm.js.map +1 -0
  296. package/dist/chunks/oitFragment-D5kQEOJH.esm.min.js +2 -0
  297. package/dist/chunks/oitFragment-D5kQEOJH.esm.min.js.map +1 -0
  298. package/dist/chunks/oitFragment-HW7VZaca.esm.min.js +2 -0
  299. package/dist/chunks/oitFragment-HW7VZaca.esm.min.js.map +1 -0
  300. package/dist/chunks/oitFragment-JXDEu0bi.esm.js +1150 -0
  301. package/dist/chunks/oitFragment-JXDEu0bi.esm.js.map +1 -0
  302. package/dist/chunks/pass.fragment-BJQq2qAp.esm.js +15 -0
  303. package/dist/chunks/pass.fragment-BJQq2qAp.esm.js.map +1 -0
  304. package/dist/chunks/pass.fragment-BxD_kCkX.esm.min.js +2 -0
  305. package/dist/chunks/pass.fragment-BxD_kCkX.esm.min.js.map +1 -0
  306. package/dist/chunks/pass.fragment-By7gsCOP.esm.js +15 -0
  307. package/dist/chunks/pass.fragment-By7gsCOP.esm.js.map +1 -0
  308. package/dist/chunks/pass.fragment-CBeObuzk.esm.min.js +2 -0
  309. package/dist/chunks/pass.fragment-CBeObuzk.esm.min.js.map +1 -0
  310. package/dist/chunks/pbr.fragment-BYJy3TyL.esm.js +3165 -0
  311. package/dist/chunks/pbr.fragment-BYJy3TyL.esm.js.map +1 -0
  312. package/dist/chunks/pbr.fragment-Cjqfjhki.esm.min.js +2 -0
  313. package/dist/chunks/pbr.fragment-Cjqfjhki.esm.min.js.map +1 -0
  314. package/dist/chunks/pbr.fragment-fj1P_BfA.esm.min.js +2 -0
  315. package/dist/chunks/pbr.fragment-fj1P_BfA.esm.min.js.map +1 -0
  316. package/dist/chunks/pbr.fragment-wP-c85IY.esm.js +3219 -0
  317. package/dist/chunks/pbr.fragment-wP-c85IY.esm.js.map +1 -0
  318. package/dist/chunks/pbr.vertex-BviiatXf.esm.js +335 -0
  319. package/dist/chunks/pbr.vertex-BviiatXf.esm.js.map +1 -0
  320. package/dist/chunks/pbr.vertex-DEEQfrHH.esm.js +210 -0
  321. package/dist/chunks/pbr.vertex-DEEQfrHH.esm.js.map +1 -0
  322. package/dist/chunks/pbr.vertex-DK-wI3nj.esm.min.js +2 -0
  323. package/dist/chunks/pbr.vertex-DK-wI3nj.esm.min.js.map +1 -0
  324. package/dist/chunks/pbr.vertex-SS6Eh96F.esm.min.js +2 -0
  325. package/dist/chunks/pbr.vertex-SS6Eh96F.esm.min.js.map +1 -0
  326. package/dist/chunks/postprocess.vertex-BbTJmjCf.esm.min.js +2 -0
  327. package/dist/chunks/postprocess.vertex-BbTJmjCf.esm.min.js.map +1 -0
  328. package/dist/chunks/postprocess.vertex-CNs3MRKb.esm.js +20 -0
  329. package/dist/chunks/postprocess.vertex-CNs3MRKb.esm.js.map +1 -0
  330. package/dist/chunks/postprocess.vertex-CTo285Z2.esm.min.js +2 -0
  331. package/dist/chunks/postprocess.vertex-CTo285Z2.esm.min.js.map +1 -0
  332. package/dist/chunks/postprocess.vertex-y147vu4l.esm.js +18 -0
  333. package/dist/chunks/postprocess.vertex-y147vu4l.esm.js.map +1 -0
  334. package/dist/chunks/rawTexture-6isRmFti.esm.js +191 -0
  335. package/dist/chunks/rawTexture-6isRmFti.esm.js.map +1 -0
  336. package/dist/chunks/rawTexture-D4XnSF1r.esm.min.js +2 -0
  337. package/dist/chunks/rawTexture-D4XnSF1r.esm.min.js.map +1 -0
  338. package/dist/chunks/rgbdDecode.fragment-3lEy-Ka7.esm.js +17 -0
  339. package/dist/chunks/rgbdDecode.fragment-3lEy-Ka7.esm.js.map +1 -0
  340. package/dist/chunks/rgbdDecode.fragment-COQem3tF.esm.js +17 -0
  341. package/dist/chunks/rgbdDecode.fragment-COQem3tF.esm.js.map +1 -0
  342. package/dist/chunks/rgbdDecode.fragment-DXGiOnN0.esm.min.js +2 -0
  343. package/dist/chunks/rgbdDecode.fragment-DXGiOnN0.esm.min.js.map +1 -0
  344. package/dist/chunks/rgbdDecode.fragment-H721Xf9-.esm.min.js +2 -0
  345. package/dist/chunks/rgbdDecode.fragment-H721Xf9-.esm.min.js.map +1 -0
  346. package/dist/chunks/rgbdEncode.fragment-B4OD9ZtF.esm.min.js +2 -0
  347. package/dist/chunks/rgbdEncode.fragment-B4OD9ZtF.esm.min.js.map +1 -0
  348. package/dist/chunks/rgbdEncode.fragment-CQiCuTLF.esm.js +17 -0
  349. package/dist/chunks/rgbdEncode.fragment-CQiCuTLF.esm.js.map +1 -0
  350. package/dist/chunks/rgbdEncode.fragment-CX3nTLp5.esm.js +17 -0
  351. package/dist/chunks/rgbdEncode.fragment-CX3nTLp5.esm.js.map +1 -0
  352. package/dist/chunks/rgbdEncode.fragment-CdBxB5jv.esm.min.js +2 -0
  353. package/dist/chunks/rgbdEncode.fragment-CdBxB5jv.esm.min.js.map +1 -0
  354. package/dist/chunks/splatFileLoader-3iaRLBaz.esm.min.js +2 -0
  355. package/dist/chunks/splatFileLoader-3iaRLBaz.esm.min.js.map +1 -0
  356. package/dist/chunks/splatFileLoader-B9nfzA38.esm.js +3598 -0
  357. package/dist/chunks/splatFileLoader-B9nfzA38.esm.js.map +1 -0
  358. package/dist/chunks/standardMaterial-PSnYwoCV.esm.min.js +2 -0
  359. package/dist/chunks/standardMaterial-PSnYwoCV.esm.min.js.map +1 -0
  360. package/dist/chunks/standardMaterial-sHuTQ1tu.esm.js +1800 -0
  361. package/dist/chunks/standardMaterial-sHuTQ1tu.esm.js.map +1 -0
  362. package/dist/chunks/stlFileLoader-CGeDwcKD.esm.js +238 -0
  363. package/dist/chunks/stlFileLoader-CGeDwcKD.esm.js.map +1 -0
  364. package/dist/chunks/stlFileLoader-CMvJa97I.esm.min.js +2 -0
  365. package/dist/chunks/stlFileLoader-CMvJa97I.esm.min.js.map +1 -0
  366. package/dist/chunks/tgaTextureLoader-DA9PD4-W.esm.min.js +2 -0
  367. package/dist/chunks/tgaTextureLoader-DA9PD4-W.esm.min.js.map +1 -0
  368. package/dist/chunks/tgaTextureLoader-tLbUn9Fj.esm.js +349 -0
  369. package/dist/chunks/tgaTextureLoader-tLbUn9Fj.esm.js.map +1 -0
  370. package/dist/chunks/thinEngine-BHJfErVb.esm.js +3721 -0
  371. package/dist/chunks/thinEngine-BHJfErVb.esm.js.map +1 -0
  372. package/dist/chunks/thinEngine-Dm9mz21A.esm.min.js +2 -0
  373. package/dist/chunks/thinEngine-Dm9mz21A.esm.min.js.map +1 -0
  374. package/dist/chunks/thinInstanceMesh-BmyPW1W0.esm.js +314 -0
  375. package/dist/chunks/thinInstanceMesh-BmyPW1W0.esm.js.map +1 -0
  376. package/dist/chunks/thinInstanceMesh-FE1_0Dpq.esm.min.js +2 -0
  377. package/dist/chunks/thinInstanceMesh-FE1_0Dpq.esm.min.js.map +1 -0
  378. package/dist/chunks/vertexColorMixing-q2DcZ4Dn.esm.js +528 -0
  379. package/dist/chunks/vertexColorMixing-q2DcZ4Dn.esm.js.map +1 -0
  380. package/dist/chunks/vertexColorMixing-rp5ckHF-.esm.min.js +2 -0
  381. package/dist/chunks/vertexColorMixing-rp5ckHF-.esm.min.js.map +1 -0
  382. package/dist/chunks/webgpuEngine-B_ikij35.esm.js +11191 -0
  383. package/dist/chunks/webgpuEngine-B_ikij35.esm.js.map +1 -0
  384. package/dist/chunks/webgpuEngine-CsJfrYZY.esm.min.js +2 -0
  385. package/dist/chunks/webgpuEngine-CsJfrYZY.esm.min.js.map +1 -0
  386. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  387. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  388. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  389. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  390. package/docs/ViewerDefault.jpg +0 -0
  391. package/docs/ViewerParts.jpg +0 -0
  392. package/docs/ViewerSlots.jpg +0 -0
  393. package/docs/ViewerStyled.jpg +0 -0
  394. package/lib/index.d.ts +325 -0
  395. package/lib/index.js +1116 -0
  396. package/lib/index.js.map +1 -0
  397. package/package.json +18 -27
  398. package/readme.md +145 -21
  399. package/configuration/configuration.d.ts +0 -107
  400. package/configuration/configuration.js +0 -16
  401. package/configuration/configuration.js.map +0 -1
  402. package/configuration/configurationCompatibility.d.ts +0 -8
  403. package/configuration/configurationCompatibility.js +0 -66
  404. package/configuration/configurationCompatibility.js.map +0 -1
  405. package/configuration/configurationContainer.d.ts +0 -10
  406. package/configuration/configurationContainer.js +0 -10
  407. package/configuration/configurationContainer.js.map +0 -1
  408. package/configuration/globals.d.ts +0 -6
  409. package/configuration/globals.js +0 -18
  410. package/configuration/globals.js.map +0 -1
  411. package/configuration/index.d.ts +0 -2
  412. package/configuration/index.js +0 -4
  413. package/configuration/index.js.map +0 -1
  414. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  415. package/configuration/interfaces/cameraConfiguration.js +0 -2
  416. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  417. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  418. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  419. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  420. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  421. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  422. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  423. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  424. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  425. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  426. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  427. package/configuration/interfaces/groundConfiguration.js +0 -2
  428. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  429. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  430. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  431. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  432. package/configuration/interfaces/index.d.ts +0 -15
  433. package/configuration/interfaces/index.js +0 -16
  434. package/configuration/interfaces/index.js.map +0 -1
  435. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  436. package/configuration/interfaces/lightConfiguration.js +0 -2
  437. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  438. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  439. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  440. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  441. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  442. package/configuration/interfaces/modelConfiguration.js +0 -2
  443. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  444. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  445. package/configuration/interfaces/observersConfiguration.js +0 -2
  446. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  447. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  448. package/configuration/interfaces/sceneConfiguration.js +0 -2
  449. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  450. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  451. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  452. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  453. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  454. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  455. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  456. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  457. package/configuration/interfaces/templateConfiguration.js +0 -2
  458. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  459. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  460. package/configuration/interfaces/vrConfiguration.js +0 -2
  461. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  462. package/configuration/loader.d.ts +0 -4
  463. package/configuration/loader.js +0 -17
  464. package/configuration/loader.js.map +0 -1
  465. package/configuration/mappers.d.ts +0 -43
  466. package/configuration/mappers.js +0 -192
  467. package/configuration/mappers.js.map +0 -1
  468. package/configuration/renderOnlyLoader.d.ts +0 -33
  469. package/configuration/renderOnlyLoader.js +0 -162
  470. package/configuration/renderOnlyLoader.js.map +0 -1
  471. package/configuration/types/default.d.ts +0 -6
  472. package/configuration/types/default.js +0 -121
  473. package/configuration/types/default.js.map +0 -1
  474. package/configuration/types/environmentMap.d.ts +0 -5
  475. package/configuration/types/environmentMap.js +0 -14
  476. package/configuration/types/environmentMap.js.map +0 -1
  477. package/configuration/types/extended.d.ts +0 -6
  478. package/configuration/types/extended.js +0 -317
  479. package/configuration/types/extended.js.map +0 -1
  480. package/configuration/types/index.d.ts +0 -14
  481. package/configuration/types/index.js +0 -51
  482. package/configuration/types/index.js.map +0 -1
  483. package/configuration/types/minimal.d.ts +0 -6
  484. package/configuration/types/minimal.js +0 -43
  485. package/configuration/types/minimal.js.map +0 -1
  486. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  487. package/configuration/types/renderOnlyDefault.js +0 -31
  488. package/configuration/types/renderOnlyDefault.js.map +0 -1
  489. package/configuration/types/shadowLight.d.ts +0 -9
  490. package/configuration/types/shadowLight.js +0 -64
  491. package/configuration/types/shadowLight.js.map +0 -1
  492. package/helper/index.d.ts +0 -29
  493. package/helper/index.js +0 -66
  494. package/helper/index.js.map +0 -1
  495. package/index.d.ts +0 -30
  496. package/index.js +0 -46
  497. package/index.js.map +0 -1
  498. package/initializer.d.ts +0 -11
  499. package/initializer.js +0 -35
  500. package/initializer.js.map +0 -1
  501. package/interfaces.d.ts +0 -5
  502. package/interfaces.js +0 -7
  503. package/interfaces.js.map +0 -1
  504. package/labs/environmentSerializer.d.ts +0 -126
  505. package/labs/environmentSerializer.js +0 -191
  506. package/labs/environmentSerializer.js.map +0 -1
  507. package/labs/texture.d.ts +0 -183
  508. package/labs/texture.js +0 -350
  509. package/labs/texture.js.map +0 -1
  510. package/labs/viewerLabs.d.ts +0 -51
  511. package/labs/viewerLabs.js +0 -134
  512. package/labs/viewerLabs.js.map +0 -1
  513. package/loader/modelLoader.d.ts +0 -56
  514. package/loader/modelLoader.js +0 -199
  515. package/loader/modelLoader.js.map +0 -1
  516. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  517. package/loader/plugins/applyMaterialConfig.js +0 -16
  518. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  519. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  520. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  521. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  522. package/loader/plugins/index.d.ts +0 -19
  523. package/loader/plugins/index.js +0 -44
  524. package/loader/plugins/index.js.map +0 -1
  525. package/loader/plugins/loaderPlugin.d.ts +0 -24
  526. package/loader/plugins/loaderPlugin.js +0 -2
  527. package/loader/plugins/loaderPlugin.js.map +0 -1
  528. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  529. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  530. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  531. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  532. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  533. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  534. package/managers/observablesManager.d.ts +0 -66
  535. package/managers/observablesManager.js +0 -35
  536. package/managers/observablesManager.js.map +0 -1
  537. package/managers/sceneManager.d.ts +0 -245
  538. package/managers/sceneManager.js +0 -1375
  539. package/managers/sceneManager.js.map +0 -1
  540. package/managers/telemetryManager.d.ts +0 -78
  541. package/managers/telemetryManager.js +0 -117
  542. package/managers/telemetryManager.js.map +0 -1
  543. package/model/modelAnimation.d.ts +0 -215
  544. package/model/modelAnimation.js +0 -237
  545. package/model/modelAnimation.js.map +0 -1
  546. package/model/viewerModel.d.ts +0 -233
  547. package/model/viewerModel.js +0 -673
  548. package/model/viewerModel.js.map +0 -1
  549. package/optimizer/custom/extended.d.ts +0 -13
  550. package/optimizer/custom/extended.js +0 -101
  551. package/optimizer/custom/extended.js.map +0 -1
  552. package/optimizer/custom/index.d.ts +0 -9
  553. package/optimizer/custom/index.js +0 -26
  554. package/optimizer/custom/index.js.map +0 -1
  555. package/renderOnlyIndex.d.ts +0 -11
  556. package/renderOnlyIndex.js +0 -18
  557. package/renderOnlyIndex.js.map +0 -1
  558. package/templating/eventManager.d.ts +0 -35
  559. package/templating/eventManager.js +0 -66
  560. package/templating/eventManager.js.map +0 -1
  561. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  562. package/templating/plugins/hdButtonPlugin.js +0 -21
  563. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  564. package/templating/plugins/printButton.d.ts +0 -9
  565. package/templating/plugins/printButton.js +0 -40
  566. package/templating/plugins/printButton.js.map +0 -1
  567. package/templating/templateManager.d.ts +0 -197
  568. package/templating/templateManager.js +0 -561
  569. package/templating/templateManager.js.map +0 -1
  570. package/templating/viewerTemplatePlugin.d.ts +0 -21
  571. package/templating/viewerTemplatePlugin.js +0 -69
  572. package/templating/viewerTemplatePlugin.js.map +0 -1
  573. package/viewer/defaultViewer.d.ts +0 -130
  574. package/viewer/defaultViewer.js +0 -672
  575. package/viewer/defaultViewer.js.map +0 -1
  576. package/viewer/renderOnlyViewer.d.ts +0 -9
  577. package/viewer/renderOnlyViewer.js +0 -46
  578. package/viewer/renderOnlyViewer.js.map +0 -1
  579. package/viewer/viewer.d.ts +0 -258
  580. package/viewer/viewer.js +0 -783
  581. package/viewer/viewer.js.map +0 -1
  582. package/viewer/viewerManager.d.ts +0 -58
  583. package/viewer/viewerManager.js +0 -91
  584. package/viewer/viewerManager.js.map +0 -1
  585. package/viewer/viewerWithTemplate.d.ts +0 -9
  586. package/viewer/viewerWithTemplate.js +0 -20
  587. package/viewer/viewerWithTemplate.js.map +0 -1
package/labs/texture.js DELETED
@@ -1,350 +0,0 @@
1
- import { CubeTexture } from "@babylonjs/core/Materials/Textures/cubeTexture.js";
2
- import { InternalTexture } from "@babylonjs/core/Materials/Textures/internalTexture.js";
3
- import { Texture } from "@babylonjs/core/Materials/Textures/texture.js";
4
- /**
5
- * WebGL Pixel Formats
6
- */
7
- export var PixelFormat;
8
- (function (PixelFormat) {
9
- PixelFormat[PixelFormat["DEPTH_COMPONENT"] = 6402] = "DEPTH_COMPONENT";
10
- PixelFormat[PixelFormat["ALPHA"] = 6406] = "ALPHA";
11
- PixelFormat[PixelFormat["RGB"] = 6407] = "RGB";
12
- PixelFormat[PixelFormat["RGBA"] = 6408] = "RGBA";
13
- PixelFormat[PixelFormat["LUMINANCE"] = 6409] = "LUMINANCE";
14
- PixelFormat[PixelFormat["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
15
- })(PixelFormat || (PixelFormat = {}));
16
- /**
17
- * WebGL Pixel Types
18
- */
19
- export var PixelType;
20
- (function (PixelType) {
21
- PixelType[PixelType["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE";
22
- PixelType[PixelType["UNSIGNED_SHORT_4_4_4_4"] = 32819] = "UNSIGNED_SHORT_4_4_4_4";
23
- PixelType[PixelType["UNSIGNED_SHORT_5_5_5_1"] = 32820] = "UNSIGNED_SHORT_5_5_5_1";
24
- PixelType[PixelType["UNSIGNED_SHORT_5_6_5"] = 33635] = "UNSIGNED_SHORT_5_6_5";
25
- })(PixelType || (PixelType = {}));
26
- /**
27
- * WebGL Texture Magnification Filter
28
- */
29
- export var TextureMagFilter;
30
- (function (TextureMagFilter) {
31
- TextureMagFilter[TextureMagFilter["NEAREST"] = 9728] = "NEAREST";
32
- TextureMagFilter[TextureMagFilter["LINEAR"] = 9729] = "LINEAR";
33
- })(TextureMagFilter || (TextureMagFilter = {}));
34
- /**
35
- * WebGL Texture Minification Filter
36
- */
37
- export var TextureMinFilter;
38
- (function (TextureMinFilter) {
39
- TextureMinFilter[TextureMinFilter["NEAREST"] = 9728] = "NEAREST";
40
- TextureMinFilter[TextureMinFilter["LINEAR"] = 9729] = "LINEAR";
41
- TextureMinFilter[TextureMinFilter["NEAREST_MIPMAP_NEAREST"] = 9984] = "NEAREST_MIPMAP_NEAREST";
42
- TextureMinFilter[TextureMinFilter["LINEAR_MIPMAP_NEAREST"] = 9985] = "LINEAR_MIPMAP_NEAREST";
43
- TextureMinFilter[TextureMinFilter["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
44
- TextureMinFilter[TextureMinFilter["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
45
- })(TextureMinFilter || (TextureMinFilter = {}));
46
- /**
47
- * WebGL Texture Wrap Modes
48
- */
49
- export var TextureWrapMode;
50
- (function (TextureWrapMode) {
51
- TextureWrapMode[TextureWrapMode["REPEAT"] = 10497] = "REPEAT";
52
- TextureWrapMode[TextureWrapMode["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
53
- TextureWrapMode[TextureWrapMode["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
54
- })(TextureWrapMode || (TextureWrapMode = {}));
55
- /**
56
- * A minimal WebGL cubemap descriptor
57
- */
58
- var TextureCube = /** @class */ (function () {
59
- /**
60
- * constructor
61
- * @param internalFormat WebGL pixel format for the texture on the GPU
62
- * @param type WebGL pixel type of the supplied data and texture on the GPU
63
- * @param source An array containing mipmap levels of faces, where each mipmap level is an array of faces and each face is a TextureSource object
64
- */
65
- function TextureCube(internalFormat, type, source) {
66
- if (source === void 0) { source = []; }
67
- this.internalFormat = internalFormat;
68
- this.type = type;
69
- this.source = source;
70
- }
71
- Object.defineProperty(TextureCube.prototype, "Width", {
72
- /**
73
- * Returns the width of a face of the texture or 0 if not available
74
- */
75
- // eslint-disable-next-line @typescript-eslint/naming-convention
76
- get: function () {
77
- return this.source && this.source[0] && this.source[0][0] ? this.source[0][0].width : 0;
78
- },
79
- enumerable: false,
80
- configurable: true
81
- });
82
- Object.defineProperty(TextureCube.prototype, "Height", {
83
- /**
84
- * Returns the height of a face of the texture or 0 if not available
85
- */
86
- // eslint-disable-next-line @typescript-eslint/naming-convention
87
- get: function () {
88
- return this.source && this.source[0] && this.source[0][0] ? this.source[0][0].height : 0;
89
- },
90
- enumerable: false,
91
- configurable: true
92
- });
93
- return TextureCube;
94
- }());
95
- export { TextureCube };
96
- /**
97
- * A static class providing methods to aid working with Bablyon textures.
98
- */
99
- export var TextureUtils = /** @class */ (function () {
100
- function TextureUtils() {
101
- }
102
- /**
103
- * Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters.
104
- * If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created.
105
- * The advantage of this is to enable working with texture objects without the need to initialize on the GPU until desired.
106
- * @param scene A Babylon Scene instance
107
- * @param textureCube A Spectre TextureCube object
108
- * @param automaticMipmaps Pass true to enable automatic mipmap generation where possible (requires power of images)
109
- * @param environment Specifies that the texture will be used as an environment
110
- * @param singleLod Specifies that the texture will be a singleLod (for environment)
111
- * @returns Babylon cube texture
112
- */
113
- TextureUtils.GetBabylonCubeTexture = function (scene, textureCube, automaticMipmaps, environment, singleLod) {
114
- var _a;
115
- if (environment === void 0) { environment = false; }
116
- if (singleLod === void 0) { singleLod = false; }
117
- if (!textureCube) {
118
- throw new Error("no texture cube provided");
119
- }
120
- var parameters;
121
- if (environment) {
122
- parameters = singleLod ? TextureUtils._EnvironmentSingleMipSampling : TextureUtils._EnvironmentSampling;
123
- }
124
- else {
125
- parameters = {
126
- magFilter: 9728 /* TextureMagFilter.NEAREST */,
127
- minFilter: 9728 /* TextureMinFilter.NEAREST */,
128
- wrapS: 33071 /* TextureWrapMode.CLAMP_TO_EDGE */,
129
- wrapT: 33071 /* TextureWrapMode.CLAMP_TO_EDGE */,
130
- };
131
- }
132
- var key = TextureUtils.BabylonTextureKeyPrefix + parameters.magFilter + "" + parameters.minFilter + "" + parameters.wrapS + "" + parameters.wrapT;
133
- var babylonTexture = textureCube[key];
134
- if (!babylonTexture) {
135
- //initialize babylon texture
136
- babylonTexture = new CubeTexture("", scene);
137
- if (environment) {
138
- babylonTexture.lodGenerationOffset = TextureUtils.EnvironmentLODOffset;
139
- babylonTexture.lodGenerationScale = TextureUtils.EnvironmentLODScale;
140
- }
141
- babylonTexture.gammaSpace = false;
142
- var internalTexture_1 = new InternalTexture(scene.getEngine(), 8 /* InternalTextureSource.CubeRaw */);
143
- var glTexture_1 = (_a = internalTexture_1._hardwareTexture) === null || _a === void 0 ? void 0 : _a.underlyingResource;
144
- //babylon properties
145
- internalTexture_1.isCube = true;
146
- internalTexture_1.generateMipMaps = false;
147
- babylonTexture._texture = internalTexture_1;
148
- TextureUtils.ApplySamplingParameters(babylonTexture, parameters);
149
- var maxMipLevel_1 = automaticMipmaps ? 0 : textureCube.source.length - 1;
150
- var texturesUploaded_1 = 0;
151
- var textureComplete_1 = function () {
152
- return texturesUploaded_1 === (maxMipLevel_1 + 1) * 6;
153
- };
154
- var uploadFace_1 = function (i, level, face) {
155
- if (!glTexture_1) {
156
- return;
157
- }
158
- if (i === 0 && level === 0) {
159
- internalTexture_1.width = face.width;
160
- internalTexture_1.height = face.height;
161
- }
162
- var gl = scene.getEngine()._gl;
163
- gl.bindTexture(gl.TEXTURE_CUBE_MAP, glTexture_1);
164
- scene.getEngine()._unpackFlipY(false);
165
- if (face instanceof HTMLElement || face instanceof ImageData) {
166
- gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level, textureCube.internalFormat, textureCube.internalFormat, textureCube.type, face);
167
- }
168
- else {
169
- var textureData = face;
170
- gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level, textureCube.internalFormat, textureData.width, textureData.height, 0, textureData.format, textureCube.type, textureData.data);
171
- }
172
- texturesUploaded_1++;
173
- if (textureComplete_1()) {
174
- //generate mipmaps
175
- if (automaticMipmaps) {
176
- var w = face.width;
177
- var h = face.height;
178
- var isPot = (w !== 0 && w & (w - 1)) === 0 && (h !== 0 && h & (h - 1)) === 0;
179
- if (isPot) {
180
- gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
181
- }
182
- }
183
- // Upload Separate lods in case there is no support for texture lod.
184
- if (environment && !scene.getEngine().getCaps().textureLOD && !singleLod) {
185
- var mipSlices = 3;
186
- for (var i_1 = 0; i_1 < mipSlices; i_1++) {
187
- var lodKey = TextureUtils.BabylonTextureKeyPrefix + "lod" + i_1;
188
- var lod = textureCube[lodKey];
189
- //initialize lod texture if it doesn't already exist
190
- if (lod == null && textureCube.Width) {
191
- //compute LOD from even spacing in smoothness (matching shader calculation)
192
- var smoothness = i_1 / (mipSlices - 1);
193
- var roughness = 1 - smoothness;
194
- var kMinimumVariance = 0.0005;
195
- var alphaG = roughness * roughness + kMinimumVariance;
196
- var microsurfaceAverageSlopeTexels = alphaG * textureCube.Width;
197
- var environmentSpecularLOD = TextureUtils.EnvironmentLODScale * Math.log2(microsurfaceAverageSlopeTexels) + TextureUtils.EnvironmentLODOffset;
198
- var maxLODIndex = textureCube.source.length - 1;
199
- var mipmapIndex = Math.min(Math.max(Math.round(environmentSpecularLOD), 0), maxLODIndex);
200
- lod = TextureUtils.GetBabylonCubeTexture(scene, new TextureCube(6408 /* PixelFormat.RGBA */, 5121 /* PixelType.UNSIGNED_BYTE */, [textureCube.source[mipmapIndex]]), false, true, true);
201
- if (i_1 === 0) {
202
- internalTexture_1._lodTextureLow = lod;
203
- }
204
- else if (i_1 === 1) {
205
- internalTexture_1._lodTextureMid = lod;
206
- }
207
- else {
208
- internalTexture_1._lodTextureHigh = lod;
209
- }
210
- textureCube[lodKey] = lod;
211
- }
212
- }
213
- }
214
- internalTexture_1.isReady = true;
215
- }
216
- gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);
217
- scene.getEngine().resetTextureCache();
218
- };
219
- var _loop_1 = function (i) {
220
- var faces = textureCube.source[i];
221
- var _loop_2 = function (j) {
222
- var face = faces[j];
223
- if (face instanceof HTMLImageElement && !face.complete) {
224
- face.addEventListener("load", function () {
225
- uploadFace_1(j, i, face);
226
- }, false);
227
- }
228
- else {
229
- uploadFace_1(j, i, face);
230
- }
231
- };
232
- for (var j = 0; j < faces.length; j++) {
233
- _loop_2(j);
234
- }
235
- };
236
- for (var i = 0; i <= maxMipLevel_1; i++) {
237
- _loop_1(i);
238
- }
239
- scene.getEngine().resetTextureCache();
240
- babylonTexture.isReady = function () {
241
- return textureComplete_1();
242
- };
243
- textureCube[key] = babylonTexture;
244
- }
245
- return babylonTexture;
246
- };
247
- /**
248
- * Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields
249
- * @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field)
250
- * @param parameters Spectre SamplingParameters to apply
251
- */
252
- TextureUtils.ApplySamplingParameters = function (babylonTexture, parameters) {
253
- var _a;
254
- var scene = babylonTexture.getScene();
255
- if (!scene) {
256
- return;
257
- }
258
- var gl = scene.getEngine()._gl;
259
- var target = babylonTexture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;
260
- var internalTexture = babylonTexture._texture;
261
- if (!internalTexture) {
262
- return;
263
- }
264
- var glTexture = (_a = internalTexture._hardwareTexture) === null || _a === void 0 ? void 0 : _a.underlyingResource;
265
- gl.bindTexture(target, glTexture);
266
- if (parameters.magFilter != null) {
267
- gl.texParameteri(target, gl.TEXTURE_MAG_FILTER, parameters.magFilter);
268
- }
269
- if (parameters.minFilter != null) {
270
- gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, parameters.minFilter);
271
- }
272
- if (parameters.wrapS != null) {
273
- gl.texParameteri(target, gl.TEXTURE_WRAP_S, parameters.wrapS);
274
- }
275
- if (parameters.wrapT != null) {
276
- gl.texParameteri(target, gl.TEXTURE_WRAP_T, parameters.wrapT);
277
- }
278
- //set babylon wrap modes from sampling parameter
279
- switch (parameters.wrapS) {
280
- case 10497 /* TextureWrapMode.REPEAT */:
281
- babylonTexture.wrapU = Texture.WRAP_ADDRESSMODE;
282
- break;
283
- case 33071 /* TextureWrapMode.CLAMP_TO_EDGE */:
284
- babylonTexture.wrapU = Texture.CLAMP_ADDRESSMODE;
285
- break;
286
- case 33648 /* TextureWrapMode.MIRRORED_REPEAT */:
287
- babylonTexture.wrapU = Texture.MIRROR_ADDRESSMODE;
288
- break;
289
- default:
290
- babylonTexture.wrapU = Texture.CLAMP_ADDRESSMODE;
291
- }
292
- switch (parameters.wrapT) {
293
- case 10497 /* TextureWrapMode.REPEAT */:
294
- babylonTexture.wrapV = Texture.WRAP_ADDRESSMODE;
295
- break;
296
- case 33071 /* TextureWrapMode.CLAMP_TO_EDGE */:
297
- babylonTexture.wrapV = Texture.CLAMP_ADDRESSMODE;
298
- break;
299
- case 33648 /* TextureWrapMode.MIRRORED_REPEAT */:
300
- babylonTexture.wrapV = Texture.MIRROR_ADDRESSMODE;
301
- break;
302
- default:
303
- babylonTexture.wrapV = Texture.CLAMP_ADDRESSMODE;
304
- }
305
- if (parameters.maxAnisotropy != null && parameters.maxAnisotropy > 1) {
306
- var anisotropicExt = gl.getExtension("EXT_texture_filter_anisotropic");
307
- if (anisotropicExt) {
308
- var maxAnisotropicSamples = gl.getParameter(anisotropicExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
309
- var maxAnisotropy = Math.min(parameters.maxAnisotropy, maxAnisotropicSamples);
310
- gl.texParameterf(target, anisotropicExt.TEXTURE_MAX_ANISOTROPY_EXT, maxAnisotropy);
311
- babylonTexture.anisotropicFilteringLevel = maxAnisotropy;
312
- }
313
- }
314
- gl.bindTexture(target, null);
315
- scene.getEngine().resetTextureCache();
316
- };
317
- /**
318
- * A prefix used when storing a babylon texture object reference on a Spectre texture object
319
- */
320
- TextureUtils.BabylonTextureKeyPrefix = "__babylonTexture_";
321
- /**
322
- * Controls anisotropic filtering for deserialized textures.
323
- */
324
- TextureUtils.MaxAnisotropy = 4;
325
- TextureUtils._EnvironmentSampling = {
326
- magFilter: 9729 /* TextureMagFilter.LINEAR */,
327
- minFilter: 9987 /* TextureMinFilter.LINEAR_MIPMAP_LINEAR */,
328
- wrapS: 33071 /* TextureWrapMode.CLAMP_TO_EDGE */,
329
- wrapT: 33071 /* TextureWrapMode.CLAMP_TO_EDGE */,
330
- maxAnisotropy: 1,
331
- };
332
- TextureUtils._EnvironmentSingleMipSampling = {
333
- magFilter: 9729 /* TextureMagFilter.LINEAR */,
334
- minFilter: 9729 /* TextureMinFilter.LINEAR */,
335
- wrapS: 33071 /* TextureWrapMode.CLAMP_TO_EDGE */,
336
- wrapT: 33071 /* TextureWrapMode.CLAMP_TO_EDGE */,
337
- maxAnisotropy: 1,
338
- };
339
- //from "/Internal/Lighting.EnvironmentFilterScale" in Engine/*/Configuration.cpp
340
- /**
341
- * Environment preprocessing dedicated value (Internal Use or Advanced only).
342
- */
343
- TextureUtils.EnvironmentLODScale = 0.8;
344
- /**
345
- * Environment preprocessing dedicated value (Internal Use or Advanced only)..
346
- */
347
- TextureUtils.EnvironmentLODOffset = 1.0;
348
- return TextureUtils;
349
- }());
350
- //# sourceMappingURL=texture.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"texture.js","sourceRoot":"","sources":["../../../../tools/viewer/src/labs/texture.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,0DAA4C;AAClE,OAAO,EAAE,eAAe,EAAyB,8DAAgD;AAEjG,OAAO,EAAE,OAAO,EAAE,sDAAwC;AAG1D;;GAEG;AACH,MAAM,CAAN,IAAkB,WAOjB;AAPD,WAAkB,WAAW;IACzB,sEAAwB,CAAA;IACxB,kDAAc,CAAA;IACd,8CAAY,CAAA;IACZ,gD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,YAAY,CAAC,cAAc,CAAC,8BAA8B,CAAC,CAAC;gBAC7F,IAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC;gBAChF,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,cAAc,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAC;gBACnF,cAAc,CAAC,yBAAyB,GAAG,aAAa,CAAC;aAC5D;SACJ;QAED,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC7B,KAAK,CAAC,SAAS,EAAE,CAAC,iBAAiB,EAAE,CAAC;IAC1C,CAAC;IA1QD;;OAEG;IACW,oCAAuB,GAAG,mBAAmB,CAAC;IAE5D;;OAEG;IACW,0BAAa,GAAG,CAAC,CAAC;IAoQjB,iCAAoB,GAAuB;QACtD,SAAS,oCAAyB;QAClC,SAAS,kDAAuC;QAChD,KAAK,2CAA+B;QACpC,KAAK,2CAA+B;QACpC,aAAa,EAAE,CAAC;KACnB,CAAC;IAEa,0CAA6B,GAAuB;QAC/D,SAAS,oCAAyB;QAClC,SAAS,oCAAyB;QAClC,KAAK,2CAA+B;QACpC,KAAK,2CAA+B;QACpC,aAAa,EAAE,CAAC;KACnB,CAAC;IAEF,gFAAgF;IAChF;;OAEG;IACW,gCAAmB,GAAG,GAAG,CAAC;IACxC;;OAEG;IACW,iCAAoB,GAAG,GAAG,CAAC;IAC7C,mBAAC;CAAA,AAtSD,IAsSC","sourcesContent":["import type { Scene } from \"core/scene\";\r\nimport { CubeTexture } from \"core/Materials/Textures/cubeTexture\";\r\nimport { InternalTexture, InternalTextureSource } from \"core/Materials/Textures/internalTexture\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport { Texture } from \"core/Materials/Textures/texture\";\r\nimport type { Engine } from \"core/Engines/engine\";\r\n\r\n/**\r\n * WebGL Pixel Formats\r\n */\r\nexport const enum PixelFormat {\r\n DEPTH_COMPONENT = 0x1902,\r\n ALPHA = 0x1906,\r\n RGB = 0x1907,\r\n RGBA = 0x1908,\r\n LUMINANCE = 0x1909,\r\n LUMINANCE_ALPHA = 0x190a,\r\n}\r\n\r\n/**\r\n * WebGL Pixel Types\r\n */\r\nexport const enum PixelType {\r\n UNSIGNED_BYTE = 0x1401,\r\n UNSIGNED_SHORT_4_4_4_4 = 0x8033,\r\n UNSIGNED_SHORT_5_5_5_1 = 0x8034,\r\n UNSIGNED_SHORT_5_6_5 = 0x8363,\r\n}\r\n\r\n/**\r\n * WebGL Texture Magnification Filter\r\n */\r\nexport const enum TextureMagFilter {\r\n NEAREST = 0x2600,\r\n LINEAR = 0x2601,\r\n}\r\n\r\n/**\r\n * WebGL Texture Minification Filter\r\n */\r\nexport const enum TextureMinFilter {\r\n NEAREST = 0x2600,\r\n LINEAR = 0x2601,\r\n NEAREST_MIPMAP_NEAREST = 0x2700,\r\n LINEAR_MIPMAP_NEAREST = 0x2701,\r\n NEAREST_MIPMAP_LINEAR = 0x2702,\r\n LINEAR_MIPMAP_LINEAR = 0x2703,\r\n}\r\n\r\n/**\r\n * WebGL Texture Wrap Modes\r\n */\r\nexport const enum TextureWrapMode {\r\n REPEAT = 0x2901,\r\n CLAMP_TO_EDGE = 0x812f,\r\n MIRRORED_REPEAT = 0x8370,\r\n}\r\n\r\n/**\r\n * Raw texture data and descriptor sufficient for WebGL texture upload\r\n */\r\nexport interface TextureData {\r\n /**\r\n * Width of image\r\n */\r\n width: number;\r\n /**\r\n * Height of image\r\n */\r\n height: number;\r\n /**\r\n * Format of pixels in data\r\n */\r\n format: PixelFormat;\r\n /**\r\n * Row byte alignment of pixels in data\r\n */\r\n alignment: number;\r\n /**\r\n * Pixel data\r\n */\r\n data: ArrayBufferView;\r\n}\r\n\r\n/**\r\n * Wraps sampling parameters for a WebGL texture\r\n */\r\nexport interface SamplingParameters {\r\n /**\r\n * Magnification mode when upsampling from a WebGL texture\r\n */\r\n magFilter?: TextureMagFilter;\r\n /**\r\n * Minification mode when upsampling from a WebGL texture\r\n */\r\n minFilter?: TextureMinFilter;\r\n /**\r\n * X axis wrapping mode when sampling out of a WebGL texture bounds\r\n */\r\n wrapS?: TextureWrapMode;\r\n /**\r\n * Y axis wrapping mode when sampling out of a WebGL texture bounds\r\n */\r\n wrapT?: TextureWrapMode;\r\n /**\r\n * Anisotropic filtering samples\r\n */\r\n maxAnisotropy?: number;\r\n}\r\n\r\n/**\r\n * Represents a valid WebGL texture source for use in texImage2D\r\n */\r\nexport type TextureSource = TextureData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;\r\n\r\n/**\r\n * A generic set of texture mipmaps (where index 0 has the largest dimension)\r\n */\r\nexport type Mipmaps<T> = Array<T>;\r\n\r\n/**\r\n * A set of 6 cubemap arranged in the order [+x, -x, +y, -y, +z, -z]\r\n */\r\nexport type Faces<T> = Array<T>;\r\n\r\n/**\r\n * A set of texture mipmaps specifically for 2D textures in WebGL (where index 0 has the largest dimension)\r\n */\r\nexport type Mipmaps2D = Mipmaps<TextureSource>;\r\n\r\n/**\r\n * A set of texture mipmaps specifically for cubemap textures in WebGL (where index 0 has the largest dimension)\r\n */\r\nexport type MipmapsCube = Mipmaps<Faces<TextureSource>>;\r\n\r\n/**\r\n * A minimal WebGL cubemap descriptor\r\n */\r\nexport class TextureCube {\r\n /**\r\n * Returns the width of a face of the texture or 0 if not available\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public get Width(): number {\r\n return this.source && this.source[0] && this.source[0][0] ? this.source[0][0].width : 0;\r\n }\r\n\r\n /**\r\n * Returns the height of a face of the texture or 0 if not available\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public get Height(): number {\r\n return this.source && this.source[0] && this.source[0][0] ? this.source[0][0].height : 0;\r\n }\r\n\r\n /**\r\n * constructor\r\n * @param internalFormat WebGL pixel format for the texture on the GPU\r\n * @param type WebGL pixel type of the supplied data and texture on the GPU\r\n * @param source An array containing mipmap levels of faces, where each mipmap level is an array of faces and each face is a TextureSource object\r\n */\r\n constructor(\r\n public internalFormat: PixelFormat,\r\n public type: PixelType,\r\n public source: MipmapsCube = []\r\n ) {}\r\n}\r\n\r\n/**\r\n * A static class providing methods to aid working with Bablyon textures.\r\n */\r\nexport class TextureUtils {\r\n /**\r\n * A prefix used when storing a babylon texture object reference on a Spectre texture object\r\n */\r\n public static BabylonTextureKeyPrefix = \"__babylonTexture_\";\r\n\r\n /**\r\n * Controls anisotropic filtering for deserialized textures.\r\n */\r\n public static MaxAnisotropy = 4;\r\n\r\n /**\r\n * Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters.\r\n * If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created.\r\n * The advantage of this is to enable working with texture objects without the need to initialize on the GPU until desired.\r\n * @param scene A Babylon Scene instance\r\n * @param textureCube A Spectre TextureCube object\r\n * @param automaticMipmaps Pass true to enable automatic mipmap generation where possible (requires power of images)\r\n * @param environment Specifies that the texture will be used as an environment\r\n * @param singleLod Specifies that the texture will be a singleLod (for environment)\r\n * @returns Babylon cube texture\r\n */\r\n public static GetBabylonCubeTexture(scene: Scene, textureCube: TextureCube, automaticMipmaps: boolean, environment = false, singleLod = false): CubeTexture {\r\n if (!textureCube) {\r\n throw new Error(\"no texture cube provided\");\r\n }\r\n\r\n let parameters: SamplingParameters;\r\n if (environment) {\r\n parameters = singleLod ? TextureUtils._EnvironmentSingleMipSampling : TextureUtils._EnvironmentSampling;\r\n } else {\r\n parameters = {\r\n magFilter: TextureMagFilter.NEAREST,\r\n minFilter: TextureMinFilter.NEAREST,\r\n wrapS: TextureWrapMode.CLAMP_TO_EDGE,\r\n wrapT: TextureWrapMode.CLAMP_TO_EDGE,\r\n };\r\n }\r\n\r\n const key = TextureUtils.BabylonTextureKeyPrefix + parameters.magFilter + \"\" + parameters.minFilter + \"\" + parameters.wrapS + \"\" + parameters.wrapT;\r\n\r\n let babylonTexture: CubeTexture = (<any>textureCube)[key];\r\n\r\n if (!babylonTexture) {\r\n //initialize babylon texture\r\n babylonTexture = new CubeTexture(\"\", scene);\r\n if (environment) {\r\n babylonTexture.lodGenerationOffset = TextureUtils.EnvironmentLODOffset;\r\n babylonTexture.lodGenerationScale = TextureUtils.EnvironmentLODScale;\r\n }\r\n\r\n babylonTexture.gammaSpace = false;\r\n\r\n const internalTexture = new InternalTexture(scene.getEngine(), InternalTextureSource.CubeRaw);\r\n const glTexture = internalTexture._hardwareTexture?.underlyingResource;\r\n //babylon properties\r\n internalTexture.isCube = true;\r\n internalTexture.generateMipMaps = false;\r\n\r\n babylonTexture._texture = internalTexture;\r\n\r\n TextureUtils.ApplySamplingParameters(babylonTexture, parameters);\r\n\r\n const maxMipLevel = automaticMipmaps ? 0 : textureCube.source.length - 1;\r\n let texturesUploaded = 0;\r\n\r\n const textureComplete = function () {\r\n return texturesUploaded === (maxMipLevel + 1) * 6;\r\n };\r\n\r\n const uploadFace = function (i: number, level: number, face: TextureSource) {\r\n if (!glTexture) {\r\n return;\r\n }\r\n\r\n if (i === 0 && level === 0) {\r\n internalTexture.width = face.width;\r\n internalTexture.height = face.height;\r\n }\r\n\r\n const gl = (<any>scene.getEngine())._gl;\r\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, glTexture);\r\n (scene.getEngine() as Engine)._unpackFlipY(false);\r\n if (face instanceof HTMLElement || face instanceof ImageData) {\r\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level, textureCube.internalFormat, textureCube.internalFormat, textureCube.type, <any>face);\r\n } else {\r\n const textureData = <TextureData>face;\r\n gl.texImage2D(\r\n gl.TEXTURE_CUBE_MAP_POSITIVE_X + i,\r\n level,\r\n textureCube.internalFormat,\r\n textureData.width,\r\n textureData.height,\r\n 0,\r\n textureData.format,\r\n textureCube.type,\r\n textureData.data\r\n );\r\n }\r\n\r\n texturesUploaded++;\r\n\r\n if (textureComplete()) {\r\n //generate mipmaps\r\n if (automaticMipmaps) {\r\n const w = face.width;\r\n const h = face.height;\r\n const isPot = (w !== 0 && w & (w - 1)) === 0 && (h !== 0 && h & (h - 1)) === 0;\r\n if (isPot) {\r\n gl.generateMipmap(gl.TEXTURE_CUBE_MAP);\r\n }\r\n }\r\n\r\n // Upload Separate lods in case there is no support for texture lod.\r\n if (environment && !scene.getEngine().getCaps().textureLOD && !singleLod) {\r\n const mipSlices = 3;\r\n for (let i = 0; i < mipSlices; i++) {\r\n const lodKey = TextureUtils.BabylonTextureKeyPrefix + \"lod\" + i;\r\n let lod: CubeTexture = (<any>textureCube)[lodKey];\r\n\r\n //initialize lod texture if it doesn't already exist\r\n if (lod == null && textureCube.Width) {\r\n //compute LOD from even spacing in smoothness (matching shader calculation)\r\n const smoothness = i / (mipSlices - 1);\r\n const roughness = 1 - smoothness;\r\n const kMinimumVariance = 0.0005;\r\n const alphaG = roughness * roughness + kMinimumVariance;\r\n const microsurfaceAverageSlopeTexels = alphaG * textureCube.Width;\r\n\r\n const environmentSpecularLOD = TextureUtils.EnvironmentLODScale * Math.log2(microsurfaceAverageSlopeTexels) + TextureUtils.EnvironmentLODOffset;\r\n\r\n const maxLODIndex = textureCube.source.length - 1;\r\n const mipmapIndex = Math.min(Math.max(Math.round(environmentSpecularLOD), 0), maxLODIndex);\r\n\r\n lod = TextureUtils.GetBabylonCubeTexture(\r\n scene,\r\n new TextureCube(PixelFormat.RGBA, PixelType.UNSIGNED_BYTE, [textureCube.source[mipmapIndex]]),\r\n false,\r\n true,\r\n true\r\n );\r\n\r\n if (i === 0) {\r\n internalTexture._lodTextureLow = lod;\r\n } else if (i === 1) {\r\n internalTexture._lodTextureMid = lod;\r\n } else {\r\n internalTexture._lodTextureHigh = lod;\r\n }\r\n\r\n (<any>textureCube)[lodKey] = lod;\r\n }\r\n }\r\n }\r\n\r\n internalTexture.isReady = true;\r\n }\r\n\r\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);\r\n scene.getEngine().resetTextureCache();\r\n };\r\n\r\n for (let i = 0; i <= maxMipLevel; i++) {\r\n const faces = textureCube.source[i];\r\n for (let j = 0; j < faces.length; j++) {\r\n const face = faces[j];\r\n if (face instanceof HTMLImageElement && !face.complete) {\r\n face.addEventListener(\r\n \"load\",\r\n () => {\r\n uploadFace(j, i, face);\r\n },\r\n false\r\n );\r\n } else {\r\n uploadFace(j, i, face);\r\n }\r\n }\r\n }\r\n\r\n scene.getEngine().resetTextureCache();\r\n\r\n babylonTexture.isReady = () => {\r\n return textureComplete();\r\n };\r\n\r\n (<any>textureCube)[key] = babylonTexture;\r\n }\r\n\r\n return babylonTexture;\r\n }\r\n\r\n /**\r\n * Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields\r\n * @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field)\r\n * @param parameters Spectre SamplingParameters to apply\r\n */\r\n public static ApplySamplingParameters(babylonTexture: BaseTexture, parameters: SamplingParameters) {\r\n const scene = babylonTexture.getScene();\r\n if (!scene) {\r\n return;\r\n }\r\n const gl = (<any>scene.getEngine())._gl;\r\n\r\n const target = babylonTexture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\r\n\r\n const internalTexture = babylonTexture._texture;\r\n if (!internalTexture) {\r\n return;\r\n }\r\n const glTexture = internalTexture._hardwareTexture?.underlyingResource;\r\n gl.bindTexture(target, glTexture);\r\n\r\n if (parameters.magFilter != null) {\r\n gl.texParameteri(target, gl.TEXTURE_MAG_FILTER, parameters.magFilter);\r\n }\r\n if (parameters.minFilter != null) {\r\n gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, parameters.minFilter);\r\n }\r\n if (parameters.wrapS != null) {\r\n gl.texParameteri(target, gl.TEXTURE_WRAP_S, parameters.wrapS);\r\n }\r\n if (parameters.wrapT != null) {\r\n gl.texParameteri(target, gl.TEXTURE_WRAP_T, parameters.wrapT);\r\n }\r\n\r\n //set babylon wrap modes from sampling parameter\r\n switch (parameters.wrapS) {\r\n case TextureWrapMode.REPEAT:\r\n babylonTexture.wrapU = Texture.WRAP_ADDRESSMODE;\r\n break;\r\n case TextureWrapMode.CLAMP_TO_EDGE:\r\n babylonTexture.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n break;\r\n case TextureWrapMode.MIRRORED_REPEAT:\r\n babylonTexture.wrapU = Texture.MIRROR_ADDRESSMODE;\r\n break;\r\n default:\r\n babylonTexture.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n }\r\n\r\n switch (parameters.wrapT) {\r\n case TextureWrapMode.REPEAT:\r\n babylonTexture.wrapV = Texture.WRAP_ADDRESSMODE;\r\n break;\r\n case TextureWrapMode.CLAMP_TO_EDGE:\r\n babylonTexture.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n break;\r\n case TextureWrapMode.MIRRORED_REPEAT:\r\n babylonTexture.wrapV = Texture.MIRROR_ADDRESSMODE;\r\n break;\r\n default:\r\n babylonTexture.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n }\r\n\r\n if (parameters.maxAnisotropy != null && parameters.maxAnisotropy > 1) {\r\n const anisotropicExt = gl.getExtension(\"EXT_texture_filter_anisotropic\");\r\n if (anisotropicExt) {\r\n const maxAnisotropicSamples = gl.getParameter(anisotropicExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT);\r\n const maxAnisotropy = Math.min(parameters.maxAnisotropy, maxAnisotropicSamples);\r\n gl.texParameterf(target, anisotropicExt.TEXTURE_MAX_ANISOTROPY_EXT, maxAnisotropy);\r\n babylonTexture.anisotropicFilteringLevel = maxAnisotropy;\r\n }\r\n }\r\n\r\n gl.bindTexture(target, null);\r\n scene.getEngine().resetTextureCache();\r\n }\r\n\r\n private static _EnvironmentSampling: SamplingParameters = {\r\n magFilter: TextureMagFilter.LINEAR,\r\n minFilter: TextureMinFilter.LINEAR_MIPMAP_LINEAR,\r\n wrapS: TextureWrapMode.CLAMP_TO_EDGE,\r\n wrapT: TextureWrapMode.CLAMP_TO_EDGE,\r\n maxAnisotropy: 1,\r\n };\r\n\r\n private static _EnvironmentSingleMipSampling: SamplingParameters = {\r\n magFilter: TextureMagFilter.LINEAR,\r\n minFilter: TextureMinFilter.LINEAR,\r\n wrapS: TextureWrapMode.CLAMP_TO_EDGE,\r\n wrapT: TextureWrapMode.CLAMP_TO_EDGE,\r\n maxAnisotropy: 1,\r\n };\r\n\r\n //from \"/Internal/Lighting.EnvironmentFilterScale\" in Engine/*/Configuration.cpp\r\n /**\r\n * Environment preprocessing dedicated value (Internal Use or Advanced only).\r\n */\r\n public static EnvironmentLODScale = 0.8;\r\n /**\r\n * Environment preprocessing dedicated value (Internal Use or Advanced only)..\r\n */\r\n public static EnvironmentLODOffset = 1.0;\r\n}\r\n"]}
@@ -1,51 +0,0 @@
1
- import type { PBREnvironment } from "./environmentSerializer";
2
- import type { Scene } from "@babylonjs/core/scene.js";
3
- import { Vector3 } from "@babylonjs/core/Maths/math.vector.js";
4
- import type { ShadowLight } from "@babylonjs/core/Lights/shadowLight.js";
5
- /**
6
- * The ViewerLabs class will hold functions that are not (!) backwards compatible.
7
- * The APIs in all labs-related classes and configuration might change.
8
- * Once stable, lab features will be moved to the publis API and configuration object.
9
- */
10
- export declare class ViewerLabs {
11
- private _scene;
12
- constructor(_scene: Scene);
13
- assetsRootURL: string;
14
- environment: PBREnvironment;
15
- /**
16
- * Loads an environment map from a given URL
17
- * @param url URL of environment map
18
- * @param onSuccess Callback fired after environment successfully applied to the scene
19
- * @param onProgress Callback fired at progress events while loading the environment map
20
- * @param onError Callback fired when the load fails
21
- */
22
- loadEnvironment(url: string, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
23
- /**
24
- * Loads an environment map from a given URL
25
- * @param buffer ArrayBuffer containing environment map
26
- * @param onSuccess Callback fired after environment successfully applied to the scene
27
- * @param onProgress Callback fired at progress events while loading the environment map
28
- * @param onError Callback fired when the load fails
29
- */
30
- loadEnvironment(buffer: ArrayBuffer, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
31
- /**
32
- * Sets the environment to an already loaded environment
33
- * @param env PBREnvironment instance
34
- * @param onSuccess Callback fired after environment successfully applied to the scene
35
- * @param onProgress Callback fired at progress events while loading the environment map
36
- * @param onError Callback fired when the load fails
37
- */
38
- loadEnvironment(env: PBREnvironment, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
39
- /**
40
- * Applies an `EnvironmentMapConfiguration` to the scene
41
- * @param rotationY
42
- */
43
- applyEnvironmentMapConfiguration(rotationY?: number): void;
44
- /**
45
- * Get an environment asset url by using the configuration if the path is not absolute.
46
- * @param url Asset url
47
- * @returns The Asset url using the `environmentAssetsRootURL` if the url is not an absolute path.
48
- */
49
- getAssetUrl(url: string): string;
50
- rotateShadowLight(shadowLight: ShadowLight, amount: number, point?: Vector3, axis?: Vector3, target?: Vector3): void;
51
- }
@@ -1,134 +0,0 @@
1
- import { EnvironmentDeserializer } from "./environmentSerializer.js";
2
- import { Vector3, Quaternion, Matrix, TmpVectors } from "@babylonjs/core/Maths/math.vector.js";
3
- import { SphericalPolynomial } from "@babylonjs/core/Maths/sphericalPolynomial.js";
4
- import { TextureUtils } from "./texture.js";
5
- import { Axis } from "@babylonjs/core/Maths/math.axis.js";
6
- /**
7
- * The ViewerLabs class will hold functions that are not (!) backwards compatible.
8
- * The APIs in all labs-related classes and configuration might change.
9
- * Once stable, lab features will be moved to the publis API and configuration object.
10
- */
11
- var ViewerLabs = /** @class */ (function () {
12
- function ViewerLabs(_scene) {
13
- this._scene = _scene;
14
- this.environment = {
15
- //irradiance
16
- irradiancePolynomialCoefficients: {
17
- x: new Vector3(0, 0, 0),
18
- y: new Vector3(0, 0, 0),
19
- z: new Vector3(0, 0, 0),
20
- xx: new Vector3(0, 0, 0),
21
- yy: new Vector3(0, 0, 0),
22
- zz: new Vector3(0, 0, 0),
23
- yz: new Vector3(0, 0, 0),
24
- zx: new Vector3(0, 0, 0),
25
- xy: new Vector3(0, 0, 0),
26
- },
27
- textureIntensityScale: 1.0,
28
- };
29
- }
30
- ViewerLabs.prototype.loadEnvironment = function (data, onSuccess, onProgress, onError) {
31
- var _this = this;
32
- //@! todo: should loadEnvironment cancel any currently loading environments?
33
- if (data instanceof ArrayBuffer) {
34
- this.environment = EnvironmentDeserializer.Parse(data);
35
- if (onSuccess) {
36
- onSuccess(this.environment);
37
- }
38
- }
39
- else if (typeof data === "string") {
40
- var url = this.getAssetUrl(data);
41
- this._scene._loadFile(url, function (arrayBuffer) {
42
- _this.environment = EnvironmentDeserializer.Parse(arrayBuffer);
43
- if (onSuccess) {
44
- onSuccess(_this.environment);
45
- }
46
- }, function (progressEvent) {
47
- if (onProgress) {
48
- onProgress(progressEvent.loaded, progressEvent.total);
49
- }
50
- }, false, true, function (r, e) {
51
- if (onError) {
52
- onError(e);
53
- }
54
- });
55
- }
56
- else {
57
- //data assumed to be PBREnvironment object
58
- this.environment = data;
59
- if (onSuccess) {
60
- onSuccess(data);
61
- }
62
- }
63
- };
64
- /**
65
- * Applies an `EnvironmentMapConfiguration` to the scene
66
- * @param rotationY
67
- */
68
- ViewerLabs.prototype.applyEnvironmentMapConfiguration = function (rotationY) {
69
- if (!this.environment) {
70
- return;
71
- }
72
- //set orientation
73
- var rotatquatRotationionY = Quaternion.RotationAxis(Axis.Y, rotationY || 0);
74
- // Add env texture to the scene.
75
- if (this.environment.specularTexture) {
76
- // IE crashes when disposing the old texture and setting a new one
77
- if (!this._scene.environmentTexture) {
78
- this._scene.environmentTexture = TextureUtils.GetBabylonCubeTexture(this._scene, this.environment.specularTexture, false, true);
79
- }
80
- if (this._scene.environmentTexture) {
81
- this._scene.environmentTexture.level = this.environment.textureIntensityScale;
82
- this._scene.environmentTexture.invertZ = true;
83
- this._scene.environmentTexture.lodLevelInAlpha = true;
84
- var poly = this._scene.environmentTexture.sphericalPolynomial || new SphericalPolynomial();
85
- poly.x = this.environment.irradiancePolynomialCoefficients.x;
86
- poly.y = this.environment.irradiancePolynomialCoefficients.y;
87
- poly.z = this.environment.irradiancePolynomialCoefficients.z;
88
- poly.xx = this.environment.irradiancePolynomialCoefficients.xx;
89
- poly.xy = this.environment.irradiancePolynomialCoefficients.xy;
90
- poly.yy = this.environment.irradiancePolynomialCoefficients.yy;
91
- poly.yz = this.environment.irradiancePolynomialCoefficients.yz;
92
- poly.zx = this.environment.irradiancePolynomialCoefficients.zx;
93
- poly.zz = this.environment.irradiancePolynomialCoefficients.zz;
94
- this._scene.environmentTexture.sphericalPolynomial = poly;
95
- //set orientation
96
- Matrix.FromQuaternionToRef(rotatquatRotationionY, this._scene.environmentTexture.getReflectionTextureMatrix());
97
- }
98
- }
99
- };
100
- /**
101
- * Get an environment asset url by using the configuration if the path is not absolute.
102
- * @param url Asset url
103
- * @returns The Asset url using the `environmentAssetsRootURL` if the url is not an absolute path.
104
- */
105
- ViewerLabs.prototype.getAssetUrl = function (url) {
106
- var returnUrl = url;
107
- if (url && url.toLowerCase().indexOf("//") === -1) {
108
- if (!this.assetsRootURL) {
109
- // Tools.Warn("Please, specify the root url of your assets before loading the configuration (labs.environmentAssetsRootURL) or disable the background through the viewer options.");
110
- return url;
111
- }
112
- returnUrl = this.assetsRootURL + returnUrl;
113
- }
114
- return returnUrl;
115
- };
116
- ViewerLabs.prototype.rotateShadowLight = function (shadowLight, amount, point, axis, target) {
117
- if (point === void 0) { point = Vector3.Zero(); }
118
- if (axis === void 0) { axis = Axis.Y; }
119
- if (target === void 0) { target = Vector3.Zero(); }
120
- axis.normalize();
121
- point.subtractToRef(shadowLight.position, TmpVectors.Vector3[0]);
122
- Matrix.TranslationToRef(TmpVectors.Vector3[0].x, TmpVectors.Vector3[0].y, TmpVectors.Vector3[0].z, TmpVectors.Matrix[0]);
123
- TmpVectors.Matrix[0].invertToRef(TmpVectors.Matrix[2]);
124
- Matrix.RotationAxisToRef(axis, amount, TmpVectors.Matrix[1]);
125
- TmpVectors.Matrix[2].multiplyToRef(TmpVectors.Matrix[1], TmpVectors.Matrix[2]);
126
- TmpVectors.Matrix[2].multiplyToRef(TmpVectors.Matrix[0], TmpVectors.Matrix[2]);
127
- TmpVectors.Matrix[2].decompose(TmpVectors.Vector3[0], TmpVectors.Quaternion[0], TmpVectors.Vector3[1]);
128
- shadowLight.position.addInPlace(TmpVectors.Vector3[1]);
129
- shadowLight.setDirectionToTarget(target);
130
- };
131
- return ViewerLabs;
132
- }());
133
- export { ViewerLabs };
134
- //# sourceMappingURL=viewerLabs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"viewerLabs.js","sourceRoot":"","sources":["../../../../tools/viewer/src/labs/viewerLabs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,6CAA+B;AACjF,OAAO,EAAE,mBAAmB,EAAE,qDAAuC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,2CAA6B;AAE5C;;;;GAIG;AACH;IACI,oBAAoB,MAAa;QAAb,WAAM,GAAN,MAAM,CAAO;QAG1B,gBAAW,GAAmB;YACjC,YAAY;YACZ,gCAAgC,EAAE;gBAC9B,CAAC,EAAE,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACvB,CAAC,EAAE,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACvB,CAAC,EAAE,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACvB,EAAE,EAAE,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACxB,EAAE,EAAE,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACxB,EAAE,EAAE,I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,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAEvG,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAEvD,WAAW,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IACL,iBAAC;AAAD,CAAC,AAnLD,IAmLC","sourcesContent":["import type { PBREnvironment } from \"./environmentSerializer\";\r\nimport { EnvironmentDeserializer } from \"./environmentSerializer\";\r\nimport type { Scene } from \"core/scene\";\r\nimport { Vector3, Quaternion, Matrix, TmpVectors } from \"core/Maths/math.vector\";\r\nimport { SphericalPolynomial } from \"core/Maths/sphericalPolynomial\";\r\nimport type { ShadowLight } from \"core/Lights/shadowLight\";\r\nimport { TextureUtils } from \"./texture\";\r\nimport { Axis } from \"core/Maths/math.axis\";\r\n\r\n/**\r\n * The ViewerLabs class will hold functions that are not (!) backwards compatible.\r\n * The APIs in all labs-related classes and configuration might change.\r\n * Once stable, lab features will be moved to the publis API and configuration object.\r\n */\r\nexport class ViewerLabs {\r\n constructor(private _scene: Scene) {}\r\n\r\n public assetsRootURL: string;\r\n public environment: PBREnvironment = {\r\n //irradiance\r\n irradiancePolynomialCoefficients: {\r\n x: new Vector3(0, 0, 0),\r\n y: new Vector3(0, 0, 0),\r\n z: new Vector3(0, 0, 0),\r\n xx: new Vector3(0, 0, 0),\r\n yy: new Vector3(0, 0, 0),\r\n zz: new Vector3(0, 0, 0),\r\n yz: new Vector3(0, 0, 0),\r\n zx: new Vector3(0, 0, 0),\r\n xy: new Vector3(0, 0, 0),\r\n },\r\n\r\n textureIntensityScale: 1.0,\r\n };\r\n\r\n /**\r\n * Loads an environment map from a given URL\r\n * @param url URL of environment map\r\n * @param onSuccess Callback fired after environment successfully applied to the scene\r\n * @param onProgress Callback fired at progress events while loading the environment map\r\n * @param onError Callback fired when the load fails\r\n */\r\n public loadEnvironment(\r\n url: string,\r\n onSuccess?: (env: PBREnvironment) => void,\r\n onProgress?: (bytesLoaded: number, bytesTotal: number) => void,\r\n onError?: (e: any) => void\r\n ): void;\r\n /**\r\n * Loads an environment map from a given URL\r\n * @param buffer ArrayBuffer containing environment map\r\n * @param onSuccess Callback fired after environment successfully applied to the scene\r\n * @param onProgress Callback fired at progress events while loading the environment map\r\n * @param onError Callback fired when the load fails\r\n */\r\n public loadEnvironment(\r\n buffer: ArrayBuffer,\r\n onSuccess?: (env: PBREnvironment) => void,\r\n onProgress?: (bytesLoaded: number, bytesTotal: number) => void,\r\n onError?: (e: any) => void\r\n ): void;\r\n /**\r\n * Sets the environment to an already loaded environment\r\n * @param env PBREnvironment instance\r\n * @param onSuccess Callback fired after environment successfully applied to the scene\r\n * @param onProgress Callback fired at progress events while loading the environment map\r\n * @param onError Callback fired when the load fails\r\n */\r\n public loadEnvironment(\r\n env: PBREnvironment,\r\n onSuccess?: (env: PBREnvironment) => void,\r\n onProgress?: (bytesLoaded: number, bytesTotal: number) => void,\r\n onError?: (e: any) => void\r\n ): void;\r\n public loadEnvironment(\r\n data: string | ArrayBuffer | PBREnvironment,\r\n onSuccess?: (env: PBREnvironment) => void,\r\n onProgress?: (bytesLoaded: number, bytesTotal: number) => void,\r\n onError?: (e: any) => void\r\n ): void {\r\n //@! todo: should loadEnvironment cancel any currently loading environments?\r\n if (data instanceof ArrayBuffer) {\r\n this.environment = EnvironmentDeserializer.Parse(data);\r\n if (onSuccess) {\r\n onSuccess(this.environment);\r\n }\r\n } else if (typeof data === \"string\") {\r\n const url = this.getAssetUrl(data);\r\n this._scene._loadFile(\r\n url,\r\n (arrayBuffer: string | ArrayBuffer) => {\r\n this.environment = EnvironmentDeserializer.Parse(arrayBuffer as ArrayBuffer);\r\n if (onSuccess) {\r\n onSuccess(this.environment);\r\n }\r\n },\r\n (progressEvent) => {\r\n if (onProgress) {\r\n onProgress(progressEvent.loaded, progressEvent.total);\r\n }\r\n },\r\n false,\r\n true,\r\n (r, e) => {\r\n if (onError) {\r\n onError(e);\r\n }\r\n }\r\n );\r\n } else {\r\n //data assumed to be PBREnvironment object\r\n this.environment = data;\r\n if (onSuccess) {\r\n onSuccess(data);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Applies an `EnvironmentMapConfiguration` to the scene\r\n * @param rotationY\r\n */\r\n public applyEnvironmentMapConfiguration(rotationY?: number) {\r\n if (!this.environment) {\r\n return;\r\n }\r\n\r\n //set orientation\r\n const rotatquatRotationionY = Quaternion.RotationAxis(Axis.Y, rotationY || 0);\r\n\r\n // Add env texture to the scene.\r\n if (this.environment.specularTexture) {\r\n // IE crashes when disposing the old texture and setting a new one\r\n if (!this._scene.environmentTexture) {\r\n this._scene.environmentTexture = TextureUtils.GetBabylonCubeTexture(this._scene, this.environment.specularTexture, false, true);\r\n }\r\n if (this._scene.environmentTexture) {\r\n this._scene.environmentTexture.level = this.environment.textureIntensityScale;\r\n this._scene.environmentTexture.invertZ = true;\r\n this._scene.environmentTexture.lodLevelInAlpha = true;\r\n\r\n const poly = this._scene.environmentTexture.sphericalPolynomial || new SphericalPolynomial();\r\n poly.x = this.environment.irradiancePolynomialCoefficients.x;\r\n poly.y = this.environment.irradiancePolynomialCoefficients.y;\r\n poly.z = this.environment.irradiancePolynomialCoefficients.z;\r\n poly.xx = this.environment.irradiancePolynomialCoefficients.xx;\r\n poly.xy = this.environment.irradiancePolynomialCoefficients.xy;\r\n poly.yy = this.environment.irradiancePolynomialCoefficients.yy;\r\n poly.yz = this.environment.irradiancePolynomialCoefficients.yz;\r\n poly.zx = this.environment.irradiancePolynomialCoefficients.zx;\r\n poly.zz = this.environment.irradiancePolynomialCoefficients.zz;\r\n this._scene.environmentTexture.sphericalPolynomial = poly;\r\n\r\n //set orientation\r\n Matrix.FromQuaternionToRef(rotatquatRotationionY, this._scene.environmentTexture.getReflectionTextureMatrix());\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Get an environment asset url by using the configuration if the path is not absolute.\r\n * @param url Asset url\r\n * @returns The Asset url using the `environmentAssetsRootURL` if the url is not an absolute path.\r\n */\r\n public getAssetUrl(url: string): string {\r\n let returnUrl = url;\r\n if (url && url.toLowerCase().indexOf(\"//\") === -1) {\r\n if (!this.assetsRootURL) {\r\n // Tools.Warn(\"Please, specify the root url of your assets before loading the configuration (labs.environmentAssetsRootURL) or disable the background through the viewer options.\");\r\n return url;\r\n }\r\n\r\n returnUrl = this.assetsRootURL + returnUrl;\r\n }\r\n\r\n return returnUrl;\r\n }\r\n\r\n public rotateShadowLight(shadowLight: ShadowLight, amount: number, point = Vector3.Zero(), axis = Axis.Y, target = Vector3.Zero()) {\r\n axis.normalize();\r\n point.subtractToRef(shadowLight.position, TmpVectors.Vector3[0]);\r\n Matrix.TranslationToRef(TmpVectors.Vector3[0].x, TmpVectors.Vector3[0].y, TmpVectors.Vector3[0].z, TmpVectors.Matrix[0]);\r\n TmpVectors.Matrix[0].invertToRef(TmpVectors.Matrix[2]);\r\n Matrix.RotationAxisToRef(axis, amount, TmpVectors.Matrix[1]);\r\n TmpVectors.Matrix[2].multiplyToRef(TmpVectors.Matrix[1], TmpVectors.Matrix[2]);\r\n TmpVectors.Matrix[2].multiplyToRef(TmpVectors.Matrix[0], TmpVectors.Matrix[2]);\r\n\r\n TmpVectors.Matrix[2].decompose(TmpVectors.Vector3[0], TmpVectors.Quaternion[0], TmpVectors.Vector3[1]);\r\n\r\n shadowLight.position.addInPlace(TmpVectors.Vector3[1]);\r\n\r\n shadowLight.setDirectionToTarget(target);\r\n }\r\n}\r\n"]}