You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-rain-effect

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-rain-effect

React wrapper for rain effect using web-gl inspired by https://freebiesbug.com/code-stuff/rain-drops-effect-with-webgl/

0.1.5
latest
Source
npmnpm
Version published
Weekly downloads
124
275.76%
Maintainers
1
Weekly downloads
 
Created
Source

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}

Keywords

react

FAQs

Package last updated on 22 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts