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

@manycore/aholo-splat-transform

v2.7.0

Published

Transform & filter Gaussian splats file

Readme

splat-transform

Gaussian splat conversion, LOD generation, and voxel collision data for Aholo Viewer.

The processing engine is a standalone C++20 executable. The npm package translates the existing CLI commands into JSON pipelines and starts that executable. Vulkan compute uses Vulkan-Hpp RAII and VMA.

Requirements

  • Node.js >= 22.22.1 for the npm CLI and JavaScript wrapper. The native executable does not require Node.
  • Windows 22H2 or later: x64 or ARM64.
  • Linux: x64 or ARM64, Ubuntu 22.04 / glibc 2.35 or later. The C++ runtime is linked statically.
  • macOS 13 or later: Apple silicon ARM64.
  • GPU operations require a user-installed Vulkan 1.2+ loader and a compatible device with timeline semaphores. macOS additionally requires a MoltenVK installation supporting Vulkan 1.2 or newer. The packages do not include a Vulkan runtime or GPU drivers.

CPU operations start without Vulkan. SOG output with SH coefficients requires GPU clustering; SH0 SOG encoding runs on CPU. Voxel tasks accept backend: "gpu" | "cpu", defaulting to "gpu". Backend resolution initializes the selected Vulkan device; if initialization fails, it logs a warning and selects CPU for the complete task, including cluster filtering, voxel generation, and navigation. Explicit CPU processing does not initialize Vulkan. The selected backend stays fixed: later compute errors propagate and empty GPU results are not retried on CPU. CPU jobs reuse the process-wide pool; the former cpuWorkerCount option is not used. CPU and GPU results can differ near occupancy thresholds.

Automatic SOG SH palette search uses e-means when its resident workspace fits the available GPU memory budget. Point features, weights, and labels are split into chunks that respect device buffer and workgroup limits. If the workspace cannot fit or be allocated, fixed-size Lloyd clustering caches as many points as fit and streams the rest through reusable slots. Memory scheduling is automatic and preserves the existing pipeline JSON parameters; staging and driver memory are additional. See the native build instructions for budget details.

LOD, clustering updates, bundle writing, SOG texture encoding, and gzip jobs reuse one CPU pool created on first use. Set optional top-level cpuWorkers in the pipeline to choose its worker count before tasks start. It must be a positive integer and is capped at max(1, std::thread::hardware_concurrency() - 1), using logical hardware threads. Omitting it preserves the existing automatic policy: half the next power of two of hardware concurrency, clamped to 1–16. SOG generates archive members in parallel and assembles the final ZIP with libzip. zstd compression contexts share a separate pool supplied by zstd, initialized with the same worker count. Large gzip and zstd outputs remain standard single-member/single-frame streams.

Install and run

npm install @manycore/aholo-splat-transform -g
splat-transform --help
splat-transform create input.ply output.spz
splat-transform lod:loading --ratio 0.1 input.ply loading.ply
splat-transform lod:flex --score scores.bin --ratio 0.3 input.ply selected.esz
splat-transform lod:auto --ratio 0.3 input.ply output.ply
splat-transform lod:auto-chunk --type esz input.ply output-directory
splat-transform split --type esz input.ply split-directory
splat-transform list:gpu
splat-transform pipeline.json

GPU indices start at zero and increase across all graphics APIs in enumeration order. Currently only Vulkan is implemented. Run list:gpu again when migrating a saved configuration: indices from the former Dawn backend can include D3D12 adapters and are not interchangeable. Indices are not persistent hardware identifiers.

Use ESZ for chunk LOD output. lod:auto, lod:auto-chunk, and split accept --split-normal None|X|Y|Z or 0|1|2|3; a reference axis keeps blocks unsplit along that axis. lod:flex --score reads little-endian float32 scores in input-point order. Use individual command help, such as splat-transform lod:flex --help, or the complete task and CLI reference (中文).

Both the npm CLI and the native executable accept a pipeline file or a single dash for JSON on stdin. The npm CLI forwards the file path or stdin directly to the native process, which reads and validates the JSON. V2 files resolve relative paths from the directory containing the config (pipelineDir). Set the top-level "base": "workDir" to use the process working directory. On stdin, including JavaScript run(), both names refer to the child working directory. Referenced SOG/LCC/LCC2 assets resolve relative to their metadata files.

{
    "version": 2,
    "tasks": [
        { "id": "read", "type": "Read", "config": { "inputs": ["input.ply"], "output": "data" } },
        {
            "id": "write",
            "type": "Write",
            "config": { "input": "data", "output": "${workDir}/output.spz" },
            "release": ["data"]
        }
    ]
}

Supported tasks are Read, Write, Modify, Filter, Select, ReplaceAppend, ExtractLodLevel, SkeletonLod, FlexLod, AutoLod, AutoChunkLod, Split, and Voxel. JavaScript and TypeScript use Split; the native C++ pipeline loader also accepts the legacy name SplitSplatTask. GPU enumeration uses the native executable's standalone --list-gpu command through enumerateAdapters() and does not enter the pipeline. Task logs keep the 1.x prefixes, counts, LOD summaries, file progress, and timing labels. Information, progress, and timing logs go to stdout; warnings and errors go to stderr.

The ${pipelineDir} and ${workDir} placeholders are supported only in V2. Use them in task filesystem paths, including output paths, modify patches, selection indices, FlexLod scores, and original-index output. In-memory resource names match literally.

Migrate a V1 pipeline file

Set "version": 2 and "base": "workDir" to preserve paths that depend on the launch directory. To make the file portable, omit base and express relative paths from the config directory. For example, when migrating jobs/pipeline.json launched from the project root, data/input.ply becomes ../data/input.ply. V1 files default to workDir. An unrecognized integer version produces one warning on stderr and uses V2. With stdin or run(), changing the version alone preserves the default directory.

Task execution

Tasks run sequentially. Top-level gpu defaults to device index 0. Task input and processing output fields are in-memory resource keys; Write.output and Voxel.output are filesystem destinations. Task-level release: string[] removes resource keys after the task succeeds, so release shared resources only after their final consumer. Failures stop subsequent tasks without rolling back completed output.

Writing a LOD or split bundle recursively replaces an existing output directory. Use a dedicated destination. Single-file output overwrites matching files. Voxel output overwrites matching files without clearing its directory; resolve the current binary from voxel-meta.json.files.

Inputs: PLY, compressed PLY, SPLAT, KSPLAT, SPZ/USPZ, SOG and unpacked SOG metadata, ESZ, LCC/LCC2, and their supported ZIP resource layouts. Outputs: PLY, SPLAT, SPZ v3/v4, USPZ, SOG, ESZ low/high precision, LOD directories, and voxel raw/compact binaries with optional gzip/zstd compression and collision GLB.

Output and LOD options

  • Write.version selects SOG v2 (default) or v3, or SPZ v3 (default) or v4. Unsupported output versions fall back to the target format's default. USPZ always writes uncompressed v3. PLY, SOG v3, and SPZ v4 support SH4. SOG v2, SPZ v3, USPZ and ESZ retain up to SH3. SPLAT stores SH0. Each output uses its own format limit.
  • Write.shBits takes three or four integers for SH degrees 1 through 4. A three-entry configuration uses 4 bits for the fourth degree. SPZ, USPZ and low-precision ESZ clamp each value to 1–8 bits. The default is [5, 4, 4, 4]. High-precision ESZ always packs each SH coefficient at 11/10/11 bits for RGB.
  • Write.compressLevel applies only to SPZ. Starting with 2.1.2, it defaults to 6 for both v3 gzip and v4 zstd. Version 2.1.1 defaults to 6 for v3 and 7 for v4. Set compressLevel: 7 explicitly to retain the SPZ v4 level used by 2.1.1.
  • For SOG, omit Write.paletteSize or set it to 0 to size the SH palette with visibility-weighted e-means. Write.colorError is the target RMS colour error in 8-bit levels. It defaults to 5 when omitted or when its numeric value is nonpositive or nonfinite. A positive paletteSize selects fixed-size Lloyd clustering and takes precedence over colorError. The writer clamps the count to the input size and the format limit (65536 for v2, 262144 for v3).
  • SOG v3 stores exp-map rotations in the RGB channels of a separate quats.webp texture and uses square-root opacity encoding up to 1.5625. SOG v2 clamps opacity to 1. Optional blind data, extras, and comments are not retained.
  • Write.highPrecision defaults to false for ESZ. enableMortonSort defaults to true, subject to bundle interval ordering. Concurrent bundle writes are limited to the shared CPU pool's worker count, configured through top-level cpuWorkers.
  • AutoChunkLod.levels defaults to precision values 1, 0.5, 0.25, 0.05, 0.01, with scale boosts 1, 1, 1, 1.01, 1.02. The last two levels also set merged: true and permanent: true. A custom array replaces these defaults; omitted merged and permanent fields are false.
  • Voxel supports compression: "none" | "gzip" | "zstd", nodeEncoding: "raw" | "compact", and collisionMesh: false | true | "smooth" | "faces". Defaults are "none", "raw", and false; true selects smooth mesh generation. Cluster filtering, automatic dense bounds, floor fill, and navigation options are documented in the task reference.
  • Voxel capacity limits can increase the effective voxel edge length. Use output metadata values, and decompress then decode compact nodes before supplying runtime arrays. See the voxel file format.

Pipeline data tasks

  • Modify accepts optional rgba and a nonnegative maxShDegree capped at 4. It reads both options before applying patches, applies RGBA to the remaining points, then truncates SH. A four-entry [r, g, b, a] array or an object with optional r, g, b, and a channels sets internal float RGBA without clamping or color-space conversion. Other shapes are ignored. Within a supported shape, only finite nonnegative channel values are applied. Omitted channels and unknown object fields are ignored. A channel that cannot be read as a number fails the task. Modify mutates its input and a different output key aliases the result.
  • Select accepts input, output, and exactly one of indices or indicesPath. Files may contain a JSON array, { "indices": [...] }, little-endian uint32 values, or zstd-compressed uint32 values with a .zst suffix. It copies one point per index in input order, including repeated indices, with complete attributes and SH. Each uint32 index must reference a source point. Empty selection is valid.
  • ReplaceAppend accepts input, patch, output, and required sourceIndices (which may be empty). The patch prefix replaces source points in the supplied order. For repeated indices, the last replacement wins. Remaining patch points are appended. Both inputs must have matching SH degrees. The output has independent storage.
  • ExtractLodLevel accepts input, output, and required zero-based level. It copies tree[*].lods[level] intervals from an in-memory LOD bundle in metadata order, including repeated intervals. It caps the manifest’s shDegree at 4 and requires each referenced chunk to match that degree. The result has independent SH storage. It does not load a LOD directory from disk or regenerate LOD.

All three new tasks produce independent single-block splat resources. Write remains read-only: write low- and high-precision ESZ from the same bundle using two Write tasks in one pipeline, with highPrecision: false and true. Release the bundle only after its final consumer. Bundle preserve_order flags still override Morton sorting. For interaction data, extract the requested level before applying black RGBA and SH0 to the copy.

LOD output metadata includes optional voxels: string[] when the same pipeline successfully writes voxels from the same input or its derived models. Each entry points to voxel-meta.json relative to that LOD metadata directory. Associations survive simplification, LOD extraction, and resource release; repeated writes compute their own relative paths without changing the in-memory bundle. Voxel tasks may run before or after LOD writes. Unrelated inputs remain separate, duplicate output paths are removed, and the field is omitted when no associated voxel output exists.

JavaScript API

import { run, enumerateAdapters, ApiType } from '@manycore/aholo-splat-transform';

await run({ version: 2, tasks: [] });
const adapters = await enumerateAdapters();
const vulkan = adapters.filter(adapter => adapter.api === ApiType.Vulkan);

run accepts optional cwd and AbortSignal options. Nonzero child exits reject with PipelineError, which exposes exitCode and signal; process-start failures and cancellation can reject with a regular Error or AbortError. SIGINT and SIGTERM are forwarded to the child process. enumerateAdapters accepts the same options and returns DeviceInfo[] with global index, name, numeric api, raw numeric apiVersion, vendorId, deviceId, and uuid. ApiType.Vulkan = 0 matches the native enum. apiVersion is the device-supported version in that API's encoding; JavaScript callers decode it according to api. list:gpu displays the API name and decoded version. The former backend string is replaced by api; apiVersion retains its raw numeric encoding. Use resolveExecutable() to locate the platform executable, or set SPLAT_TRANSFORM_EXECUTABLE to an absolute local CMake build path. If no platform executable is installed, enable npm optional dependencies.

Version 2.0 of the npm package removed injectCustomTask, SplatData, other in-memory processing APIs, and deep module imports. Use the CLI or run() to execute V2 pipelines in the native process.

The package exports the runtime ApiType and FilterMode enums and DeviceInfo type, plus FilterConfig, ModifyConfig, SelectConfig, ReplaceAppendConfig, ExtractLodLevelConfig, and VoxelConfig for typed task construction, alongside PipelineConfig, PipelineTask, TaskType, and RunOptions. PipelineTask.config remains Record<string, unknown>; the manual lists complete task parameters and cancellation examples.

Native builds

See native build instructions for CMake presets, vcpkg, and platform requirements. Building the native program requires no Node or pnpm installation.

Compatibility notes

  • Format equivalence is checked after decompression/decoding; compression streams and ZIP metadata may differ between library versions.
  • Migrated arithmetic uses float; LOD covariance, sampling, and edge-cost calculations retain double precision. Float rounding can affect quantization boundaries, so compare decoded values with the format's numerical tolerances.
  • SOG clustering uses thread-local random engines seeded on first use. Successive exports can produce different clustering results.
  • Large gzip and zstd payloads use bounded automatic parallel compression. The resulting files use standard gzip and zstd streams; decompressed data is unchanged.
  • FlexLod now reads short score files correctly. The former JavaScript implementation could read unrelated bytes before a pooled Buffer's offset.
  • Unpacked SOG metadata resolves local textures relative to meta.json. The former CLI did not correctly load this documented input form.
  • Multi-section KSPLAT files append each section. The former reader overwrote earlier sections instead of advancing the output offset.

License

MIT License. Third-party notices are included in THIRD_PARTY_LICENSES.txt and in each native platform package.