Giter Site home page Giter Site logo

dam-phreaticline's Introduction

🌊 Dam-PhreaticLine

大坝浸润线横截面展示

效果图

项目说明:

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

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

使用方式

  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,
  },
]);

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}>

dam-phreaticline's People

Contributors

fengtianxi001 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.