# @lijuhong1981/jswindfield

> Wind field particle animation visualization.

Latest version **1.2.14** (published 2026-09-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install @lijuhong1981/jswindfield
pnpm add @lijuhong1981/jswindfield
yarn add @lijuhong1981/jswindfield
bun add @lijuhong1981/jswindfield
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.2.14 |
| Published | 2026-09-24 |
| First published | 2022-09-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 22.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | lijuhong1981 |
| Maintainers | lijuhong1981_pci |

## Links

- npm: https://www.npmjs.com/package/@lijuhong1981/jswindfield
- Repository: https://github.com/lijuhong1981/jslibs
- Homepage: https://github.com/lijuhong1981/jslibs#readme
- Issues: https://github.com/lijuhong1981/jslibs/issues
- npm.io page: https://npm.io/package/@lijuhong1981/jswindfield

## Dependencies (5)

- [@lijuhong1981/jslib](https://npm.io/package/@lijuhong1981/jslib.md) ^1.3.0
- [@lijuhong1981/jsmath](https://npm.io/package/@lijuhong1981/jsmath.md) ^1.3.6
- [@lijuhong1981/jstime](https://npm.io/package/@lijuhong1981/jstime.md) ^1.1.2
- [@lijuhong1981/jscheck](https://npm.io/package/@lijuhong1981/jscheck.md) ^1.1.7
- [@lijuhong1981/jsdestroy](https://npm.io/package/@lijuhong1981/jsdestroy.md) ^1.2.7

## Recent versions

- 1.2.14 (latest) — 2026-09-24
- 1.2.13 — 2026-04-01
- 1.2.12 — 2026-03-30
- 1.2.11 — 2026-03-27
- 1.2.10 — 2026-03-27
- 1.2.9 — 2026-03-19
- 1.2.8 — 2026-03-16
- 1.2.7 — 2026-03-16
- 1.2.6 — 2026-03-16
- 1.2.5 — 2025-08-11
- 1.2.4 — 2025-07-24
- 1.2.3 — 2025-07-24
- 1.2.2 — 2025-07-24
- 1.2.1 — 2025-04-14
- 1.2.0 — 2025-04-14
- … 33 more at https://npm.io/package/@lijuhong1981/jswindfield/versions

## README

# @lijuhong1981/jswindfield

> 风场粒子动画可视化，基于 Canvas 2D 渲染风场矢量场（GRIB 数据），支持经纬度/像素两种坐标单位与双线性插值。

## 安装

```bash
npm install @lijuhong1981/jswindfield
```

## 导出

- `WindField`（默认导出，同时命名导出）— 风场渲染器
  - 静态属性：`WindField.Vector`、`WindField.Field`、`WindField.defaultOptions`
  - 方法：`setOptions`、`setData`、`startRender`、`stopRender`、`destroy`
- `Field` — 矢量场（含网格构建、双线性插值、经纬度/像素坐标换算）
- `Vector` — 二维向量
- `defaultOptions` — 默认渲染选项

### 默认渲染选项

| 项 | 默认 | 说明 |
| --- | --- | --- |
| `globalAlpha` | `0.9` | Canvas 全局透明度 |
| `lineWidth` | `1` | 线宽 |
| `colors` | 15 色渐变数组 | 粒子颜色 |
| `velocityScale` | `1.0` | 速度缩放倍率 |
| `maxAge` | `90` | 粒子最大存活帧数 |
| `particlesCount` | `2000` | 粒子数量 |
| `frameDeltaTime` | `1000 / 30` | 动画帧渲染间隔（毫秒） |
| `useAnimationFrame` | `true` | 是否使用动画帧 |
| `unit` | `'degrees'` | 粒子位置单位 |
| `enableLog` | `false` | 是否启用日志 |

依赖：`@lijuhong1981/jscheck`、`@lijuhong1981/jsdestroy`、`@lijuhong1981/jslib`、`@lijuhong1981/jsmath`、`@lijuhong1981/jstime`

---
_Source: https://npm.io/package/@lijuhong1981/jswindfield · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
