All Projects → danillouz → react-snowfetti

danillouz / react-snowfetti

Licence: MIT license
Generates random particles using html5 canvas API.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-snowfetti

SPConfetti
Show the confetti only when the user is having fun, and if not having fun, don't show it.
Stars: ✭ 187 (+1000%)
Mutual labels:  particles, confetti
Canvas Confetti
🎉 on-demand confetti gun
Stars: ✭ 2,394 (+13982.35%)
Mutual labels:  particles, confetti
Tsparticles
tsParticles - Easily create highly customizable particles animations and use them as animated backgrounds for your website. Ready to use components available for React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Solid, Riot and Web Components.
Stars: ✭ 2,694 (+15747.06%)
Mutual labels:  particles, confetti
MultipleScattering.jl
A Julia library for simulating, processing, and plotting multiple scattering of waves.
Stars: ✭ 35 (+105.88%)
Mutual labels:  particles
reactparticles.js
Independently configurable react component for particles.js
Stars: ✭ 24 (+41.18%)
Mutual labels:  particles
DynamicalBilliards.jl
An easy-to-use, modular, extendable and absurdly fast Julia package for dynamical billiards in two dimensions.
Stars: ✭ 97 (+470.59%)
Mutual labels:  particles
teilchen
a simple physics library based on particles, forces, constraints and behaviors
Stars: ✭ 22 (+29.41%)
Mutual labels:  particles
ping-vue-admin
用vue做的一个后台管理系统模板,可以用此项目作为一个脚手架工程
Stars: ✭ 50 (+194.12%)
Mutual labels:  particles
decaylanguage
Package to parse decay files, describe and convert particle decays between digital representations.
Stars: ✭ 34 (+100%)
Mutual labels:  particles
BeatSaber Tweaks55
A collection of various tweaks which by themselves are too simple for their own designated mods
Stars: ✭ 26 (+52.94%)
Mutual labels:  particles
olwind
Wind layers for OpenLayers
Stars: ✭ 22 (+29.41%)
Mutual labels:  particles
react-canvas-confetti
React component for canvas-confetti library
Stars: ✭ 120 (+605.88%)
Mutual labels:  confetti
ParticleGround-Portfolio
A minimalistic particle theme landing page template. ⚛️
Stars: ✭ 335 (+1870.59%)
Mutual labels:  particles
phaser-particle-editor-plugin
This plugin creates particles based on JSON data generated by Phaser Particle Editor
Stars: ✭ 28 (+64.71%)
Mutual labels:  particles
FlockModifier
A Cinema 4D plugin that implements a flocking/swarming simulation for the C4D standard particle system using a distributed behavioral model.
Stars: ✭ 25 (+47.06%)
Mutual labels:  particles
v2
🧪 Personal website built using React!
Stars: ✭ 113 (+564.71%)
Mutual labels:  particles
fireworks-js
🎆 A simple fireworks library! Ready to use components available for React, Vue 3, Svelte, Angular, Preact, Solid, and Web Components.
Stars: ✭ 550 (+3135.29%)
Mutual labels:  particles
GPU-Fog-Particles
Textureless fog particles using a highly customizable shader to attenuate noise values.
Stars: ✭ 303 (+1682.35%)
Mutual labels:  particles
Interactive-Image-Particles
A Simple Javascript library that use image data to create a small interactive particles network.
Stars: ✭ 24 (+41.18%)
Mutual labels:  particles
Corpuscles.jl
Julia package for particle physics
Stars: ✭ 25 (+47.06%)
Mutual labels:  particles

react-snowfetti

NPM Version Build Status Coverage Status

Generates random particles using html5 canvas API.

react-snowfetti exposes an interface to create snow for the holidays or confetti when you're celebrating!

Inspired by this codepen.

snow

snow

confetti

confetti

interface

const palette = [
	'#55476a',
	'#ae3d63',
	'#db3853',
	'#f45c44',
	'#f8b646'
];

const snowfettiStyles = {
	backgroundColor: '#0a2933'
};

<Snowfetti
	profile={ [ 'confetti', 'steady', palette ] }
	amount={ 800 }
	width={ 600 }
	height={ 300 }
	styles={ snowfettiStyles }
/>

properties

profile (Array) - optional

Denotes the visual profile of the rendered particles on the canvas. The profile accepts three values:

  • type (String):
    • 'snow'
    • 'confetti'
  • velocity (String):
    • 'slow'
    • 'steady'
    • 'fast'
  • palette (Array): contains hex color strings

Defaults to type 'snow' and velocity 'slow'.

amount (Number) - optional

Denotes the amount of particles that will be rendered on the canvas.

Defaults to 800 particles.

width (Number) - optional

Denotes the canvas width.

Defaults to 600.

height (Number) - optional

Denotes the canvas height.

Defaults to 300.

styles (Object) - optional

Denotes the canvas css styles.

Defaults to backgroundColor: '#0a2933', position: 'absolute' with top: 0 and left: 0.

peer dependencies

react-snowfetti has a dependency on react version ^0.14.3.

This dependency must be fulfilled by the consumer of react-snowfetti.

usage

First install the package together with react in your project using npm:

npm i -S react-snowfetti react

Then import the package in your consumer application:

import React from 'react';
import Snowfetti from 'react-snowfetti';

export React.createClass({
	render () {
		return <Snowfetti />;
	}
});

todos

  • write tests
  • add code coverage
  • add CI
  • add support for confetti color sets
  • fade out confetti particles
  • make particle flow direction be affected by mouse cursor
  • add README.md badges
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].