xivweather
v1.3.1
Published
Weather for Final Fantasy XIV built off of eorzea-weather using generated weather files for additional/updated functionality.
Downloads
504
Readme
XIVWeather
XIVWeather is an NPM package built off of Eorzea Weather. All of the static files are built using Lumina in this separate C# application to make implementing new zones far more painless than the existing Eorzea Weather solution. This currently only supports EN.
Install
npm install xivweather
Usage
import { getETWindow, getWeather, getTimefromIncrement, ZONE_EUREKA_PYROS, findWeatherWindows } from "xivweather";
const eorzeaTime = getETWindow(new Date());
const weather = getWeather(eorzeaTime, ZONE_EUREKA_PYROS); // {currentWeather: Umbral Wind, increment: 0}
const time = getTimefromIncrement(weather.increment) // 4pm
const startTime = new Date()
const endTime = new Date(startTime.getTime() + 6.048e8)
const consectutiveWindows = 2
const zone = ZONE_EUREKA_PYROS
const weathers = ["Thunder", "Heat Waves"]
// optional
const nightOnly = false
// Returns a list of consectutive weather windows in a time range
const windows = findWeatherWindows(startTime, endTime, consectutiveWindows, zone, weathers, nightOnly)