Giter Club home page Giter Club logo

stormsimulator's Introduction

Stormsimulator

Simulate a thunderstorm with the exact right amount of thunder/lightning. Thanks to the relaxing sound of heavy rain paired with thunder it helps you to relax, study, meditate and sleep.

Overview of Website

Where can I try it out myself?

Click here to try it out.

Description of parameters

There are different parameters that will control your experience:

  • amount of rain
  • amount of lightning
  • distance to thunderstorm
  • image
  • volume
  • play state

Amount of Rain

This will control how loud the rain sound is and how strong you can see the rain in the image.

Amount of Lightning

This will control how often lightning appears. Lightning will schedule thunder. (In real life thunder always appears after lightning)

Distance to Thunderstorm

This will control how much time needs to pass between the lightning and the effective thunder sound.

kilometers * 3 = amount of seconds from lightning to thunder sound

This is because sound travels one kilometer every three seconds.

Image

Changes the images the rain animation is shown on.

Volume

Controls the overall volume.

Play State

Controls if rain/thunder sounds should play or not.

Features

  • Different Parameters are controllable by the user
  • Current configuration is saved to make it possible to have the same configuration across sessions (localStorage)
  • Responsiveness (even for very small screens)

Browser Support

All browsers that support the Web Audio API, which are all modern browsers. For other features like the fetch function I included a polyfill.

There are some performance problems with the Mobile Safari browser.

Run it locally

To run it locally you need to open the index.html page.

So that the sounds also play you need to supply the sound files yourself because I only got the permission from the sound creators to use the sound files on my website but not for uploading them onto GitHub.

You need to supply the files here:

root
  /audio
    /rainloop
      rain.wav      -> this is the file for the rain sound
    /thunder
      thunder-1.wav -> these are the seven different thunder sounds used
      thunder-2.wav 
      thunder-3.wav
      thunder-4.wav
      thunder-5.wav
      thunder-6.wav
      thunder-7.wav

Can I use the images?

Yes. Feel free to use them for what ever you want as I made them myself. Some of them are also on Unsplash

License

MIT

stormsimulator's People

Contributors

panmona avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

stormsimulator's Issues

More Random Change of Rain Volume / Lightning Amount

Received this feedback from a user:
"If letting it run in the background for a long time it can get a little stale and monotonous. It would be nice, and a more natural-like simulation, if one could set the three parameters to vary over time. Especially the rain one, it seems to me. Some kind of random, or timed, variation of intensity would be much better."

Migrate to React

When developing this project further it would make it a lot easier if the components are a bit more decoupled. React would make this easier. This would also give me the ability to clean up some technical debts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.