festive-effects 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +163 -0
- package/dist/animations/index.d.ts +91 -0
- package/dist/components/FestiveEffects.d.ts +19 -0
- package/dist/config/index.d.ts +18 -0
- package/dist/effects/ChineseNewYearEffect.d.ts +32 -0
- package/dist/effects/ChristmasEffect.d.ts +32 -0
- package/dist/effects/DiwaliEffect.d.ts +32 -0
- package/dist/effects/EasterEffect.d.ts +32 -0
- package/dist/effects/EidEffect.d.ts +32 -0
- package/dist/effects/HalloweenEffect.d.ts +32 -0
- package/dist/effects/HoliEffect.d.ts +32 -0
- package/dist/effects/IndependenceEffect.d.ts +32 -0
- package/dist/effects/NewYearEffect.d.ts +31 -0
- package/dist/effects/StPatricksEffect.d.ts +32 -0
- package/dist/effects/ThanksgivingEffect.d.ts +32 -0
- package/dist/effects/ValentineEffect.d.ts +32 -0
- package/dist/effects/index.d.ts +15 -0
- package/dist/hooks/index.d.ts +70 -0
- package/dist/index.d.ts +754 -0
- package/dist/index.esm.js +2009 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2074 -0
- package/dist/index.js.map +1 -0
- package/dist/particles/index.d.ts +37 -0
- package/dist/registry/index.d.ts +69 -0
- package/dist/types/index.d.ts +144 -0
- package/package.json +85 -0
package/README.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# 🎉 Festive Effects
|
|
2
|
+
|
|
3
|
+
Beautiful, performant festival animations for React. Powered by Framer Motion.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/festive-effects)
|
|
6
|
+
[](https://bundlephobia.com/package/festive-effects)
|
|
7
|
+
[](https://github.com/your-username/festive-effects/blob/main/LICENSE)
|
|
8
|
+
|
|
9
|
+
## ✨ Features
|
|
10
|
+
|
|
11
|
+
- 🎄 **12 Festival Effects** - Christmas, New Year, Valentine, Easter, Halloween, Thanksgiving, Diwali, Chinese New Year, Holi, Eid, St. Patrick's, Independence Day
|
|
12
|
+
- ⚡ **60fps Performance** - GPU-accelerated animations via Framer Motion
|
|
13
|
+
- 📦 **Lightweight** - Tree-shakeable, minimal bundle impact
|
|
14
|
+
- ♿ **Accessible** - Respects `prefers-reduced-motion`
|
|
15
|
+
- 🔧 **Customizable** - Intensity, duration, colors & more
|
|
16
|
+
- 💪 **TypeScript** - Full type safety out of the box
|
|
17
|
+
|
|
18
|
+
## 📦 Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install festive-effects framer-motion
|
|
22
|
+
# or
|
|
23
|
+
yarn add festive-effects framer-motion
|
|
24
|
+
# or
|
|
25
|
+
pnpm add festive-effects framer-motion
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 🚀 Quick Start
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import { FestiveEffects } from 'festive-effects';
|
|
32
|
+
|
|
33
|
+
function App() {
|
|
34
|
+
return (
|
|
35
|
+
<div>
|
|
36
|
+
<h1>Happy Holidays!</h1>
|
|
37
|
+
<FestiveEffects festival="christmas" />
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 🎨 Available Festivals
|
|
44
|
+
|
|
45
|
+
| Festival | Prop Value | Effect |
|
|
46
|
+
|----------|------------|--------|
|
|
47
|
+
| 🎄 Christmas | `christmas` | Falling snowflakes |
|
|
48
|
+
| 🎆 New Year | `newyear` | Fireworks & confetti |
|
|
49
|
+
| 💝 Valentine | `valentine` | Floating hearts |
|
|
50
|
+
| 🐰 Easter | `easter` | Eggs & flowers |
|
|
51
|
+
| 🎃 Halloween | `halloween` | Bats & pumpkins |
|
|
52
|
+
| 🍂 Thanksgiving | `thanksgiving` | Autumn leaves |
|
|
53
|
+
| 🪔 Diwali | `diwali` | Diyas & sparkles |
|
|
54
|
+
| 🏮 Chinese New Year | `chinesenewyear` | Lanterns & dragons |
|
|
55
|
+
| 🎨 Holi | `holi` | Color splashes |
|
|
56
|
+
| 🌙 Eid | `eid` | Moons & stars |
|
|
57
|
+
| ☘️ St. Patrick's | `stpatricks` | Shamrocks |
|
|
58
|
+
| 🎇 Independence Day | `independence` | Patriotic fireworks |
|
|
59
|
+
|
|
60
|
+
## ⚙️ Props
|
|
61
|
+
|
|
62
|
+
| Prop | Type | Default | Description |
|
|
63
|
+
|------|------|---------|-------------|
|
|
64
|
+
| `festival` | `FestivalType` | required | The festival effect to display |
|
|
65
|
+
| `intensity` | `'low' \| 'medium' \| 'high'` | `'medium'` | Particle density |
|
|
66
|
+
| `duration` | `number` | `undefined` | Auto-stop after ms (infinite if not set) |
|
|
67
|
+
| `zIndex` | `number` | `9999` | CSS z-index of overlay |
|
|
68
|
+
| `respectReducedMotion` | `boolean` | `true` | Honor user's motion preferences |
|
|
69
|
+
| `colors` | `string[]` | festival default | Custom color palette |
|
|
70
|
+
|
|
71
|
+
## 📖 Examples
|
|
72
|
+
|
|
73
|
+
### Basic Usage
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
<FestiveEffects festival="christmas" />
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### With Intensity
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
<FestiveEffects
|
|
83
|
+
festival="newyear"
|
|
84
|
+
intensity="high"
|
|
85
|
+
/>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Auto-stop After 10 Seconds
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
<FestiveEffects
|
|
92
|
+
festival="valentine"
|
|
93
|
+
duration={10000}
|
|
94
|
+
/>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Custom Colors
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
<FestiveEffects
|
|
101
|
+
festival="independence"
|
|
102
|
+
colors={['#FF0000', '#FFFFFF', '#0000FF']}
|
|
103
|
+
/>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Conditional Rendering
|
|
107
|
+
|
|
108
|
+
```tsx
|
|
109
|
+
function App() {
|
|
110
|
+
const [showEffects, setShowEffects] = useState(false);
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<>
|
|
114
|
+
<button onClick={() => setShowEffects(true)}>
|
|
115
|
+
Celebrate! 🎉
|
|
116
|
+
</button>
|
|
117
|
+
{showEffects && (
|
|
118
|
+
<FestiveEffects
|
|
119
|
+
festival="diwali"
|
|
120
|
+
duration={5000}
|
|
121
|
+
/>
|
|
122
|
+
)}
|
|
123
|
+
</>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## 🎯 TypeScript
|
|
129
|
+
|
|
130
|
+
Full TypeScript support with exported types:
|
|
131
|
+
|
|
132
|
+
```tsx
|
|
133
|
+
import {
|
|
134
|
+
FestiveEffects,
|
|
135
|
+
type FestivalType,
|
|
136
|
+
type IntensityLevel,
|
|
137
|
+
type FestiveEffectsProps
|
|
138
|
+
} from 'festive-effects';
|
|
139
|
+
|
|
140
|
+
const festival: FestivalType = 'christmas';
|
|
141
|
+
const intensity: IntensityLevel = 'medium';
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## ♿ Accessibility
|
|
145
|
+
|
|
146
|
+
By default, `FestiveEffects` respects the user's `prefers-reduced-motion` setting. When enabled, no animations will render.
|
|
147
|
+
|
|
148
|
+
To override this behavior:
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
<FestiveEffects
|
|
152
|
+
festival="christmas"
|
|
153
|
+
respectReducedMotion={false}
|
|
154
|
+
/>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## 📄 License
|
|
158
|
+
|
|
159
|
+
MIT © [Your Name]
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
Made with 💜 and Framer Motion
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { Variants, Transition } from 'framer-motion';
|
|
2
|
+
import type { AnimationType, PhysicsConfig } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Custom data passed to animation variants
|
|
5
|
+
*/
|
|
6
|
+
export interface AnimationCustomData {
|
|
7
|
+
/** Horizontal drift amount */
|
|
8
|
+
drift: number;
|
|
9
|
+
/** Rotation amount in degrees */
|
|
10
|
+
rotation: number;
|
|
11
|
+
/** Animation delay in seconds */
|
|
12
|
+
delay: number;
|
|
13
|
+
/** Animation duration in seconds */
|
|
14
|
+
duration: number;
|
|
15
|
+
/** Angle for radial animations (explode, scatter) */
|
|
16
|
+
angle: number;
|
|
17
|
+
/** Distance for radial animations */
|
|
18
|
+
distance: number;
|
|
19
|
+
/** Initial X position */
|
|
20
|
+
x: number;
|
|
21
|
+
/** Initial Y position */
|
|
22
|
+
y: number;
|
|
23
|
+
/** Viewport height for calculations */
|
|
24
|
+
viewportHeight: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Fall animation variants - used for snow, leaves, shamrocks
|
|
28
|
+
* Particles fall from top to bottom with horizontal drift and rotation
|
|
29
|
+
*/
|
|
30
|
+
export declare const fallVariants: Variants;
|
|
31
|
+
/**
|
|
32
|
+
* Get transition for fall animation
|
|
33
|
+
*/
|
|
34
|
+
export declare function getFallTransition(custom: AnimationCustomData): Transition;
|
|
35
|
+
/**
|
|
36
|
+
* Rise animation variants - used for hearts, lanterns
|
|
37
|
+
* Particles rise from bottom to top with gentle sway
|
|
38
|
+
*/
|
|
39
|
+
export declare const riseVariants: Variants;
|
|
40
|
+
/**
|
|
41
|
+
* Get transition for rise animation
|
|
42
|
+
*/
|
|
43
|
+
export declare function getRiseTransition(custom: AnimationCustomData): Transition;
|
|
44
|
+
/**
|
|
45
|
+
* Explode animation variants - used for fireworks, confetti
|
|
46
|
+
* Particles burst outward from center point
|
|
47
|
+
*/
|
|
48
|
+
export declare const explodeVariants: Variants;
|
|
49
|
+
/**
|
|
50
|
+
* Get transition for explode animation
|
|
51
|
+
*/
|
|
52
|
+
export declare function getExplodeTransition(custom: AnimationCustomData): Transition;
|
|
53
|
+
/**
|
|
54
|
+
* Float animation variants - used for bats, diyas, moons
|
|
55
|
+
* Particles float with gentle bobbing motion
|
|
56
|
+
*/
|
|
57
|
+
export declare const floatVariants: Variants;
|
|
58
|
+
/**
|
|
59
|
+
* Get transition for float animation
|
|
60
|
+
*/
|
|
61
|
+
export declare function getFloatTransition(custom: AnimationCustomData): Transition;
|
|
62
|
+
/**
|
|
63
|
+
* Scatter animation variants - used for holi colors
|
|
64
|
+
* Particles scatter outward with fading effect
|
|
65
|
+
*/
|
|
66
|
+
export declare const scatterVariants: Variants;
|
|
67
|
+
/**
|
|
68
|
+
* Get transition for scatter animation
|
|
69
|
+
*/
|
|
70
|
+
export declare function getScatterTransition(custom: AnimationCustomData): Transition;
|
|
71
|
+
/**
|
|
72
|
+
* Map of animation types to their variants
|
|
73
|
+
*/
|
|
74
|
+
export declare const ANIMATION_VARIANTS: Record<AnimationType, Variants>;
|
|
75
|
+
/**
|
|
76
|
+
* Get the appropriate transition function for an animation type
|
|
77
|
+
*/
|
|
78
|
+
export declare function getTransitionForType(animationType: AnimationType, custom: AnimationCustomData): Transition;
|
|
79
|
+
/**
|
|
80
|
+
* Create custom animation data from particle properties
|
|
81
|
+
*/
|
|
82
|
+
export declare function createAnimationCustomData(x: number, y: number, physics: PhysicsConfig, delay: number, duration: number, viewportHeight: number): AnimationCustomData;
|
|
83
|
+
/**
|
|
84
|
+
* Get animation props for a particle based on animation type
|
|
85
|
+
* Returns initial, animate, and transition properties for Framer Motion
|
|
86
|
+
*/
|
|
87
|
+
export declare function getAnimationPropsForType(animationType: AnimationType, custom: AnimationCustomData): {
|
|
88
|
+
initial: Record<string, unknown>;
|
|
89
|
+
animate: Record<string, unknown>;
|
|
90
|
+
transition: Transition;
|
|
91
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FestiveEffectsProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* FestiveEffects - Main component for rendering festival-themed visual effects
|
|
5
|
+
*
|
|
6
|
+
* Renders a full-screen overlay with animated particles for various festivals.
|
|
7
|
+
* Uses Framer Motion for smooth, GPU-accelerated animations.
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Automatic cleanup of timeouts and event listeners on unmount
|
|
11
|
+
* - Pauses animations when browser tab is not visible (performance optimization)
|
|
12
|
+
* - Respects user's reduced motion preferences
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <FestiveEffects festival="christmas" intensity="medium" />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare const FestiveEffects: React.FC<FestiveEffectsProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IntensityLevel, IntensitySettings, FestivalType, FestivalConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Intensity configuration for particle effects
|
|
4
|
+
* Defines particle multipliers and max counts for each intensity level
|
|
5
|
+
*/
|
|
6
|
+
export declare const INTENSITY_CONFIG: Record<IntensityLevel, IntensitySettings>;
|
|
7
|
+
/**
|
|
8
|
+
* Calculate the actual particle count based on base count and intensity
|
|
9
|
+
* @param baseCount - The base particle count from festival config
|
|
10
|
+
* @param intensity - The intensity level
|
|
11
|
+
* @returns The calculated particle count, capped at maxParticles
|
|
12
|
+
*/
|
|
13
|
+
export declare function getParticleCount(baseCount: number, intensity?: IntensityLevel): number;
|
|
14
|
+
/**
|
|
15
|
+
* Festival configurations for all 12 supported festivals
|
|
16
|
+
* Each config defines colors, particle types, animation style, and physics
|
|
17
|
+
*/
|
|
18
|
+
export declare const FESTIVAL_CONFIGS: Record<FestivalType, FestivalConfig>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport, ParticleType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Chinese New Year effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const CHINESENEWYEAR_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: ParticleType[];
|
|
10
|
+
animationType: "rise";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate particles for Chinese New Year effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateChineseNewYearParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface ChineseNewYearEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Chinese New Year Effect Component
|
|
28
|
+
* Renders rising red lanterns and golden fireworks
|
|
29
|
+
* Red/gold color palette
|
|
30
|
+
*/
|
|
31
|
+
export declare const ChineseNewYearEffect: React.FC<ChineseNewYearEffectProps>;
|
|
32
|
+
export default ChineseNewYearEffect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Christmas effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const CHRISTMAS_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: readonly ["snowflake"];
|
|
10
|
+
animationType: "fall";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate snowflake particles for Christmas effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateChristmasParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface ChristmasEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Christmas Effect Component
|
|
28
|
+
* Renders falling snowflakes with drift and rotation
|
|
29
|
+
* White/blue color palette
|
|
30
|
+
*/
|
|
31
|
+
export declare const ChristmasEffect: React.FC<ChristmasEffectProps>;
|
|
32
|
+
export default ChristmasEffect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport, ParticleType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Diwali effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const DIWALI_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: ParticleType[];
|
|
10
|
+
animationType: "float";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate particles for Diwali effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateDiwaliParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface DiwaliEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Diwali Effect Component
|
|
28
|
+
* Renders glowing diyas with flickering, golden sparkles and rangoli patterns
|
|
29
|
+
* Golden/orange color palette
|
|
30
|
+
*/
|
|
31
|
+
export declare const DiwaliEffect: React.FC<DiwaliEffectProps>;
|
|
32
|
+
export default DiwaliEffect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport, ParticleType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Easter effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const EASTER_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: ParticleType[];
|
|
10
|
+
animationType: "float";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate particles for Easter effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateEasterParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface EasterEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Easter Effect Component
|
|
28
|
+
* Renders floating eggs and spring flowers
|
|
29
|
+
* Pastel color palette
|
|
30
|
+
*/
|
|
31
|
+
export declare const EasterEffect: React.FC<EasterEffectProps>;
|
|
32
|
+
export default EasterEffect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport, ParticleType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Eid effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const EID_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: ParticleType[];
|
|
10
|
+
animationType: "float";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate particles for Eid effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateEidParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface EidEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Eid Effect Component
|
|
28
|
+
* Renders floating crescent moons and twinkling stars
|
|
29
|
+
* Gold/silver/green color palette
|
|
30
|
+
*/
|
|
31
|
+
export declare const EidEffect: React.FC<EidEffectProps>;
|
|
32
|
+
export default EidEffect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport, ParticleType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Halloween effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const HALLOWEEN_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: ParticleType[];
|
|
10
|
+
animationType: "float";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate particles for Halloween effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateHalloweenParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface HalloweenEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Halloween Effect Component
|
|
28
|
+
* Renders flying bats with erratic movement, floating pumpkins and spiders
|
|
29
|
+
* Orange/purple/black color palette
|
|
30
|
+
*/
|
|
31
|
+
export declare const HalloweenEffect: React.FC<HalloweenEffectProps>;
|
|
32
|
+
export default HalloweenEffect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Holi effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const HOLI_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: readonly ["color-splash"];
|
|
10
|
+
animationType: "scatter";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate particles for Holi effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateHoliParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface HoliEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Holi Effect Component
|
|
28
|
+
* Renders scattered color powder bursts
|
|
29
|
+
* Vibrant multi-color palette
|
|
30
|
+
*/
|
|
31
|
+
export declare const HoliEffect: React.FC<HoliEffectProps>;
|
|
32
|
+
export default HoliEffect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport, ParticleType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Independence Day effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const INDEPENDENCE_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: ParticleType[];
|
|
10
|
+
animationType: "explode";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate particles for Independence Day effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateIndependenceParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface IndependenceEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Independence Day Effect Component
|
|
28
|
+
* Renders customizable color fireworks and patriotic confetti
|
|
29
|
+
* Default US colors (red, white, blue), customizable via colors prop
|
|
30
|
+
*/
|
|
31
|
+
export declare const IndependenceEffect: React.FC<IndependenceEffectProps>;
|
|
32
|
+
export default IndependenceEffect;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport, ParticleType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* New Year effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const NEWYEAR_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: ParticleType[];
|
|
10
|
+
animationType: "explode";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate particles for New Year effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateNewYearParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface NewYearEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* New Year Effect Component
|
|
28
|
+
* Renders exploding fireworks with sparks and falling confetti
|
|
29
|
+
*/
|
|
30
|
+
export declare const NewYearEffect: React.FC<NewYearEffectProps>;
|
|
31
|
+
export default NewYearEffect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport, ParticleType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* St. Patrick's effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const STPATRICKS_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: ParticleType[];
|
|
10
|
+
animationType: "fall";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate particles for St. Patrick's effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateStPatricksParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface StPatricksEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* St. Patrick's Effect Component
|
|
28
|
+
* Renders falling shamrocks with spin
|
|
29
|
+
* Green color palette with gold accents
|
|
30
|
+
*/
|
|
31
|
+
export declare const StPatricksEffect: React.FC<StPatricksEffectProps>;
|
|
32
|
+
export default StPatricksEffect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Thanksgiving effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const THANKSGIVING_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: readonly ["leaf"];
|
|
10
|
+
animationType: "fall";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate leaf particles for Thanksgiving effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateThanksgivingParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface ThanksgivingEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Thanksgiving Effect Component
|
|
28
|
+
* Renders falling autumn leaves with tumbling rotation
|
|
29
|
+
* Orange/brown color palette
|
|
30
|
+
*/
|
|
31
|
+
export declare const ThanksgivingEffect: React.FC<ThanksgivingEffectProps>;
|
|
32
|
+
export default ThanksgivingEffect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticleData, Viewport } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Valentine effect configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare const VALENTINE_CONFIG: {
|
|
7
|
+
baseParticleCount: number;
|
|
8
|
+
colors: string[];
|
|
9
|
+
particleTypes: readonly ["heart"];
|
|
10
|
+
animationType: "rise";
|
|
11
|
+
physics: {
|
|
12
|
+
speed: number;
|
|
13
|
+
drift: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
scale: [number, number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Generate heart particles for Valentine effect
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateValentineParticles(count: number, viewport: Viewport, colors?: string[]): ParticleData[];
|
|
22
|
+
interface ValentineEffectProps {
|
|
23
|
+
particles: ParticleData[];
|
|
24
|
+
viewport: Viewport;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Valentine Effect Component
|
|
28
|
+
* Renders rising hearts with gentle sway
|
|
29
|
+
* Pink/red color palette
|
|
30
|
+
*/
|
|
31
|
+
export declare const ValentineEffect: React.FC<ValentineEffectProps>;
|
|
32
|
+
export default ValentineEffect;
|