0.1.5 • Published 1 year ago

react-rain-effect v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Displaying rain effect with in an HTML page using React

This project was bootstrapped with Create React App. Inspired by - https://freebiesbug.com/code-stuff/rain-drops-effect-with-webgl/ Code is extended from https://github.com/codrops/RainEffect

Install

Run the following command: npm install react-rain-effect OR yarn add react-rain-effect

Usage

import { Weather } from 'react-rain-effect

How to use the component

<Weather type="rain"/> type properties allowed - rain, drizzle, sunny, storm, fallout

Other properties allowed

NameDescription
temperaturenumber (if provided , will show the temperature passed) otherwise hide it
textureOverridesoptional object, if passed, will override the default textures for each type ()
rainFg,rainBg,stormLightningFg, stormLightningBg, falloutFg,falloutBg,sunFg,sunBg, drizzleFg, drizzleBg
showTimeboolean (if provided, will show the time asa a day time string)

How to use textureOverrides (code example)

import TextureRainFg from './background/background01.jpg';

const textureOverrides = {'falloutFg': TextureRainFg, 'falloutBg': TextureRainBg}

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago