@babylonjs/viewer 7.41.1-alpha → 7.42.0

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 (619) hide show
  1. package/configuration/configuration.d.ts +107 -0
  2. package/configuration/configuration.js +16 -0
  3. package/configuration/configuration.js.map +1 -0
  4. package/configuration/configurationCompatibility.d.ts +8 -0
  5. package/configuration/configurationCompatibility.js +66 -0
  6. package/configuration/configurationCompatibility.js.map +1 -0
  7. package/configuration/configurationContainer.d.ts +10 -0
  8. package/configuration/configurationContainer.js +10 -0
  9. package/configuration/configurationContainer.js.map +1 -0
  10. package/configuration/globals.d.ts +6 -0
  11. package/configuration/globals.js +18 -0
  12. package/configuration/globals.js.map +1 -0
  13. package/configuration/index.d.ts +2 -0
  14. package/configuration/index.js +4 -0
  15. package/configuration/index.js.map +1 -0
  16. package/configuration/interfaces/cameraConfiguration.d.ts +31 -0
  17. package/configuration/interfaces/cameraConfiguration.js +2 -0
  18. package/configuration/interfaces/cameraConfiguration.js.map +1 -0
  19. package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -0
  20. package/configuration/interfaces/colorGradingConfiguration.js +2 -0
  21. package/configuration/interfaces/colorGradingConfiguration.js.map +1 -0
  22. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -0
  23. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +2 -0
  24. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +1 -0
  25. package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -0
  26. package/configuration/interfaces/environmentMapConfiguration.js +2 -0
  27. package/configuration/interfaces/environmentMapConfiguration.js.map +1 -0
  28. package/configuration/interfaces/groundConfiguration.d.ts +24 -0
  29. package/configuration/interfaces/groundConfiguration.js +2 -0
  30. package/configuration/interfaces/groundConfiguration.js.map +1 -0
  31. package/configuration/interfaces/imageProcessingConfiguration.d.ts +45 -0
  32. package/configuration/interfaces/imageProcessingConfiguration.js +2 -0
  33. package/configuration/interfaces/imageProcessingConfiguration.js.map +1 -0
  34. package/configuration/interfaces/index.d.ts +15 -0
  35. package/configuration/interfaces/index.js +16 -0
  36. package/configuration/interfaces/index.js.map +1 -0
  37. package/configuration/interfaces/lightConfiguration.d.ts +60 -0
  38. package/configuration/interfaces/lightConfiguration.js +2 -0
  39. package/configuration/interfaces/lightConfiguration.js.map +1 -0
  40. package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -0
  41. package/configuration/interfaces/modelAnimationConfiguration.js +2 -0
  42. package/configuration/interfaces/modelAnimationConfiguration.js.map +1 -0
  43. package/configuration/interfaces/modelConfiguration.d.ts +65 -0
  44. package/configuration/interfaces/modelConfiguration.js +2 -0
  45. package/configuration/interfaces/modelConfiguration.js.map +1 -0
  46. package/configuration/interfaces/observersConfiguration.d.ts +5 -0
  47. package/configuration/interfaces/observersConfiguration.js +2 -0
  48. package/configuration/interfaces/observersConfiguration.js.map +1 -0
  49. package/configuration/interfaces/sceneConfiguration.d.ts +48 -0
  50. package/configuration/interfaces/sceneConfiguration.js +2 -0
  51. package/configuration/interfaces/sceneConfiguration.js.map +1 -0
  52. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -0
  53. package/configuration/interfaces/sceneOptimizerConfiguration.js +2 -0
  54. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +1 -0
  55. package/configuration/interfaces/skyboxConfiguration.d.ts +21 -0
  56. package/configuration/interfaces/skyboxConfiguration.js +2 -0
  57. package/configuration/interfaces/skyboxConfiguration.js.map +1 -0
  58. package/configuration/interfaces/templateConfiguration.d.ts +67 -0
  59. package/configuration/interfaces/templateConfiguration.js +2 -0
  60. package/configuration/interfaces/templateConfiguration.js.map +1 -0
  61. package/configuration/interfaces/vrConfiguration.d.ts +16 -0
  62. package/configuration/interfaces/vrConfiguration.js +2 -0
  63. package/configuration/interfaces/vrConfiguration.js.map +1 -0
  64. package/configuration/loader.d.ts +4 -0
  65. package/configuration/loader.js +17 -0
  66. package/configuration/loader.js.map +1 -0
  67. package/configuration/mappers.d.ts +43 -0
  68. package/configuration/mappers.js +193 -0
  69. package/configuration/mappers.js.map +1 -0
  70. package/configuration/renderOnlyLoader.d.ts +33 -0
  71. package/configuration/renderOnlyLoader.js +162 -0
  72. package/configuration/renderOnlyLoader.js.map +1 -0
  73. package/configuration/types/default.d.ts +6 -0
  74. package/configuration/types/default.js +121 -0
  75. package/configuration/types/default.js.map +1 -0
  76. package/configuration/types/environmentMap.d.ts +5 -0
  77. package/configuration/types/environmentMap.js +14 -0
  78. package/configuration/types/environmentMap.js.map +1 -0
  79. package/configuration/types/extended.d.ts +6 -0
  80. package/configuration/types/extended.js +317 -0
  81. package/configuration/types/extended.js.map +1 -0
  82. package/configuration/types/index.d.ts +14 -0
  83. package/configuration/types/index.js +51 -0
  84. package/configuration/types/index.js.map +1 -0
  85. package/configuration/types/minimal.d.ts +6 -0
  86. package/configuration/types/minimal.js +43 -0
  87. package/configuration/types/minimal.js.map +1 -0
  88. package/configuration/types/renderOnlyDefault.d.ts +30 -0
  89. package/configuration/types/renderOnlyDefault.js +31 -0
  90. package/configuration/types/renderOnlyDefault.js.map +1 -0
  91. package/configuration/types/shadowLight.d.ts +9 -0
  92. package/configuration/types/shadowLight.js +64 -0
  93. package/configuration/types/shadowLight.js.map +1 -0
  94. package/helper/index.d.ts +29 -0
  95. package/helper/index.js +66 -0
  96. package/helper/index.js.map +1 -0
  97. package/index.d.ts +30 -0
  98. package/index.js +46 -0
  99. package/index.js.map +1 -0
  100. package/initializer.d.ts +11 -0
  101. package/initializer.js +35 -0
  102. package/initializer.js.map +1 -0
  103. package/interfaces.d.ts +5 -0
  104. package/interfaces.js +7 -0
  105. package/interfaces.js.map +1 -0
  106. package/labs/environmentSerializer.d.ts +126 -0
  107. package/labs/environmentSerializer.js +191 -0
  108. package/labs/environmentSerializer.js.map +1 -0
  109. package/labs/texture.d.ts +183 -0
  110. package/labs/texture.js +351 -0
  111. package/labs/texture.js.map +1 -0
  112. package/labs/viewerLabs.d.ts +51 -0
  113. package/labs/viewerLabs.js +134 -0
  114. package/labs/viewerLabs.js.map +1 -0
  115. package/loader/modelLoader.d.ts +56 -0
  116. package/loader/modelLoader.js +202 -0
  117. package/loader/modelLoader.js.map +1 -0
  118. package/loader/plugins/applyMaterialConfig.d.ts +12 -0
  119. package/loader/plugins/applyMaterialConfig.js +16 -0
  120. package/loader/plugins/applyMaterialConfig.js.map +1 -0
  121. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -0
  122. package/loader/plugins/extendedMaterialLoaderPlugin.js +16 -0
  123. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +1 -0
  124. package/loader/plugins/index.d.ts +19 -0
  125. package/loader/plugins/index.js +44 -0
  126. package/loader/plugins/index.js.map +1 -0
  127. package/loader/plugins/loaderPlugin.d.ts +24 -0
  128. package/loader/plugins/loaderPlugin.js +2 -0
  129. package/loader/plugins/loaderPlugin.js.map +1 -0
  130. package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -0
  131. package/loader/plugins/msftLodLoaderPlugin.js +21 -0
  132. package/loader/plugins/msftLodLoaderPlugin.js.map +1 -0
  133. package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -0
  134. package/loader/plugins/telemetryLoaderPlugin.js +36 -0
  135. package/loader/plugins/telemetryLoaderPlugin.js.map +1 -0
  136. package/managers/observablesManager.d.ts +66 -0
  137. package/managers/observablesManager.js +35 -0
  138. package/managers/observablesManager.js.map +1 -0
  139. package/managers/sceneManager.d.ts +245 -0
  140. package/managers/sceneManager.js +1375 -0
  141. package/managers/sceneManager.js.map +1 -0
  142. package/managers/telemetryManager.d.ts +78 -0
  143. package/managers/telemetryManager.js +117 -0
  144. package/managers/telemetryManager.js.map +1 -0
  145. package/model/modelAnimation.d.ts +215 -0
  146. package/model/modelAnimation.js +237 -0
  147. package/model/modelAnimation.js.map +1 -0
  148. package/model/viewerModel.d.ts +233 -0
  149. package/model/viewerModel.js +673 -0
  150. package/model/viewerModel.js.map +1 -0
  151. package/optimizer/custom/extended.d.ts +13 -0
  152. package/optimizer/custom/extended.js +101 -0
  153. package/optimizer/custom/extended.js.map +1 -0
  154. package/optimizer/custom/index.d.ts +9 -0
  155. package/optimizer/custom/index.js +26 -0
  156. package/optimizer/custom/index.js.map +1 -0
  157. package/package.json +28 -19
  158. package/readme.md +28 -28
  159. package/renderOnlyIndex.d.ts +11 -0
  160. package/renderOnlyIndex.js +18 -0
  161. package/renderOnlyIndex.js.map +1 -0
  162. package/templating/eventManager.d.ts +35 -0
  163. package/templating/eventManager.js +66 -0
  164. package/templating/eventManager.js.map +1 -0
  165. package/templating/plugins/hdButtonPlugin.d.ts +9 -0
  166. package/templating/plugins/hdButtonPlugin.js +22 -0
  167. package/templating/plugins/hdButtonPlugin.js.map +1 -0
  168. package/templating/plugins/printButton.d.ts +9 -0
  169. package/templating/plugins/printButton.js +41 -0
  170. package/templating/plugins/printButton.js.map +1 -0
  171. package/templating/templateManager.d.ts +197 -0
  172. package/templating/templateManager.js +561 -0
  173. package/templating/templateManager.js.map +1 -0
  174. package/templating/viewerTemplatePlugin.d.ts +21 -0
  175. package/templating/viewerTemplatePlugin.js +69 -0
  176. package/templating/viewerTemplatePlugin.js.map +1 -0
  177. package/viewer/defaultViewer.d.ts +130 -0
  178. package/viewer/defaultViewer.js +672 -0
  179. package/viewer/defaultViewer.js.map +1 -0
  180. package/viewer/renderOnlyViewer.d.ts +9 -0
  181. package/viewer/renderOnlyViewer.js +46 -0
  182. package/viewer/renderOnlyViewer.js.map +1 -0
  183. package/viewer/viewer.d.ts +258 -0
  184. package/viewer/viewer.js +783 -0
  185. package/viewer/viewer.js.map +1 -0
  186. package/viewer/viewerManager.d.ts +58 -0
  187. package/viewer/viewerManager.js +91 -0
  188. package/viewer/viewerManager.js.map +1 -0
  189. package/viewer/viewerWithTemplate.d.ts +9 -0
  190. package/viewer/viewerWithTemplate.js +20 -0
  191. package/viewer/viewerWithTemplate.js.map +1 -0
  192. package/assets/photoStudio.env +0 -0
  193. package/dist/babylon-viewer.esm.js +0 -2
  194. package/dist/babylon-viewer.esm.js.map +0 -1
  195. package/dist/babylon-viewer.esm.min.js +0 -2
  196. package/dist/babylon-viewer.esm.min.js.map +0 -1
  197. package/dist/chunks/EXT_lights_ies-BS2USlck.esm.min.js +0 -2
  198. package/dist/chunks/EXT_lights_ies-BS2USlck.esm.min.js.map +0 -1
  199. package/dist/chunks/EXT_lights_ies-C-joQ5O4.esm.js +0 -84
  200. package/dist/chunks/EXT_lights_ies-C-joQ5O4.esm.js.map +0 -1
  201. package/dist/chunks/EXT_lights_image_based-C3wbbb5Z.esm.js +0 -171
  202. package/dist/chunks/EXT_lights_image_based-C3wbbb5Z.esm.js.map +0 -1
  203. package/dist/chunks/EXT_lights_image_based-DDdRDnM2.esm.min.js +0 -2
  204. package/dist/chunks/EXT_lights_image_based-DDdRDnM2.esm.min.js.map +0 -1
  205. package/dist/chunks/EXT_mesh_gpu_instancing-AXAnRQN7.esm.js +0 -86
  206. package/dist/chunks/EXT_mesh_gpu_instancing-AXAnRQN7.esm.js.map +0 -1
  207. package/dist/chunks/EXT_mesh_gpu_instancing-BcjPo6uC.esm.min.js +0 -2
  208. package/dist/chunks/EXT_mesh_gpu_instancing-BcjPo6uC.esm.min.js.map +0 -1
  209. package/dist/chunks/EXT_meshopt_compression-DlUkQB2P.esm.js +0 -134
  210. package/dist/chunks/EXT_meshopt_compression-DlUkQB2P.esm.js.map +0 -1
  211. package/dist/chunks/EXT_meshopt_compression-yJ4OpORd.esm.min.js +0 -2
  212. package/dist/chunks/EXT_meshopt_compression-yJ4OpORd.esm.min.js.map +0 -1
  213. package/dist/chunks/EXT_texture_avif-BQWbvJfK.esm.min.js +0 -2
  214. package/dist/chunks/EXT_texture_avif-BQWbvJfK.esm.min.js.map +0 -1
  215. package/dist/chunks/EXT_texture_avif-C0pGpnGv.esm.js +0 -44
  216. package/dist/chunks/EXT_texture_avif-C0pGpnGv.esm.js.map +0 -1
  217. package/dist/chunks/EXT_texture_webp-Dd7Uqtmh.esm.min.js +0 -2
  218. package/dist/chunks/EXT_texture_webp-Dd7Uqtmh.esm.min.js.map +0 -1
  219. package/dist/chunks/EXT_texture_webp-DehlrnW-.esm.js +0 -43
  220. package/dist/chunks/EXT_texture_webp-DehlrnW-.esm.js.map +0 -1
  221. package/dist/chunks/ExtrasAsMetadata-C5NMuDj4.esm.js +0 -64
  222. package/dist/chunks/ExtrasAsMetadata-C5NMuDj4.esm.js.map +0 -1
  223. package/dist/chunks/ExtrasAsMetadata-Cp3LHdoG.esm.min.js +0 -2
  224. package/dist/chunks/ExtrasAsMetadata-Cp3LHdoG.esm.min.js.map +0 -1
  225. package/dist/chunks/KHR_animation_pointer-DEBOwDXh.esm.min.js +0 -2
  226. package/dist/chunks/KHR_animation_pointer-DEBOwDXh.esm.min.js.map +0 -1
  227. package/dist/chunks/KHR_animation_pointer-Dx1OeG2b.esm.js +0 -352
  228. package/dist/chunks/KHR_animation_pointer-Dx1OeG2b.esm.js.map +0 -1
  229. package/dist/chunks/KHR_draco_mesh_compression-Ch0QOlBL.esm.min.js +0 -2
  230. package/dist/chunks/KHR_draco_mesh_compression-Ch0QOlBL.esm.min.js.map +0 -1
  231. package/dist/chunks/KHR_draco_mesh_compression-D59SFLyo.esm.js +0 -610
  232. package/dist/chunks/KHR_draco_mesh_compression-D59SFLyo.esm.js.map +0 -1
  233. package/dist/chunks/KHR_interactivity-Blj_9jts.esm.min.js +0 -2
  234. package/dist/chunks/KHR_interactivity-Blj_9jts.esm.min.js.map +0 -1
  235. package/dist/chunks/KHR_interactivity-CR0LYUa7.esm.js +0 -4033
  236. package/dist/chunks/KHR_interactivity-CR0LYUa7.esm.js.map +0 -1
  237. package/dist/chunks/KHR_lights_punctual--w0a62AP.esm.js +0 -581
  238. package/dist/chunks/KHR_lights_punctual--w0a62AP.esm.js.map +0 -1
  239. package/dist/chunks/KHR_lights_punctual-BojffBbG.esm.min.js +0 -2
  240. package/dist/chunks/KHR_lights_punctual-BojffBbG.esm.min.js.map +0 -1
  241. package/dist/chunks/KHR_materials_anisotropy-BPtHWkOQ.esm.js +0 -65
  242. package/dist/chunks/KHR_materials_anisotropy-BPtHWkOQ.esm.js.map +0 -1
  243. package/dist/chunks/KHR_materials_anisotropy-DU5_bnCL.esm.min.js +0 -2
  244. package/dist/chunks/KHR_materials_anisotropy-DU5_bnCL.esm.min.js.map +0 -1
  245. package/dist/chunks/KHR_materials_clearcoat-BBuRlPhc.esm.min.js +0 -2
  246. package/dist/chunks/KHR_materials_clearcoat-BBuRlPhc.esm.min.js.map +0 -1
  247. package/dist/chunks/KHR_materials_clearcoat-Eg0xbuWN.esm.js +0 -96
  248. package/dist/chunks/KHR_materials_clearcoat-Eg0xbuWN.esm.js.map +0 -1
  249. package/dist/chunks/KHR_materials_diffuse_transmission-Bkzk60Y5.esm.min.js +0 -2
  250. package/dist/chunks/KHR_materials_diffuse_transmission-Bkzk60Y5.esm.min.js.map +0 -1
  251. package/dist/chunks/KHR_materials_diffuse_transmission-C3DaLgRY.esm.js +0 -97
  252. package/dist/chunks/KHR_materials_diffuse_transmission-C3DaLgRY.esm.js.map +0 -1
  253. package/dist/chunks/KHR_materials_dispersion-DL_XFhxj.esm.js +0 -62
  254. package/dist/chunks/KHR_materials_dispersion-DL_XFhxj.esm.js.map +0 -1
  255. package/dist/chunks/KHR_materials_dispersion-DbMQPBgM.esm.min.js +0 -2
  256. package/dist/chunks/KHR_materials_dispersion-DbMQPBgM.esm.min.js.map +0 -1
  257. package/dist/chunks/KHR_materials_emissive_strength-BuHyjtBD.esm.js +0 -55
  258. package/dist/chunks/KHR_materials_emissive_strength-BuHyjtBD.esm.js.map +0 -1
  259. package/dist/chunks/KHR_materials_emissive_strength-Djlr_ul3.esm.min.js +0 -2
  260. package/dist/chunks/KHR_materials_emissive_strength-Djlr_ul3.esm.min.js.map +0 -1
  261. package/dist/chunks/KHR_materials_ior-BIe6qBOo.esm.js +0 -64
  262. package/dist/chunks/KHR_materials_ior-BIe6qBOo.esm.js.map +0 -1
  263. package/dist/chunks/KHR_materials_ior-DOfaAmNY.esm.min.js +0 -2
  264. package/dist/chunks/KHR_materials_ior-DOfaAmNY.esm.min.js.map +0 -1
  265. package/dist/chunks/KHR_materials_iridescence-BgElZgUu.esm.js +0 -72
  266. package/dist/chunks/KHR_materials_iridescence-BgElZgUu.esm.js.map +0 -1
  267. package/dist/chunks/KHR_materials_iridescence-lUeo07SZ.esm.min.js +0 -2
  268. package/dist/chunks/KHR_materials_iridescence-lUeo07SZ.esm.min.js.map +0 -1
  269. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-9ShQyhJ6.esm.min.js +0 -2
  270. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-9ShQyhJ6.esm.min.js.map +0 -1
  271. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DE5LjLg6.esm.js +0 -81
  272. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DE5LjLg6.esm.js.map +0 -1
  273. package/dist/chunks/KHR_materials_sheen-BfZe6ZFu.esm.js +0 -85
  274. package/dist/chunks/KHR_materials_sheen-BfZe6ZFu.esm.js.map +0 -1
  275. package/dist/chunks/KHR_materials_sheen-OWjuK2V4.esm.min.js +0 -2
  276. package/dist/chunks/KHR_materials_sheen-OWjuK2V4.esm.min.js.map +0 -1
  277. package/dist/chunks/KHR_materials_specular-dowPxbW3.esm.js +0 -75
  278. package/dist/chunks/KHR_materials_specular-dowPxbW3.esm.js.map +0 -1
  279. package/dist/chunks/KHR_materials_specular-nWeBZu0R.esm.min.js +0 -2
  280. package/dist/chunks/KHR_materials_specular-nWeBZu0R.esm.min.js.map +0 -1
  281. package/dist/chunks/KHR_materials_transmission-BPNQkK0O.esm.min.js +0 -2
  282. package/dist/chunks/KHR_materials_transmission-BPNQkK0O.esm.min.js.map +0 -1
  283. package/dist/chunks/KHR_materials_transmission-CHr_yLLX.esm.js +0 -307
  284. package/dist/chunks/KHR_materials_transmission-CHr_yLLX.esm.js.map +0 -1
  285. package/dist/chunks/KHR_materials_unlit-BYXpcsdj.esm.min.js +0 -2
  286. package/dist/chunks/KHR_materials_unlit-BYXpcsdj.esm.min.js.map +0 -1
  287. package/dist/chunks/KHR_materials_unlit-Cr7YsDHT.esm.js +0 -74
  288. package/dist/chunks/KHR_materials_unlit-Cr7YsDHT.esm.js.map +0 -1
  289. package/dist/chunks/KHR_materials_variants-BCVX3sJa.esm.js +0 -262
  290. package/dist/chunks/KHR_materials_variants-BCVX3sJa.esm.js.map +0 -1
  291. package/dist/chunks/KHR_materials_variants-BXzl6KpJ.esm.min.js +0 -2
  292. package/dist/chunks/KHR_materials_variants-BXzl6KpJ.esm.min.js.map +0 -1
  293. package/dist/chunks/KHR_materials_volume-BD9KEaJz.esm.min.js +0 -2
  294. package/dist/chunks/KHR_materials_volume-BD9KEaJz.esm.min.js.map +0 -1
  295. package/dist/chunks/KHR_materials_volume-DrqGUGW6.esm.js +0 -87
  296. package/dist/chunks/KHR_materials_volume-DrqGUGW6.esm.js.map +0 -1
  297. package/dist/chunks/KHR_mesh_quantization-Dg22auJA.esm.min.js +0 -2
  298. package/dist/chunks/KHR_mesh_quantization-Dg22auJA.esm.min.js.map +0 -1
  299. package/dist/chunks/KHR_mesh_quantization-hvxpvTbe.esm.js +0 -26
  300. package/dist/chunks/KHR_mesh_quantization-hvxpvTbe.esm.js.map +0 -1
  301. package/dist/chunks/KHR_node_hoverability-BDiqFmBB.esm.js +0 -39
  302. package/dist/chunks/KHR_node_hoverability-BDiqFmBB.esm.js.map +0 -1
  303. package/dist/chunks/KHR_node_hoverability-CumkOtZM.esm.min.js +0 -2
  304. package/dist/chunks/KHR_node_hoverability-CumkOtZM.esm.min.js.map +0 -1
  305. package/dist/chunks/KHR_node_visibility-BKEa-Yfj.esm.min.js +0 -2
  306. package/dist/chunks/KHR_node_visibility-BKEa-Yfj.esm.min.js.map +0 -1
  307. package/dist/chunks/KHR_node_visibility-K0fsD4Vv.esm.js +0 -46
  308. package/dist/chunks/KHR_node_visibility-K0fsD4Vv.esm.js.map +0 -1
  309. package/dist/chunks/KHR_texture_basisu-8YVY1pKo.esm.js +0 -43
  310. package/dist/chunks/KHR_texture_basisu-8YVY1pKo.esm.js.map +0 -1
  311. package/dist/chunks/KHR_texture_basisu-BM__NeSW.esm.min.js +0 -2
  312. package/dist/chunks/KHR_texture_basisu-BM__NeSW.esm.min.js.map +0 -1
  313. package/dist/chunks/KHR_texture_transform--qxpdvRw.esm.js +0 -63
  314. package/dist/chunks/KHR_texture_transform--qxpdvRw.esm.js.map +0 -1
  315. package/dist/chunks/KHR_texture_transform-C0MO-oJp.esm.min.js +0 -2
  316. package/dist/chunks/KHR_texture_transform-C0MO-oJp.esm.min.js.map +0 -1
  317. package/dist/chunks/KHR_xmp_json_ld-D9FpHvJo.esm.js +0 -51
  318. package/dist/chunks/KHR_xmp_json_ld-D9FpHvJo.esm.js.map +0 -1
  319. package/dist/chunks/KHR_xmp_json_ld-DeXPWWQE.esm.min.js +0 -2
  320. package/dist/chunks/KHR_xmp_json_ld-DeXPWWQE.esm.min.js.map +0 -1
  321. package/dist/chunks/MSFT_audio_emitter-BbICSwFH.esm.min.js +0 -2
  322. package/dist/chunks/MSFT_audio_emitter-BbICSwFH.esm.min.js.map +0 -1
  323. package/dist/chunks/MSFT_audio_emitter-Dd5lbfUc.esm.js +0 -2201
  324. package/dist/chunks/MSFT_audio_emitter-Dd5lbfUc.esm.js.map +0 -1
  325. package/dist/chunks/MSFT_lod-B0zrRF3s.esm.js +0 -337
  326. package/dist/chunks/MSFT_lod-B0zrRF3s.esm.js.map +0 -1
  327. package/dist/chunks/MSFT_lod-Bd4znUfD.esm.min.js +0 -2
  328. package/dist/chunks/MSFT_lod-Bd4znUfD.esm.min.js.map +0 -1
  329. package/dist/chunks/MSFT_minecraftMesh-CdIpMgsb.esm.min.js +0 -2
  330. package/dist/chunks/MSFT_minecraftMesh-CdIpMgsb.esm.min.js.map +0 -1
  331. package/dist/chunks/MSFT_minecraftMesh-WFc8m_Ka.esm.js +0 -46
  332. package/dist/chunks/MSFT_minecraftMesh-WFc8m_Ka.esm.js.map +0 -1
  333. package/dist/chunks/MSFT_sRGBFactors-CTbtGna8.esm.js +0 -47
  334. package/dist/chunks/MSFT_sRGBFactors-CTbtGna8.esm.js.map +0 -1
  335. package/dist/chunks/MSFT_sRGBFactors-yTSoBQJx.esm.min.js +0 -2
  336. package/dist/chunks/MSFT_sRGBFactors-yTSoBQJx.esm.min.js.map +0 -1
  337. package/dist/chunks/animationGroup-8TJDgymS.esm.js +0 -2482
  338. package/dist/chunks/animationGroup-8TJDgymS.esm.js.map +0 -1
  339. package/dist/chunks/animationGroup-toXtd3a1.esm.min.js +0 -2
  340. package/dist/chunks/animationGroup-toXtd3a1.esm.min.js.map +0 -1
  341. package/dist/chunks/assetContainer-7pMDUaac.esm.min.js +0 -2
  342. package/dist/chunks/assetContainer-7pMDUaac.esm.min.js.map +0 -1
  343. package/dist/chunks/assetContainer-DYzO0AbX.esm.js +0 -1720
  344. package/dist/chunks/assetContainer-DYzO0AbX.esm.js.map +0 -1
  345. package/dist/chunks/audioEngine-Kz4HSEXd.esm.min.js +0 -2
  346. package/dist/chunks/audioEngine-Kz4HSEXd.esm.min.js.map +0 -1
  347. package/dist/chunks/audioEngine-peiGqjr6.esm.js +0 -305
  348. package/dist/chunks/audioEngine-peiGqjr6.esm.js.map +0 -1
  349. package/dist/chunks/bakedVertexAnimation-BZvcL01J.esm.min.js +0 -2
  350. package/dist/chunks/bakedVertexAnimation-BZvcL01J.esm.min.js.map +0 -1
  351. package/dist/chunks/bakedVertexAnimation-CPflSjER.esm.js +0 -114
  352. package/dist/chunks/bakedVertexAnimation-CPflSjER.esm.js.map +0 -1
  353. package/dist/chunks/basisTextureLoader-CR0XhSAg.esm.js +0 -600
  354. package/dist/chunks/basisTextureLoader-CR0XhSAg.esm.js.map +0 -1
  355. package/dist/chunks/basisTextureLoader-DVJdcB62.esm.min.js +0 -2
  356. package/dist/chunks/basisTextureLoader-DVJdcB62.esm.min.js.map +0 -1
  357. package/dist/chunks/dds-6EdM5O6M.esm.js +0 -540
  358. package/dist/chunks/dds-6EdM5O6M.esm.js.map +0 -1
  359. package/dist/chunks/dds-DVX_K9B3.esm.min.js +0 -2
  360. package/dist/chunks/dds-DVX_K9B3.esm.min.js.map +0 -1
  361. package/dist/chunks/ddsTextureLoader-BAK7Ib2Z.esm.min.js +0 -2
  362. package/dist/chunks/ddsTextureLoader-BAK7Ib2Z.esm.min.js.map +0 -1
  363. package/dist/chunks/ddsTextureLoader-_nktVxwZ.esm.js +0 -88
  364. package/dist/chunks/ddsTextureLoader-_nktVxwZ.esm.js.map +0 -1
  365. package/dist/chunks/decalFragment-C_Cews3-.esm.js +0 -18
  366. package/dist/chunks/decalFragment-C_Cews3-.esm.js.map +0 -1
  367. package/dist/chunks/decalFragment-Dmj88EX9.esm.min.js +0 -2
  368. package/dist/chunks/decalFragment-Dmj88EX9.esm.min.js.map +0 -1
  369. package/dist/chunks/default.fragment-Bv_nR7po.esm.min.js +0 -2
  370. package/dist/chunks/default.fragment-Bv_nR7po.esm.min.js.map +0 -1
  371. package/dist/chunks/default.fragment-CkZQyJVM.esm.min.js +0 -2
  372. package/dist/chunks/default.fragment-CkZQyJVM.esm.min.js.map +0 -1
  373. package/dist/chunks/default.fragment-CyFHDykY.esm.js +0 -446
  374. package/dist/chunks/default.fragment-CyFHDykY.esm.js.map +0 -1
  375. package/dist/chunks/default.fragment-ej-2z5tS.esm.js +0 -515
  376. package/dist/chunks/default.fragment-ej-2z5tS.esm.js.map +0 -1
  377. package/dist/chunks/default.vertex-16mVOFgT.esm.js +0 -211
  378. package/dist/chunks/default.vertex-16mVOFgT.esm.js.map +0 -1
  379. package/dist/chunks/default.vertex-D--q2At3.esm.min.js +0 -2
  380. package/dist/chunks/default.vertex-D--q2At3.esm.min.js.map +0 -1
  381. package/dist/chunks/default.vertex-DDlgZTrR.esm.js +0 -190
  382. package/dist/chunks/default.vertex-DDlgZTrR.esm.js.map +0 -1
  383. package/dist/chunks/default.vertex-_jqs3KiZ.esm.min.js +0 -2
  384. package/dist/chunks/default.vertex-_jqs3KiZ.esm.min.js.map +0 -1
  385. package/dist/chunks/defaultUboDeclaration-8YG0iNg8.esm.js +0 -15
  386. package/dist/chunks/defaultUboDeclaration-8YG0iNg8.esm.js.map +0 -1
  387. package/dist/chunks/defaultUboDeclaration-BoBSRTbi.esm.js +0 -13
  388. package/dist/chunks/defaultUboDeclaration-BoBSRTbi.esm.js.map +0 -1
  389. package/dist/chunks/defaultUboDeclaration-Dt_5vo1d.esm.min.js +0 -2
  390. package/dist/chunks/defaultUboDeclaration-Dt_5vo1d.esm.min.js.map +0 -1
  391. package/dist/chunks/defaultUboDeclaration-R6gGjkAM.esm.min.js +0 -2
  392. package/dist/chunks/defaultUboDeclaration-R6gGjkAM.esm.min.js.map +0 -1
  393. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +0 -11
  394. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +0 -1
  395. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +0 -2
  396. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +0 -1
  397. package/dist/chunks/dumpTools-Bhux0wvM.esm.js +0 -200
  398. package/dist/chunks/dumpTools-Bhux0wvM.esm.js.map +0 -1
  399. package/dist/chunks/dumpTools-CHCb2UkY.esm.min.js +0 -2
  400. package/dist/chunks/dumpTools-CHCb2UkY.esm.min.js.map +0 -1
  401. package/dist/chunks/engine-DF_zE4qj.esm.js +0 -2213
  402. package/dist/chunks/engine-DF_zE4qj.esm.js.map +0 -1
  403. package/dist/chunks/engine-DVmdDcyP.esm.min.js +0 -2
  404. package/dist/chunks/engine-DVmdDcyP.esm.min.js.map +0 -1
  405. package/dist/chunks/engine.common-CvOmoKru.esm.js +0 -1162
  406. package/dist/chunks/engine.common-CvOmoKru.esm.js.map +0 -1
  407. package/dist/chunks/engine.common-DpTzktQJ.esm.min.js +0 -2
  408. package/dist/chunks/engine.common-DpTzktQJ.esm.min.js.map +0 -1
  409. package/dist/chunks/envTextureLoader-4YxGm-Px.esm.js +0 -64
  410. package/dist/chunks/envTextureLoader-4YxGm-Px.esm.js.map +0 -1
  411. package/dist/chunks/envTextureLoader-DMQui088.esm.min.js +0 -2
  412. package/dist/chunks/envTextureLoader-DMQui088.esm.min.js.map +0 -1
  413. package/dist/chunks/environmentTextureTools-BPGrTBPI.esm.min.js +0 -2
  414. package/dist/chunks/environmentTextureTools-BPGrTBPI.esm.min.js.map +0 -1
  415. package/dist/chunks/environmentTextureTools-DvkpsqkN.esm.js +0 -382
  416. package/dist/chunks/environmentTextureTools-DvkpsqkN.esm.js.map +0 -1
  417. package/dist/chunks/exrTextureLoader-BRkB54sO.esm.js +0 -1683
  418. package/dist/chunks/exrTextureLoader-BRkB54sO.esm.js.map +0 -1
  419. package/dist/chunks/exrTextureLoader-BtN7_zst.esm.min.js +0 -2
  420. package/dist/chunks/exrTextureLoader-BtN7_zst.esm.min.js.map +0 -1
  421. package/dist/chunks/fogFragment-BrGGFaiu.esm.js +0 -101
  422. package/dist/chunks/fogFragment-BrGGFaiu.esm.js.map +0 -1
  423. package/dist/chunks/fogFragment-ByOwwQur.esm.min.js +0 -2
  424. package/dist/chunks/fogFragment-ByOwwQur.esm.min.js.map +0 -1
  425. package/dist/chunks/fogFragment-Chod24nu.esm.min.js +0 -2
  426. package/dist/chunks/fogFragment-Chod24nu.esm.min.js.map +0 -1
  427. package/dist/chunks/fogFragment-gZfybCpt.esm.js +0 -102
  428. package/dist/chunks/fogFragment-gZfybCpt.esm.js.map +0 -1
  429. package/dist/chunks/fresnelFunction-BdEia8ob.esm.min.js +0 -2
  430. package/dist/chunks/fresnelFunction-BdEia8ob.esm.min.js.map +0 -1
  431. package/dist/chunks/fresnelFunction-DBlxfmri.esm.js +0 -12
  432. package/dist/chunks/fresnelFunction-DBlxfmri.esm.js.map +0 -1
  433. package/dist/chunks/glTFLoader-D4C1IGb3.esm.min.js +0 -2
  434. package/dist/chunks/glTFLoader-D4C1IGb3.esm.min.js.map +0 -1
  435. package/dist/chunks/glTFLoader-fUFiWvYb.esm.js +0 -7693
  436. package/dist/chunks/glTFLoader-fUFiWvYb.esm.js.map +0 -1
  437. package/dist/chunks/glTFLoaderAnimation-BB_Vw079.esm.min.js +0 -2
  438. package/dist/chunks/glTFLoaderAnimation-BB_Vw079.esm.min.js.map +0 -1
  439. package/dist/chunks/glTFLoaderAnimation-CttmY50U.esm.js +0 -77
  440. package/dist/chunks/glTFLoaderAnimation-CttmY50U.esm.js.map +0 -1
  441. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +0 -2
  442. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +0 -1
  443. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +0 -67
  444. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +0 -1
  445. package/dist/chunks/harmonicsFunctions-B0Rp1hEo.esm.min.js +0 -2
  446. package/dist/chunks/harmonicsFunctions-B0Rp1hEo.esm.min.js.map +0 -1
  447. package/dist/chunks/harmonicsFunctions-Cca_z552.esm.js +0 -34
  448. package/dist/chunks/harmonicsFunctions-Cca_z552.esm.js.map +0 -1
  449. package/dist/chunks/harmonicsFunctions-D4ID83NC.esm.min.js +0 -2
  450. package/dist/chunks/harmonicsFunctions-D4ID83NC.esm.min.js.map +0 -1
  451. package/dist/chunks/harmonicsFunctions-HJ5dbl0w.esm.js +0 -35
  452. package/dist/chunks/harmonicsFunctions-HJ5dbl0w.esm.js.map +0 -1
  453. package/dist/chunks/hdrTextureLoader-C3kqy6YV.esm.js +0 -253
  454. package/dist/chunks/hdrTextureLoader-C3kqy6YV.esm.js.map +0 -1
  455. package/dist/chunks/hdrTextureLoader-Dhlluz4z.esm.min.js +0 -2
  456. package/dist/chunks/hdrTextureLoader-Dhlluz4z.esm.min.js.map +0 -1
  457. package/dist/chunks/helperFunctions-BJotVqUd.esm.min.js +0 -2
  458. package/dist/chunks/helperFunctions-BJotVqUd.esm.min.js.map +0 -1
  459. package/dist/chunks/helperFunctions-C66wRWtu.esm.js +0 -110
  460. package/dist/chunks/helperFunctions-C66wRWtu.esm.js.map +0 -1
  461. package/dist/chunks/helperFunctions-DwEZ9rqh.esm.min.js +0 -2
  462. package/dist/chunks/helperFunctions-DwEZ9rqh.esm.min.js.map +0 -1
  463. package/dist/chunks/helperFunctions-gnki_9Kj.esm.js +0 -83
  464. package/dist/chunks/helperFunctions-gnki_9Kj.esm.js.map +0 -1
  465. package/dist/chunks/iesTextureLoader-QDs2Cwy5.esm.js +0 -189
  466. package/dist/chunks/iesTextureLoader-QDs2Cwy5.esm.js.map +0 -1
  467. package/dist/chunks/iesTextureLoader-pwA6Q4HK.esm.min.js +0 -2
  468. package/dist/chunks/iesTextureLoader-pwA6Q4HK.esm.min.js.map +0 -1
  469. package/dist/chunks/index-C6hXZyZb.esm.js +0 -74889
  470. package/dist/chunks/index-C6hXZyZb.esm.js.map +0 -1
  471. package/dist/chunks/index-rZVkfTE6.esm.min.js +0 -57
  472. package/dist/chunks/index-rZVkfTE6.esm.min.js.map +0 -1
  473. package/dist/chunks/ktxTextureLoader-jVu-Sj-0.esm.js +0 -814
  474. package/dist/chunks/ktxTextureLoader-jVu-Sj-0.esm.js.map +0 -1
  475. package/dist/chunks/ktxTextureLoader-zG9azrZF.esm.min.js +0 -2
  476. package/dist/chunks/ktxTextureLoader-zG9azrZF.esm.min.js.map +0 -1
  477. package/dist/chunks/logDepthDeclaration-0cA1pTvQ.esm.min.js +0 -2
  478. package/dist/chunks/logDepthDeclaration-0cA1pTvQ.esm.min.js.map +0 -1
  479. package/dist/chunks/logDepthDeclaration-CYxYhXIS.esm.js +0 -11
  480. package/dist/chunks/logDepthDeclaration-CYxYhXIS.esm.js.map +0 -1
  481. package/dist/chunks/logDepthDeclaration-D4KGxdX-.esm.min.js +0 -2
  482. package/dist/chunks/logDepthDeclaration-D4KGxdX-.esm.min.js.map +0 -1
  483. package/dist/chunks/logDepthDeclaration-DJlt2-H5.esm.js +0 -35
  484. package/dist/chunks/logDepthDeclaration-DJlt2-H5.esm.js.map +0 -1
  485. package/dist/chunks/logDepthVertex-BS2JEtXA.esm.min.js +0 -2
  486. package/dist/chunks/logDepthVertex-BS2JEtXA.esm.min.js.map +0 -1
  487. package/dist/chunks/logDepthVertex-DKPfA10X.esm.js +0 -81
  488. package/dist/chunks/logDepthVertex-DKPfA10X.esm.js.map +0 -1
  489. package/dist/chunks/logDepthVertex-ojTShW5I.esm.js +0 -77
  490. package/dist/chunks/logDepthVertex-ojTShW5I.esm.js.map +0 -1
  491. package/dist/chunks/logDepthVertex-v-0pHNc-.esm.min.js +0 -2
  492. package/dist/chunks/logDepthVertex-v-0pHNc-.esm.min.js.map +0 -1
  493. package/dist/chunks/mainUVVaryingDeclaration-BAzmbS0W.esm.min.js +0 -2
  494. package/dist/chunks/mainUVVaryingDeclaration-BAzmbS0W.esm.min.js.map +0 -1
  495. package/dist/chunks/mainUVVaryingDeclaration-Cnux1jkK.esm.js +0 -11
  496. package/dist/chunks/mainUVVaryingDeclaration-Cnux1jkK.esm.js.map +0 -1
  497. package/dist/chunks/mainUVVaryingDeclaration-CwS0hUUZ.esm.min.js +0 -2
  498. package/dist/chunks/mainUVVaryingDeclaration-CwS0hUUZ.esm.min.js.map +0 -1
  499. package/dist/chunks/mainUVVaryingDeclaration-DCawby1A.esm.js +0 -11
  500. package/dist/chunks/mainUVVaryingDeclaration-DCawby1A.esm.js.map +0 -1
  501. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js +0 -119
  502. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js.map +0 -1
  503. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js +0 -2
  504. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js.map +0 -1
  505. package/dist/chunks/meshUboDeclaration-QvH0RgeZ.esm.js +0 -26
  506. package/dist/chunks/meshUboDeclaration-QvH0RgeZ.esm.js.map +0 -1
  507. package/dist/chunks/meshUboDeclaration-g2s_cYI1.esm.min.js +0 -2
  508. package/dist/chunks/meshUboDeclaration-g2s_cYI1.esm.min.js.map +0 -1
  509. package/dist/chunks/objFileLoader-BOutXdVR.esm.min.js +0 -2
  510. package/dist/chunks/objFileLoader-BOutXdVR.esm.min.js.map +0 -1
  511. package/dist/chunks/objFileLoader-BPwrX8RK.esm.js +0 -1338
  512. package/dist/chunks/objFileLoader-BPwrX8RK.esm.js.map +0 -1
  513. package/dist/chunks/oitFragment-CmcWUhsZ.esm.js +0 -1240
  514. package/dist/chunks/oitFragment-CmcWUhsZ.esm.js.map +0 -1
  515. package/dist/chunks/oitFragment-D8XBQ6Wa.esm.js +0 -1078
  516. package/dist/chunks/oitFragment-D8XBQ6Wa.esm.js.map +0 -1
  517. package/dist/chunks/oitFragment-DgAlmoHs.esm.min.js +0 -2
  518. package/dist/chunks/oitFragment-DgAlmoHs.esm.min.js.map +0 -1
  519. package/dist/chunks/oitFragment-DpJ5xGhy.esm.min.js +0 -2
  520. package/dist/chunks/oitFragment-DpJ5xGhy.esm.min.js.map +0 -1
  521. package/dist/chunks/pass.fragment--XRaXRhU.esm.js +0 -15
  522. package/dist/chunks/pass.fragment--XRaXRhU.esm.js.map +0 -1
  523. package/dist/chunks/pass.fragment-5Q3qXxDe.esm.min.js +0 -2
  524. package/dist/chunks/pass.fragment-5Q3qXxDe.esm.min.js.map +0 -1
  525. package/dist/chunks/pass.fragment-BBLiyU_i.esm.min.js +0 -2
  526. package/dist/chunks/pass.fragment-BBLiyU_i.esm.min.js.map +0 -1
  527. package/dist/chunks/pass.fragment-DI4ZYZJe.esm.js +0 -15
  528. package/dist/chunks/pass.fragment-DI4ZYZJe.esm.js.map +0 -1
  529. package/dist/chunks/pbr.fragment-C7xQS4ZJ.esm.js +0 -3269
  530. package/dist/chunks/pbr.fragment-C7xQS4ZJ.esm.js.map +0 -1
  531. package/dist/chunks/pbr.fragment-Ddxaik8T.esm.min.js +0 -2
  532. package/dist/chunks/pbr.fragment-Ddxaik8T.esm.min.js.map +0 -1
  533. package/dist/chunks/pbr.fragment-fky04gH_.esm.js +0 -3222
  534. package/dist/chunks/pbr.fragment-fky04gH_.esm.js.map +0 -1
  535. package/dist/chunks/pbr.fragment-ya1zai4w.esm.min.js +0 -2
  536. package/dist/chunks/pbr.fragment-ya1zai4w.esm.min.js.map +0 -1
  537. package/dist/chunks/pbr.vertex-BPEYHoRM.esm.js +0 -223
  538. package/dist/chunks/pbr.vertex-BPEYHoRM.esm.js.map +0 -1
  539. package/dist/chunks/pbr.vertex-BXcMYADF.esm.js +0 -348
  540. package/dist/chunks/pbr.vertex-BXcMYADF.esm.js.map +0 -1
  541. package/dist/chunks/pbr.vertex-BjA08auU.esm.min.js +0 -2
  542. package/dist/chunks/pbr.vertex-BjA08auU.esm.min.js.map +0 -1
  543. package/dist/chunks/pbr.vertex-Cx2V3lNf.esm.min.js +0 -2
  544. package/dist/chunks/pbr.vertex-Cx2V3lNf.esm.min.js.map +0 -1
  545. package/dist/chunks/postprocess.vertex-BHpQrNSx.esm.min.js +0 -2
  546. package/dist/chunks/postprocess.vertex-BHpQrNSx.esm.min.js.map +0 -1
  547. package/dist/chunks/postprocess.vertex-DnDbk0tq.esm.js +0 -20
  548. package/dist/chunks/postprocess.vertex-DnDbk0tq.esm.js.map +0 -1
  549. package/dist/chunks/rawTexture-CWiRIto8.esm.js +0 -191
  550. package/dist/chunks/rawTexture-CWiRIto8.esm.js.map +0 -1
  551. package/dist/chunks/rawTexture-DX8V9PEj.esm.min.js +0 -2
  552. package/dist/chunks/rawTexture-DX8V9PEj.esm.min.js.map +0 -1
  553. package/dist/chunks/ray-ix7SqYNQ.esm.min.js +0 -2
  554. package/dist/chunks/ray-ix7SqYNQ.esm.min.js.map +0 -1
  555. package/dist/chunks/ray-nTZBkOil.esm.js +0 -946
  556. package/dist/chunks/ray-nTZBkOil.esm.js.map +0 -1
  557. package/dist/chunks/rgbdDecode.fragment-Be3ofvlt.esm.min.js +0 -2
  558. package/dist/chunks/rgbdDecode.fragment-Be3ofvlt.esm.min.js.map +0 -1
  559. package/dist/chunks/rgbdDecode.fragment-C05QJpT2.esm.js +0 -13
  560. package/dist/chunks/rgbdDecode.fragment-C05QJpT2.esm.js.map +0 -1
  561. package/dist/chunks/rgbdDecode.fragment-D3SYBclQ.esm.min.js +0 -2
  562. package/dist/chunks/rgbdDecode.fragment-D3SYBclQ.esm.min.js.map +0 -1
  563. package/dist/chunks/rgbdDecode.fragment-DBG6KfKF.esm.js +0 -13
  564. package/dist/chunks/rgbdDecode.fragment-DBG6KfKF.esm.js.map +0 -1
  565. package/dist/chunks/rgbdEncode.fragment-BlhtohrO.esm.js +0 -13
  566. package/dist/chunks/rgbdEncode.fragment-BlhtohrO.esm.js.map +0 -1
  567. package/dist/chunks/rgbdEncode.fragment-BmJKYw6A.esm.min.js +0 -2
  568. package/dist/chunks/rgbdEncode.fragment-BmJKYw6A.esm.min.js.map +0 -1
  569. package/dist/chunks/rgbdEncode.fragment-dr2kGjSO.esm.js +0 -13
  570. package/dist/chunks/rgbdEncode.fragment-dr2kGjSO.esm.js.map +0 -1
  571. package/dist/chunks/rgbdEncode.fragment-hXPzg1p5.esm.min.js +0 -2
  572. package/dist/chunks/rgbdEncode.fragment-hXPzg1p5.esm.min.js.map +0 -1
  573. package/dist/chunks/splatFileLoader-Bs42LtsP.esm.min.js +0 -2
  574. package/dist/chunks/splatFileLoader-Bs42LtsP.esm.min.js.map +0 -1
  575. package/dist/chunks/splatFileLoader-Dp33YOem.esm.js +0 -3379
  576. package/dist/chunks/splatFileLoader-Dp33YOem.esm.js.map +0 -1
  577. package/dist/chunks/spotLight-C0NmKeem.esm.js +0 -701
  578. package/dist/chunks/spotLight-C0NmKeem.esm.js.map +0 -1
  579. package/dist/chunks/spotLight-CcuCNdES.esm.min.js +0 -2
  580. package/dist/chunks/spotLight-CcuCNdES.esm.min.js.map +0 -1
  581. package/dist/chunks/standardMaterial-C1E5n_4w.esm.min.js +0 -2
  582. package/dist/chunks/standardMaterial-C1E5n_4w.esm.min.js.map +0 -1
  583. package/dist/chunks/standardMaterial-v_D8QA4q.esm.js +0 -1807
  584. package/dist/chunks/standardMaterial-v_D8QA4q.esm.js.map +0 -1
  585. package/dist/chunks/stlFileLoader-DC2IRQDj.esm.min.js +0 -2
  586. package/dist/chunks/stlFileLoader-DC2IRQDj.esm.min.js.map +0 -1
  587. package/dist/chunks/stlFileLoader-LRHEIFfU.esm.js +0 -238
  588. package/dist/chunks/stlFileLoader-LRHEIFfU.esm.js.map +0 -1
  589. package/dist/chunks/tgaTextureLoader-2ekJC0En.esm.js +0 -349
  590. package/dist/chunks/tgaTextureLoader-2ekJC0En.esm.js.map +0 -1
  591. package/dist/chunks/tgaTextureLoader-Clj6zUK-.esm.min.js +0 -2
  592. package/dist/chunks/tgaTextureLoader-Clj6zUK-.esm.min.js.map +0 -1
  593. package/dist/chunks/thinEngine-DksimP2U.esm.js +0 -3848
  594. package/dist/chunks/thinEngine-DksimP2U.esm.js.map +0 -1
  595. package/dist/chunks/thinEngine-tsALaFYH.esm.min.js +0 -2
  596. package/dist/chunks/thinEngine-tsALaFYH.esm.min.js.map +0 -1
  597. package/dist/chunks/thinInstanceMesh-B8AW0Oa2.esm.js +0 -314
  598. package/dist/chunks/thinInstanceMesh-B8AW0Oa2.esm.js.map +0 -1
  599. package/dist/chunks/thinInstanceMesh-kCGEJ0-e.esm.min.js +0 -2
  600. package/dist/chunks/thinInstanceMesh-kCGEJ0-e.esm.min.js.map +0 -1
  601. package/dist/chunks/vertexColorMixing-Bjijk3lU.esm.min.js +0 -2
  602. package/dist/chunks/vertexColorMixing-Bjijk3lU.esm.min.js.map +0 -1
  603. package/dist/chunks/vertexColorMixing-D9917nJN.esm.js +0 -428
  604. package/dist/chunks/vertexColorMixing-D9917nJN.esm.js.map +0 -1
  605. package/dist/chunks/vertexColorMixing-DgthWrKf.esm.min.js +0 -2
  606. package/dist/chunks/vertexColorMixing-DgthWrKf.esm.min.js.map +0 -1
  607. package/dist/chunks/vertexColorMixing-U1SA6UK3.esm.js +0 -538
  608. package/dist/chunks/vertexColorMixing-U1SA6UK3.esm.js.map +0 -1
  609. package/dist/chunks/webgpuEngine-BOGR1D8F.esm.min.js +0 -2
  610. package/dist/chunks/webgpuEngine-BOGR1D8F.esm.min.js.map +0 -1
  611. package/dist/chunks/webgpuEngine-BrzOpZ-2.esm.js +0 -11533
  612. package/dist/chunks/webgpuEngine-BrzOpZ-2.esm.js.map +0 -1
  613. package/dist/chunks/workerPool-BUOov2K1.esm.js +0 -122
  614. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +0 -1
  615. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +0 -2
  616. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +0 -1
  617. package/lib/index.d.ts +0 -591
  618. package/lib/index.js +0 -2165
  619. package/lib/index.js.map +0 -1
@@ -0,0 +1,183 @@
1
+ import type { Scene } from "@babylonjs/core/scene.js";
2
+ import { CubeTexture } from "@babylonjs/core/Materials/Textures/cubeTexture.js";
3
+ import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
4
+ /**
5
+ * WebGL Pixel Formats
6
+ */
7
+ export declare const enum PixelFormat {
8
+ DEPTH_COMPONENT = 6402,
9
+ ALPHA = 6406,
10
+ RGB = 6407,
11
+ RGBA = 6408,
12
+ LUMINANCE = 6409,
13
+ LUMINANCE_ALPHA = 6410
14
+ }
15
+ /**
16
+ * WebGL Pixel Types
17
+ */
18
+ export declare const enum PixelType {
19
+ UNSIGNED_BYTE = 5121,
20
+ UNSIGNED_SHORT_4_4_4_4 = 32819,
21
+ UNSIGNED_SHORT_5_5_5_1 = 32820,
22
+ UNSIGNED_SHORT_5_6_5 = 33635
23
+ }
24
+ /**
25
+ * WebGL Texture Magnification Filter
26
+ */
27
+ export declare const enum TextureMagFilter {
28
+ NEAREST = 9728,
29
+ LINEAR = 9729
30
+ }
31
+ /**
32
+ * WebGL Texture Minification Filter
33
+ */
34
+ export declare const enum TextureMinFilter {
35
+ NEAREST = 9728,
36
+ LINEAR = 9729,
37
+ NEAREST_MIPMAP_NEAREST = 9984,
38
+ LINEAR_MIPMAP_NEAREST = 9985,
39
+ NEAREST_MIPMAP_LINEAR = 9986,
40
+ LINEAR_MIPMAP_LINEAR = 9987
41
+ }
42
+ /**
43
+ * WebGL Texture Wrap Modes
44
+ */
45
+ export declare const enum TextureWrapMode {
46
+ REPEAT = 10497,
47
+ CLAMP_TO_EDGE = 33071,
48
+ MIRRORED_REPEAT = 33648
49
+ }
50
+ /**
51
+ * Raw texture data and descriptor sufficient for WebGL texture upload
52
+ */
53
+ export interface TextureData {
54
+ /**
55
+ * Width of image
56
+ */
57
+ width: number;
58
+ /**
59
+ * Height of image
60
+ */
61
+ height: number;
62
+ /**
63
+ * Format of pixels in data
64
+ */
65
+ format: PixelFormat;
66
+ /**
67
+ * Row byte alignment of pixels in data
68
+ */
69
+ alignment: number;
70
+ /**
71
+ * Pixel data
72
+ */
73
+ data: ArrayBufferView;
74
+ }
75
+ /**
76
+ * Wraps sampling parameters for a WebGL texture
77
+ */
78
+ export interface SamplingParameters {
79
+ /**
80
+ * Magnification mode when upsampling from a WebGL texture
81
+ */
82
+ magFilter?: TextureMagFilter;
83
+ /**
84
+ * Minification mode when upsampling from a WebGL texture
85
+ */
86
+ minFilter?: TextureMinFilter;
87
+ /**
88
+ * X axis wrapping mode when sampling out of a WebGL texture bounds
89
+ */
90
+ wrapS?: TextureWrapMode;
91
+ /**
92
+ * Y axis wrapping mode when sampling out of a WebGL texture bounds
93
+ */
94
+ wrapT?: TextureWrapMode;
95
+ /**
96
+ * Anisotropic filtering samples
97
+ */
98
+ maxAnisotropy?: number;
99
+ }
100
+ /**
101
+ * Represents a valid WebGL texture source for use in texImage2D
102
+ */
103
+ export type TextureSource = TextureData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
104
+ /**
105
+ * A generic set of texture mipmaps (where index 0 has the largest dimension)
106
+ */
107
+ export type Mipmaps<T> = Array<T>;
108
+ /**
109
+ * A set of 6 cubemap arranged in the order [+x, -x, +y, -y, +z, -z]
110
+ */
111
+ export type Faces<T> = Array<T>;
112
+ /**
113
+ * A set of texture mipmaps specifically for 2D textures in WebGL (where index 0 has the largest dimension)
114
+ */
115
+ export type Mipmaps2D = Mipmaps<TextureSource>;
116
+ /**
117
+ * A set of texture mipmaps specifically for cubemap textures in WebGL (where index 0 has the largest dimension)
118
+ */
119
+ export type MipmapsCube = Mipmaps<Faces<TextureSource>>;
120
+ /**
121
+ * A minimal WebGL cubemap descriptor
122
+ */
123
+ export declare class TextureCube {
124
+ internalFormat: PixelFormat;
125
+ type: PixelType;
126
+ source: MipmapsCube;
127
+ /**
128
+ * Returns the width of a face of the texture or 0 if not available
129
+ */
130
+ get Width(): number;
131
+ /**
132
+ * Returns the height of a face of the texture or 0 if not available
133
+ */
134
+ get Height(): number;
135
+ /**
136
+ * constructor
137
+ * @param internalFormat WebGL pixel format for the texture on the GPU
138
+ * @param type WebGL pixel type of the supplied data and texture on the GPU
139
+ * @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
140
+ */
141
+ constructor(internalFormat: PixelFormat, type: PixelType, source?: MipmapsCube);
142
+ }
143
+ /**
144
+ * A static class providing methods to aid working with Bablyon textures.
145
+ */
146
+ export declare class TextureUtils {
147
+ /**
148
+ * A prefix used when storing a babylon texture object reference on a Spectre texture object
149
+ */
150
+ static BabylonTextureKeyPrefix: string;
151
+ /**
152
+ * Controls anisotropic filtering for deserialized textures.
153
+ */
154
+ static MaxAnisotropy: number;
155
+ /**
156
+ * Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters.
157
+ * If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created.
158
+ * The advantage of this is to enable working with texture objects without the need to initialize on the GPU until desired.
159
+ * @param scene A Babylon Scene instance
160
+ * @param textureCube A Spectre TextureCube object
161
+ * @param automaticMipmaps Pass true to enable automatic mipmap generation where possible (requires power of images)
162
+ * @param environment Specifies that the texture will be used as an environment
163
+ * @param singleLod Specifies that the texture will be a singleLod (for environment)
164
+ * @returns Babylon cube texture
165
+ */
166
+ static GetBabylonCubeTexture(scene: Scene, textureCube: TextureCube, automaticMipmaps: boolean, environment?: boolean, singleLod?: boolean): CubeTexture;
167
+ /**
168
+ * Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields
169
+ * @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field)
170
+ * @param parameters Spectre SamplingParameters to apply
171
+ */
172
+ static ApplySamplingParameters(babylonTexture: BaseTexture, parameters: SamplingParameters): void;
173
+ private static _EnvironmentSampling;
174
+ private static _EnvironmentSingleMipSampling;
175
+ /**
176
+ * Environment preprocessing dedicated value (Internal Use or Advanced only).
177
+ */
178
+ static EnvironmentLODScale: number;
179
+ /**
180
+ * Environment preprocessing dedicated value (Internal Use or Advanced only)..
181
+ */
182
+ static EnvironmentLODOffset: number;
183
+ }
@@ -0,0 +1,351 @@
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
+ 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
+ export { TextureUtils };
351
+ //# sourceMappingURL=texture.js.map
@@ -0,0 +1 @@
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,gDAAa,CAAA;IACb,0DAAkB,CAAA;IAClB,sEAAwB,CAAA;AAC5B,CAAC,EAPiB,WAAW,KAAX,WAAW,QAO5B;AAED;;GAEG;AACH,MAAM,CAAN,IAAkB,SAKjB;AALD,WAAkB,SAAS;IACvB,8DAAsB,CAAA;IACtB,iFAA+B,CAAA;IAC/B,iFAA+B,CAAA;IAC/B,6EAA6B,CAAA;AAC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CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAC;YACzE,IAAI,cAAc,EAAE,CAAC;gBACjB,IAAM,qBAAqB,GAAG,EAAE,CAAC,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;YAC7D,CAAC;QACL,CAAC;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;SAtSY,YAAY","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"]}
@@ -0,0 +1,51 @@
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
+ }