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

filens-step

v0.1.0-rc.1

Published

Browser-local STEP tessellation with a compact Rust WebAssembly core.

Readme

filens-step

Read STEP/STP geometry locally in a browser with a Rust WebAssembly core. The package has no runtime dependencies, CLI, Python, server or CAD installation. Parsing, units, assembly placement and tessellation run inside WASM. The TypeScript adapter supplies an isolated in-memory WASI host and typed mesh data.

Install the release candidate from the npm next tag:

npm install filens-step@next
import { readStep, createStepReader } from 'filens-step';

const mesh = await readStep(await file.arrayBuffer(), { tolerance: 0.1 });
// Non-indexed triangles, in millimetres; three Float32 coordinates per vertex.
console.log(mesh.positions, mesh.normals, mesh.triangleCount, mesh.warnings);

// Optional URL/bytes/precompiled-module override for a custom asset host or CSP.
const reader = createStepReader({ wasm: '/assets/filens-step.wasm' });
const another = await reader.read(await file.arrayBuffer(), { signal });

The default WASM URL resolves relative to the installed ESM module. Serve the WASM asset emitted by your bundler with the JavaScript. The module is fetched and compiled only on the first read, then reused. Every read creates a separate WASM instance and virtual filesystem. Failed fetches can be retried. The default tolerance is 0.1 mm; input is limited to 64 MiB. AbortSignal cancels asynchronous loading, but synchronous tessellation itself cannot be interrupted on the same JavaScript thread. Large files can be loaded in a caller-owned worker.

With Three.js, use the returned arrays directly:

geometry.setAttribute('position', new THREE.BufferAttribute(mesh.positions, 3));
geometry.setAttribute('normal', new THREE.BufferAttribute(mesh.normals, 3));
// No index buffer is needed.

This is an approximate preview, not a certified CAD geometry conversion. The tested 44 files with embedded solids all produce meshes without missing faces; 43 pass the recorded geometry screen. HEAD_BACK.stp retains a trimmed-sphere region/orientation disagreement with OCCT. Tightening tolerance is not a known fix for it. Source colors, names and the assembly tree are omitted. External assembly references need their part files; multi-file assembly loading is not implemented. Empty geometry and incomplete faces are reported as errors rather than silently accepted as a complete model.

The bundled WASM is 947,729 bytes raw, 334,212 bytes with gzip level 9, or 261,101 bytes (254.98 KiB) with Brotli 11. Those are WASM-only sizes, not the npm tarball or complete download. JavaScript, TypeScript declarations, provenance and dependency notices are also included. See the size and geometry evidence.

Mesh transport uses a compact binary Float32 payload, preserving the previous reader's exact vertex and normal values. On the tested as1-oc-214.stp assembly, browser reading falls from 278.9 to 224.2 ms with unchanged tessellation and tolerance; this excludes downloads, WASM compilation and rendering.

Build inputs, the pinned upstream commit and exact WASM hash are shipped in dist/filens-step-manifest.json; dependency license texts are in dist/filens-step-THIRD-PARTY-NOTICES.txt. FiLens first-party code is MIT. The patched truck core is Apache-2.0; see upstream PR #141. In the FiLens workspace, npm run build:step builds the browser package without a Rust toolchain; npm run build:step:wasm rebuilds the pinned Rust core.