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

cesium-wind-canvas

v1.1.6

Published

a cesium extension to show wind field.

Readme

cesium-wind-canvas

a cesium extension to show wind field.

# npm
npm install cesium-wind-canvas

| addTo() | 添加视图 | | | --------------- | ----------------- | --- | | show() | 开启风场 | | | hide() | 关闭风场 | | | remove() | 移除风场 | | | removeLayer() | 同 remove()同效果 | | | setData() | 配置风场数据 | |

npm + es6

<script>
  const map = new Cesium.Viewer("cesium");
  import CesiumWind from 'cesium-wind-canvas';
  const windOptions = {
    colorScale: [
       "rgb(36,104, 180)",
       "rgb(60,157, 194)",
       "rgb(128,205,193 )",
       "rgb(151,218,168 )",
       "rgb(198,231,181)",
       "rgb(238,247,217)",
       "rgb(255,238,159)",
       "rgb(252,217,125)",
       "rgb(255,182,100)",
       "rgb(252,150,75)",
       "rgb(250,112,52)",
       "rgb(245,64,32)",
       "rgb(237,45,28)",
       "rgb(220,24,32)",
       "rgb(180,0,35)"
    ],
    frameRate: 50,
    maxAge: 60,
    globalAlpha: 0.9,
    velocityScale: 1 / 30,
    paths: 2000,
  };
  // 获取风流场数据
  fetch("https://qjvic.github.io/cesium-wind/examples/wind.json")
    .then((res) => {
      if (!res.ok) {
        throw new Error("Network response was not ok");
      }
      return res.json();
    })
    .then((data) => {
        const wind = new CesiumWind(data, { windOptions });
        wind.addTo(map.viewer);
        wind.show() // 默认不开启
    })
    .catch((error) => {
      console.error(error);
    });

如何获取数据

天气数据由全球预报系统(GFS)生成, 由美国国家气象局管理。 预测每天产生四次,并可用于 从NOMADS下载。 这些文件位于GRIB2 格式并包含超过300 条记录。 我们只需要这些记录中的一小部分就可以在特定的等压线上可视化风资料。 下面的命令下载 1000 hPa 风向量,并使用grib2json将它们转换为 JSON 格式。

介绍

本项目基于 https://github.com/QJvic/cesium-wind 项目完成,使用设置(windOptions)及数据(data)与原项目一致。 已应用至实际项目中,请放心食用。