@onerjs/loaders 8.53.5 → 8.53.6
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.
- package/BVH/bvhFileLoader.d.ts +4 -67
- package/BVH/bvhFileLoader.js +6 -130
- package/BVH/bvhFileLoader.js.map +1 -1
- package/BVH/bvhFileLoader.pure.d.ts +75 -0
- package/BVH/bvhFileLoader.pure.js +154 -0
- package/BVH/bvhFileLoader.pure.js.map +1 -0
- package/BVH/bvhFileLoader.types.d.ts +11 -0
- package/BVH/bvhFileLoader.types.js +2 -0
- package/BVH/bvhFileLoader.types.js.map +1 -0
- package/BVH/pure.d.ts +3 -0
- package/BVH/pure.js +5 -0
- package/BVH/pure.js.map +1 -0
- package/FBX/fbxFileLoader.d.ts +4 -192
- package/FBX/fbxFileLoader.js +6 -2437
- package/FBX/fbxFileLoader.js.map +1 -1
- package/FBX/fbxFileLoader.pure.d.ts +190 -0
- package/FBX/fbxFileLoader.pure.js +2451 -0
- package/FBX/fbxFileLoader.pure.js.map +1 -0
- package/FBX/fbxFileLoader.types.d.ts +11 -0
- package/FBX/fbxFileLoader.types.js +2 -0
- package/FBX/fbxFileLoader.types.js.map +1 -0
- package/FBX/pure.d.ts +3 -0
- package/FBX/pure.js +4 -0
- package/FBX/pure.js.map +1 -0
- package/OBJ/objFileLoader.d.ts +4 -134
- package/OBJ/objFileLoader.js +6 -315
- package/OBJ/objFileLoader.js.map +1 -1
- package/OBJ/objFileLoader.pure.d.ts +132 -0
- package/OBJ/objFileLoader.pure.js +329 -0
- package/OBJ/objFileLoader.pure.js.map +1 -0
- package/OBJ/objFileLoader.types.d.ts +11 -0
- package/OBJ/objFileLoader.types.js +2 -0
- package/OBJ/objFileLoader.types.js.map +1 -0
- package/OBJ/pure.d.ts +5 -0
- package/OBJ/pure.js +6 -0
- package/OBJ/pure.js.map +1 -0
- package/OBJ/solidParser.js +4 -3
- package/OBJ/solidParser.js.map +1 -1
- package/SPLAT/gaussianSplattingBlockAllocator.d.ts +137 -0
- package/SPLAT/gaussianSplattingBlockAllocator.js +555 -0
- package/SPLAT/gaussianSplattingBlockAllocator.js.map +1 -0
- package/SPLAT/gaussianSplattingDownloadManager.d.ts +109 -0
- package/SPLAT/gaussianSplattingDownloadManager.js +241 -0
- package/SPLAT/gaussianSplattingDownloadManager.js.map +1 -0
- package/SPLAT/gaussianSplattingResidencyController.d.ts +133 -0
- package/SPLAT/gaussianSplattingResidencyController.js +222 -0
- package/SPLAT/gaussianSplattingResidencyController.js.map +1 -0
- package/SPLAT/gaussianSplattingStream.d.ts +522 -0
- package/SPLAT/gaussianSplattingStream.js +1530 -0
- package/SPLAT/gaussianSplattingStream.js.map +1 -0
- package/SPLAT/gaussianSplattingWorkBuffer.d.ts +107 -0
- package/SPLAT/gaussianSplattingWorkBuffer.js +361 -0
- package/SPLAT/gaussianSplattingWorkBuffer.js.map +1 -0
- package/SPLAT/gaussianSplattingWorkBufferShaders.d.ts +40 -0
- package/SPLAT/gaussianSplattingWorkBufferShaders.js +337 -0
- package/SPLAT/gaussianSplattingWorkBufferShaders.js.map +1 -0
- package/SPLAT/index.d.ts +1 -0
- package/SPLAT/index.js +1 -0
- package/SPLAT/index.js.map +1 -1
- package/SPLAT/pure.d.ts +5 -0
- package/SPLAT/pure.js +7 -0
- package/SPLAT/pure.js.map +1 -0
- package/SPLAT/sog.d.ts +2 -93
- package/SPLAT/sog.js +4 -418
- package/SPLAT/sog.js.map +1 -1
- package/SPLAT/sog.pure.d.ts +102 -0
- package/SPLAT/sog.pure.js +514 -0
- package/SPLAT/sog.pure.js.map +1 -0
- package/SPLAT/splatFileLoader.d.ts +5 -98
- package/SPLAT/splatFileLoader.js +9 -587
- package/SPLAT/splatFileLoader.js.map +1 -1
- package/SPLAT/splatFileLoader.pure.d.ts +104 -0
- package/SPLAT/splatFileLoader.pure.js +650 -0
- package/SPLAT/splatFileLoader.pure.js.map +1 -0
- package/SPLAT/splatFileLoader.types.d.ts +11 -0
- package/SPLAT/splatFileLoader.types.js +2 -0
- package/SPLAT/splatFileLoader.types.js.map +1 -0
- package/STL/pure.d.ts +2 -0
- package/STL/pure.js +3 -0
- package/STL/pure.js.map +1 -0
- package/STL/stlFileLoader.d.ts +5 -76
- package/STL/stlFileLoader.js +7 -236
- package/STL/stlFileLoader.js.map +1 -1
- package/STL/stlFileLoader.pure.d.ts +73 -0
- package/STL/stlFileLoader.pure.js +249 -0
- package/STL/stlFileLoader.pure.js.map +1 -0
- package/STL/stlFileLoader.types.d.ts +10 -0
- package/STL/stlFileLoader.types.js +2 -0
- package/STL/stlFileLoader.types.js.map +1 -0
- package/glTF/1.0/pure.d.ts +3 -0
- package/glTF/1.0/pure.js +4 -0
- package/glTF/1.0/pure.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_lights_area.d.ts +4 -39
- package/glTF/2.0/Extensions/EXT_lights_area.js +6 -91
- package/glTF/2.0/Extensions/EXT_lights_area.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_lights_area.pure.d.ts +38 -0
- package/glTF/2.0/Extensions/EXT_lights_area.pure.js +106 -0
- package/glTF/2.0/Extensions/EXT_lights_area.pure.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_lights_area.types.d.ts +9 -0
- package/glTF/2.0/Extensions/EXT_lights_area.types.js +2 -0
- package/glTF/2.0/Extensions/EXT_lights_area.types.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_lights_ies.d.ts +4 -39
- package/glTF/2.0/Extensions/EXT_lights_ies.js +6 -81
- package/glTF/2.0/Extensions/EXT_lights_ies.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_lights_ies.pure.d.ts +38 -0
- package/glTF/2.0/Extensions/EXT_lights_ies.pure.js +96 -0
- package/glTF/2.0/Extensions/EXT_lights_ies.pure.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_lights_ies.types.d.ts +9 -0
- package/glTF/2.0/Extensions/EXT_lights_ies.types.js +2 -0
- package/glTF/2.0/Extensions/EXT_lights_ies.types.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +4 -46
- package/glTF/2.0/Extensions/EXT_lights_image_based.js +6 -113
- package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_lights_image_based.pure.d.ts +37 -0
- package/glTF/2.0/Extensions/EXT_lights_image_based.pure.js +128 -0
- package/glTF/2.0/Extensions/EXT_lights_image_based.pure.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_lights_image_based.types.d.ts +17 -0
- package/glTF/2.0/Extensions/EXT_lights_image_based.types.js +2 -0
- package/glTF/2.0/Extensions/EXT_lights_image_based.types.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +5 -37
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +7 -92
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.pure.d.ts +35 -0
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.pure.js +106 -0
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.pure.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.types.d.ts +9 -0
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.types.js +2 -0
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.types.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +4 -37
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js +6 -48
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_meshopt_compression.pure.d.ts +36 -0
- package/glTF/2.0/Extensions/EXT_meshopt_compression.pure.js +63 -0
- package/glTF/2.0/Extensions/EXT_meshopt_compression.pure.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_meshopt_compression.types.d.ts +9 -0
- package/glTF/2.0/Extensions/EXT_meshopt_compression.types.js +2 -0
- package/glTF/2.0/Extensions/EXT_meshopt_compression.types.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_texture_avif.d.ts +4 -32
- package/glTF/2.0/Extensions/EXT_texture_avif.js +6 -36
- package/glTF/2.0/Extensions/EXT_texture_avif.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_texture_avif.pure.d.ts +31 -0
- package/glTF/2.0/Extensions/EXT_texture_avif.pure.js +51 -0
- package/glTF/2.0/Extensions/EXT_texture_avif.pure.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_texture_avif.types.d.ts +9 -0
- package/glTF/2.0/Extensions/EXT_texture_avif.types.js +2 -0
- package/glTF/2.0/Extensions/EXT_texture_avif.types.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +4 -31
- package/glTF/2.0/Extensions/EXT_texture_webp.js +6 -35
- package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_texture_webp.pure.d.ts +30 -0
- package/glTF/2.0/Extensions/EXT_texture_webp.pure.js +50 -0
- package/glTF/2.0/Extensions/EXT_texture_webp.pure.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_texture_webp.types.d.ts +9 -0
- package/glTF/2.0/Extensions/EXT_texture_webp.types.js +2 -0
- package/glTF/2.0/Extensions/EXT_texture_webp.types.js.map +1 -0
- package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +4 -51
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js +6 -71
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
- package/glTF/2.0/Extensions/ExtrasAsMetadata.pure.d.ts +50 -0
- package/glTF/2.0/Extensions/ExtrasAsMetadata.pure.js +85 -0
- package/glTF/2.0/Extensions/ExtrasAsMetadata.pure.js.map +1 -0
- package/glTF/2.0/Extensions/ExtrasAsMetadata.types.d.ts +9 -0
- package/glTF/2.0/Extensions/ExtrasAsMetadata.types.js +2 -0
- package/glTF/2.0/Extensions/ExtrasAsMetadata.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.d.ts +5 -45
- package/glTF/2.0/Extensions/KHR_animation_pointer.js +7 -75
- package/glTF/2.0/Extensions/KHR_animation_pointer.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_animation_pointer.pure.d.ts +43 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.pure.js +89 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +4 -45
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +6 -90
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.pure.d.ts +44 -0
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.pure.js +105 -0
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_gaussian_splatting.d.ts +6 -0
- package/glTF/2.0/Extensions/KHR_gaussian_splatting.js +9 -0
- package/glTF/2.0/Extensions/KHR_gaussian_splatting.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_gaussian_splatting.pure.d.ts +35 -0
- package/glTF/2.0/Extensions/KHR_gaussian_splatting.pure.js +195 -0
- package/glTF/2.0/Extensions/KHR_gaussian_splatting.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_gaussian_splatting.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_gaussian_splatting.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_gaussian_splatting.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/pure.d.ts +4 -0
- package/glTF/2.0/Extensions/KHR_interactivity/pure.js +5 -0
- package/glTF/2.0/Extensions/KHR_interactivity/pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity.d.ts +4 -36
- package/glTF/2.0/Extensions/KHR_interactivity.js +6 -148
- package/glTF/2.0/Extensions/KHR_interactivity.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity.pure.d.ts +35 -0
- package/glTF/2.0/Extensions/KHR_interactivity.pure.js +163 -0
- package/glTF/2.0/Extensions/KHR_interactivity.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_interactivity.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_interactivity.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +4 -39
- package/glTF/2.0/Extensions/KHR_lights_punctual.js +6 -89
- package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_lights_punctual.pure.d.ts +38 -0
- package/glTF/2.0/Extensions/KHR_lights_punctual.pure.js +104 -0
- package/glTF/2.0/Extensions/KHR_lights_punctual.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_lights_punctual.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_lights_punctual.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_lights_punctual.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.d.ts +4 -40
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.js +6 -63
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.pure.d.ts +39 -0
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.pure.js +78 -0
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +4 -41
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +6 -77
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.pure.d.ts +40 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.pure.js +92 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_coat.d.ts +4 -47
- package/glTF/2.0/Extensions/KHR_materials_coat.js +6 -117
- package/glTF/2.0/Extensions/KHR_materials_coat.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_coat.pure.d.ts +46 -0
- package/glTF/2.0/Extensions/KHR_materials_coat.pure.js +132 -0
- package/glTF/2.0/Extensions/KHR_materials_coat.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_coat.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_coat.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_coat.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.d.ts +4 -41
- package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.js +6 -56
- package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.pure.d.ts +40 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.pure.js +71 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.d.ts +4 -41
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js +6 -71
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.pure.d.ts +40 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.pure.js +86 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_dispersion.d.ts +4 -41
- package/glTF/2.0/Extensions/KHR_materials_dispersion.js +6 -54
- package/glTF/2.0/Extensions/KHR_materials_dispersion.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_dispersion.pure.d.ts +40 -0
- package/glTF/2.0/Extensions/KHR_materials_dispersion.pure.js +69 -0
- package/glTF/2.0/Extensions/KHR_materials_dispersion.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_dispersion.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_dispersion.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_dispersion.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +4 -40
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +6 -45
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.pure.d.ts +39 -0
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.pure.js +60 -0
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_fuzz.d.ts +4 -41
- package/glTF/2.0/Extensions/KHR_materials_fuzz.js +6 -75
- package/glTF/2.0/Extensions/KHR_materials_fuzz.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_fuzz.pure.d.ts +40 -0
- package/glTF/2.0/Extensions/KHR_materials_fuzz.pure.js +90 -0
- package/glTF/2.0/Extensions/KHR_materials_fuzz.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_fuzz.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_fuzz.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_fuzz.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +4 -44
- package/glTF/2.0/Extensions/KHR_materials_ior.js +6 -52
- package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_ior.pure.d.ts +43 -0
- package/glTF/2.0/Extensions/KHR_materials_ior.pure.js +67 -0
- package/glTF/2.0/Extensions/KHR_materials_ior.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_ior.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_ior.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_ior.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_iridescence.d.ts +4 -40
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js +6 -66
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_iridescence.pure.d.ts +39 -0
- package/glTF/2.0/Extensions/KHR_materials_iridescence.pure.js +81 -0
- package/glTF/2.0/Extensions/KHR_materials_iridescence.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_iridescence.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_iridescence.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_iridescence.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +4 -40
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +6 -72
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.pure.d.ts +39 -0
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.pure.js +87 -0
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +4 -41
- package/glTF/2.0/Extensions/KHR_materials_sheen.js +6 -71
- package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_sheen.pure.d.ts +40 -0
- package/glTF/2.0/Extensions/KHR_materials_sheen.pure.js +86 -0
- package/glTF/2.0/Extensions/KHR_materials_sheen.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_sheen.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_sheen.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_sheen.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +4 -40
- package/glTF/2.0/Extensions/KHR_materials_specular.js +6 -74
- package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_specular.pure.d.ts +39 -0
- package/glTF/2.0/Extensions/KHR_materials_specular.pure.js +89 -0
- package/glTF/2.0/Extensions/KHR_materials_specular.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_specular.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_specular.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_specular.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +4 -40
- package/glTF/2.0/Extensions/KHR_materials_transmission.js +6 -70
- package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_transmission.pure.d.ts +39 -0
- package/glTF/2.0/Extensions/KHR_materials_transmission.pure.js +85 -0
- package/glTF/2.0/Extensions/KHR_materials_transmission.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_transmission.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_transmission.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_transmission.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +4 -40
- package/glTF/2.0/Extensions/KHR_materials_unlit.js +6 -64
- package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_unlit.pure.d.ts +39 -0
- package/glTF/2.0/Extensions/KHR_materials_unlit.pure.js +79 -0
- package/glTF/2.0/Extensions/KHR_materials_unlit.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_unlit.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_unlit.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_unlit.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +4 -110
- package/glTF/2.0/Extensions/KHR_materials_variants.js +6 -260
- package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_variants.pure.d.ts +97 -0
- package/glTF/2.0/Extensions/KHR_materials_variants.pure.js +275 -0
- package/glTF/2.0/Extensions/KHR_materials_variants.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_variants.types.d.ts +29 -0
- package/glTF/2.0/Extensions/KHR_materials_variants.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_variants.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +4 -41
- package/glTF/2.0/Extensions/KHR_materials_volume.js +6 -77
- package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_volume.pure.d.ts +40 -0
- package/glTF/2.0/Extensions/KHR_materials_volume.pure.js +92 -0
- package/glTF/2.0/Extensions/KHR_materials_volume.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_volume.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_volume.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_volume.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_volume_scatter.d.ts +4 -43
- package/glTF/2.0/Extensions/KHR_materials_volume_scatter.js +6 -113
- package/glTF/2.0/Extensions/KHR_materials_volume_scatter.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_volume_scatter.pure.d.ts +42 -0
- package/glTF/2.0/Extensions/KHR_materials_volume_scatter.pure.js +128 -0
- package/glTF/2.0/Extensions/KHR_materials_volume_scatter.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_volume_scatter.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_materials_volume_scatter.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_materials_volume_scatter.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +4 -27
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js +6 -20
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_mesh_quantization.pure.d.ts +26 -0
- package/glTF/2.0/Extensions/KHR_mesh_quantization.pure.js +35 -0
- package/glTF/2.0/Extensions/KHR_mesh_quantization.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_mesh_quantization.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_mesh_quantization.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_mesh_quantization.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_node_hoverability.d.ts +4 -29
- package/glTF/2.0/Extensions/KHR_node_hoverability.js +6 -187
- package/glTF/2.0/Extensions/KHR_node_hoverability.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_node_hoverability.pure.d.ts +28 -0
- package/glTF/2.0/Extensions/KHR_node_hoverability.pure.js +202 -0
- package/glTF/2.0/Extensions/KHR_node_hoverability.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_node_hoverability.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_node_hoverability.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_node_hoverability.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_node_selectability.d.ts +4 -28
- package/glTF/2.0/Extensions/KHR_node_selectability.js +6 -121
- package/glTF/2.0/Extensions/KHR_node_selectability.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_node_selectability.pure.d.ts +27 -0
- package/glTF/2.0/Extensions/KHR_node_selectability.pure.js +136 -0
- package/glTF/2.0/Extensions/KHR_node_selectability.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_node_selectability.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_node_selectability.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_node_selectability.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_node_visibility.d.ts +4 -28
- package/glTF/2.0/Extensions/KHR_node_visibility.js +6 -64
- package/glTF/2.0/Extensions/KHR_node_visibility.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_node_visibility.pure.d.ts +27 -0
- package/glTF/2.0/Extensions/KHR_node_visibility.pure.js +79 -0
- package/glTF/2.0/Extensions/KHR_node_visibility.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_node_visibility.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_node_visibility.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_node_visibility.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +4 -31
- package/glTF/2.0/Extensions/KHR_texture_basisu.js +6 -35
- package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_basisu.pure.d.ts +30 -0
- package/glTF/2.0/Extensions/KHR_texture_basisu.pure.js +50 -0
- package/glTF/2.0/Extensions/KHR_texture_basisu.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_texture_basisu.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_texture_basisu.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_texture_basisu.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +4 -35
- package/glTF/2.0/Extensions/KHR_texture_transform.js +6 -56
- package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_transform.pure.d.ts +34 -0
- package/glTF/2.0/Extensions/KHR_texture_transform.pure.js +71 -0
- package/glTF/2.0/Extensions/KHR_texture_transform.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_texture_transform.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_texture_transform.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_texture_transform.types.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +4 -37
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +6 -45
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.pure.d.ts +36 -0
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.pure.js +60 -0
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.pure.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.types.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.types.js +2 -0
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.types.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +5 -54
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js +7 -226
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_audio_emitter.pure.d.ts +52 -0
- package/glTF/2.0/Extensions/MSFT_audio_emitter.pure.js +240 -0
- package/glTF/2.0/Extensions/MSFT_audio_emitter.pure.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_audio_emitter.types.d.ts +9 -0
- package/glTF/2.0/Extensions/MSFT_audio_emitter.types.js +2 -0
- package/glTF/2.0/Extensions/MSFT_audio_emitter.types.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_lod.d.ts +4 -102
- package/glTF/2.0/Extensions/MSFT_lod.js +6 -335
- package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_lod.pure.d.ts +96 -0
- package/glTF/2.0/Extensions/MSFT_lod.pure.js +350 -0
- package/glTF/2.0/Extensions/MSFT_lod.pure.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_lod.types.d.ts +14 -0
- package/glTF/2.0/Extensions/MSFT_lod.types.js +2 -0
- package/glTF/2.0/Extensions/MSFT_lod.types.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +6 -27
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +8 -40
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.pure.d.ts +24 -0
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.pure.js +53 -0
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.pure.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.types.d.ts +9 -0
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.types.js +2 -0
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.types.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +6 -27
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +8 -38
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.pure.d.ts +24 -0
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.pure.js +51 -0
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.pure.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.types.d.ts +9 -0
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.types.js +2 -0
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.types.js.map +1 -0
- package/glTF/2.0/Extensions/dynamic.js +5 -0
- package/glTF/2.0/Extensions/dynamic.js.map +1 -1
- package/glTF/2.0/Extensions/index.d.ts +1 -0
- package/glTF/2.0/Extensions/index.js +1 -0
- package/glTF/2.0/Extensions/index.js.map +1 -1
- package/glTF/2.0/Extensions/objectModelMapping.d.ts +31 -2
- package/glTF/2.0/Extensions/objectModelMapping.js +3 -3
- package/glTF/2.0/Extensions/objectModelMapping.js.map +1 -1
- package/glTF/2.0/Extensions/pure.d.ts +46 -0
- package/glTF/2.0/Extensions/pure.js +48 -0
- package/glTF/2.0/Extensions/pure.js.map +1 -0
- package/glTF/2.0/glTFLoader.d.ts +1 -471
- package/glTF/2.0/glTFLoader.js +9 -2570
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/glTF/2.0/glTFLoader.pure.d.ts +476 -0
- package/glTF/2.0/glTFLoader.pure.js +2606 -0
- package/glTF/2.0/glTFLoader.pure.js.map +1 -0
- package/glTF/2.0/glTFLoaderAnimation.d.ts +2 -2
- package/glTF/2.0/glTFLoaderAnimation.js +2 -2
- package/glTF/2.0/glTFLoaderAnimation.js.map +1 -1
- package/glTF/2.0/pbrMaterialLoadingAdapter.d.ts +1 -1
- package/glTF/2.0/pbrMaterialLoadingAdapter.js +2 -2
- package/glTF/2.0/pbrMaterialLoadingAdapter.js.map +1 -1
- package/glTF/2.0/pure.d.ts +8 -0
- package/glTF/2.0/pure.js +10 -0
- package/glTF/2.0/pure.js.map +1 -0
- package/glTF/glTFFileLoader.d.ts +5 -571
- package/glTF/glTFFileLoader.js +6 -1016
- package/glTF/glTFFileLoader.js.map +1 -1
- package/glTF/glTFFileLoader.pure.d.ts +582 -0
- package/glTF/glTFFileLoader.pure.js +1044 -0
- package/glTF/glTFFileLoader.pure.js.map +1 -0
- package/glTF/glTFFileLoader.types.d.ts +11 -0
- package/glTF/glTFFileLoader.types.js +2 -0
- package/glTF/glTFFileLoader.types.js.map +1 -0
- package/glTF/glTFValidation.js +1 -1
- package/glTF/glTFValidation.js.map +1 -1
- package/glTF/pure.d.ts +6 -0
- package/glTF/pure.js +8 -0
- package/glTF/pure.js.map +1 -0
- package/package.json +3 -3
- package/pure.d.ts +8 -0
- package/pure.js +10 -0
- package/pure.js.map +1 -0
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
import { GaussianSplattingMesh } from "@onerjs/core/Meshes/GaussianSplatting/gaussianSplattingMesh.js";
|
|
2
|
+
import { type Scene } from "@onerjs/core/scene.js";
|
|
3
|
+
import { type Nullable } from "@onerjs/core/types.js";
|
|
4
|
+
import { Camera } from "@onerjs/core/Cameras/camera.js";
|
|
5
|
+
import { BoundingInfo } from "@onerjs/core/Culling/boundingInfo.js";
|
|
6
|
+
/**
|
|
7
|
+
* A single LOD variant of a tree node: a contiguous splat range inside one streamed SOG file.
|
|
8
|
+
*/
|
|
9
|
+
interface ISOGLODEntry {
|
|
10
|
+
/** Index into {@link ISOGLODMetadata.filenames}. */
|
|
11
|
+
file: number;
|
|
12
|
+
/** First splat index inside that file. */
|
|
13
|
+
offset: number;
|
|
14
|
+
/** Number of splats. */
|
|
15
|
+
count: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A node of the PlayCanvas-style SOG LOD octree. Internal nodes have `children`; leaves have `lods`.
|
|
19
|
+
*/
|
|
20
|
+
interface ISOGLODNode {
|
|
21
|
+
bound: {
|
|
22
|
+
min: number[];
|
|
23
|
+
max: number[];
|
|
24
|
+
};
|
|
25
|
+
children?: ISOGLODNode[];
|
|
26
|
+
lods?: {
|
|
27
|
+
[level: string]: ISOGLODEntry;
|
|
28
|
+
};
|
|
29
|
+
/** LOD level currently streamed/rendered for this node, or undefined until its base LOD is ready. */
|
|
30
|
+
activeLod?: number;
|
|
31
|
+
/** Distance-based ideal LOD level for this node, recomputed per frame. */
|
|
32
|
+
optimalLod?: number;
|
|
33
|
+
/** Available LOD levels for this leaf, sorted ascending (0 = finest). Set during the tree walk. */
|
|
34
|
+
availableLevels?: number[];
|
|
35
|
+
/** Coarsest available level (= max key), always streamed as the permanent base layer. */
|
|
36
|
+
baseLod?: number;
|
|
37
|
+
/** Final LOD level the node should stream/render (distance optimal, capped by maxDetailLod). */
|
|
38
|
+
targetLevel?: number;
|
|
39
|
+
/** Frames remaining before this node may switch LOD again (oscillation damping). */
|
|
40
|
+
lodCooldown?: number;
|
|
41
|
+
/** True when the node's bounding box currently intersects the camera frustum. Drives the LOD bias that
|
|
42
|
+
* pushes off-screen nodes to the coarsest level (they stay rendered, not hidden). */
|
|
43
|
+
inFrustum?: boolean;
|
|
44
|
+
/** Cached local-space bounding info used for the per-node frustum test (created once per leaf). */
|
|
45
|
+
cullBounds?: BoundingInfo;
|
|
46
|
+
/** File index this node currently has an in-flight/queued decode request for (its not-yet-decoded target),
|
|
47
|
+
* or undefined when the node's target is already decoded. Drives pending-download reference counting. */
|
|
48
|
+
pendingFile?: number;
|
|
49
|
+
/** File index this node's current {@link activeLod} renders from, or undefined before any LOD is active.
|
|
50
|
+
* Drives the resident reference count that keeps a file in the work buffer. */
|
|
51
|
+
activeFile?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Parsed contents of a PlayCanvas-style `lod-meta.json` file.
|
|
55
|
+
*/
|
|
56
|
+
export interface ISOGLODMetadata {
|
|
57
|
+
/** Number of LOD levels (0 = highest detail). */
|
|
58
|
+
lodLevels: number;
|
|
59
|
+
/** SOG `meta.json` paths, relative to the metadata file, indexed by `ISOGLODEntry.file`. */
|
|
60
|
+
filenames: string[];
|
|
61
|
+
/** Optional always-on environment `.sog` bundle, relative to the metadata file. */
|
|
62
|
+
environment?: string;
|
|
63
|
+
/** Root of the LOD octree. */
|
|
64
|
+
tree: ISOGLODNode;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Selects which LOD value drives the {@link GaussianSplattingStream} debug wireframe colors.
|
|
68
|
+
*/
|
|
69
|
+
export type GaussianSplattingStreamDebugLodSource = "optimal" | "current";
|
|
70
|
+
/**
|
|
71
|
+
* Options for {@link GaussianSplattingStream}.
|
|
72
|
+
*/
|
|
73
|
+
export interface IGaussianSplattingStreamOptions {
|
|
74
|
+
/** URL of the fflate UMD module used to unzip `.sog` environment bundles. */
|
|
75
|
+
deflateURL?: string;
|
|
76
|
+
/** Pre-loaded fflate module. */
|
|
77
|
+
fflate?: any;
|
|
78
|
+
/** When true, renders a wireframe box per LOD node, colored by the node's LOD level. */
|
|
79
|
+
debugDisplay?: boolean;
|
|
80
|
+
/** Which LOD value drives the debug wireframe colors. Defaults to `"optimal"`. */
|
|
81
|
+
debugLodSource?: GaussianSplattingStreamDebugLodSource;
|
|
82
|
+
/** Distance (in local units) of the first LOD transition. PlayCanvas default `5`. */
|
|
83
|
+
lodBaseDistance?: number;
|
|
84
|
+
/** Geometric ratio between successive LOD transition distances. PlayCanvas default `3`. */
|
|
85
|
+
lodMultiplier?: number;
|
|
86
|
+
/** Distance multiplier applied to nodes behind the camera (`1` = no penalty). PlayCanvas default `1`. */
|
|
87
|
+
lodBehindPenalty?: number;
|
|
88
|
+
/** Lowest LOD index the optimal-LOD heuristic may select. Defaults to `0`. */
|
|
89
|
+
lodRangeMin?: number;
|
|
90
|
+
/** Highest LOD index the optimal-LOD heuristic may select. Defaults to `lodLevels - 1`. */
|
|
91
|
+
lodRangeMax?: number;
|
|
92
|
+
/** Maximum number of LOD source files to GPU-decode per frame (spreads work to avoid hitches). Defaults to `1`. */
|
|
93
|
+
maxDecodesPerFrame?: number;
|
|
94
|
+
/** Frames a node must wait after switching LOD before it may switch again (oscillation damping). Defaults to `10`. */
|
|
95
|
+
lodCooldownFrames?: number;
|
|
96
|
+
/** Minimum number of frames between LOD re-evaluations (throttles per-frame work during motion). Defaults to `4`. */
|
|
97
|
+
lodUpdateInterval?: number;
|
|
98
|
+
/** Minimum camera movement (world units) required to re-evaluate LODs. Defaults to `0.5`. */
|
|
99
|
+
lodUpdateDistance?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Finest (most detailed) LOD level any node is allowed to render. `0` allows full detail (level 0);
|
|
102
|
+
* `1` caps detail at the next-coarser level, and so on. Higher values force a coarser maximum detail.
|
|
103
|
+
*/
|
|
104
|
+
maxDetailLod?: number;
|
|
105
|
+
/**
|
|
106
|
+
* When true (default), LOD nodes outside the camera frustum are biased to their coarsest LOD rather than
|
|
107
|
+
* rendered at full detail. They stay in the sort/render set so they appear instantly (at low detail) when
|
|
108
|
+
* the camera turns toward them, then refine. Set to `false` to render every node at its distance LOD.
|
|
109
|
+
*/
|
|
110
|
+
frustumCulling?: boolean;
|
|
111
|
+
/** Maximum number of LOD file downloads allowed to run concurrently. PlayCanvas default `2`. */
|
|
112
|
+
maxConcurrentDownloads?: number;
|
|
113
|
+
/** Number of times a failed file download is retried before giving up. PlayCanvas default `2`. */
|
|
114
|
+
maxDownloadRetries?: number;
|
|
115
|
+
/**
|
|
116
|
+
* GPU memory budget (in megabytes) for resident splats. When set (and smaller than the full dataset),
|
|
117
|
+
* LOD files are streamed through a fixed-size work buffer and unreferenced files are evicted to stay
|
|
118
|
+
* within budget, allowing datasets larger than a single full-dataset buffer. Converted to a splat count
|
|
119
|
+
* at ~84 bytes/splat. Combined with {@link maxResidentSplats} by taking the smaller of the two.
|
|
120
|
+
*/
|
|
121
|
+
memoryBudgetMb?: number;
|
|
122
|
+
/**
|
|
123
|
+
* Maximum number of splats kept resident in the work buffer. When set (and smaller than the full
|
|
124
|
+
* dataset), enables eviction-based streaming (see {@link memoryBudgetMb}). Default unset = size the work
|
|
125
|
+
* buffer for the whole dataset (no eviction).
|
|
126
|
+
*/
|
|
127
|
+
maxResidentSplats?: number;
|
|
128
|
+
/**
|
|
129
|
+
* Frames an unreferenced (no longer rendered) LOD file stays resident before it is evicted, so a quick
|
|
130
|
+
* return to it avoids a re-download. Only used when a budget enables eviction. PlayCanvas default `100`.
|
|
131
|
+
*/
|
|
132
|
+
evictionCooldownFrames?: number;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Streams a PlayCanvas-style SOG LOD scene (`lod-meta.json`) into a single Gaussian Splatting mesh.
|
|
136
|
+
*
|
|
137
|
+
* Each selected SOG file (plus the environment) is loaded directly as GPU textures and decoded on the
|
|
138
|
+
* GPU into one unified, PlayCanvas-style square work buffer (no CPU splat decode or `updateData`). Only
|
|
139
|
+
* the splats of each node's currently-selected LOD are rendered/sorted via the mesh's interval filter.
|
|
140
|
+
*
|
|
141
|
+
* The coarsest (least-detail) LOD of every node is streamed first as a permanent base layer so the whole
|
|
142
|
+
* scene is visible quickly with no holes. A distance-based "optimal" LOD is then computed per node (see
|
|
143
|
+
* {@link evaluateOptimalLods}); finer LOD source files are streamed on demand and a node only switches to
|
|
144
|
+
* a finer LOD once that file is decoded, so transitions never flash or leave gaps.
|
|
145
|
+
*
|
|
146
|
+
* @experimental
|
|
147
|
+
*/
|
|
148
|
+
export declare class GaussianSplattingStream extends GaussianSplattingMesh {
|
|
149
|
+
private readonly _metadata;
|
|
150
|
+
private readonly _rootUrl;
|
|
151
|
+
private readonly _streamOptions;
|
|
152
|
+
private readonly _leafNodes;
|
|
153
|
+
private _lodBaseDistance;
|
|
154
|
+
private _lodMultiplier;
|
|
155
|
+
private _lodBehindPenalty;
|
|
156
|
+
private _lodRangeMin;
|
|
157
|
+
private _lodRangeMax;
|
|
158
|
+
private _maxDecodesPerFrame;
|
|
159
|
+
private _lodCooldownFrames;
|
|
160
|
+
private _lodUpdateInterval;
|
|
161
|
+
private _lodUpdateDistance;
|
|
162
|
+
private _maxDetailLod;
|
|
163
|
+
private _frustumCulling;
|
|
164
|
+
private readonly _frustumPlanes;
|
|
165
|
+
private readonly _cullViewProj;
|
|
166
|
+
private _workBuffer;
|
|
167
|
+
private _useGpuPositionReadback;
|
|
168
|
+
private _readbackCandidate;
|
|
169
|
+
private _readbackProbed;
|
|
170
|
+
private _residency;
|
|
171
|
+
private readonly _fileCounts;
|
|
172
|
+
private readonly _fileMeta;
|
|
173
|
+
private readonly _decodedFiles;
|
|
174
|
+
private readonly _loadingFiles;
|
|
175
|
+
private readonly _decodeQueue;
|
|
176
|
+
private readonly _fileRefs;
|
|
177
|
+
private readonly _cancelledDecodes;
|
|
178
|
+
private _evictionEnabled;
|
|
179
|
+
private _residentBudget;
|
|
180
|
+
private _evictionCooldownFrames;
|
|
181
|
+
private _decodeGate;
|
|
182
|
+
private readonly _relayoutOldOffsets;
|
|
183
|
+
private _relayoutSrcIndex;
|
|
184
|
+
private readonly _downloadManager;
|
|
185
|
+
private _environmentRange;
|
|
186
|
+
private _environmentFiles;
|
|
187
|
+
private _lodObserver;
|
|
188
|
+
private _baseLayerReady;
|
|
189
|
+
private _framesSinceLodUpdate;
|
|
190
|
+
private readonly _lastLodCamPos;
|
|
191
|
+
private _forceLodUpdate;
|
|
192
|
+
private readonly _boundsMin;
|
|
193
|
+
private readonly _boundsMax;
|
|
194
|
+
private _debugDisplay;
|
|
195
|
+
private _debugLodSource;
|
|
196
|
+
private _debugMesh;
|
|
197
|
+
private _debugObserver;
|
|
198
|
+
private _debugColorData;
|
|
199
|
+
private _debugSignature;
|
|
200
|
+
private _disposed;
|
|
201
|
+
/**
|
|
202
|
+
* Returns true when the parsed JSON looks like a PlayCanvas-style `lod-meta.json` payload.
|
|
203
|
+
* @param data parsed JSON
|
|
204
|
+
* @returns whether the data is SOG LOD metadata
|
|
205
|
+
*/
|
|
206
|
+
static IsLODMetadata(data: unknown): data is ISOGLODMetadata;
|
|
207
|
+
/**
|
|
208
|
+
* Creates a new SOG LOD streaming mesh and immediately starts streaming (non-blocking).
|
|
209
|
+
* @param name mesh name
|
|
210
|
+
* @param metadata parsed `lod-meta.json`
|
|
211
|
+
* @param rootUrl base URL the metadata's relative paths resolve against
|
|
212
|
+
* @param scene hosting scene
|
|
213
|
+
* @param options streaming options
|
|
214
|
+
*/
|
|
215
|
+
constructor(name: string, metadata: ISOGLODMetadata, rootUrl: string, scene: Scene, options?: IGaussianSplattingStreamOptions);
|
|
216
|
+
getClassName(): string;
|
|
217
|
+
/**
|
|
218
|
+
* Resolves once the scene is fully streamed and displayed for the current camera: a LOD re-evaluation has
|
|
219
|
+
* run for the current point of view, every reachable LOD file has finished downloading and decoding (no
|
|
220
|
+
* downloads, decodes, or queued work remain), and the depth sort for the resulting splats has been applied
|
|
221
|
+
* and rendered. Intended for deterministic automated testing and screenshot/image comparison.
|
|
222
|
+
*
|
|
223
|
+
* Streaming and settling require rendered frames. If an external render loop is already running, this waits
|
|
224
|
+
* on it passively; otherwise (e.g. when awaited inside an async `createScene` before the host starts its
|
|
225
|
+
* render loop) it drives `scene.render()` itself until settled, so it never deadlocks.
|
|
226
|
+
*
|
|
227
|
+
* Note: the promise only resolves while the camera is still — if the camera keeps moving, the target LODs
|
|
228
|
+
* (and the depth sort) keep changing and the stream never settles. Position the camera, then await this.
|
|
229
|
+
* @param stableFrames number of consecutive settled frames to require before resolving (defaults to 3), so
|
|
230
|
+
* the final sorted frame is actually on screen
|
|
231
|
+
* @returns a promise that resolves when loading and rendering are complete for the current view
|
|
232
|
+
*/
|
|
233
|
+
whenSettledAsync(stableFrames?: number): Promise<void>;
|
|
234
|
+
/**
|
|
235
|
+
* Whether the base layer is ready and there is no streaming work in flight (nothing queued for decode, no
|
|
236
|
+
* decode running, and no downloads pending).
|
|
237
|
+
* @returns true when no loading work remains
|
|
238
|
+
*/
|
|
239
|
+
private _isLoadingIdle;
|
|
240
|
+
/**
|
|
241
|
+
* Finest (most detailed) LOD level any node is allowed to render. `0` allows full detail (level 0);
|
|
242
|
+
* `1` caps detail at the next-coarser level, and so on. Nodes already coarser than this cap (by
|
|
243
|
+
* distance) are unaffected. Changes take effect in real time.
|
|
244
|
+
*/
|
|
245
|
+
get maxDetailLod(): number;
|
|
246
|
+
set maxDetailLod(value: number);
|
|
247
|
+
/**
|
|
248
|
+
* Coarsest LOD level index in the scene (number of LOD levels minus one). Useful as the upper bound
|
|
249
|
+
* for {@link maxDetailLod}.
|
|
250
|
+
*/
|
|
251
|
+
get maxLodLevel(): number;
|
|
252
|
+
/**
|
|
253
|
+
* When true (default), nodes whose bounding box is outside the camera frustum are biased to the coarsest
|
|
254
|
+
* LOD instead of being hidden. They stay in the sort/render set (their off-screen splats are clipped), so
|
|
255
|
+
* turning the camera toward them shows low detail immediately with no invisible frames, then refines.
|
|
256
|
+
* Changes take effect in real time.
|
|
257
|
+
*/
|
|
258
|
+
get frustumCulling(): boolean;
|
|
259
|
+
set frustumCulling(value: boolean);
|
|
260
|
+
/**
|
|
261
|
+
* When true, renders a wireframe box per LOD node, colored by the LOD level selected by {@link debugLodSource}.
|
|
262
|
+
*/
|
|
263
|
+
get debugDisplay(): boolean;
|
|
264
|
+
set debugDisplay(value: boolean);
|
|
265
|
+
/**
|
|
266
|
+
* Selects which LOD value drives the debug wireframe colors: the distance-based `"optimal"` LOD
|
|
267
|
+
* (default, recomputed as the camera moves) or the `"current"` streamed/rendered LOD.
|
|
268
|
+
*/
|
|
269
|
+
get debugLodSource(): GaussianSplattingStreamDebugLodSource;
|
|
270
|
+
set debugLodSource(value: GaussianSplattingStreamDebugLodSource);
|
|
271
|
+
dispose(doNotRecurse?: boolean): void;
|
|
272
|
+
/**
|
|
273
|
+
* Re-evaluates the optimal LOD for every node based on the camera position. The result is stored in
|
|
274
|
+
* each node's `optimalLod`. Rendering is unaffected; this currently drives only diagnostics and the
|
|
275
|
+
* debug wireframe display.
|
|
276
|
+
* @param camera camera to evaluate against (defaults to the scene's active camera)
|
|
277
|
+
*/
|
|
278
|
+
evaluateOptimalLods(camera?: Nullable<Camera>): void;
|
|
279
|
+
/**
|
|
280
|
+
* The LOD level used to color a node's debug box, per {@link debugLodSource}.
|
|
281
|
+
* @param node leaf node
|
|
282
|
+
* @returns the displayed LOD level
|
|
283
|
+
*/
|
|
284
|
+
private _displayedLodLevel;
|
|
285
|
+
/**
|
|
286
|
+
* Rebuilds the debug wireframe (evaluating the optimal LOD first when needed) and wires up the per-frame
|
|
287
|
+
* recolor observer. The observer runs for both LOD sources: "optimal" colors track the camera, and
|
|
288
|
+
* "current" colors track LOD levels as they stream in/out.
|
|
289
|
+
*/
|
|
290
|
+
private _refreshDebugDisplay;
|
|
291
|
+
/**
|
|
292
|
+
* Per-frame debug update: recolors the existing wireframe in place whenever the displayed LOD levels
|
|
293
|
+
* change. For the "optimal" source the optimal LOD is recomputed first (it tracks the camera); for the
|
|
294
|
+
* "current" source the levels are driven by the streaming loop, so no recomputation is needed here. The
|
|
295
|
+
* geometry is never rebuilt, which avoids the dispose/recreate flicker while the camera moves.
|
|
296
|
+
*/
|
|
297
|
+
private _onDebugFrame;
|
|
298
|
+
/**
|
|
299
|
+
* Builds the LOD-node wireframe boxes once (one box per leaf node), colored by the displayed LOD level.
|
|
300
|
+
* The color vertex buffer is created updatable so subsequent recolors can happen in place.
|
|
301
|
+
*/
|
|
302
|
+
private _buildDebugMesh;
|
|
303
|
+
/**
|
|
304
|
+
* Recolors the existing wireframe in place from the current displayed LOD levels, without rebuilding geometry.
|
|
305
|
+
*/
|
|
306
|
+
private _updateDebugColors;
|
|
307
|
+
/**
|
|
308
|
+
* Computes a cheap 32-bit rolling hash of every leaf's displayed LOD level, used to detect when the
|
|
309
|
+
* debug wireframe needs recoloring. Avoids per-frame string allocation in the render loop.
|
|
310
|
+
* @returns a numeric signature of the current displayed LOD levels
|
|
311
|
+
*/
|
|
312
|
+
private _computeDebugSignature;
|
|
313
|
+
/**
|
|
314
|
+
* Disposes the LOD-node wireframe boxes and stops live debug updates.
|
|
315
|
+
*/
|
|
316
|
+
private _clearDebugDisplay;
|
|
317
|
+
/**
|
|
318
|
+
* Walks the LOD tree and records every leaf that carries renderable LOD entries, capturing the set of
|
|
319
|
+
* available levels and the coarsest (base) level for each.
|
|
320
|
+
* @param node current tree node
|
|
321
|
+
*/
|
|
322
|
+
private _collectLodEntries;
|
|
323
|
+
/**
|
|
324
|
+
* Streams the scene: learns every source file's splat count, allocates one unified GPU work buffer
|
|
325
|
+
* sized for all LOD files, decodes the environment and the coarsest LOD of every node as a permanent
|
|
326
|
+
* base layer, then installs the per-frame loop that streams finer LODs on demand.
|
|
327
|
+
*/
|
|
328
|
+
private _streamAllAsync;
|
|
329
|
+
/**
|
|
330
|
+
* Collects the unique set of source file indices referenced by any LOD of any leaf, sorted ascending.
|
|
331
|
+
* @returns sorted unique file indices
|
|
332
|
+
*/
|
|
333
|
+
private _collectAllFileIds;
|
|
334
|
+
/**
|
|
335
|
+
* Fetches the environment bundle and every referenced file's metadata to learn splat counts, caching
|
|
336
|
+
* each file's parsed metadata for the later on-demand decode. Metadata fetches run in parallel.
|
|
337
|
+
* @param fileIds file indices to fetch metadata for
|
|
338
|
+
* @returns the environment splat count (0 when there is no environment)
|
|
339
|
+
*/
|
|
340
|
+
private _gatherCountsAsync;
|
|
341
|
+
/**
|
|
342
|
+
* Queues a file for on-demand decode if it isn't already decoded, in flight, or already queued.
|
|
343
|
+
* @param fileId file index to decode
|
|
344
|
+
*/
|
|
345
|
+
private _enqueueDecode;
|
|
346
|
+
/**
|
|
347
|
+
* Starts up to {@link _maxDecodesPerFrame} queued decodes for this frame. Decodes run asynchronously
|
|
348
|
+
* and promote any waiting nodes once they complete.
|
|
349
|
+
*/
|
|
350
|
+
private _pumpDecodeQueue;
|
|
351
|
+
/**
|
|
352
|
+
* Writes a decoded splat range's positions into the shared buffer, expands the bounds, and incrementally
|
|
353
|
+
* patches the sort worker.
|
|
354
|
+
* @param positions stride-4 positions for the range
|
|
355
|
+
* @param base first splat index of the range in the work buffer
|
|
356
|
+
* @param count number of splats in the range
|
|
357
|
+
*/
|
|
358
|
+
private _applyPositions;
|
|
359
|
+
/**
|
|
360
|
+
* One-time validation of GPU position readback: reads a sample of the just-decoded range back from the work
|
|
361
|
+
* buffer and compares it to the CPU-decoded positions. Enables {@link _useGpuPositionReadback} only on an
|
|
362
|
+
* exact (within float tolerance) match, so an unsupported or incorrect readback (e.g. a backend without the
|
|
363
|
+
* required texture usage, or an orientation mismatch) safely keeps the CPU decode path.
|
|
364
|
+
* @param base first splat index of the validated range
|
|
365
|
+
* @param count number of splats in the range
|
|
366
|
+
* @param cpuPositions the CPU-decoded stride-4 positions for the range (ground truth)
|
|
367
|
+
*/
|
|
368
|
+
private _probeReadbackAsync;
|
|
369
|
+
/**
|
|
370
|
+
* Resolves the decoded positions for a splat range and applies them. Once GPU readback has been validated,
|
|
371
|
+
* positions are read back from the work buffer (non-blocking) and `pack.positions` is empty; otherwise the
|
|
372
|
+
* CPU-decoded `pack.positions` are used, and — on the first such decode — the GPU readback is validated
|
|
373
|
+
* against them so subsequent decodes can use the fast path.
|
|
374
|
+
* @param pack the parsed SOG pack (its `positions` is populated only on the CPU path)
|
|
375
|
+
* @param base first splat index of the range in the work buffer
|
|
376
|
+
* @param count number of splats in the range
|
|
377
|
+
* @returns whether positions were applied
|
|
378
|
+
*/
|
|
379
|
+
private _applyDecodedPositionsAsync;
|
|
380
|
+
/**
|
|
381
|
+
* Decodes the always-on environment bundle into its work-buffer block and activates its range.
|
|
382
|
+
*/
|
|
383
|
+
private _decodeEnvironmentAsync;
|
|
384
|
+
/**
|
|
385
|
+
* Loads one LOD source file as GPU textures, decodes it into its fixed work-buffer block, records its
|
|
386
|
+
* CPU centers for sorting, frees the source textures, then promotes any nodes that were waiting for it.
|
|
387
|
+
* Concurrent or repeat requests for the same file are ignored. If the file is cancelled mid-flight
|
|
388
|
+
* (because every node that wanted it retargeted), the decode bails cooperatively at the next checkpoint.
|
|
389
|
+
* @param fileId file index to decode
|
|
390
|
+
*/
|
|
391
|
+
private _decodeFileAsync;
|
|
392
|
+
/**
|
|
393
|
+
* Acquires the decode gate (a simple async mutex). Resolves once any prior holder releases, returning a
|
|
394
|
+
* release function the caller must invoke in a `finally`.
|
|
395
|
+
* @returns the release function
|
|
396
|
+
*/
|
|
397
|
+
private _acquireDecodeGateAsync;
|
|
398
|
+
/**
|
|
399
|
+
* Defragments the work buffer to make room for a file that did not fit, then allocates its slot. Runs the
|
|
400
|
+
* compaction + GPU relayout atomically inside a single `onBeforeRender` so no inconsistent CPU/GPU layout
|
|
401
|
+
* is ever rendered. Returns the new slot offset, or null if even compaction cannot free enough contiguous
|
|
402
|
+
* space (the caller refuses the upgrade).
|
|
403
|
+
* @param fileId file to allocate after compaction
|
|
404
|
+
* @param count splats the file needs
|
|
405
|
+
* @returns the allocated offset, or null
|
|
406
|
+
*/
|
|
407
|
+
private _relayoutAndAllocateAsync;
|
|
408
|
+
/**
|
|
409
|
+
* Compacts the resident set and relocates the corresponding GPU textures and CPU positions to the new
|
|
410
|
+
* layout. Must run at a frame-safe point with the work buffer's relayout shader ready.
|
|
411
|
+
*/
|
|
412
|
+
private _performRelayout;
|
|
413
|
+
/**
|
|
414
|
+
* Drops a file evicted by the residency controller from the decoded set so it will be re-decoded on demand.
|
|
415
|
+
* The file had no remaining references, so no node was rendering or downloading it.
|
|
416
|
+
* @param fileId evicted file index
|
|
417
|
+
*/
|
|
418
|
+
private _onFileEvicted;
|
|
419
|
+
/**
|
|
420
|
+
* Snaps a desired LOD level to the nearest level the node provides, while never selecting a level finer
|
|
421
|
+
* than {@link maxDetailLod} (i.e. with an index below the cap). Ties prefer the finer allowed level. If
|
|
422
|
+
* the node has no level at or coarser than the cap, its coarsest available level is used.
|
|
423
|
+
* @param node leaf node
|
|
424
|
+
* @param desired desired LOD level
|
|
425
|
+
* @returns the chosen available level
|
|
426
|
+
*/
|
|
427
|
+
private _cappedLevelForNode;
|
|
428
|
+
/**
|
|
429
|
+
* Computes each node's {@link ISOGLODNode.targetLevel}: the distance-based optimal level snapped to an
|
|
430
|
+
* available level, capped so no node renders finer (more detailed) than {@link maxDetailLod}.
|
|
431
|
+
*/
|
|
432
|
+
private _computeTargetLevels;
|
|
433
|
+
/**
|
|
434
|
+
* Applies each node's {@link ISOGLODNode.targetLevel}: switches a node to its target level when that
|
|
435
|
+
* level's file is already decoded, otherwise records a pending download request for the file and leaves
|
|
436
|
+
* the node on its current LOD (so nothing ever disappears). Nodes within their post-switch cooldown are
|
|
437
|
+
* left untouched to damp oscillation (and keep their existing pending request).
|
|
438
|
+
*
|
|
439
|
+
* Each node tracks the single file it currently needs but lacks ({@link ISOGLODNode.pendingFile}). When a
|
|
440
|
+
* node's target changes before that file finished downloading, the old file's reference is released; if no
|
|
441
|
+
* other node still needs it, its queued/in-flight download is cancelled (see {@link _releaseFileRef}).
|
|
442
|
+
* @returns true when at least one node changed LOD (callers should refresh the active ranges)
|
|
443
|
+
*/
|
|
444
|
+
private _applyDesiredLods;
|
|
445
|
+
/**
|
|
446
|
+
* Moves a node's resident reference from its previous active file to the one it now renders, so the file
|
|
447
|
+
* count that keeps a block in the work buffer stays accurate (and cancels any pending eviction of the new
|
|
448
|
+
* file). The new file is already decoded.
|
|
449
|
+
* @param node leaf node switching its rendered file
|
|
450
|
+
* @param file the file the node now renders from
|
|
451
|
+
*/
|
|
452
|
+
private _switchActiveFile;
|
|
453
|
+
/**
|
|
454
|
+
* Adds a reference to a file (active render or pending download), cancelling any scheduled eviction.
|
|
455
|
+
* @param fileId file index
|
|
456
|
+
*/
|
|
457
|
+
private _acquireFileRef;
|
|
458
|
+
/**
|
|
459
|
+
* Records that a node needs a not-yet-decoded file, bumping its reference count and queueing the decode.
|
|
460
|
+
* @param fileId file index the node now targets
|
|
461
|
+
*/
|
|
462
|
+
private _acquirePendingFile;
|
|
463
|
+
/**
|
|
464
|
+
* Releases a node's reference to a file. When the last reference is dropped: a decoded file is scheduled
|
|
465
|
+
* for eviction (when streaming under a budget), and a still-downloading file has its queued decode dropped
|
|
466
|
+
* and any in-flight download cancelled.
|
|
467
|
+
* @param fileId file index the node no longer references
|
|
468
|
+
*/
|
|
469
|
+
private _releaseFileRef;
|
|
470
|
+
/**
|
|
471
|
+
* Per-frame LOD streaming loop. Ticks cooldowns and pumps the decode queue every frame, and runs the
|
|
472
|
+
* cheap per-node frustum test every frame so the off-screen LOD bias tracks camera rotation. The LOD
|
|
473
|
+
* re-evaluation is throttled to at most every {@link _lodUpdateInterval} frames once the camera has
|
|
474
|
+
* translated far enough, but also runs immediately whenever a node enters/leaves the frustum (so its
|
|
475
|
+
* detail upgrades/downgrades promptly) or a cap change forces it. Active ranges rebuild on any LOD change.
|
|
476
|
+
*/
|
|
477
|
+
private _onLodFrame;
|
|
478
|
+
/**
|
|
479
|
+
* Updates each leaf node's {@link ISOGLODNode.inFrustum} flag from a per-node frustum test against the
|
|
480
|
+
* active camera. When {@link frustumCulling} is disabled (or there is no camera) every node is marked
|
|
481
|
+
* in-frustum. Bounds are static (from the LOD tree), so flags are valid for all nodes regardless of
|
|
482
|
+
* decode state. Returns true when any node's in-frustum state changed (so the LOD bias must be re-applied).
|
|
483
|
+
* @returns whether any node's in-frustum state changed
|
|
484
|
+
*/
|
|
485
|
+
private _updateNodeFrustum;
|
|
486
|
+
/**
|
|
487
|
+
* Reads the splat count from SOG metadata.
|
|
488
|
+
* @param data SOG metadata
|
|
489
|
+
* @returns the splat count
|
|
490
|
+
*/
|
|
491
|
+
private static _GetSplatCount;
|
|
492
|
+
/**
|
|
493
|
+
* Disposes all GPU source textures of a SOG pack (they are only needed for the one decode pass).
|
|
494
|
+
* @param pack the SOG texture pack
|
|
495
|
+
*/
|
|
496
|
+
private static _DisposePack;
|
|
497
|
+
/**
|
|
498
|
+
* Expands the running splat-center bounds with a newly decoded file's centers and updates the
|
|
499
|
+
* mesh bounding info so the GS is correctly frustum-culled and pickable.
|
|
500
|
+
* @param positions stride-4 splat centers for the new file
|
|
501
|
+
* @param count number of splats
|
|
502
|
+
*/
|
|
503
|
+
private _updateBounds;
|
|
504
|
+
/**
|
|
505
|
+
* Rebuilds the active interval set from the environment plus each node's currently-selected LOD entry,
|
|
506
|
+
* coalesces adjacent ranges, and pushes the result to the sort worker.
|
|
507
|
+
*/
|
|
508
|
+
private _refreshActiveRanges;
|
|
509
|
+
/**
|
|
510
|
+
* Sorts and merges adjacent/overlapping ranges to keep the interval list compact.
|
|
511
|
+
* @param ranges raw ranges
|
|
512
|
+
* @returns coalesced ranges
|
|
513
|
+
*/
|
|
514
|
+
private static _CoalesceRanges;
|
|
515
|
+
/**
|
|
516
|
+
* Unzips a `.sog` bundle into a name -> bytes map, loading fflate on demand.
|
|
517
|
+
* @param data zipped bytes
|
|
518
|
+
* @returns map of entry name to bytes
|
|
519
|
+
*/
|
|
520
|
+
private _unzipAsync;
|
|
521
|
+
}
|
|
522
|
+
export {};
|