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

tunnelface

v0.0.11

Published

<p align="center">GenerateGraph - 基于 svgJS 和 jsPDF 的图表生成库</p>

Readme

  • 💪 Vue 3 Composition API
  • 🔥 TypeScript 驱动开发
  • 📊 强大的图表生成能力

快速开始

要使用本库进行开发,请通过以下命令安装:

npm install tunnelface@latest --registry=http://devwh.sinoccdc.com:8096/npm/

用法

全局引入

使用组件

<template>
  <div class="TestTunnelFace">
    <div class="svg-container" id="svg-container"></div>
  </div>
</template>

<script setup lang="ts">
import { ContourType, GetDefaultOptions, Grade, TunnelFace, type TunnelFaceOptions } from "tunnelface";
import { onMounted } from "vue";
const canvas = "svg-container";

onMounted(() => {
  const explosiveOptions = GetDefaultOptions(Grade.IIIb); //通过围岩级别获取默认参数
  options.explosiveOptions = explosiveOptions;
  const tunnelFace = new TunnelFace(canvas, options); //创建隧道面对象
  tunnelFace.draw();
});

const options: TunnelFaceOptions = {
  contourOptions: {
    topRadius: 780, // 拱顶半径
    topAngle: 180, // 拱顶圆心角
    contourType: ContourType.SingleCentredArchContour
  },
  HoleSlotAreaOptions: {
    height: 300, //掏槽区高度
    type: "wedge", //掏槽类型
    row: 3, //掏槽区排数
    levelArr: [
      {
        level: 1,
        angle: 70,
        levelDistance: 50
      },
      {
        level: 2,
        angle: 70,
        levelDistance: 50
      },
      {
        level: 3,
        angle: 70,
        levelDistance: 50
      }
    ],
    upDownSpace: 60, //上下排距
    angle: 67, //掏槽角???
    insideDistance: 15 //孔底两级距离
  },
  explosiveOptions: {} as any,
  drawConfigOptions: {
    drawContour: true, //是否绘制轮廓线
    drawHoleSlotArea: true, //是否绘制掏槽区边框
    drawMarkerLine: true, //是否绘制辅助标注线
    drawHoleLines: true, //是否绘制孔线
    drawHoles: true //是否绘制孔
  },
  globalConfigOptions: {
    debug: false //是否调试模式
  }
};
</script>

<style scoped>
.TestTunnelFace {
  width: 100%;
  height: 100vh;
  user-select: none;
}
.svg-container {
  width: 100%;
  height: 100%;
}
</style>