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

osd-pixi

v1.0.9

Published

## 功能简介 ### 1. 基本参数和数据格式(Props) | 变量名 | 功能 | 类型 | 说明 | 备注 | | --- | --- | --- | --- | --- | | iiifData | 渲染图片所需图片信息 | Object | 必填 | | | tileSourcesRenderMode | tileSources 渲染方式 | String('normal' or 'iiif') | | | | shapesData | 所有 shape 数据 | Object | |

Readme

Openseadragon+Pixijs

功能简介

1. 基本参数和数据格式(Props)

| 变量名 | 功能 | 类型 | 说明 | 备注 | | --- | --- | --- | --- | --- | | iiifData | 渲染图片所需图片信息 | Object | 必填 | | | tileSourcesRenderMode | tileSources 渲染方式 | String('normal' or 'iiif') | | | | shapesData | 所有 shape 数据 | Object | | | | remarkShapesData | 备注轮廓数据 | Object | | | | shapeColors | shape 颜色序列 | number[ ] | | | | mpp | 单位像素 | number | | | | imageWidth | 图片宽度 | number | | | | imageHeight | 图片高度 | number | | | | imagePathId | 图片地址 | number | | | | imageTileSize | 图片瓦片大小 | number | | | | imageMagnitude | 最大放大倍数 | number | | | | hasInteraction | 是否开启交互 | boolean | | | | hasZoom | 是否开启缩放 | boolean | | | | hasScaleController | 是否开启放大倍数控制器 | boolean | | | | hasScaleBar | 是否开启比例尺 | boolean | | | | hasRuler | 是否开启标尺 | boolean | | | | hasColorSetting | 是否开启颜色调节 | boolean | | | | hasRotate | 是否开启旋转 | boolean | | | | hasReset | 是否开启重置 | boolean | | | | isShowShapeStyle | 是否显示shape样式 | boolean | | | | stackNames | 层级名称 | string[ ] | | | | defaultShapeRenderType | 默认 shape 渲染类型 | String('fill' or 'line') | | | | isOnlyShowShapeRange | 在 shape 显示为 area 时,是否只显示 range 条,这个只在isShowShapeStyle为 true 时起作用 | boolean | 默认 false | 默认显示 |

2. 方法(Methods)

| 方法名 | 描述 | 参数 | 返回值 | | --- | --- | --- | --- | | getCurrentOsdViewerImageData | 获取当前视图图片信息 | | | | onNormalMove | 选择 | | | | onNormalClick | 点击 | | | | onRectSelect | 开始框选 | | | | onRectSelectEnd | 结束框选 | | rectSelectorDoneCallback | | onStartDrawPen | 笔刷 | color格式(示例:0x880022) | | | onStartFreeDraw | 笔刷模式绘制 | color格式(示例:0x880022) | | | updateIsNormalDrawMode | 新绘制模式 | true | | | updateIsNormalDrawMode | 新橡皮擦模式 | false | | | onEndFreeDraw | 结束新绘制或橡皮擦 | | | | onEditFreeDraw | 修改涂抹 | | | | onEndEditFreeDraw | 结束修改涂抹 | | | | onStartDrawPolygon | 开始绘制多边形 | color格式(示例:0x880022) | | | onEditPolygroup | 结束绘制多边形 | | | | onStartDrawCircle | 开始绘制圆 | color格式(示例:0x880022) | | | onStartDrawRect | 开始绘制矩形 | | | | onEndDraw | 结束绘制图形 | | | | onStartDrawPolygroup | 开始绘制Ploygroup | color格式(示例:0x880022) | | | onCancelDrawPolygroup | 取消绘制Ploygroup | | | | getPolygroupData | 完成绘制Ploygroup | | | | onEditClip | 编辑切片 | 参数示例({id:"2233",xywh:[691,613,489,537]}) | | | onEditPolygon | 编辑多边形 | | | | onEditCircle | 编辑圆 | | | | onEditRect | 编辑矩形 | | | | onEditPolygroup | 编辑Ploygroup | | | | onEndEdit | 编辑完成 | | | | onCancelEdit | 取消编辑 | | | | setEnableDrawRuler | 允许测量 | true | | | setEnableDrawRuler | 禁止测量 | false | | | onEndDrawRuler | 测量距离结束 | | | | onCleanRuler | 清除所有测量 | | | | onHideShapes | 隐藏shape | ['shapeid'] | | | onStartDrawShot | 截图 | color格式(示例:0x880022) | |

3. 事件(Events)

| 事件名 | 描述 | 参数 | --- | --- | --- | singleSelectCallback | 单个选择回调 | 当前选择的shapeData | | normalClickCallback | 普通点击回调 | | | rectSelectorCallback | 框选回调 | 当前框选的shapeData | | rightClickCallback | 右键点击回调 | 当前点击点的shapeData | | drawShotCallback | 截图回调 | | | drawRectCallback | 绘制矩形的回调 | 当前绘制的rectData | | drawCircleCallback | 绘制圆形的回调 | 当前绘制的circleData | | drawPolygonCallback | 绘制多边形的回调 | 当前绘制的polygonData | | drawPolygroupCallback | 绘制多边形组回调 | 当前绘制的polygroupData | | drawClipCallback | 绘制切片的回调 | 当前绘制的penData | | rulerDrawCallback | 标尺绘制状态 | | | pointerClickCallback | 获取点击坐标回调 | | | editPolygonCallback | 编辑多边形回调 | | | editCircleCallback | 编辑圆回调 | | | editRectangleCallback | 编辑矩形回调 | | | editPolygroupCallback | 编辑多边形组回调 | | | remarkLabelClickCallback | 备注轮廓回调 | | | editShapeDoneCallback | 编辑轮廓完成回调 | | | onSlideChangeCallback | 倍率尺滑动回调 | |

4. 数据格式(Data Format)

shapes格式 { "线段格式(solid or dashed)_颜色格式(示例5118182)":[ { id: "shapeid", shapeType: "shape类型", color: "颜色", points: "点集合(Array)", area: "面积", extra:{ algCheckId: "算法检测id", algCheckType: "算法检测类型", label: "标签", lineStyle: "线段格式(solid or dashed)", originPoints: "原始点集合(Array)", } } ] }