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

@leverege/tpi-viz

v0.2.6

Published

3D scene viewer for TPI manufacturing data — renders blade geometry, PTZ cameras, defects, ply layers, and flows. Exports mountViewer()/destroy() for embedding (e.g. an Imaginarium React route); also runs standalone.

Readme

@leverege/tpi-viz

3D scene viewer for TPI manufacturing data. Renders blade geometry, PTZ cameras, defects, ply layers, and flows from JSON scene files written by tpi-scripts-py (Python).

This is a sibling package inside the tpi-scripts-py repo. The Python side writes scene data + image assets into work_dir/scenes/<name>/. This package's dev server mounts that directory at /scenes/* so the viewer can fetch any scene by name.

Dev loop (the normal flow)

cd packages/tpi-scripts-py/tpi-viz
yarn install
yarn dev          # vite dev server on http://localhost:5173

Leave that running. In another terminal generate a scene:

cd packages/tpi-scripts-py
python -m scripts.visualize.defects <SA_JOB_ID>
python -m scripts.visualize.plylayers <SA_JOB_ID>
python -m scripts.visualize.ptz_camera <CAMERA_ID>
python -m scripts.flow.viewer --shell <SHELL_ID>

Each writes work_dir/scenes/<name>/scene.json (plus sibling image dirs when relevant) and prints the URL to open:

http://localhost:5173/?scene=<name>

Refresh the page after re-running the script to see new data — no Python re-render, no rebuild.

Hitting http://localhost:5173/ with no ?scene= shows a list of available scenes scraped from the dev server's directory listing.

How it works

  • vite.config.js mounts <repo>/work_dir/scenes/ at /scenes/* via a sirv middleware.
  • src/main.js reads ?scene=<name> from the URL, sets <base href="/scenes/<name>/"> so relative paths in scene.json (images/foo.jpg, overlays/bar.png) resolve under the scene's dir, then fetches /scenes/<name>/scene.json and renders.
  • The viewer is a single-page app built with Three.js + @leverege/ptz-camera.

Production build

yarn build        # writes dist/index.html (single self-contained file)

Useful for shipping the viewer somewhere. The dev-server scene loading still works against the built artifact if it's hosted with /scenes/* mapped the same way.