{"_id":"maplibre-gl-wind","_rev":"4-9df5c16072c05c2f48c6d6ca391d3f78","name":"maplibre-gl-wind","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"maplibre-gl-wind","version":"0.1.0","keywords":["maplibre","wind","visualization","weather","particles","webgl","map"],"author":{"url":"https://vinayakkulkarni.dev","name":"Vinayak Kulkarni","email":"inbox.vinayak@gmail.com"},"license":"MIT","_id":"maplibre-gl-wind@0.1.0","maintainers":[{"name":"vinayakkulkarni","email":"inbox.vinayak@gmail.com"}],"homepage":"https://github.com/geoql/maplibre-gl-wind#readme","bugs":{"url":"https://github.com/geoql/maplibre-gl-wind/issues"},"dist":{"shasum":"6757b94aeb97762f83892ef705b461644aafdfba","tarball":"https://registry.npmjs.org/maplibre-gl-wind/-/maplibre-gl-wind-0.1.0.tgz","fileCount":14,"integrity":"sha512-4RdKYoUANpdoyFUa4Ls3Pcjl1sIpxwzDALTnOFpUSzCpG6XcC6jI7Z430C6btxTUOzfKRi2fSHLrn0+aA2f75w==","signatures":[{"sig":"MEQCIDo1WA+GEcCzN7ypbwIe8SqEAQVj5+kx+3rjMLxn5huIAiBtj0+UgR+YjjohiVT6BAIWW7b2jmJQ5m4VBe6jB9h2yQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1872088},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"c4f5ac2c7c8992b7a42cb540e9c37218624d5529","private":false,"scripts":{"dev":"tsdown --watch","lint":"oxlint --deny-warnings","test":"echo 'test!'","build":"tsdown","format":"prettier --check .","prepare":"is-ci || husky","lint:fix":"oxlint --fix","typecheck":"tsc --noEmit","format:fix":"prettier --write .","publish:jsr":"bunx jsr publish","publish:npm":"npm publish --access public"},"_npmUser":{"name":"vinayakkulkarni","email":"inbox.vinayak@gmail.com"},"repository":{"url":"git+https://github.com/geoql/maplibre-gl-wind.git","type":"git"},"_npmVersion":"11.7.0","description":"Wind visualization layer for MapLibre GL JS with v5 compatibility","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","dependencies":{"wind-gl-core":"^2.0.2","@sakitam-gis/rbush":"^3.1.2","@mapbox/geojson-rewind":"^0.5.2","@sakitam-gis/vis-engine":"^1.5.3"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.5","devDependencies":{"husky":"^9.1.7","is-ci":"^4.1.0","oxlint":"^1.39.0","tsdown":"^0.19.0","prettier":"^3.7.4","typescript":"^5.9.3","@types/node":"^25.0.6","lint-staged":"^16.2.7","maplibre-gl":"5.16.0","@commitlint/cli":"^20.3.1","@commitlint/config-conventional":"^20.3.1"},"peerDependencies":{"maplibre-gl":">=4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/maplibre-gl-wind_0.1.0_1768504275794_0.40427366714523827","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"maplibre-gl-wind","version":"0.1.1","keywords":["maplibre","wind","visualization","weather","particles","webgl","map"],"author":{"url":"https://vinayakkulkarni.dev","name":"Vinayak Kulkarni","email":"inbox.vinayak@gmail.com"},"license":"MIT","_id":"maplibre-gl-wind@0.1.1","maintainers":[{"name":"vinayakkulkarni","email":"inbox.vinayak@gmail.com"}],"homepage":"https://github.com/geoql/maplibre-gl-wind#readme","bugs":{"url":"https://github.com/geoql/maplibre-gl-wind/issues"},"dist":{"shasum":"030aaa160254b9966a8b4561365e83269072f186","tarball":"https://registry.npmjs.org/maplibre-gl-wind/-/maplibre-gl-wind-0.1.1.tgz","fileCount":9,"integrity":"sha512-bmWhpYNHgRWdQQT55Ak1J/HiHGxIH5iBiC6ozdjYyNjAgWsUUZm4W3cZjYA+aqvrw3r/8aoSP+SF/2MTVNyzeQ==","signatures":[{"sig":"MEUCIQCOUFU4atD9kaV+HY3iaRC2b/fgH31Kz//1UQRF4XJQ0wIgBZDppCH025vEIa/jz8sMVSNiOFbJhpopXNpZPD114yA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1816638},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"3023fdc0dd8796d2f41e658be8dea831e9473491","private":false,"scripts":{"dev":"tsdown --watch","lint":"oxlint --deny-warnings","test":"echo 'test!'","build":"tsdown","format":"prettier --check .","prepare":"is-ci || husky","lint:fix":"oxlint --fix","typecheck":"tsc --noEmit","format:fix":"prettier --write .","publish:jsr":"bunx jsr publish","publish:npm":"npm publish --access public"},"_npmUser":{"name":"vinayakkulkarni","email":"inbox.vinayak@gmail.com"},"repository":{"url":"git+https://github.com/geoql/maplibre-gl-wind.git","type":"git"},"_npmVersion":"11.7.0","description":"Wind visualization layer for MapLibre GL JS with v5 compatibility","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","dependencies":{"wind-gl-core":"^2.0.2","@sakitam-gis/rbush":"^3.1.2","@mapbox/geojson-rewind":"^0.5.2","@sakitam-gis/vis-engine":"^1.5.3"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.5","devDependencies":{"husky":"^9.1.7","is-ci":"^4.1.0","oxlint":"^1.39.0","tsdown":"^0.19.0","prettier":"^3.7.4","typescript":"^5.9.3","@types/node":"^25.0.6","lint-staged":"^16.2.7","maplibre-gl":"5.16.0","@commitlint/cli":"^20.3.1","@commitlint/config-conventional":"^20.3.1"},"peerDependencies":{"maplibre-gl":">=4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/maplibre-gl-wind_0.1.1_1768505721510_0.4524436533845031","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"maplibre-gl-wind","version":"0.2.0","keywords":["deck.gl","maplibre","wind","visualization","weather","particles","webgl","map"],"author":{"url":"https://vinayakkulkarni.dev","name":"Vinayak Kulkarni","email":"inbox.vinayak@gmail.com"},"license":"MIT","_id":"maplibre-gl-wind@0.2.0","maintainers":[{"name":"vinayakkulkarni","email":"inbox.vinayak@gmail.com"}],"homepage":"https://github.com/geoql/maplibre-gl-wind#readme","bugs":{"url":"https://github.com/geoql/maplibre-gl-wind/issues"},"dist":{"shasum":"62325164197bbee743c8b5b0100d564d9dafd4cb","tarball":"https://registry.npmjs.org/maplibre-gl-wind/-/maplibre-gl-wind-0.2.0.tgz","fileCount":11,"integrity":"sha512-LRopmmN5XXFKgbSqcUpwP1fTpeuWXg0j6sYUnEOfZUz/maVd+g9PsY15tY6QwPpdEzWrzx2QWcpsCs7n+fsOFg==","signatures":[{"sig":"MEYCIQDuuGeaaPMzlNEHkZLzt7YuHy9RlzbKWneyK/K5pynNhQIhAMzL12Gb1gaX9U6QVHiY9Yoe+2S7Q+J9YF0hOFGBDued","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/maplibre-gl-wind@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":92581},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"6812f4fcb77d8a329b110b583431282d6b13cf57","private":false,"scripts":{"dev":"tsdown --watch","lint":"oxlint --deny-warnings","test":"echo 'test!'","build":"tsdown","format":"prettier --check .","prepare":"is-ci || husky","lint:fix":"oxlint --fix","typecheck":"tsc --noEmit","format:fix":"prettier --write .","publish:jsr":"bunx jsr publish","publish:npm":"npm publish --access public"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2e747726-c9ca-49a8-9b71-d78d4057a654"}},"repository":{"url":"git+https://github.com/geoql/maplibre-gl-wind.git","type":"git"},"_npmVersion":"11.6.2","description":"Wind particle visualization layer for deck.gl and MapLibre GL JS","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"packageManager":"bun@1.3.5","devDependencies":{"husky":"^9.1.7","is-ci":"^4.1.0","oxlint":"^1.39.0","tsdown":"^0.19.0","prettier":"^3.7.4","typescript":"^5.9.3","@types/node":"^25.0.6","lint-staged":"^16.2.7","@deck.gl/core":"^9.1.16","@luma.gl/core":"^9.2.0","@commitlint/cli":"^20.3.1","@deck.gl/layers":"^9.1.16","@luma.gl/engine":"^9.2.0","@luma.gl/shadertools":"^9.2.0","@commitlint/config-conventional":"^20.3.1"},"peerDependencies":{"@deck.gl/core":">=9.0.0","@luma.gl/core":">=9.0.0","@deck.gl/layers":">=9.0.0","@luma.gl/engine":">=9.0.0","@luma.gl/shadertools":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/maplibre-gl-wind_0.2.0_1768506456102_0.4480993838723597","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"maplibre-gl-wind","version":"0.2.1","private":false,"description":"Wind particle visualization layer for deck.gl and MapLibre GL JS","keywords":["deck.gl","map","maplibre","particles","visualization","weather","webgl","wind"],"homepage":"https://github.com/geoql/maplibre-gl-wind#readme","bugs":{"url":"https://github.com/geoql/maplibre-gl-wind/issues"},"license":"MIT","author":{"name":"Vinayak Kulkarni","email":"inbox.vinayak@gmail.com","url":"https://vinayakkulkarni.dev"},"repository":{"type":"git","url":"git+https://github.com/geoql/maplibre-gl-wind.git"},"type":"module","sideEffects":false,"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"vp pack","check":"vp check","test":"echo 'test!'","prepare":"is-ci || husky","lint":"vp lint","lint:fix":"vp lint --fix","format":"vp fmt --check","format:fix":"vp fmt --write","typecheck":"vp check --no-fmt --no-lint","publish:npm":"npm publish --access public","publish:jsr":"pnpm dlx jsr publish"},"devDependencies":{"@commitlint/cli":"^21.2.2","@commitlint/config-conventional":"^21.2.2","@commitlint/types":"^21.2.0","@deck.gl/core":"^9.2.6","@deck.gl/layers":"^9.2.6","@luma.gl/core":"^9.2.6","@luma.gl/engine":"^9.2.6","@luma.gl/shadertools":"^9.2.6","@types/node":"^26.2.0","husky":"^9.1.7","is-ci":"^4.1.0","lint-staged":"^17.3.0","typescript":"^7.0.2","vite-plus":"^0.2.9"},"peerDependencies":{"@deck.gl/core":">=9.0.0","@deck.gl/layers":">=9.0.0","@luma.gl/core":">=9.0.0","@luma.gl/engine":">=9.0.0","@luma.gl/shadertools":">=9.0.0"},"engines":{"node":">=24.0.0"},"packageManager":"pnpm@11.21.0+sha512.521705bce689924eac72f5a3587122f362689ef6571e55ba80076fd637c11132ecffada26fad4ea79c485bfddbfd3d5a2a5b05805a77e893de71ec8a6cca3bb1","gitHead":"09a8050f5a085a5150af1af8253e640662ce3669","_id":"maplibre-gl-wind@0.2.1","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-iEAFsqdkamle2+Ra9OL5dRzxhsNgdPYn4uz/4Q1E5whw2rGdW9ob7bdBSyhSmqJ1aczUBD5kovk7Rb8TgN93bg==","shasum":"9588c260382a5d56f332b8629be8272978a36456","tarball":"https://registry.npmjs.org/maplibre-gl-wind/-/maplibre-gl-wind-0.2.1.tgz","fileCount":11,"unpackedSize":91404,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/maplibre-gl-wind@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDrAJwYI0hnfGHxhyPCpD3mJMKMC9yINd8vEFRGRo7g1QIgA2UtlBjIuoq7SK5xPXtiUJ98NuBpazi9QQjG4hpZBSA="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2e747726-c9ca-49a8-9b71-d78d4057a654"}},"directories":{},"maintainers":[{"name":"vinayakkulkarni","email":"inbox.vinayak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/maplibre-gl-wind_0.2.1_1786788845010_0.04791526948147373"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-15T19:11:15.681Z","modified":"2026-08-15T10:14:05.482Z","0.1.0":"2026-01-15T19:11:16.029Z","0.1.1":"2026-01-15T19:35:21.695Z","0.2.0":"2026-01-15T19:47:36.232Z","0.2.1":"2026-08-15T10:14:05.164Z"},"bugs":{"url":"https://github.com/geoql/maplibre-gl-wind/issues"},"author":{"name":"Vinayak Kulkarni","email":"inbox.vinayak@gmail.com","url":"https://vinayakkulkarni.dev"},"license":"MIT","homepage":"https://github.com/geoql/maplibre-gl-wind#readme","keywords":["deck.gl","map","maplibre","particles","visualization","weather","webgl","wind"],"repository":{"type":"git","url":"git+https://github.com/geoql/maplibre-gl-wind.git"},"description":"Wind particle visualization layer for deck.gl and MapLibre GL JS","maintainers":[{"name":"vinayakkulkarni","email":"inbox.vinayak@gmail.com"}],"readme":"# MapLibre GL Wind\n\n[![CI](https://img.shields.io/github/actions/workflow/status/geoql/maplibre-gl-wind/ci.yml?branch=main&logo=github-actions&logoColor=white)](https://github.com/geoql/maplibre-gl-wind/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/maplibre-gl-wind?logo=npm)](https://www.npmjs.com/package/maplibre-gl-wind)\n[![JSR](https://jsr.io/badges/@geoql/maplibre-gl-wind)](https://jsr.io/@geoql/maplibre-gl-wind)\n[![npm](https://img.shields.io/npm/dm/maplibre-gl-wind?logo=npm)](http://npm-stat.com/charts.html?package=maplibre-gl-wind)\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/maplibre-gl-wind)](https://bundlephobia.com/package/maplibre-gl-wind)\n\n[![oxlint](https://img.shields.io/badge/linter-oxlint-7c5dfa?logo=oxc)](https://oxc.rs)\n[![prettier](https://img.shields.io/badge/formatter-prettier-f7b93e?logo=prettier)](https://prettier.io/)\n[![tsdown](https://img.shields.io/badge/bundler-tsdown-3178c6)](https://tsdown.dev/)\n[![typescript](https://img.shields.io/npm/dependency-version/maplibre-gl-wind/dev/typescript?logo=TypeScript)](https://www.typescriptlang.org/)\n\n---\n\nA high-performance wind particle visualization layer for deck.gl. Renders animated wind flow particles with speed-based coloring using GPU transform feedback.\n\nBased on [Az's deck.gl 9.x particle layer implementation](https://az.id.au/dev/wind-particle-layer-in-deckgl-9.x/).\n\n## Features\n\n- GPU-accelerated particle animation using transform feedback\n- Speed-based color ramps (Windy.com style)\n- Configurable particle count, speed, and lifetime\n- IDW interpolation for wind data points\n- Works with deck.gl 9.x and MapLibre GL JS\n\n## Installation\n\n```bash\n# npm\nnpm install maplibre-gl-wind @deck.gl/core @deck.gl/layers\n\n# bun\nbun add maplibre-gl-wind @deck.gl/core @deck.gl/layers\n\n# JSR\nbunx jsr add @geoql/maplibre-gl-wind\n```\n\n## Usage\n\n### With Wind Texture Image\n\n```typescript\nimport { Deck } from '@deck.gl/core';\nimport { WindParticleLayer } from 'maplibre-gl-wind';\n\nconst deck = new Deck({\n  initialViewState: {\n    longitude: 0,\n    latitude: 20,\n    zoom: 2,\n  },\n  controller: true,\n  layers: [\n    new WindParticleLayer({\n      id: 'wind',\n      image: 'path/to/wind-texture.png',\n      bounds: [-180, -90, 180, 90],\n      imageUnscale: [-50, 50],\n      numParticles: 8192,\n      maxAge: 50,\n      speedFactor: 50,\n      colorRamp: [\n        [0.0, [59, 130, 189, 255]],\n        [0.5, [253, 174, 97, 255]],\n        [1.0, [213, 62, 79, 255]],\n      ],\n      speedRange: [0, 30],\n    }),\n  ],\n});\n```\n\n### With Wind Data Points (IDW Interpolation)\n\n```typescript\nimport { WindParticleLayer, generateWindTexture } from 'maplibre-gl-wind';\n\nconst windData = [\n  { lat: 40.7, lon: -74.0, speed: 5.2, direction: 180 },\n  { lat: 34.0, lon: -118.2, speed: 3.1, direction: 270 },\n  // ... more points\n];\n\nconst { canvas, uMin, uMax, vMin, vMax } = generateWindTexture(windData, {\n  width: 360,\n  height: 180,\n  bounds: [-180, -90, 180, 90],\n});\n\nconst layer = new WindParticleLayer({\n  id: 'wind',\n  image: canvas.toDataURL(),\n  bounds: [-180, -90, 180, 90],\n  imageUnscale: [Math.min(uMin, vMin), Math.max(uMax, vMax)],\n  numParticles: 8192,\n  colorRamp: [\n    [0.0, [59, 130, 189, 255]],\n    [1.0, [213, 62, 79, 255]],\n  ],\n});\n```\n\n### With MapLibre GL JS\n\n```typescript\nimport maplibregl from 'maplibre-gl';\nimport { MapboxOverlay } from '@deck.gl/mapbox';\nimport { WindParticleLayer } from 'maplibre-gl-wind';\n\nconst map = new maplibregl.Map({\n  container: 'map',\n  style: 'https://demotiles.maplibre.org/style.json',\n  center: [0, 20],\n  zoom: 2,\n});\n\nmap.on('load', () => {\n  const overlay = new MapboxOverlay({\n    layers: [\n      new WindParticleLayer({\n        id: 'wind',\n        image: 'path/to/wind-texture.png',\n        bounds: [-180, -90, 180, 90],\n        imageUnscale: [-50, 50],\n        numParticles: 8192,\n      }),\n    ],\n  });\n\n  map.addControl(overlay);\n});\n```\n\n## API\n\n### WindParticleLayer\n\n| Option         | Type          | Default                | Description                                  |\n| -------------- | ------------- | ---------------------- | -------------------------------------------- |\n| `image`        | `string`      | -                      | URL or data URL of wind texture              |\n| `bounds`       | `number[]`    | `[-180, -90, 180, 90]` | Geographic bounds [west, south, east, north] |\n| `imageUnscale` | `number[]`    | `[0, 0]`               | Wind velocity range [min, max]               |\n| `numParticles` | `number`      | `8192`                 | Number of particles                          |\n| `maxAge`       | `number`      | `50`                   | Particle lifetime in frames                  |\n| `speedFactor`  | `number`      | `50`                   | Particle speed multiplier                    |\n| `colorRamp`    | `ColorStop[]` | Blue to red gradient   | Speed-based color stops `[position, color]`  |\n| `speedRange`   | `number[]`    | `[0, 30]`              | Speed range for color mapping [min, max]     |\n| `width`        | `number`      | `1.5`                  | Particle trail width                         |\n| `animate`      | `boolean`     | `true`                 | Enable animation                             |\n\n### generateWindTexture\n\nConverts wind data points to a texture using IDW interpolation.\n\n```typescript\nfunction generateWindTexture(\n  windData: WindDataPoint[],\n  options?: {\n    width?: number;\n    height?: number;\n    bounds?: [number, number, number, number];\n    power?: number;\n  },\n): WindTextureResult;\n```\n\n### createWindDataFromOpenWeatherMap\n\nHelper to convert OpenWeatherMap API responses to wind data points.\n\n```typescript\nfunction createWindDataFromOpenWeatherMap(\n  responses: Array<{\n    coord: { lat: number; lon: number };\n    wind?: { speed?: number; deg?: number };\n  }>,\n): WindDataPoint[];\n```\n\n## Wind Texture Format\n\nWind textures encode U (east-west) and V (north-south) velocity components:\n\n- **R channel**: U component (normalized 0-255)\n- **G channel**: V component (normalized 0-255)\n- **A channel**: Should be 255 for valid data\n\n## Requirements\n\n- **Node.js** >= 24.0.0\n- **deck.gl** >= 9.0.0\n\n## Contributing\n\n1. Fork and create a feature branch from `main`\n2. Make changes following [conventional commits](https://www.conventionalcommits.org/)\n3. Ensure commits are signed\n4. Submit a PR\n\n```bash\nbun install\nbun run build\nbun run lint\nbun run typecheck\n```\n\n## License\n\nMIT © [Vinayak Kulkarni](https://github.com/vinayakkulkarni)\n\n## Credits\n\n- [Az's deck.gl particle layer](https://az.id.au/dev/wind-particle-layer-in-deckgl-9.x/) - Original implementation\n- [deck.gl](https://deck.gl/) - WebGL visualization framework\n- [luma.gl](https://luma.gl/) - WebGL2 engine\n","readmeFilename":"README.md"}