@spatialpack/core
v0.1.0
Published
Standards-first glTF/GLB/USDZ engine — analyze, optimize (KTX2/meshopt/WebP/AVIF), recipe search, commerce-readiness scoring + autocorrect, USDZ validation, USDA/USDC, Gaussian splats. Pure TypeScript.
Maintainers
Readme
@spatialpack/core
The engine behind SpatialPack — a standards-first
glTF / GLB / USDZ toolkit, in pure TypeScript. It powers analyze, optimize
(KTX2 / meshopt / WebP / AVIF / Draco), recipe search, commerce-readiness
scoring + autocorrect, USDZ / USDC validation and USDA ↔ USDC round-trip,
visual-diff metrics, and Gaussian-splat ingest.
Most users want the CLI, not this package. Install
@spatialpack/cli(npm i -g @spatialpack/cli) for the command-line surface, or@spatialpack/sdkfor a friendly programmatic wrapper. Install@spatialpack/coredirectly only if you're building on the low-level engine.
Usage
import { analyzePath, optimizePath } from '@spatialpack/core';
const report = await analyzePath('model.glb'); // per-mesh/material/texture stats
const result = await optimizePath('model.glb', { preset: 'web-mobile' });The package ships fine-grained subpath exports — e.g. @spatialpack/core/analyze,
/optimize, /recipe-search, /visual-diff, /conformance, /io,
/splat-input — so consumers pull only what they need. See package.json
exports for the full list.
License
Functional Source License, Version 1.1, ALv2 Future License (FSL-1.1-ALv2).
You may read, run, and self-host the engine; you may not ship a competing
3D-optimization product on it. The license converts to Apache-2.0 two years
after each release. Full text in LICENSE.
The @spatialpack/cli, @spatialpack/sdk, and @spatialpack/mcp packages
that wrap this engine are MIT.
