World Labs has released Spark 2.4.0, which lets its three.js gaussian splatting renderer read SPZ version 4 files.
Niantic Spatial released SPZ 4 in May, replacing the single GZip stream of earlier versions with a plaintext NGSP header and separate ZSTD streams per attribute class. Spark's Rust SPZ decoder handled only versions 1 through 3 until now. Contributor mrxz built the v4 read path from an earlier pull request by udwinj, who is credited as co-author. Decompression uses the ruzstd crate, which builds for WASM with Spark's existing Rust toolchain, and starts once every compressed stream has been buffered. Write support is left to a future pull request.
Spark 2.4.0 rejects SPZ files carrying spherical harmonics above degree 3, which v4 permits, and skips v4 extension data with a warning that the unpacked splats may be incorrect.
Spark v2.3.0 fixed on-demand rendering for paged LoD three weeks ago, but PagedSplats still fetched its own data from a rootUrl or in-memory fileBytes. Spark 2.4.0 moves that logic behind a PagedSplatsFetcher interface with three methods, fetchRange, fetchChunkFile and fetchChunkById. A new fetchSource option accepts a custom implementation, such as one that decrypts chunks as they arrive, and then requires an explicit fileType. The rootUrl and fileBytes options work unchanged.
RAD deflate compression moves from miniz_oxide to the flate2 crate with the zlib-rs backend, and SPZ gzip follows, removing miniz_oxide as a dependency. In the pull request author's basic tests, compression time fell about 50%, output shrank 2 to 5%, and decoding ran about 20% faster.
Spark 2.4.0 also stops sorting a stale splat mapping again when a new LoD mapping arrives mid sort. On a rotating 10M splat scene with lodSplatCount at 2.5M, a trace in the pull request puts the median time from LoD result to first drawn frame at 105 ms, down from 151 ms.
In WebXR, the LoD pixel limit now derives from the camera projection matrix, and splat size and antialiasing blur, previously drawn at half width because they were sized to the whole two eye render target, are now sized to each eye's own viewport. Other fixes restore dropped degree 3 spherical harmonics, stop unwanted coefficient clamping, correct long thin splats drawn off axis, replace workers that crash, and stop retrying a failed LoD tree on every update.
Spark 2.4.0 is available now on npm under the MIT license.



