A dynamic weather visualization canvas built with Svelte and TypeScript. This project simulates various weather conditions such as clouds, rain, snow, and wind, along with a day/night cycle. The visual effects are driven by real-time weather data, allowing for a visually impressive, interactive experience. The visualization is modular and can be embedded in any website as an iframe, where users can pass custom parameters for location and background images.
To run this project locally, you'll need:
Clone the repository:
git clone https://github.com/yourusername/weather-visualization.git cd weather-visualization
Install dependencies:
npm install
Set up environment variables by creating a .env file in the root directory. Add your API key for the weather forecast service:
VITE_WEATHER_API_KEY=your_api_key_here
Run the development server:
npm run dev
The application will be available at http://localhost:3000.
Open the project in your browser at http://localhost:3000.
The weather visualization will automatically update based on real-time weather data for the default location.
To embed the weather visualization on your own website, use the following iframe:
Replace lat, lon, and bg with the desired latitude, longitude, and background image URL.
To build the app for production:
npm run build
The output files will be located in the dist/ directory, ready to be served by a static file server.
We welcome contributions! Feel free to submit issues or pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.