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

@addozhang/dsh-3d-model-viewer

v0.4.2

Published

Interactive STL/3MF viewer plugin for the DeepSeek Harness Web GUI: sidebar document preview, live session drawer, CAD navigation, orthographic dimension labels, 3MF part colors.

Readme

DSH 3D Model Viewer

默认英文文档:README.md

DeepSeek Harness Web GUI 的本地交互式 STL / 3MF 预览插件。模型可直接在侧边栏文档预览中查看,无需外部工具;同时为活动会话提供实时预览抽屉。

3MF 文档预览

功能

  • 侧边栏原生文档预览:在「文件」面板点击 .stl / .3mf,右侧文档标签页像打开 Markdown / PDF / 图片一样打开 3D 视图(通过公开的 documentPreviews + sidebar.right.tab.document 扩展点接入)
  • 会话实时抽屉:当前会话引用了模型时,会话标题栏出现 3D 预览 (N) 按钮,打开带搜索列表的预览抽屉;文件在磁盘上变化后约 1.5 秒自动重新解析
  • CAD 式导航:左键拖动旋转(真轨迹球,无万向锁)、右键 / 中键 / Shift 拖动平移、滚轮缩放(透视与正交通用)、双击复位
  • 多盘切换:带 Bambu 盘表的 3MF 工程会出现「全部 | 盘 N…」工具行,逐盘渲染、自动居中、尺寸标签随盘切换
  • 视角预设:前/后/左/右/顶/底使用正交相机并显示包围盒三向尺寸标签(毫米);等轴测为经典透视。画布聚焦时快捷键 1-7 切视角、R 复位
  • 模型颜色:七个预置色板(含白色)+ 原生取色器;STL 单色渲染,3MF 的部件颜色(basematerials)按顶点多色显示
  • 打印检查(当前由 PRINT_INSIGHTS_ENABLED 开关关闭):打印机体积适配(默认 X2D)、封闭网格体积、耗材重量估算
  • 截图导出:一键保存当前视图为 PNG
  • 跟随系统主题:浅色/深色平面背景(prefers-color-scheme),附淡网格线

所有解析都在浏览器本地完成,模型文件不会离开本机(抽屉仅从本地插件端点拉取文件)。

安装

dsh plugin --profile web add @addozhang/dsh-3d-model-viewer

包自带 bundle patch(cordis.patch.yml),插件管理器会自动接入 profile,无需手改 cordis.patch.yml。

安装最新源码:dsh plugin --profile web add github:addozhang/dsh-3d-model-viewer

刷新 Web GUI;若客户端 roster 未更新,重启 dsh web 后再刷新。

开发

npm install
npm run build    # esbuild:src/ -> lib/client.js
npm test         # 单测 + 构建产物冒烟测试(node --test)
npm run test:e2e # 起私有 dsh web 实例 + Playwright 驱动真实 GUI(仅本机)

src/ 模块划分:core(React 注入与状态存储)、styles、parse(STL 二进制/ASCII、3MF zip + basematerials、网格体积)、viewer(WebGL 渲染器、预设、拾取数学)、ui(文档预览体、抽屉、打印检查面板)、app(注册)、entry-client。

e2e 脚本依赖本机 python3 + playwright + Chrome,从 ~/.dsh/.credentials.yaml 读取签名密钥为私有实例铸造会话 cookie。环境变量:E2E_WORKSPACE、E2E_WORKSPACE_DIR、E2E_SESSION_SUBSTR。

当前限制

  • 3MF 支持网格几何、build-item / component 变换(多盘工程按真实盘位渲染全部盘)与 basematerials 部件颜色;切片器私有元数据忽略
  • 单文件限制 250 MB / 500 万三角面;超过 40 万三角面的网格拾取只用包围盒(按键式拖动模式下影响甚微)
  • 这是几何预览器:不做切片,不做可制造性分析

许可

MIT