libassimp
0.1.0

Install libassimp

Add the ESM package and load its single Wasm artifact.

Open Markdown
npm install libassimp

libassimp requires Node.js 22.14 or newer and is ESM-only. CommonJS callers use dynamic import().

Package entry

libassimp reads all 69 compiled extensions and writes all 15 canonical formats.

Format unions, metadata, and conversionEdges describe that complete catalog.

import { conversionEdges } from 'libassimp';

console.log(conversionEdges.some(({ from, to }) => from === 'glb' && to === 'stl'));

This import reads static JavaScript data and does not fetch or compile Wasm.

Loading

Vite and webpack 5 can emit the entry-relative glue and Wasm assets. To control the location or provide already-fetched bytes, create an instance:

import { createAssimp } from 'libassimp';

const response = await fetch('/assets/libassimp.wasm');
using assimp = await createAssimp({ wasmBinary: await response.arrayBuffer() });

console.log(assimp.formats.export.map(({ id }) => id));

CreateAssimpOptions remains wasmUrl, wasmBinary, and onLog. There is no async-mode selector: the artifact automatically uses JSPI when available or replay otherwise. The published binary subpath is libassimp/wasm.

Workers require no pthread bootstrap or cross-origin isolation. See the canonical compatibility matrix for host floors and feature routing.

On this page