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

@nativecad/viewer

v0.2.0

Published

Drop-in browser CAD viewer: the zero-dependency NativeCAD (formerly CADSolver) STEP/STL kernel bundled with a three.js viewer component. One import, no WASM, no server round-trips.

Readme

@nativecad/viewer

Renamed in 0.2.0 — this package was published as @cadsolver/viewer. NativeCAD (formerly CADSolver) is the same code under a new name; the repository URL is unchanged.

Drop-in browser CAD viewer: the zero-dependency CADSolver STEP/STL kernel bundled with a three.js viewer component. Parse, tessellate, and render CAD files entirely client-side — no WASM, no native binaries, no server round-trips.

The kernel is bundled in (~135 KB gzipped); the only peer dependency is three (>= 0.150), resolved by your bundler.

Install

npm install @nativecad/viewer three

Quickstart

import { createViewer } from '@nativecad/viewer';

const viewer = createViewer(document.getElementById('viewport'));

// from an <input type=file>
fileInput.addEventListener('change', async (e) => {
  const res = await viewer.loadFile(e.target.files[0]);   // .step/.stp/.stl
  console.log(res.stats);   // { vertices, triangles, faces, solids }
});

// or from STEP text you already have
viewer.loadStep(stepText);

createViewer sets up the scene, camera, lights, orbit controls, and resize handling; loadStep/loadStl/loadFile run the kernel and display the mesh with B-rep feature edges. Escape hatches (viewer.scene, .camera, .renderer, .controls, .kernel) expose the underlying three.js objects and the full kernel API (headless solves, the modeling API, STEP save).

Options

createViewer(el, {
  background: 0x1a1d21,   // scene background
  meshColor:  0x3498db,   // model color
  edgeColor:  0x0a0e12,   // feature-edge color
  showEdges:  true,       // draw B-rep feature edges
  antialias:  true,
  targetCount: null,      // approximate triangle budget
  heal: false,            // geometry healing during tessellation
});

Script-tag usage (no bundler)

The package also ships the classic IIFE kernel bundle at @nativecad/viewer/cad-bundle.js — one <script> tag exposing window.CADSolverBundle (solveStep, solveStl, saveStep, …). Pair it with your own three.js exactly as in the embedding guide.

License key

The free tier renders a small "Powered by CADSolver" watermark (plus a one-time console notice). A commercial license key removes it:

const viewer = createViewer(el, { licenseKey: 'CSLV1-…' });
// or later:
viewer.setLicenseKey('CSLV1-…');       // { valid, licensee, tier }
viewer.licenseStatus();                // { licensed, licensee, tier, … }

Validation is fully offline — no phone-home, and the kernel is fully functional either way (Indie-tier attribution is required by the license terms anyway; the watermark simply is that attribution).

License

Dual-licensed: free for evaluation, personal, academic, and other non-commercial use; any commercial use requires a paid license — see LICENSE and COMMERCIAL.md.