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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dam-phreatic-line

v0.0.0

Published

# Dam Phreatic Line

Downloads

2

Readme

Dam Phreatic Line

大坝浸润线横截面展示

1. 项目说明:

  • 传入大坝高度大坝迎水面宽度大坝背水面宽度大坝坝顶宽度 等四个参数来绘制大坝形状

  • 传入渗压传感器数据绘制传感器点位及渗流面

2.使用方式

  1. 初始化大坝形状
const container = document.getElementById('container');
const instance = new DamPhreaticLine(container);
instance.initialize({
  damHeight: 100,
  damLeftWidth: 200,
  damRightWidth: 300,
  damTopWidth: 50,
});
  1. 传入传感器数据
instance.addSeaLevel(100);
instance.addSensors([
  {
    name: '#001',
    value: 30,
    distance: -10,
  },
  {
    name: '#002',
    value: 20,
    distance: 10,
  },
]);

3.API

initialize

| 参数 | 说明 | 类型 | 默认值 | | --------------- | ----------------- | -------- | ------ | | damHeight | 大坝高度(m) | number | - | | damLeftWidth | 大坝迎水面宽度(m) | number | - | | damRightWidth | 大坝背水面宽度(m) | number | - | | damTopWidth | 大坝坝顶宽度(m) | number | - | | seaLevel | 坝外水位 | number | - |

addSensor

| 参数 | 说明 | 类型 | 默认值 | | ---------- | ------------------------------------------------------- | -------- | ------ | | name | 传感器名称 | string | - | | value | 传感器值(m) | number | - | | distance | 传感器距离闸门的距离(m), 闸门位置以迎水坡和背水坡为界。 | number | - |

  • distance: 有效值为 [-damLeftWidth, +damRightWidth]。假如迎水坡宽度为200,背水坡宽度为100, 则取值范围为[-200, 100], 0表示在闸门处。

methods

| 方法名称 | 描述 | 参数 | | ------------- | -------------- | -------------------------------- | | updateSensor | 更新单个传感器 | {name, value, distance} | | updateSensors | 全量更新传感器 | Array<{name, value, distance}> |