npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bitruvius/turbo-spz

v0.3.1

Published

TurboSPZ: fast SPZ Gaussian-splat decoder (reads SPZ v1 to v4) for the browser, pure-Rust wasm

Readme

@bitruvius/turbo-spz

SPZ Gaussian splats, decoded in the browser faster than libspz.

SPZ is the open compression format Niantic published for 3D Gaussian splats. TurboSPZ is an independent pure-Rust decoder for it, compiled to WebAssembly with SIMD128. It reads every SPZ version libspz reads: v1, v2, v3 and v4, with the legacy gzip framing detected from the magic bytes rather than configured by you.

Turbocharged by Bitruvius TurboSPZ.

Faster than libspz in the browser

Browser decode throughput, turbospz-wasm against Niantic libspz, both compiled to WASM SIMD128, decoding the same file per version.

| SPZ version | Format | turbospz-wasm | libspz | Speedup | |---|---|---|---|---| | v2 | gzip (legacy) | 1078 MiB/s | 595 MiB/s | 1.81× faster | | v3 | gzip (legacy) | 1007 MiB/s | 568 MiB/s | 1.77× faster | | v4 | zstd (current) | 1078 MiB/s | 847 MiB/s | 1.27× faster |

SH degree 3, scene-averaged over hornedlizard (786K splats) and racoonfamily (933K splats). Higher is faster.

One codebase, one answer. AVX2, NEON, WASM SIMD128 and a scalar fallback all produce byte-identical output. This package ships the WASM SIMD128 path, so a capture decoded in a phone browser matches the same file decoded by the native TurboSPZ tools on a workstation.

Memory-safe by construction. Pure Rust, zero unsafe in the consumer libraries, and no emscripten anywhere in the build.

Use it

import { SpzDecoder } from '@bitruvius/turbo-spz';

const bytes = new Uint8Array(await (await fetch('scene.spz')).arrayBuffer());
const cloud = await new SpzDecoder().decode(bytes);
// cloud.numPoints, cloud.shDegree, then flat Float32Arrays:
// positions (3N), scales (3N), rotations (4N), alphas (N), colors (3N), sh

Reuse one decoder across many files. The wasm is a lazily initialized singleton, so only the first decode on the page pays the init cost.

The arrays arrive as the container stores them, not as your shader wants them. Three conversions stand between decode and a correct render:

scale = Math.exp(logScale);              // scales ship as logs
color = 0.5 + 0.28209479177387814 * dc;  // SH degree-0 DC to straight colour
alpha = 1 / (1 + Math.exp(-a));          // alphas are opacity logits

Opacity is the one that bites. Get it wrong and the scene renders uniformly near-opaque or near-invisible, with no error to tell you why.

Splat tilesets

SpzGltfSplatDecoder and WorkerSpzGltfSplatDecoder decode whole 3D Tiles Gaussian-splat tiles (KHR_gaussian_splatting), which is how Esri and Cesium splat tilesets stream. The worker variant fans tiles out to a pool so the entropy decode never blocks your render thread. You rarely wire it up yourself: a splat layer in @bitruvius/sdk-maplibre uses it by default.

import { Tiles3DSplatLayer } from '@bitruvius/sdk-maplibre';

map.addLayer(new Tiles3DSplatLayer({ id: 'splats', url: tilesetUrl }));

SpzContainerDecoder adapts a standalone .spz file to the SDK's streaming decoder contract, so a raw capture renders through the same pipeline as any other Bitruvius container.

Install

npm i @bitruvius/turbo-spz

A self-contained ESM bundle is published on the Bitruvius CDN if you would rather skip the bundler entirely. In production, pin an exact version, add integrity= from the release manifest, and allow script-src 'wasm-unsafe-eval' in your CSP.

This package decodes. It does not encode. There is no encoder in the package and none inside the .wasm. The decoder is free: anyone who needs to read SPZ data can pull it and ship it inside their application, under LICENSE. The TurboSPZ encoder is licensed separately: see bitruvius.com/turbo-spz for its benchmarks and licensing terms.

Learn more

Trademarks

Niantic and SPZ are trademarks of Niantic, Inc. Esri and ArcGIS are trademarks of Environmental Systems Research Institute, Inc. Cesium and 3D Tiles are trademarks of Cesium GS, Inc. Khronos and glTF are trademarks of The Khronos Group Inc. MapLibre is a trademark of the MapLibre organization. All other marks are the property of their respective owners.

These names are used solely to describe the data formats this software interoperates with. Bitruvius is not affiliated with, sponsored by, or endorsed by any of them, and no such relationship is implied.

TurboSPZ is an independent implementation of the openly published SPZ format, developed by Bitruvius and verified against Niantic's libspz reference, which Niantic releases under the MIT license. It is neither produced nor endorsed by Niantic, and compatibility claims describe interoperability with the format as verified by our test suites, not any form of certification.

License

Proprietary. The full terms ship as LICENSE inside this package, and are readable before installing at cdn.bitruvius.com/legal/sdk-license-v1.txt.

© Bitruvius, Inc.