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

@gausssimplify/wasm

v0.1.3

Published

GaussSimplify WASM library for 3D Gaussian Splat simplification

Readme

@gausssimplify/wasm

WebAssembly version of GaussSimplify, providing TypeScript wrapper library for 3D Gaussian Splat simplification in browsers and Node.js.

Features

  • Read/write multiple Gaussian splatting formats: PLY, Compressed PLY, Splat, KSplat, SPZ, SOG
  • High-performance simplification via kNN + moment matching
  • Model info retrieval for display
  • TypeScript type support
  • Browser and Node.js compatible

Installation

npm install @gausssimplify/wasm

Usage

Browser

import { createGaussSimplify } from '@gausssimplify/wasm';

async function simplifyFile(file: File) {
    // Initialize
    const api = await createGaussSimplify();

    // Read file
    const fileData = await file.arrayBuffer();
    const { data: ir } = await api.read(new Uint8Array(fileData), 'ply');
    console.log(`Loaded ${ir.numPoints} points`);

    // Get model info for display
    const { data: info } = await api.getModelInfo(ir);
    console.log(`Bounds: ${JSON.stringify(info.bounds)}`);

    // Simplify to 10%
    const { data: simplified } = await api.simplify(ir, { ratio: 0.1 });
    console.log(`Simplified to ${simplified.numPoints} points`);

    // Export as .splat
    const { data: output } = await api.write(simplified, 'splat');

    // Download
    const blob = new Blob([output], { type: 'application/octet-stream' });
    const url = URL.createObjectURL(blob);
    const a = document.createElement('a');
    a.href = url;
    a.download = 'output.splat';
    a.click();
    URL.revokeObjectURL(url);
}

Node.js

import { createGaussSimplify } from '@gausssimplify/wasm';
import fs from 'fs';

async function simplify() {
    const api = await createGaussSimplify();

    // Read file
    const inputData = fs.readFileSync('input.ply');
    const { data: ir } = await api.read(inputData, 'ply');
    console.log(`Loaded ${ir.numPoints} points`);

    // Simplify
    const { data: simplified } = await api.simplify(ir, {
        ratio: 0.1,
        target_sh_degree: 1,
    });

    // Write output
    const { data: output } = await api.write(simplified, 'splat');
    fs.writeFileSync('output.splat', output);
}

simplify().catch(console.error);

API

createGaussSimplify(moduleFactory?)

Create and initialize a GaussSimplify WASM instance (singleton).

destroyGaussSimplify()

Dispose the WASM instance and free memory.

api.read(data, format, options?)Promise<ReadResult>

Read file bytes into GaussianCloudIR.

| Param | Type | Description | |-------|------|-------------| | data | ArrayBuffer \| Uint8Array | File content | | format | string | 'ply', 'splat', 'ksplat', 'spz', 'sog' | | options.strict | boolean | Strict validation (default: false) |

api.simplify(ir, options?)Promise<SimplifyResult>

Simplify a GaussianCloudIR.

| Param | Type | Default | Description | |-------|------|---------|-------------| | ratio | number | 0.1 | Target fraction of points to keep | | knn_k | number | 16 | kNN neighbors for merge graph | | merge_cap | number | 0.5 | Max fraction merged per pass | | opacity_prune_threshold | number | 0.1 | Remove gaussians below this opacity | | target_sh_degree | number | -1 | SH degree (-1 = keep original) | | sor_nb_neighbors | number | 0 | SOR: kNN neighbors, 0 = disabled | | sor_std_ratio | number | 2.0 | SOR: std multiplier threshold | | keep_weight | number | 3.0 | Region cost multiplier (1.0 = no bias, >1 protects regions) | | keep_regions | AABBRegion[] | [] | Regions to preserve |

AABBRegion

interface AABBRegion {
    min_x: number; min_y: number; min_z: number;
    max_x: number; max_y: number; max_z: number;
}

api.write(ir, format, options?)Promise<WriteResult>

Write GaussianCloudIR to file bytes.

| Param | Type | Description | |-------|------|-------------| | ir | GaussianCloudIR | Gaussian cloud data | | format | string | Output format | | options.strict | boolean | Strict mode (default: false) |

api.getModelInfo(ir)Promise<ModelInfoResult>

Get bounding box, point stats, and size breakdown from an IR.

api.getSupportedFormats()string[]

Returns: ['ply', 'compressed.ply', 'splat', 'ksplat', 'spz', 'sog']

api.getVersion()string

Library version string.

Supported Formats

  • ply — Standard PLY format
  • compressed.ply — Compressed PLY format
  • splat — Splat format
  • ksplat — KSplat format
  • spz — SPZ compressed format
  • sog — SOG format

Powered by GaussForge.

Development

Build from Source

Prerequisites: Emscripten SDK, Node.js 18+

cd wasm
npm install
npm run build       # Build WASM + TypeScript
npm run build:wasm  # Build WASM only
npm run build:ts    # Build TypeScript only

Build Output

  • gauss_simplify.node.js — Node.js WASM module
  • gauss_simplify.web.js — Browser/Worker WASM module
  • dist/index.node.js — Node.js entry with types
  • dist/index.web.js — Browser entry with types

Error Handling

All methods may throw errors. Use try-catch for robust handling:

try {
    const { data: simplified } = await api.simplify(ir, { ratio: 0.1 });
} catch (error) {
    console.error('Simplify failed:', error.message);
}

Requirements

  • Emscripten SDK (for building WASM)
  • Node.js 18+ (for development)
  • TypeScript 5+ (for development)