Skip to content

WindLayer

Example

Example Source Code
vue
<template>
  <div style="height: 400px" class="map-dark-bg">
    <mb-map :zoom="2">
      <mb-wind-layer
        :image="__RESOURCE_URL__ + 'wind/2016112200.png'"
        :wind-min="[-21.32, -21.57]"
        :wind-max="[26.8, 21.42]"
        :wind-range="[360, 170]"
        :wind-origin="[0, 85]"
        :wind-res="1"
      />
    </mb-map>
  </div>
</template>

<script setup lang="ts"></script>

API

PROPS

NameDescriptionTypeDefault
idLayer IDstring-
imageURL of the imagestring-
wind-maxMaximum wind values (e.g., [u, v])number[]-
wind-minMinimum wind values (e.g., [u, v])number[]-
wind-originOrigin of the wind data (e.g., [x, y] coordinates)number[]-
wind-rangeRange of wind values (e.g., [[minU, minV], [maxU, maxV]]) or [min, max]number[]-
wind-resResolution of the wind data (e.g., [width, height] or [xRes, yRes])number[]-
drop-rateRate at which particles are dropped/spawnednumber0.003
drop-rate-bumpIncrease in the drop rate (e.g., for bursts or changes)number0.01
fade-opacityRate at which particle opacity fades over time (values closer to 1 fade slower)number0.998
particles-numberNumber of particlesnumber256 * 256
ramp-colorsColor ramp for visualizationIndexAny{ 0.0: "#6fb9e6", 0.1: "#8ac4e6", 0.2: "#abdda4", 0.3: "#e6f598", 0.4: "#fee08b", 0.5: "#fdae61", 0.6: "#f46d43", 1.0: "#d53e4f" }
speed-factorSpeed factor/multiplier (controls the overall animation speed)number0.15

EVENTS

NameDescriptionParameters
createdInitialization complete event-

SLOTS

NameDescription

METHODS

NameDescriptionDefinition