New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

raindeer

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raindeer

Make your website fabulous

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Raindeer

Because websites aren't bloated enough as it is

NPM Version Downloads Stats

What's it all about?

Raindeer (not to be confused with reindeer) is a rather small package that takes a list of emojis and make them rain all over your website.

Installation

Install with Yarn:

yarn add raindeer

Install with NPM:

npm install raindeer

UMD script:

<script src="https://unpkg.com/raindeer"></script>

Usage

A simple and pretty "useful" use case is to make things rain whenever anything is clicked.

document.addEventListener('click', function () {
  EmojiRain.start(document.body, {
    duration: 2,
    dropSize: 40,
    emoji: {
      '😄': 5,
      '🍰': 1
    }
  })
})

These are the options that can be given to EmojiRain.start:

OptionDefault valueTypeDescription
emojiRequiredString | Array | ObjectSet to a single emoji as a string to make only that emoji rain. Set to an array of emoji strings to make those emoji rain equally much. Set to an object where the keys are emoji and the value is the likeliness of that emoji raining.
duration0NumberThe duration of the rain. If set to 0 the rain will go on until EmojiRain.stop() is called.
dropsPerSecond10NumberHow many drops to create per second
dropSize20NumberThe size of the drops. This actually controls the font size in px of the emoji.
speedMin500NumberThe minimum time allowed for a drop to travel across the screen.
speedMax1000NumberThe minimum time allowed for a drop to travel across the screen.
rotationStartMin-90NumberThe minimum allowed start rotation for a drop.
rotationStartMax-180NumberThe maximum allowed start rotation for a drop.
rotationDistanceMin0NumberThe minimum allowed rotation distance for a drop.
rotationDistanceMax45NumberThe maximum allowed rotation distance for a drop.
resolution2NumberThe amount of times that new drops will be created each second. This shouldn't need to be increased and could potentially have a high performance impact.

Contributing

See the contribution guidelines.

Tests

There are currently no tests. I'll make sure to add some when I get the time.

Code style

We use ESLint for making sure that our code remains pretty and consistent throughout the project. If your editor doesn't automatically pick up our config you can lint the code using npm run lint.

Additional information

Malcolm Nihlén - malcolm.nihlen@gmail.com

Distributed under the MIT licence. See LICENCE for more information.

https://github.com/scriptcoded

Keywords

FAQs

Package last updated on 10 Mar 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc