@babylonjs/loaders 9.13.0 → 9.14.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 (489) hide show
  1. package/BVH/bvhFileLoader.d.ts +4 -67
  2. package/BVH/bvhFileLoader.js +6 -130
  3. package/BVH/bvhFileLoader.js.map +1 -1
  4. package/BVH/bvhFileLoader.pure.d.ts +75 -0
  5. package/BVH/bvhFileLoader.pure.js +154 -0
  6. package/BVH/bvhFileLoader.pure.js.map +1 -0
  7. package/BVH/bvhFileLoader.types.d.ts +11 -0
  8. package/BVH/bvhFileLoader.types.js +2 -0
  9. package/BVH/bvhFileLoader.types.js.map +1 -0
  10. package/BVH/pure.d.ts +3 -0
  11. package/BVH/pure.js +5 -0
  12. package/BVH/pure.js.map +1 -0
  13. package/FBX/fbxFileLoader.d.ts +4 -192
  14. package/FBX/fbxFileLoader.js +6 -2437
  15. package/FBX/fbxFileLoader.js.map +1 -1
  16. package/FBX/fbxFileLoader.pure.d.ts +190 -0
  17. package/FBX/fbxFileLoader.pure.js +2451 -0
  18. package/FBX/fbxFileLoader.pure.js.map +1 -0
  19. package/FBX/fbxFileLoader.types.d.ts +11 -0
  20. package/FBX/fbxFileLoader.types.js +2 -0
  21. package/FBX/fbxFileLoader.types.js.map +1 -0
  22. package/FBX/pure.d.ts +3 -0
  23. package/FBX/pure.js +4 -0
  24. package/FBX/pure.js.map +1 -0
  25. package/OBJ/objFileLoader.d.ts +4 -134
  26. package/OBJ/objFileLoader.js +6 -315
  27. package/OBJ/objFileLoader.js.map +1 -1
  28. package/OBJ/objFileLoader.pure.d.ts +132 -0
  29. package/OBJ/objFileLoader.pure.js +329 -0
  30. package/OBJ/objFileLoader.pure.js.map +1 -0
  31. package/OBJ/objFileLoader.types.d.ts +11 -0
  32. package/OBJ/objFileLoader.types.js +2 -0
  33. package/OBJ/objFileLoader.types.js.map +1 -0
  34. package/OBJ/pure.d.ts +5 -0
  35. package/OBJ/pure.js +6 -0
  36. package/OBJ/pure.js.map +1 -0
  37. package/OBJ/solidParser.js +4 -3
  38. package/OBJ/solidParser.js.map +1 -1
  39. package/SPLAT/gaussianSplattingBlockAllocator.d.ts +137 -0
  40. package/SPLAT/gaussianSplattingBlockAllocator.js +555 -0
  41. package/SPLAT/gaussianSplattingBlockAllocator.js.map +1 -0
  42. package/SPLAT/gaussianSplattingDownloadManager.d.ts +109 -0
  43. package/SPLAT/gaussianSplattingDownloadManager.js +241 -0
  44. package/SPLAT/gaussianSplattingDownloadManager.js.map +1 -0
  45. package/SPLAT/gaussianSplattingResidencyController.d.ts +133 -0
  46. package/SPLAT/gaussianSplattingResidencyController.js +222 -0
  47. package/SPLAT/gaussianSplattingResidencyController.js.map +1 -0
  48. package/SPLAT/gaussianSplattingStream.d.ts +122 -4
  49. package/SPLAT/gaussianSplattingStream.js +413 -42
  50. package/SPLAT/gaussianSplattingStream.js.map +1 -1
  51. package/SPLAT/gaussianSplattingWorkBuffer.d.ts +36 -0
  52. package/SPLAT/gaussianSplattingWorkBuffer.js +125 -13
  53. package/SPLAT/gaussianSplattingWorkBuffer.js.map +1 -1
  54. package/SPLAT/gaussianSplattingWorkBufferShaders.d.ts +15 -0
  55. package/SPLAT/gaussianSplattingWorkBufferShaders.js +82 -0
  56. package/SPLAT/gaussianSplattingWorkBufferShaders.js.map +1 -1
  57. package/SPLAT/pure.d.ts +5 -0
  58. package/SPLAT/pure.js +7 -0
  59. package/SPLAT/pure.js.map +1 -0
  60. package/SPLAT/sog.d.ts +1 -97
  61. package/SPLAT/sog.js +1 -501
  62. package/SPLAT/sog.js.map +1 -1
  63. package/SPLAT/sog.pure.d.ts +102 -0
  64. package/SPLAT/sog.pure.js +514 -0
  65. package/SPLAT/sog.pure.js.map +1 -0
  66. package/SPLAT/splatFileLoader.d.ts +5 -106
  67. package/SPLAT/splatFileLoader.js +9 -636
  68. package/SPLAT/splatFileLoader.js.map +1 -1
  69. package/SPLAT/splatFileLoader.pure.d.ts +104 -0
  70. package/SPLAT/splatFileLoader.pure.js +650 -0
  71. package/SPLAT/splatFileLoader.pure.js.map +1 -0
  72. package/SPLAT/splatFileLoader.types.d.ts +11 -0
  73. package/SPLAT/splatFileLoader.types.js +2 -0
  74. package/SPLAT/splatFileLoader.types.js.map +1 -0
  75. package/STL/pure.d.ts +2 -0
  76. package/STL/pure.js +3 -0
  77. package/STL/pure.js.map +1 -0
  78. package/STL/stlFileLoader.d.ts +5 -76
  79. package/STL/stlFileLoader.js +7 -236
  80. package/STL/stlFileLoader.js.map +1 -1
  81. package/STL/stlFileLoader.pure.d.ts +73 -0
  82. package/STL/stlFileLoader.pure.js +249 -0
  83. package/STL/stlFileLoader.pure.js.map +1 -0
  84. package/STL/stlFileLoader.types.d.ts +10 -0
  85. package/STL/stlFileLoader.types.js +2 -0
  86. package/STL/stlFileLoader.types.js.map +1 -0
  87. package/glTF/1.0/pure.d.ts +3 -0
  88. package/glTF/1.0/pure.js +4 -0
  89. package/glTF/1.0/pure.js.map +1 -0
  90. package/glTF/2.0/Extensions/EXT_lights_area.d.ts +4 -39
  91. package/glTF/2.0/Extensions/EXT_lights_area.js +6 -91
  92. package/glTF/2.0/Extensions/EXT_lights_area.js.map +1 -1
  93. package/glTF/2.0/Extensions/EXT_lights_area.pure.d.ts +38 -0
  94. package/glTF/2.0/Extensions/EXT_lights_area.pure.js +106 -0
  95. package/glTF/2.0/Extensions/EXT_lights_area.pure.js.map +1 -0
  96. package/glTF/2.0/Extensions/EXT_lights_area.types.d.ts +9 -0
  97. package/glTF/2.0/Extensions/EXT_lights_area.types.js +2 -0
  98. package/glTF/2.0/Extensions/EXT_lights_area.types.js.map +1 -0
  99. package/glTF/2.0/Extensions/EXT_lights_ies.d.ts +4 -39
  100. package/glTF/2.0/Extensions/EXT_lights_ies.js +6 -81
  101. package/glTF/2.0/Extensions/EXT_lights_ies.js.map +1 -1
  102. package/glTF/2.0/Extensions/EXT_lights_ies.pure.d.ts +38 -0
  103. package/glTF/2.0/Extensions/EXT_lights_ies.pure.js +96 -0
  104. package/glTF/2.0/Extensions/EXT_lights_ies.pure.js.map +1 -0
  105. package/glTF/2.0/Extensions/EXT_lights_ies.types.d.ts +9 -0
  106. package/glTF/2.0/Extensions/EXT_lights_ies.types.js +2 -0
  107. package/glTF/2.0/Extensions/EXT_lights_ies.types.js.map +1 -0
  108. package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +4 -46
  109. package/glTF/2.0/Extensions/EXT_lights_image_based.js +6 -113
  110. package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
  111. package/glTF/2.0/Extensions/EXT_lights_image_based.pure.d.ts +37 -0
  112. package/glTF/2.0/Extensions/EXT_lights_image_based.pure.js +128 -0
  113. package/glTF/2.0/Extensions/EXT_lights_image_based.pure.js.map +1 -0
  114. package/glTF/2.0/Extensions/EXT_lights_image_based.types.d.ts +17 -0
  115. package/glTF/2.0/Extensions/EXT_lights_image_based.types.js +2 -0
  116. package/glTF/2.0/Extensions/EXT_lights_image_based.types.js.map +1 -0
  117. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +5 -37
  118. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +7 -92
  119. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
  120. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.pure.d.ts +35 -0
  121. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.pure.js +106 -0
  122. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.pure.js.map +1 -0
  123. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.types.d.ts +9 -0
  124. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.types.js +2 -0
  125. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.types.js.map +1 -0
  126. package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +4 -37
  127. package/glTF/2.0/Extensions/EXT_meshopt_compression.js +6 -48
  128. package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
  129. package/glTF/2.0/Extensions/EXT_meshopt_compression.pure.d.ts +36 -0
  130. package/glTF/2.0/Extensions/EXT_meshopt_compression.pure.js +63 -0
  131. package/glTF/2.0/Extensions/EXT_meshopt_compression.pure.js.map +1 -0
  132. package/glTF/2.0/Extensions/EXT_meshopt_compression.types.d.ts +9 -0
  133. package/glTF/2.0/Extensions/EXT_meshopt_compression.types.js +2 -0
  134. package/glTF/2.0/Extensions/EXT_meshopt_compression.types.js.map +1 -0
  135. package/glTF/2.0/Extensions/EXT_texture_avif.d.ts +4 -32
  136. package/glTF/2.0/Extensions/EXT_texture_avif.js +6 -36
  137. package/glTF/2.0/Extensions/EXT_texture_avif.js.map +1 -1
  138. package/glTF/2.0/Extensions/EXT_texture_avif.pure.d.ts +31 -0
  139. package/glTF/2.0/Extensions/EXT_texture_avif.pure.js +51 -0
  140. package/glTF/2.0/Extensions/EXT_texture_avif.pure.js.map +1 -0
  141. package/glTF/2.0/Extensions/EXT_texture_avif.types.d.ts +9 -0
  142. package/glTF/2.0/Extensions/EXT_texture_avif.types.js +2 -0
  143. package/glTF/2.0/Extensions/EXT_texture_avif.types.js.map +1 -0
  144. package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +4 -31
  145. package/glTF/2.0/Extensions/EXT_texture_webp.js +6 -35
  146. package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
  147. package/glTF/2.0/Extensions/EXT_texture_webp.pure.d.ts +30 -0
  148. package/glTF/2.0/Extensions/EXT_texture_webp.pure.js +50 -0
  149. package/glTF/2.0/Extensions/EXT_texture_webp.pure.js.map +1 -0
  150. package/glTF/2.0/Extensions/EXT_texture_webp.types.d.ts +9 -0
  151. package/glTF/2.0/Extensions/EXT_texture_webp.types.js +2 -0
  152. package/glTF/2.0/Extensions/EXT_texture_webp.types.js.map +1 -0
  153. package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +4 -51
  154. package/glTF/2.0/Extensions/ExtrasAsMetadata.js +6 -71
  155. package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
  156. package/glTF/2.0/Extensions/ExtrasAsMetadata.pure.d.ts +50 -0
  157. package/glTF/2.0/Extensions/ExtrasAsMetadata.pure.js +85 -0
  158. package/glTF/2.0/Extensions/ExtrasAsMetadata.pure.js.map +1 -0
  159. package/glTF/2.0/Extensions/ExtrasAsMetadata.types.d.ts +9 -0
  160. package/glTF/2.0/Extensions/ExtrasAsMetadata.types.js +2 -0
  161. package/glTF/2.0/Extensions/ExtrasAsMetadata.types.js.map +1 -0
  162. package/glTF/2.0/Extensions/KHR_animation_pointer.d.ts +5 -45
  163. package/glTF/2.0/Extensions/KHR_animation_pointer.js +7 -75
  164. package/glTF/2.0/Extensions/KHR_animation_pointer.js.map +1 -1
  165. package/glTF/2.0/Extensions/KHR_animation_pointer.pure.d.ts +43 -0
  166. package/glTF/2.0/Extensions/KHR_animation_pointer.pure.js +89 -0
  167. package/glTF/2.0/Extensions/KHR_animation_pointer.pure.js.map +1 -0
  168. package/glTF/2.0/Extensions/KHR_animation_pointer.types.d.ts +9 -0
  169. package/glTF/2.0/Extensions/KHR_animation_pointer.types.js +2 -0
  170. package/glTF/2.0/Extensions/KHR_animation_pointer.types.js.map +1 -0
  171. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +4 -45
  172. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +6 -90
  173. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
  174. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.pure.d.ts +44 -0
  175. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.pure.js +105 -0
  176. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.pure.js.map +1 -0
  177. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.types.d.ts +9 -0
  178. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.types.js +2 -0
  179. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.types.js.map +1 -0
  180. package/glTF/2.0/Extensions/KHR_interactivity/pure.d.ts +4 -0
  181. package/glTF/2.0/Extensions/KHR_interactivity/pure.js +5 -0
  182. package/glTF/2.0/Extensions/KHR_interactivity/pure.js.map +1 -0
  183. package/glTF/2.0/Extensions/KHR_interactivity.d.ts +4 -36
  184. package/glTF/2.0/Extensions/KHR_interactivity.js +6 -148
  185. package/glTF/2.0/Extensions/KHR_interactivity.js.map +1 -1
  186. package/glTF/2.0/Extensions/KHR_interactivity.pure.d.ts +35 -0
  187. package/glTF/2.0/Extensions/KHR_interactivity.pure.js +163 -0
  188. package/glTF/2.0/Extensions/KHR_interactivity.pure.js.map +1 -0
  189. package/glTF/2.0/Extensions/KHR_interactivity.types.d.ts +9 -0
  190. package/glTF/2.0/Extensions/KHR_interactivity.types.js +2 -0
  191. package/glTF/2.0/Extensions/KHR_interactivity.types.js.map +1 -0
  192. package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +4 -39
  193. package/glTF/2.0/Extensions/KHR_lights_punctual.js +6 -89
  194. package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
  195. package/glTF/2.0/Extensions/KHR_lights_punctual.pure.d.ts +38 -0
  196. package/glTF/2.0/Extensions/KHR_lights_punctual.pure.js +104 -0
  197. package/glTF/2.0/Extensions/KHR_lights_punctual.pure.js.map +1 -0
  198. package/glTF/2.0/Extensions/KHR_lights_punctual.types.d.ts +9 -0
  199. package/glTF/2.0/Extensions/KHR_lights_punctual.types.js +2 -0
  200. package/glTF/2.0/Extensions/KHR_lights_punctual.types.js.map +1 -0
  201. package/glTF/2.0/Extensions/KHR_materials_anisotropy.d.ts +4 -40
  202. package/glTF/2.0/Extensions/KHR_materials_anisotropy.js +6 -63
  203. package/glTF/2.0/Extensions/KHR_materials_anisotropy.js.map +1 -1
  204. package/glTF/2.0/Extensions/KHR_materials_anisotropy.pure.d.ts +39 -0
  205. package/glTF/2.0/Extensions/KHR_materials_anisotropy.pure.js +78 -0
  206. package/glTF/2.0/Extensions/KHR_materials_anisotropy.pure.js.map +1 -0
  207. package/glTF/2.0/Extensions/KHR_materials_anisotropy.types.d.ts +9 -0
  208. package/glTF/2.0/Extensions/KHR_materials_anisotropy.types.js +2 -0
  209. package/glTF/2.0/Extensions/KHR_materials_anisotropy.types.js.map +1 -0
  210. package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +4 -41
  211. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +6 -77
  212. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
  213. package/glTF/2.0/Extensions/KHR_materials_clearcoat.pure.d.ts +40 -0
  214. package/glTF/2.0/Extensions/KHR_materials_clearcoat.pure.js +92 -0
  215. package/glTF/2.0/Extensions/KHR_materials_clearcoat.pure.js.map +1 -0
  216. package/glTF/2.0/Extensions/KHR_materials_clearcoat.types.d.ts +9 -0
  217. package/glTF/2.0/Extensions/KHR_materials_clearcoat.types.js +2 -0
  218. package/glTF/2.0/Extensions/KHR_materials_clearcoat.types.js.map +1 -0
  219. package/glTF/2.0/Extensions/KHR_materials_coat.d.ts +4 -47
  220. package/glTF/2.0/Extensions/KHR_materials_coat.js +6 -117
  221. package/glTF/2.0/Extensions/KHR_materials_coat.js.map +1 -1
  222. package/glTF/2.0/Extensions/KHR_materials_coat.pure.d.ts +46 -0
  223. package/glTF/2.0/Extensions/KHR_materials_coat.pure.js +132 -0
  224. package/glTF/2.0/Extensions/KHR_materials_coat.pure.js.map +1 -0
  225. package/glTF/2.0/Extensions/KHR_materials_coat.types.d.ts +9 -0
  226. package/glTF/2.0/Extensions/KHR_materials_coat.types.js +2 -0
  227. package/glTF/2.0/Extensions/KHR_materials_coat.types.js.map +1 -0
  228. package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.d.ts +4 -41
  229. package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.js +6 -56
  230. package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.js.map +1 -1
  231. package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.pure.d.ts +40 -0
  232. package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.pure.js +71 -0
  233. package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.pure.js.map +1 -0
  234. package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.types.d.ts +9 -0
  235. package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.types.js +2 -0
  236. package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.types.js.map +1 -0
  237. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.d.ts +4 -41
  238. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js +6 -71
  239. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js.map +1 -1
  240. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.pure.d.ts +40 -0
  241. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.pure.js +86 -0
  242. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.pure.js.map +1 -0
  243. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.types.d.ts +9 -0
  244. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.types.js +2 -0
  245. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.types.js.map +1 -0
  246. package/glTF/2.0/Extensions/KHR_materials_dispersion.d.ts +4 -41
  247. package/glTF/2.0/Extensions/KHR_materials_dispersion.js +6 -54
  248. package/glTF/2.0/Extensions/KHR_materials_dispersion.js.map +1 -1
  249. package/glTF/2.0/Extensions/KHR_materials_dispersion.pure.d.ts +40 -0
  250. package/glTF/2.0/Extensions/KHR_materials_dispersion.pure.js +69 -0
  251. package/glTF/2.0/Extensions/KHR_materials_dispersion.pure.js.map +1 -0
  252. package/glTF/2.0/Extensions/KHR_materials_dispersion.types.d.ts +9 -0
  253. package/glTF/2.0/Extensions/KHR_materials_dispersion.types.js +2 -0
  254. package/glTF/2.0/Extensions/KHR_materials_dispersion.types.js.map +1 -0
  255. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +4 -40
  256. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +6 -45
  257. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
  258. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.pure.d.ts +39 -0
  259. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.pure.js +60 -0
  260. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.pure.js.map +1 -0
  261. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.types.d.ts +9 -0
  262. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.types.js +2 -0
  263. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.types.js.map +1 -0
  264. package/glTF/2.0/Extensions/KHR_materials_fuzz.d.ts +4 -41
  265. package/glTF/2.0/Extensions/KHR_materials_fuzz.js +6 -75
  266. package/glTF/2.0/Extensions/KHR_materials_fuzz.js.map +1 -1
  267. package/glTF/2.0/Extensions/KHR_materials_fuzz.pure.d.ts +40 -0
  268. package/glTF/2.0/Extensions/KHR_materials_fuzz.pure.js +90 -0
  269. package/glTF/2.0/Extensions/KHR_materials_fuzz.pure.js.map +1 -0
  270. package/glTF/2.0/Extensions/KHR_materials_fuzz.types.d.ts +9 -0
  271. package/glTF/2.0/Extensions/KHR_materials_fuzz.types.js +2 -0
  272. package/glTF/2.0/Extensions/KHR_materials_fuzz.types.js.map +1 -0
  273. package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +4 -44
  274. package/glTF/2.0/Extensions/KHR_materials_ior.js +6 -52
  275. package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
  276. package/glTF/2.0/Extensions/KHR_materials_ior.pure.d.ts +43 -0
  277. package/glTF/2.0/Extensions/KHR_materials_ior.pure.js +67 -0
  278. package/glTF/2.0/Extensions/KHR_materials_ior.pure.js.map +1 -0
  279. package/glTF/2.0/Extensions/KHR_materials_ior.types.d.ts +9 -0
  280. package/glTF/2.0/Extensions/KHR_materials_ior.types.js +2 -0
  281. package/glTF/2.0/Extensions/KHR_materials_ior.types.js.map +1 -0
  282. package/glTF/2.0/Extensions/KHR_materials_iridescence.d.ts +4 -40
  283. package/glTF/2.0/Extensions/KHR_materials_iridescence.js +6 -66
  284. package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -1
  285. package/glTF/2.0/Extensions/KHR_materials_iridescence.pure.d.ts +39 -0
  286. package/glTF/2.0/Extensions/KHR_materials_iridescence.pure.js +81 -0
  287. package/glTF/2.0/Extensions/KHR_materials_iridescence.pure.js.map +1 -0
  288. package/glTF/2.0/Extensions/KHR_materials_iridescence.types.d.ts +9 -0
  289. package/glTF/2.0/Extensions/KHR_materials_iridescence.types.js +2 -0
  290. package/glTF/2.0/Extensions/KHR_materials_iridescence.types.js.map +1 -0
  291. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +4 -40
  292. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +6 -72
  293. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
  294. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.pure.d.ts +39 -0
  295. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.pure.js +87 -0
  296. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.pure.js.map +1 -0
  297. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.types.d.ts +9 -0
  298. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.types.js +2 -0
  299. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.types.js.map +1 -0
  300. package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +4 -41
  301. package/glTF/2.0/Extensions/KHR_materials_sheen.js +6 -71
  302. package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
  303. package/glTF/2.0/Extensions/KHR_materials_sheen.pure.d.ts +40 -0
  304. package/glTF/2.0/Extensions/KHR_materials_sheen.pure.js +86 -0
  305. package/glTF/2.0/Extensions/KHR_materials_sheen.pure.js.map +1 -0
  306. package/glTF/2.0/Extensions/KHR_materials_sheen.types.d.ts +9 -0
  307. package/glTF/2.0/Extensions/KHR_materials_sheen.types.js +2 -0
  308. package/glTF/2.0/Extensions/KHR_materials_sheen.types.js.map +1 -0
  309. package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +4 -40
  310. package/glTF/2.0/Extensions/KHR_materials_specular.js +6 -74
  311. package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
  312. package/glTF/2.0/Extensions/KHR_materials_specular.pure.d.ts +39 -0
  313. package/glTF/2.0/Extensions/KHR_materials_specular.pure.js +89 -0
  314. package/glTF/2.0/Extensions/KHR_materials_specular.pure.js.map +1 -0
  315. package/glTF/2.0/Extensions/KHR_materials_specular.types.d.ts +9 -0
  316. package/glTF/2.0/Extensions/KHR_materials_specular.types.js +2 -0
  317. package/glTF/2.0/Extensions/KHR_materials_specular.types.js.map +1 -0
  318. package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +4 -40
  319. package/glTF/2.0/Extensions/KHR_materials_transmission.js +6 -70
  320. package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
  321. package/glTF/2.0/Extensions/KHR_materials_transmission.pure.d.ts +39 -0
  322. package/glTF/2.0/Extensions/KHR_materials_transmission.pure.js +85 -0
  323. package/glTF/2.0/Extensions/KHR_materials_transmission.pure.js.map +1 -0
  324. package/glTF/2.0/Extensions/KHR_materials_transmission.types.d.ts +9 -0
  325. package/glTF/2.0/Extensions/KHR_materials_transmission.types.js +2 -0
  326. package/glTF/2.0/Extensions/KHR_materials_transmission.types.js.map +1 -0
  327. package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +4 -40
  328. package/glTF/2.0/Extensions/KHR_materials_unlit.js +6 -64
  329. package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
  330. package/glTF/2.0/Extensions/KHR_materials_unlit.pure.d.ts +39 -0
  331. package/glTF/2.0/Extensions/KHR_materials_unlit.pure.js +79 -0
  332. package/glTF/2.0/Extensions/KHR_materials_unlit.pure.js.map +1 -0
  333. package/glTF/2.0/Extensions/KHR_materials_unlit.types.d.ts +9 -0
  334. package/glTF/2.0/Extensions/KHR_materials_unlit.types.js +2 -0
  335. package/glTF/2.0/Extensions/KHR_materials_unlit.types.js.map +1 -0
  336. package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +4 -110
  337. package/glTF/2.0/Extensions/KHR_materials_variants.js +6 -260
  338. package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
  339. package/glTF/2.0/Extensions/KHR_materials_variants.pure.d.ts +97 -0
  340. package/glTF/2.0/Extensions/KHR_materials_variants.pure.js +275 -0
  341. package/glTF/2.0/Extensions/KHR_materials_variants.pure.js.map +1 -0
  342. package/glTF/2.0/Extensions/KHR_materials_variants.types.d.ts +29 -0
  343. package/glTF/2.0/Extensions/KHR_materials_variants.types.js +2 -0
  344. package/glTF/2.0/Extensions/KHR_materials_variants.types.js.map +1 -0
  345. package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +4 -41
  346. package/glTF/2.0/Extensions/KHR_materials_volume.js +6 -77
  347. package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
  348. package/glTF/2.0/Extensions/KHR_materials_volume.pure.d.ts +40 -0
  349. package/glTF/2.0/Extensions/KHR_materials_volume.pure.js +92 -0
  350. package/glTF/2.0/Extensions/KHR_materials_volume.pure.js.map +1 -0
  351. package/glTF/2.0/Extensions/KHR_materials_volume.types.d.ts +9 -0
  352. package/glTF/2.0/Extensions/KHR_materials_volume.types.js +2 -0
  353. package/glTF/2.0/Extensions/KHR_materials_volume.types.js.map +1 -0
  354. package/glTF/2.0/Extensions/KHR_materials_volume_scatter.d.ts +4 -43
  355. package/glTF/2.0/Extensions/KHR_materials_volume_scatter.js +6 -113
  356. package/glTF/2.0/Extensions/KHR_materials_volume_scatter.js.map +1 -1
  357. package/glTF/2.0/Extensions/KHR_materials_volume_scatter.pure.d.ts +42 -0
  358. package/glTF/2.0/Extensions/KHR_materials_volume_scatter.pure.js +128 -0
  359. package/glTF/2.0/Extensions/KHR_materials_volume_scatter.pure.js.map +1 -0
  360. package/glTF/2.0/Extensions/KHR_materials_volume_scatter.types.d.ts +9 -0
  361. package/glTF/2.0/Extensions/KHR_materials_volume_scatter.types.js +2 -0
  362. package/glTF/2.0/Extensions/KHR_materials_volume_scatter.types.js.map +1 -0
  363. package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +4 -27
  364. package/glTF/2.0/Extensions/KHR_mesh_quantization.js +6 -20
  365. package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
  366. package/glTF/2.0/Extensions/KHR_mesh_quantization.pure.d.ts +26 -0
  367. package/glTF/2.0/Extensions/KHR_mesh_quantization.pure.js +35 -0
  368. package/glTF/2.0/Extensions/KHR_mesh_quantization.pure.js.map +1 -0
  369. package/glTF/2.0/Extensions/KHR_mesh_quantization.types.d.ts +9 -0
  370. package/glTF/2.0/Extensions/KHR_mesh_quantization.types.js +2 -0
  371. package/glTF/2.0/Extensions/KHR_mesh_quantization.types.js.map +1 -0
  372. package/glTF/2.0/Extensions/KHR_node_hoverability.d.ts +4 -29
  373. package/glTF/2.0/Extensions/KHR_node_hoverability.js +6 -187
  374. package/glTF/2.0/Extensions/KHR_node_hoverability.js.map +1 -1
  375. package/glTF/2.0/Extensions/KHR_node_hoverability.pure.d.ts +28 -0
  376. package/glTF/2.0/Extensions/KHR_node_hoverability.pure.js +202 -0
  377. package/glTF/2.0/Extensions/KHR_node_hoverability.pure.js.map +1 -0
  378. package/glTF/2.0/Extensions/KHR_node_hoverability.types.d.ts +9 -0
  379. package/glTF/2.0/Extensions/KHR_node_hoverability.types.js +2 -0
  380. package/glTF/2.0/Extensions/KHR_node_hoverability.types.js.map +1 -0
  381. package/glTF/2.0/Extensions/KHR_node_selectability.d.ts +4 -28
  382. package/glTF/2.0/Extensions/KHR_node_selectability.js +6 -121
  383. package/glTF/2.0/Extensions/KHR_node_selectability.js.map +1 -1
  384. package/glTF/2.0/Extensions/KHR_node_selectability.pure.d.ts +27 -0
  385. package/glTF/2.0/Extensions/KHR_node_selectability.pure.js +136 -0
  386. package/glTF/2.0/Extensions/KHR_node_selectability.pure.js.map +1 -0
  387. package/glTF/2.0/Extensions/KHR_node_selectability.types.d.ts +9 -0
  388. package/glTF/2.0/Extensions/KHR_node_selectability.types.js +2 -0
  389. package/glTF/2.0/Extensions/KHR_node_selectability.types.js.map +1 -0
  390. package/glTF/2.0/Extensions/KHR_node_visibility.d.ts +4 -28
  391. package/glTF/2.0/Extensions/KHR_node_visibility.js +6 -64
  392. package/glTF/2.0/Extensions/KHR_node_visibility.js.map +1 -1
  393. package/glTF/2.0/Extensions/KHR_node_visibility.pure.d.ts +27 -0
  394. package/glTF/2.0/Extensions/KHR_node_visibility.pure.js +79 -0
  395. package/glTF/2.0/Extensions/KHR_node_visibility.pure.js.map +1 -0
  396. package/glTF/2.0/Extensions/KHR_node_visibility.types.d.ts +9 -0
  397. package/glTF/2.0/Extensions/KHR_node_visibility.types.js +2 -0
  398. package/glTF/2.0/Extensions/KHR_node_visibility.types.js.map +1 -0
  399. package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +4 -31
  400. package/glTF/2.0/Extensions/KHR_texture_basisu.js +6 -35
  401. package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
  402. package/glTF/2.0/Extensions/KHR_texture_basisu.pure.d.ts +30 -0
  403. package/glTF/2.0/Extensions/KHR_texture_basisu.pure.js +50 -0
  404. package/glTF/2.0/Extensions/KHR_texture_basisu.pure.js.map +1 -0
  405. package/glTF/2.0/Extensions/KHR_texture_basisu.types.d.ts +9 -0
  406. package/glTF/2.0/Extensions/KHR_texture_basisu.types.js +2 -0
  407. package/glTF/2.0/Extensions/KHR_texture_basisu.types.js.map +1 -0
  408. package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +4 -35
  409. package/glTF/2.0/Extensions/KHR_texture_transform.js +6 -56
  410. package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
  411. package/glTF/2.0/Extensions/KHR_texture_transform.pure.d.ts +34 -0
  412. package/glTF/2.0/Extensions/KHR_texture_transform.pure.js +71 -0
  413. package/glTF/2.0/Extensions/KHR_texture_transform.pure.js.map +1 -0
  414. package/glTF/2.0/Extensions/KHR_texture_transform.types.d.ts +9 -0
  415. package/glTF/2.0/Extensions/KHR_texture_transform.types.js +2 -0
  416. package/glTF/2.0/Extensions/KHR_texture_transform.types.js.map +1 -0
  417. package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +4 -37
  418. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +6 -45
  419. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
  420. package/glTF/2.0/Extensions/KHR_xmp_json_ld.pure.d.ts +36 -0
  421. package/glTF/2.0/Extensions/KHR_xmp_json_ld.pure.js +60 -0
  422. package/glTF/2.0/Extensions/KHR_xmp_json_ld.pure.js.map +1 -0
  423. package/glTF/2.0/Extensions/KHR_xmp_json_ld.types.d.ts +9 -0
  424. package/glTF/2.0/Extensions/KHR_xmp_json_ld.types.js +2 -0
  425. package/glTF/2.0/Extensions/KHR_xmp_json_ld.types.js.map +1 -0
  426. package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +5 -54
  427. package/glTF/2.0/Extensions/MSFT_audio_emitter.js +7 -226
  428. package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
  429. package/glTF/2.0/Extensions/MSFT_audio_emitter.pure.d.ts +52 -0
  430. package/glTF/2.0/Extensions/MSFT_audio_emitter.pure.js +240 -0
  431. package/glTF/2.0/Extensions/MSFT_audio_emitter.pure.js.map +1 -0
  432. package/glTF/2.0/Extensions/MSFT_audio_emitter.types.d.ts +9 -0
  433. package/glTF/2.0/Extensions/MSFT_audio_emitter.types.js +2 -0
  434. package/glTF/2.0/Extensions/MSFT_audio_emitter.types.js.map +1 -0
  435. package/glTF/2.0/Extensions/MSFT_lod.d.ts +4 -102
  436. package/glTF/2.0/Extensions/MSFT_lod.js +6 -335
  437. package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
  438. package/glTF/2.0/Extensions/MSFT_lod.pure.d.ts +96 -0
  439. package/glTF/2.0/Extensions/MSFT_lod.pure.js +350 -0
  440. package/glTF/2.0/Extensions/MSFT_lod.pure.js.map +1 -0
  441. package/glTF/2.0/Extensions/MSFT_lod.types.d.ts +14 -0
  442. package/glTF/2.0/Extensions/MSFT_lod.types.js +2 -0
  443. package/glTF/2.0/Extensions/MSFT_lod.types.js.map +1 -0
  444. package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +6 -27
  445. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +8 -40
  446. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
  447. package/glTF/2.0/Extensions/MSFT_minecraftMesh.pure.d.ts +24 -0
  448. package/glTF/2.0/Extensions/MSFT_minecraftMesh.pure.js +53 -0
  449. package/glTF/2.0/Extensions/MSFT_minecraftMesh.pure.js.map +1 -0
  450. package/glTF/2.0/Extensions/MSFT_minecraftMesh.types.d.ts +9 -0
  451. package/glTF/2.0/Extensions/MSFT_minecraftMesh.types.js +2 -0
  452. package/glTF/2.0/Extensions/MSFT_minecraftMesh.types.js.map +1 -0
  453. package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +6 -27
  454. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +8 -38
  455. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
  456. package/glTF/2.0/Extensions/MSFT_sRGBFactors.pure.d.ts +24 -0
  457. package/glTF/2.0/Extensions/MSFT_sRGBFactors.pure.js +51 -0
  458. package/glTF/2.0/Extensions/MSFT_sRGBFactors.pure.js.map +1 -0
  459. package/glTF/2.0/Extensions/MSFT_sRGBFactors.types.d.ts +9 -0
  460. package/glTF/2.0/Extensions/MSFT_sRGBFactors.types.js +2 -0
  461. package/glTF/2.0/Extensions/MSFT_sRGBFactors.types.js.map +1 -0
  462. package/glTF/2.0/Extensions/pure.d.ts +45 -0
  463. package/glTF/2.0/Extensions/pure.js +47 -0
  464. package/glTF/2.0/Extensions/pure.js.map +1 -0
  465. package/glTF/2.0/glTFLoader.d.ts +1 -471
  466. package/glTF/2.0/glTFLoader.js +3 -2539
  467. package/glTF/2.0/glTFLoader.js.map +1 -1
  468. package/glTF/2.0/glTFLoader.pure.d.ts +476 -0
  469. package/glTF/2.0/glTFLoader.pure.js +2563 -0
  470. package/glTF/2.0/glTFLoader.pure.js.map +1 -0
  471. package/glTF/2.0/pure.d.ts +8 -0
  472. package/glTF/2.0/pure.js +10 -0
  473. package/glTF/2.0/pure.js.map +1 -0
  474. package/glTF/glTFFileLoader.d.ts +5 -551
  475. package/glTF/glTFFileLoader.js +6 -996
  476. package/glTF/glTFFileLoader.js.map +1 -1
  477. package/glTF/glTFFileLoader.pure.d.ts +562 -0
  478. package/glTF/glTFFileLoader.pure.js +1024 -0
  479. package/glTF/glTFFileLoader.pure.js.map +1 -0
  480. package/glTF/glTFFileLoader.types.d.ts +11 -0
  481. package/glTF/glTFFileLoader.types.js +2 -0
  482. package/glTF/glTFFileLoader.types.js.map +1 -0
  483. package/glTF/pure.d.ts +6 -0
  484. package/glTF/pure.js +8 -0
  485. package/glTF/pure.js.map +1 -0
  486. package/package.json +56 -4
  487. package/pure.d.ts +8 -0
  488. package/pure.js +10 -0
  489. package/pure.js.map +1 -0
@@ -0,0 +1,650 @@
1
+ /* eslint-disable @typescript-eslint/promise-function-async*/
2
+ /* eslint-disable @typescript-eslint/naming-convention */
3
+ import { RegisterSceneLoaderPlugin, } from "@babylonjs/core/Loading/sceneLoader.js";
4
+ import { SPLATFileLoaderMetadata } from "./splatFileLoader.metadata.js";
5
+ import { GaussianSplattingMesh } from "@babylonjs/core/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js";
6
+ import { GaussianSplattingStream } from "./gaussianSplattingStream.js";
7
+ import { AssetContainer } from "@babylonjs/core/assetContainer.js";
8
+ import { Mesh } from "@babylonjs/core/Meshes/mesh.pure.js";
9
+ import { Logger } from "@babylonjs/core/Misc/logger.js";
10
+ import { Vector3 } from "@babylonjs/core/Maths/math.vector.pure.js";
11
+ import { PointsCloudSystem } from "@babylonjs/core/Particles/pointsCloudSystem.js";
12
+ import { Color4 } from "@babylonjs/core/Maths/math.color.pure.js";
13
+ import { VertexData } from "@babylonjs/core/Meshes/mesh.vertexData.js";
14
+ import { ConvertSpzToSplatAsync, GetSpzModule, ParseSpz } from "./spz.js";
15
+ import { ParseSogMeta, ParseSogMetaAsTextures } from "./sog.pure.js";
16
+ import { Tools } from "@babylonjs/core/Misc/tools.pure.js";
17
+ /**
18
+ * @experimental
19
+ * SPLAT file type loader.
20
+ * This is a babylon scene loader plugin.
21
+ */
22
+ export class SPLATFileLoader {
23
+ /**
24
+ * Creates loader for gaussian splatting files
25
+ * @param loadingOptions options for loading and parsing splat and PLY files.
26
+ */
27
+ constructor(loadingOptions = {}) {
28
+ /**
29
+ * Defines the name of the plugin.
30
+ */
31
+ this.name = SPLATFileLoaderMetadata.name;
32
+ this._assetContainer = null;
33
+ /**
34
+ * Defines the extensions the splat loader is able to load.
35
+ * force data to come in as an ArrayBuffer
36
+ */
37
+ this.extensions = SPLATFileLoaderMetadata.extensions;
38
+ this._loadingOptions = { ...SPLATFileLoader._DefaultLoadingOptions, ...loadingOptions };
39
+ }
40
+ /** @internal */
41
+ createPlugin(options) {
42
+ return new SPLATFileLoader(options[SPLATFileLoaderMetadata.name]);
43
+ }
44
+ /**
45
+ * Imports from the loaded gaussian splatting data and adds them to the scene
46
+ * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
47
+ * @param scene the scene the meshes should be added to
48
+ * @param data the gaussian splatting data to load
49
+ * @param rootUrl root url to load from
50
+ * @param _onProgress callback called while file is loading
51
+ * @param _fileName Defines the name of the file to load
52
+ * @returns a promise containing the loaded meshes, particles, skeletons and animations
53
+ */
54
+ async importMeshAsync(meshesNames, scene, data, rootUrl, _onProgress, _fileName) {
55
+ const lodStream = this._tryCreateLODStream(scene, data, rootUrl);
56
+ if (lodStream) {
57
+ return {
58
+ meshes: [lodStream],
59
+ particleSystems: [],
60
+ skeletons: [],
61
+ animationGroups: [],
62
+ transformNodes: [],
63
+ geometries: [],
64
+ lights: [],
65
+ spriteManagers: [],
66
+ };
67
+ }
68
+ // eslint-disable-next-line github/no-then
69
+ return await this._parseAsync(meshesNames, scene, data, rootUrl).then((meshes) => {
70
+ return {
71
+ meshes: meshes,
72
+ particleSystems: [],
73
+ skeletons: [],
74
+ animationGroups: [],
75
+ transformNodes: [],
76
+ geometries: [],
77
+ lights: [],
78
+ spriteManagers: [],
79
+ };
80
+ });
81
+ }
82
+ /**
83
+ * Detects a PlayCanvas-style `lod-meta.json` payload and, if found, creates a streaming mesh for it.
84
+ * @param scene hosting scene
85
+ * @param data loaded file data
86
+ * @param rootUrl root url the metadata's relative paths resolve against
87
+ * @returns the streaming mesh, or null when the data is not SOG LOD metadata
88
+ */
89
+ _tryCreateLODStream(scene, data, rootUrl) {
90
+ if (typeof data !== "string") {
91
+ return null;
92
+ }
93
+ let parsed;
94
+ try {
95
+ parsed = JSON.parse(data);
96
+ }
97
+ catch {
98
+ return null;
99
+ }
100
+ if (!GaussianSplattingStream.IsLODMetadata(parsed)) {
101
+ return null;
102
+ }
103
+ const previousBlockEntityCollection = scene._blockEntityCollection;
104
+ scene._blockEntityCollection = !!this._assetContainer;
105
+ try {
106
+ const stream = new GaussianSplattingStream("GaussianSplattingStream", parsed, rootUrl, scene, {
107
+ deflateURL: this._loadingOptions.deflateURL,
108
+ fflate: this._loadingOptions.fflate,
109
+ });
110
+ stream._parentContainer = this._assetContainer;
111
+ return stream;
112
+ }
113
+ finally {
114
+ scene._blockEntityCollection = previousBlockEntityCollection;
115
+ }
116
+ }
117
+ static _BuildPointCloud(pointcloud, data) {
118
+ if (!data.byteLength) {
119
+ return false;
120
+ }
121
+ const uBuffer = new Uint8Array(data);
122
+ const fBuffer = new Float32Array(data);
123
+ // parsed array contains room for position(3floats), normal(3floats), color (4b), quantized quaternion (4b)
124
+ const rowLength = 3 * 4 + 3 * 4 + 4 + 4;
125
+ const vertexCount = uBuffer.length / rowLength;
126
+ const pointcloudfunc = function (particle, i) {
127
+ const x = fBuffer[8 * i + 0];
128
+ const y = fBuffer[8 * i + 1];
129
+ const z = fBuffer[8 * i + 2];
130
+ particle.position = new Vector3(x, y, z);
131
+ const r = uBuffer[rowLength * i + 24 + 0] / 255;
132
+ const g = uBuffer[rowLength * i + 24 + 1] / 255;
133
+ const b = uBuffer[rowLength * i + 24 + 2] / 255;
134
+ particle.color = new Color4(r, g, b, 1);
135
+ };
136
+ pointcloud.addPoints(vertexCount, pointcloudfunc);
137
+ return true;
138
+ }
139
+ static _BuildMesh(scene, parsedPLY) {
140
+ const mesh = new Mesh("PLYMesh", scene);
141
+ const uBuffer = new Uint8Array(parsedPLY.data);
142
+ const fBuffer = new Float32Array(parsedPLY.data);
143
+ const rowLength = 3 * 4 + 3 * 4 + 4 + 4;
144
+ const vertexCount = uBuffer.length / rowLength;
145
+ const positions = [];
146
+ const vertexData = new VertexData();
147
+ for (let i = 0; i < vertexCount; i++) {
148
+ const x = fBuffer[8 * i + 0];
149
+ const y = fBuffer[8 * i + 1];
150
+ const z = fBuffer[8 * i + 2];
151
+ positions.push(x, y, z);
152
+ }
153
+ if (parsedPLY.hasVertexColors) {
154
+ const colors = new Float32Array(vertexCount * 4);
155
+ for (let i = 0; i < vertexCount; i++) {
156
+ const r = uBuffer[rowLength * i + 24 + 0] / 255;
157
+ const g = uBuffer[rowLength * i + 24 + 1] / 255;
158
+ const b = uBuffer[rowLength * i + 24 + 2] / 255;
159
+ colors[i * 4 + 0] = r;
160
+ colors[i * 4 + 1] = g;
161
+ colors[i * 4 + 2] = b;
162
+ colors[i * 4 + 3] = 1;
163
+ }
164
+ vertexData.colors = colors;
165
+ }
166
+ vertexData.positions = positions;
167
+ vertexData.indices = parsedPLY.faces;
168
+ vertexData.applyToMesh(mesh);
169
+ return mesh;
170
+ }
171
+ // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax, @typescript-eslint/naming-convention
172
+ async _unzipWithFFlateAsync(data) {
173
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
174
+ // @ts-ignore
175
+ let fflate = this._loadingOptions.fflate;
176
+ // ensure fflate is loaded
177
+ if (!fflate) {
178
+ if (typeof window.fflate === "undefined") {
179
+ await Tools.LoadScriptAsync(this._loadingOptions.deflateURL ?? "https://unpkg.com/fflate/umd/index.js");
180
+ }
181
+ fflate = window.fflate;
182
+ }
183
+ const { unzipSync } = fflate;
184
+ const unzipped = unzipSync(data); // { [filename: string]: Uint8Array }
185
+ const files = new Map();
186
+ for (const [name, content] of Object.entries(unzipped)) {
187
+ files.set(name, content);
188
+ }
189
+ return files;
190
+ }
191
+ // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax
192
+ _parseAsync(meshesNames, scene, data, rootUrl) {
193
+ const babylonMeshesArray = []; //The mesh for babylon
194
+ const makeGSFromParsedSOG = (parsedSOG) => {
195
+ scene._blockEntityCollection = !!this._assetContainer;
196
+ const gaussianSplatting = this._loadingOptions.gaussianSplattingMesh ??
197
+ new GaussianSplattingMesh("GaussianSplatting", null, scene, this._loadingOptions.keepInRam, this._loadingOptions.needsRotationScaleTextures);
198
+ gaussianSplatting._parentContainer = this._assetContainer;
199
+ babylonMeshesArray.push(gaussianSplatting);
200
+ if (parsedSOG.sogTextures) {
201
+ gaussianSplatting.setSogTextureData(parsedSOG.sogTextures);
202
+ }
203
+ else {
204
+ gaussianSplatting.updateData(parsedSOG.data, parsedSOG.sh, { flipY: false }, undefined, parsedSOG.shDegree);
205
+ }
206
+ gaussianSplatting.scaling.y *= -1;
207
+ gaussianSplatting.computeWorldMatrix(true);
208
+ scene._blockEntityCollection = false;
209
+ };
210
+ const engine = scene.getEngine();
211
+ let useSogTextures = this._loadingOptions.useSogTextures;
212
+ if (useSogTextures && !engine.isWebGPU && engine.version < 2) {
213
+ Logger.Warn("SPLATFileLoader: useSogTextures requires WebGL2 or WebGPU. Falling back to CPU path.");
214
+ useSogTextures = false;
215
+ }
216
+ const sogParser = useSogTextures ? ParseSogMetaAsTextures : ParseSogMeta;
217
+ // check if data is json string
218
+ if (typeof data === "string") {
219
+ const dataSOG = JSON.parse(data);
220
+ if (dataSOG && dataSOG.means && dataSOG.scales && dataSOG.quats && dataSOG.sh0) {
221
+ return new Promise((resolve, reject) => {
222
+ sogParser(dataSOG, rootUrl, scene)
223
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then
224
+ .then((parsedSOG) => {
225
+ makeGSFromParsedSOG(parsedSOG);
226
+ resolve(babylonMeshesArray);
227
+ })
228
+ // eslint-disable-next-line github/no-then
229
+ .catch((e) => {
230
+ reject(new Error("Failed to parse SOG data.", { cause: e }));
231
+ });
232
+ });
233
+ }
234
+ }
235
+ const u8 = data instanceof ArrayBuffer ? new Uint8Array(data) : data;
236
+ // ZIP signature check for SOG
237
+ if (u8[0] === 0x50 && u8[1] === 0x4b) {
238
+ return new Promise((resolve, reject) => {
239
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then
240
+ this._unzipWithFFlateAsync(u8).then((files) => {
241
+ sogParser(files, rootUrl, scene)
242
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then
243
+ .then((parsedSOG) => {
244
+ makeGSFromParsedSOG(parsedSOG);
245
+ resolve(babylonMeshesArray);
246
+ }) // eslint-disable-next-line github/no-then
247
+ .catch((e) => {
248
+ reject(new Error("Failed to parse SOG zip data.", { cause: e }));
249
+ });
250
+ });
251
+ });
252
+ }
253
+ const handlePLY = (resolve) => {
254
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then
255
+ SPLATFileLoader._ConvertPLYToSplat(data).then(async (parsedPLY) => {
256
+ scene._blockEntityCollection = !!this._assetContainer;
257
+ switch (parsedPLY.mode) {
258
+ case 0 /* Mode.Splat */:
259
+ {
260
+ const gaussianSplatting = this._loadingOptions.gaussianSplattingMesh ??
261
+ new GaussianSplattingMesh("GaussianSplatting", null, scene, this._loadingOptions.keepInRam, this._loadingOptions.needsRotationScaleTextures);
262
+ gaussianSplatting._parentContainer = this._assetContainer;
263
+ babylonMeshesArray.push(gaussianSplatting);
264
+ gaussianSplatting.updateData(parsedPLY.data, parsedPLY.sh, { flipY: false }, undefined, parsedPLY.shDegree);
265
+ gaussianSplatting.scaling.y *= -1.0;
266
+ if (parsedPLY.chirality === "RightHanded") {
267
+ gaussianSplatting.scaling.y *= -1.0;
268
+ }
269
+ switch (parsedPLY.upAxis) {
270
+ case "X":
271
+ gaussianSplatting.rotation = new Vector3(0, 0, Math.PI / 2);
272
+ break;
273
+ case "Y":
274
+ gaussianSplatting.rotation = new Vector3(0, 0, Math.PI);
275
+ break;
276
+ case "Z":
277
+ gaussianSplatting.rotation = new Vector3(-Math.PI / 2, Math.PI, 0);
278
+ break;
279
+ }
280
+ gaussianSplatting.computeWorldMatrix(true);
281
+ }
282
+ break;
283
+ case 1 /* Mode.PointCloud */:
284
+ {
285
+ const pointcloud = new PointsCloudSystem("PointCloud", 1, scene);
286
+ if (SPLATFileLoader._BuildPointCloud(pointcloud, parsedPLY.data)) {
287
+ // eslint-disable-next-line github/no-then
288
+ await pointcloud.buildMeshAsync().then((mesh) => {
289
+ babylonMeshesArray.push(mesh);
290
+ });
291
+ }
292
+ else {
293
+ pointcloud.dispose();
294
+ }
295
+ }
296
+ break;
297
+ case 2 /* Mode.Mesh */:
298
+ {
299
+ if (parsedPLY.faces) {
300
+ babylonMeshesArray.push(SPLATFileLoader._BuildMesh(scene, parsedPLY));
301
+ }
302
+ else {
303
+ throw new Error("PLY mesh doesn't contain face informations.");
304
+ }
305
+ }
306
+ break;
307
+ default:
308
+ throw new Error("Unsupported Splat mode");
309
+ }
310
+ scene._blockEntityCollection = false;
311
+ this.applyAutoCameraLimits(parsedPLY, scene);
312
+ resolve(babylonMeshesArray);
313
+ });
314
+ };
315
+ // Check for gzip (before SPZ V4) and NGSP (SPZ V4+) magic bytes to detect SPZ format
316
+ const isGZipped = u8[0] === 0x1f && u8[1] === 0x8b;
317
+ const isNGSP = u8[0] === 0x4e && u8[1] === 0x47 && u8[2] === 0x53 && u8[3] === 0x50;
318
+ if (!isGZipped && !isNGSP) {
319
+ return new Promise((resolve) => {
320
+ handlePLY(resolve);
321
+ });
322
+ }
323
+ const applyParsedSPZ = (parsedSPZ, resolve) => {
324
+ scene._blockEntityCollection = !!this._assetContainer;
325
+ const gaussianSplatting = this._loadingOptions.gaussianSplattingMesh ??
326
+ new GaussianSplattingMesh("GaussianSplatting", null, scene, this._loadingOptions.keepInRam, this._loadingOptions.needsRotationScaleTextures);
327
+ if (parsedSPZ.trainedWithAntialiasing) {
328
+ const gsMaterial = gaussianSplatting.material;
329
+ gsMaterial.kernelSize = 0.1;
330
+ gsMaterial.compensation = true;
331
+ }
332
+ gaussianSplatting._parentContainer = this._assetContainer;
333
+ babylonMeshesArray.push(gaussianSplatting);
334
+ gaussianSplatting.updateData(parsedSPZ.data, parsedSPZ.sh, { flipY: false }, undefined, parsedSPZ.shDegree);
335
+ if (!this._loadingOptions.flipY) {
336
+ gaussianSplatting.scaling.y *= -1.0;
337
+ gaussianSplatting.computeWorldMatrix(true);
338
+ }
339
+ scene._blockEntityCollection = false;
340
+ this.applyAutoCameraLimits(parsedSPZ, scene);
341
+ resolve(babylonMeshesArray);
342
+ };
343
+ if (this._loadingOptions.spzLibraryUrl) {
344
+ // WASM path: load spz module from URL, pass raw gzip data directly
345
+ // eslint-disable-next-line github/no-then
346
+ return GetSpzModule(this._loadingOptions.spzLibraryUrl).then((spz) => {
347
+ const cloud = spz.loadSpzFromBuffer(new Uint8Array(data), { to: spz.CoordinateSystem.RUB });
348
+ // eslint-disable-next-line github/no-then
349
+ return ConvertSpzToSplatAsync(cloud, scene).then((parsedSPZ) => {
350
+ return new Promise((resolve) => {
351
+ applyParsedSPZ(parsedSPZ, resolve);
352
+ });
353
+ });
354
+ });
355
+ }
356
+ // NGSP (SPZ V4+) requires WASM — the native fallback only handles legacy gzip formats
357
+ if (isNGSP) {
358
+ return Promise.reject(new Error("SPZ V4+ files (NGSP format) are not supported by the native fallback loader. " +
359
+ "Please provide a valid 'spzLibraryUrl' in the loading options to use the WASM-based SPZ library, " +
360
+ "or ensure WebAssembly is available in your environment."));
361
+ }
362
+ // Manual path: decompress gzip, then parse with the built-in SPZ parser
363
+ const readableStream = new ReadableStream({
364
+ start(controller) {
365
+ controller.enqueue(new Uint8Array(data));
366
+ controller.close();
367
+ },
368
+ });
369
+ const decompressionStream = new DecompressionStream("gzip");
370
+ const decompressedStream = readableStream.pipeThrough(decompressionStream);
371
+ return new Promise((resolve) => {
372
+ new Response(decompressedStream)
373
+ .arrayBuffer()
374
+ // eslint-disable-next-line github/no-then
375
+ .then((buffer) => {
376
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then
377
+ ParseSpz(buffer, scene, this._loadingOptions).then((parsedSPZ) => {
378
+ applyParsedSPZ(parsedSPZ, resolve);
379
+ });
380
+ })
381
+ // eslint-disable-next-line github/no-then
382
+ .catch(() => {
383
+ handlePLY(resolve);
384
+ });
385
+ });
386
+ }
387
+ /**
388
+ * Applies camera limits based on parsed meta data
389
+ * @param meta parsed splat meta data
390
+ * @param scene
391
+ */
392
+ applyAutoCameraLimits(meta, scene) {
393
+ if (this._loadingOptions.disableAutoCameraLimits) {
394
+ return;
395
+ }
396
+ if ((meta.safeOrbitCameraRadiusMin !== undefined || meta.safeOrbitCameraElevationMinMax !== undefined) && scene.activeCamera?.getClassName() === "ArcRotateCamera") {
397
+ const arcCam = scene.activeCamera;
398
+ if (meta.safeOrbitCameraElevationMinMax) {
399
+ arcCam.lowerBetaLimit = Math.PI * 0.5 - meta.safeOrbitCameraElevationMinMax[1];
400
+ arcCam.upperBetaLimit = Math.PI * 0.5 - meta.safeOrbitCameraElevationMinMax[0];
401
+ }
402
+ if (meta.safeOrbitCameraRadiusMin) {
403
+ arcCam.lowerRadiusLimit = meta.safeOrbitCameraRadiusMin;
404
+ }
405
+ }
406
+ }
407
+ /**
408
+ * Load into an asset container.
409
+ * @param scene The scene to load into
410
+ * @param data The data to import
411
+ * @param rootUrl The root url for scene and resources
412
+ * @returns The loaded asset container
413
+ */
414
+ // eslint-disable-next-line no-restricted-syntax
415
+ loadAssetContainerAsync(scene, data, rootUrl) {
416
+ const container = new AssetContainer(scene);
417
+ this._assetContainer = container;
418
+ return (this.importMeshAsync(null, scene, data, rootUrl)
419
+ // eslint-disable-next-line github/no-then
420
+ .then((result) => {
421
+ for (const mesh of result.meshes) {
422
+ container.meshes.push(mesh);
423
+ }
424
+ // mesh material will be null before 1st rendered frame.
425
+ this._assetContainer = null;
426
+ return container;
427
+ })
428
+ // eslint-disable-next-line github/no-then
429
+ .catch((ex) => {
430
+ this._assetContainer = null;
431
+ throw ex;
432
+ }));
433
+ }
434
+ /**
435
+ * Imports all objects from the loaded OBJ data and adds them to the scene
436
+ * @param scene the scene the objects should be added to
437
+ * @param data the OBJ data to load
438
+ * @param rootUrl root url to load from
439
+ * @returns a promise which completes when objects have been loaded to the scene
440
+ */
441
+ // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax
442
+ loadAsync(scene, data, rootUrl) {
443
+ //Get the 3D model
444
+ // eslint-disable-next-line github/no-then
445
+ return this.importMeshAsync(null, scene, data, rootUrl).then(() => {
446
+ // return void
447
+ });
448
+ }
449
+ /**
450
+ * Code from https://github.com/dylanebert/gsplat.js/blob/main/src/loaders/PLYLoader.ts Under MIT license
451
+ * Converts a .ply data array buffer to splat
452
+ * if data array buffer is not ply, returns the original buffer
453
+ * @param data the .ply data to load
454
+ * @returns the loaded splat buffer
455
+ */
456
+ static _ConvertPLYToSplat(data) {
457
+ const ubuf = new Uint8Array(data);
458
+ const header = new TextDecoder().decode(ubuf.slice(0, 1024 * 10));
459
+ const headerEnd = "end_header\n";
460
+ const headerEndIndex = header.indexOf(headerEnd);
461
+ if (headerEndIndex < 0 || !header) {
462
+ // standard splat
463
+ return new Promise((resolve) => {
464
+ resolve({ mode: 0 /* Mode.Splat */, data: data, rawSplat: true });
465
+ });
466
+ }
467
+ const vertexCount = parseInt(/element vertex (\d+)\n/.exec(header)[1]);
468
+ const faceElement = /element face (\d+)\n/.exec(header);
469
+ let faceCount = 0;
470
+ if (faceElement) {
471
+ faceCount = parseInt(faceElement[1]);
472
+ }
473
+ const chunkElement = /element chunk (\d+)\n/.exec(header);
474
+ let chunkCount = 0;
475
+ if (chunkElement) {
476
+ chunkCount = parseInt(chunkElement[1]);
477
+ }
478
+ let rowVertexOffset = 0;
479
+ let rowChunkOffset = 0;
480
+ const offsets = {
481
+ double: 8,
482
+ int: 4,
483
+ uint: 4,
484
+ float: 4,
485
+ short: 2,
486
+ ushort: 2,
487
+ uchar: 1,
488
+ list: 0,
489
+ };
490
+ const ElementMode = {
491
+ Vertex: 0,
492
+ Chunk: 1,
493
+ SH: 2,
494
+ Float_Tuple: 3,
495
+ Float: 4,
496
+ Uchar: 5,
497
+ };
498
+ let chunkMode = ElementMode.Chunk;
499
+ const vertexProperties = [];
500
+ const chunkProperties = [];
501
+ const filtered = header.slice(0, headerEndIndex).split("\n");
502
+ const metaData = {};
503
+ for (const prop of filtered) {
504
+ if (prop.startsWith("property ")) {
505
+ const [, type, name] = prop.split(" ");
506
+ if (chunkMode == ElementMode.Chunk) {
507
+ chunkProperties.push({ name, type, offset: rowChunkOffset });
508
+ rowChunkOffset += offsets[type];
509
+ }
510
+ else if (chunkMode == ElementMode.Vertex) {
511
+ vertexProperties.push({ name, type, offset: rowVertexOffset });
512
+ rowVertexOffset += offsets[type];
513
+ }
514
+ else if (chunkMode == ElementMode.SH) {
515
+ vertexProperties.push({ name, type, offset: rowVertexOffset });
516
+ }
517
+ else if (chunkMode == ElementMode.Float_Tuple) {
518
+ const view = new DataView(data, rowChunkOffset, offsets.float * 2);
519
+ metaData.safeOrbitCameraElevationMinMax = [view.getFloat32(0, true), view.getFloat32(4, true)];
520
+ }
521
+ else if (chunkMode == ElementMode.Float) {
522
+ const view = new DataView(data, rowChunkOffset, offsets.float);
523
+ metaData.safeOrbitCameraRadiusMin = view.getFloat32(0, true);
524
+ }
525
+ else if (chunkMode == ElementMode.Uchar) {
526
+ const view = new DataView(data, rowChunkOffset, offsets.uchar);
527
+ if (name == "up_axis") {
528
+ metaData.upAxis = view.getUint8(0) == 0 ? "X" : view.getUint8(0) == 1 ? "Y" : "Z";
529
+ }
530
+ else if (name == "chirality") {
531
+ metaData.chirality = view.getUint8(0) == 0 ? "LeftHanded" : "RightHanded";
532
+ }
533
+ }
534
+ if (!offsets[type]) {
535
+ Logger.Warn(`Unsupported property type: ${type}.`);
536
+ }
537
+ }
538
+ else if (prop.startsWith("element ")) {
539
+ const [, type] = prop.split(" ");
540
+ if (type == "chunk") {
541
+ chunkMode = ElementMode.Chunk;
542
+ }
543
+ else if (type == "vertex") {
544
+ chunkMode = ElementMode.Vertex;
545
+ }
546
+ else if (type == "sh") {
547
+ chunkMode = ElementMode.SH;
548
+ }
549
+ else if (type == "safe_orbit_camera_elevation_min_max_radians") {
550
+ chunkMode = ElementMode.Float_Tuple;
551
+ }
552
+ else if (type == "safe_orbit_camera_radius_min") {
553
+ chunkMode = ElementMode.Float;
554
+ }
555
+ else if (type == "up_axis" || type == "chirality") {
556
+ chunkMode = ElementMode.Uchar;
557
+ }
558
+ }
559
+ }
560
+ const rowVertexLength = rowVertexOffset;
561
+ const rowChunkLength = rowChunkOffset;
562
+ // eslint-disable-next-line github/no-then
563
+ return GaussianSplattingMesh.ConvertPLYWithSHToSplatAsync(data).then(async (splatsData) => {
564
+ const dataView = new DataView(data, headerEndIndex + headerEnd.length);
565
+ let offset = rowChunkLength * chunkCount + rowVertexLength * vertexCount;
566
+ // faces
567
+ const faces = [];
568
+ if (faceCount) {
569
+ for (let i = 0; i < faceCount; i++) {
570
+ const faceVertexCount = dataView.getUint8(offset);
571
+ if (faceVertexCount != 3) {
572
+ continue; // only support triangles
573
+ }
574
+ offset += 1;
575
+ for (let j = 0; j < faceVertexCount; j++) {
576
+ const vertexIndex = dataView.getUint32(offset + (2 - j) * 4, true); // change face winding
577
+ faces.push(vertexIndex);
578
+ }
579
+ offset += 12;
580
+ }
581
+ }
582
+ // early exit for chunked/quantized ply
583
+ if (chunkCount) {
584
+ return await new Promise((resolve) => {
585
+ resolve({
586
+ mode: 0 /* Mode.Splat */,
587
+ data: splatsData.buffer,
588
+ sh: splatsData.sh,
589
+ shDegree: splatsData.shDegree,
590
+ faces: faces,
591
+ hasVertexColors: false,
592
+ compressed: true,
593
+ rawSplat: false,
594
+ });
595
+ });
596
+ }
597
+ // count available properties. if all necessary are present then it's a splat. Otherwise, it's a point cloud
598
+ // if faces are found, then it's a standard mesh
599
+ let propertyCount = 0;
600
+ let propertyColorCount = 0;
601
+ const splatProperties = ["x", "y", "z", "scale_0", "scale_1", "scale_2", "opacity", "rot_0", "rot_1", "rot_2", "rot_3"];
602
+ const splatColorProperties = ["red", "green", "blue", "f_dc_0", "f_dc_1", "f_dc_2"];
603
+ for (let propertyIndex = 0; propertyIndex < vertexProperties.length; propertyIndex++) {
604
+ const property = vertexProperties[propertyIndex];
605
+ if (splatProperties.includes(property.name)) {
606
+ propertyCount++;
607
+ }
608
+ if (splatColorProperties.includes(property.name)) {
609
+ propertyColorCount++;
610
+ }
611
+ }
612
+ const hasMandatoryProperties = propertyCount == splatProperties.length && propertyColorCount >= 3;
613
+ const currentMode = faceCount ? 2 /* Mode.Mesh */ : hasMandatoryProperties ? 0 /* Mode.Splat */ : 1 /* Mode.PointCloud */;
614
+ // parsed ready ready to be used as a splat
615
+ return await new Promise((resolve) => {
616
+ resolve({
617
+ ...metaData,
618
+ mode: currentMode,
619
+ data: splatsData.buffer,
620
+ sh: splatsData.sh,
621
+ shDegree: splatsData.shDegree,
622
+ faces: faces,
623
+ hasVertexColors: !!propertyColorCount,
624
+ compressed: false,
625
+ rawSplat: false,
626
+ });
627
+ });
628
+ });
629
+ }
630
+ }
631
+ SPLATFileLoader._DefaultLoadingOptions = {
632
+ keepInRam: false,
633
+ flipY: false,
634
+ needsRotationScaleTextures: false,
635
+ spzLibraryUrl: typeof WebAssembly === "object" ? "https://unpkg.com/@adobe/spz@0.2.2/dist/spz.js" : undefined,
636
+ };
637
+ // Add this loader into the register plugin
638
+ let _Registered = false;
639
+ /**
640
+ * Registers the SPLATFileLoader scene loader plugin.
641
+ * Safe to call multiple times; only the first call has an effect.
642
+ */
643
+ export function RegisterSPLATFileLoader() {
644
+ if (_Registered) {
645
+ return;
646
+ }
647
+ _Registered = true;
648
+ RegisterSceneLoaderPlugin(new SPLATFileLoader());
649
+ }
650
+ //# sourceMappingURL=splatFileLoader.pure.js.map