@kiri-innov/threedgs
v0.4.0
Published
Three.js Gaussian Splatting runtime
Readme
@kiri-innov/threedgs
Home Page: https://kiri-innovation.github.io/threedgs/
A Three.js runtime for displaying 3D Gaussian Splatting models in the browser.
Installation
npm install @kiri-innov/threedgs three
npm install --save-dev @types/threethree is a peer dependency and must be provided by the application.
Quick start
import { CompressedPly, SplatMesh } from "@kiri-innov/threedgs";
const data = await CompressedPly.load("/models/example.ply", (progress) => {
console.log("loading", progress);
});
const splatMesh = SplatMesh.create(data);
scene.add(splatMesh);Remove the mesh and release its resources when it is no longer needed:
scene.remove(splatMesh);
splatMesh.dispose();Supported formats
- Compressed PLY via
CompressedPly - Standard 3DGS PLY via
Ply - SOG v2 via
Sog
import { Ply, Sog, SplatMesh } from "@kiri-innov/threedgs";
const plyMesh = SplatMesh.create(await Ply.load("/models/example.ply"));
const sog = await Sog.load("/models/example.sog");
const sogMesh = SplatMesh.create(sog);When a Sog instance is no longer needed, dispose its meshes before disposing the data:
sogMesh.dispose();
sog.dispose();Sorter selection
The runtime prefers the single-thread SIMD sorter. It falls back to the single-thread scalar sorter when Wasm SIMD is unavailable or SIMD initialization fails.
The Wasm Threads sorter is currently disabled and cross-origin isolation is not required.
The four-thread implementation remains available for explicit benchmarking, but the production Worker does not import or select it automatically.
