@sarthak03dot/romantic-animations 1.2.0 โ†’ 1.2.3

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 CHANGED
@@ -1,327 +1,332 @@
1
- # ๐Ÿ’– Romantic Animations v1.2.0
2
-
3
- <p align="center">
4
- <b>A premium, lightweight, zero-dependency JavaScript canvas particle library for gorgeous romantic & celebratory effects.</b>
5
- </p>
6
-
7
- <p align="center">
8
- Perfect for Valentine's Day, weddings, anniversaries, landing pages, or any celebratory web application needing high-quality hardware-accelerated visual particle overlays.
9
- </p>
10
-
11
- <p align="center">
12
- <a href="https://www.npmjs.com/package/@sarthak03dot/romantic-animations">
13
- <img src="https://img.shields.io/npm/v/@sarthak03dot/romantic-animations.svg" alt="NPM Version" />
14
- </a>
15
- <a href="https://opensource.org/licenses/MIT">
16
- <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" />
17
- </a>
18
- <a href="https://sarthak03dot.github.io/romantic-animations/">
19
- <img src="https://img.shields.io/badge/Demo-Interactive%20Showcase-ff4d6d.svg" alt="Interactive Showcase" />
20
- </a>
21
- </p>
22
-
23
- ---
24
-
25
- ## ๐Ÿ–ผ๏ธ Gallery & Screenshots (Placeholder Previews)
26
-
27
- Here is a sneak peek at the gorgeous, performance-tuned particle renderers in action.
28
- *(You can swap these placeholders with your actual screenshots in `docs/screenshots/`)*
29
-
30
- <div align="center">
31
- <h3>โœจ Floating Hearts & Live Tweaks</h3>
32
- <img src="https://placehold.co/800x450/1e1e24/ff4d6d?text=Preview:+Floating+Hearts+Effect" width="800" alt="Floating Hearts Effect Preview" style="border-radius: 12px; border: 1px solid rgba(255, 77, 109, 0.2); margin-bottom: 20px;" />
33
-
34
- <h3>๐ŸŽ† Starry Fireworks Celebration</h3>
35
- <img src="https://placehold.co/800x450/0f0f16/c77dff?text=Preview:+Starry+Fireworks+Effect" width="800" alt="Starry Fireworks Effect Preview" style="border-radius: 12px; border: 1px solid rgba(199, 125, 255, 0.2); margin-bottom: 20px;" />
36
-
37
- <h3>๐Ÿ“š Integrated Live Customizer & Developer Portal</h3>
38
- <img src="https://placehold.co/800x450/faf9ff/028090?text=Preview:+Light+Theme+Developer+Portal" width="800" alt="Light Theme Developer Portal Preview" style="border-radius: 12px; border: 1px solid rgba(2, 128, 144, 0.2);" />
39
- </div>
40
-
41
- ---
42
-
43
- ## ๐Ÿš€ Key Features
44
-
45
- * ๐Ÿš€ **High Performance & Zero Dependencies**: Built directly on raw HTML5 `<canvas>` API with optimal mathematical loop calculations (`requestAnimationFrame`), keeping your bundle size extremely small.
46
- * ๐ŸŒ“ **Responsive Dual-Theme Customizer**: Fully styled and responsive landing page that seamlessly toggles between a neon-drenched **Dark Mode** and a clean, high-contrast **Light Mode** for accessibility.
47
- * ๐Ÿ“ฑ **Touch & Mobile Optimizations**: Fully responsive drawer nav overlays, click-burst triggers for tapping screens, and custom mobile menu structures.
48
- * ๐Ÿ“š **Collapsible Developer Portal**: Hash-routed playground switcher containing dynamic CDN, Vanilla, React, and Next.js SSR setups.
49
-
50
- ---
51
-
52
- ## ๐Ÿ“ฆ Installation
53
-
54
- To begin adding romantic canvas overlays to your codebase:
55
-
56
- ```bash
57
- # Using npm
58
- npm install @sarthak03dot/romantic-animations
59
-
60
- # Using pnpm
61
- pnpm add @sarthak03dot/romantic-animations
62
-
63
- # Using yarn
64
- yarn add @sarthak03dot/romantic-animations
65
- ```
66
-
67
- ---
68
-
69
- ## โœจ Available Animations & API reference
70
-
71
- Each animation function returns a unique **`sessionId`** string. Keep this reference to stop or update the animation loops when pages change.
72
-
73
- ### 1. `startFloatingHearts(container, options)`
74
- Rises hearts from the bottom edge of the container that drift sideways via a sinusoidal wave.
75
- * **Best for**: Romantic background ambient atmosphere.
76
- * **Special options**:
77
- * `count`: Particle spawning density multiplier (`0.01` to `1.0`, default `0.15`).
78
-
79
- ### 2. `startHeartTrail(container, options)`
80
- Leaves a beautiful floating heart trail trailing directly behind the mouse pointer or fingertip touches.
81
- * **Best for**: High-user-interaction sections.
82
- * **Special options**:
83
- * `maxSize`: Tail sizing bounds.
84
-
85
- ### 3. `startHeartBurst(container, options)`
86
- Spawns explosive, colorful shockwaves of hearts, stars, or sparkles radiating outwards from a click/tap coordinate.
87
- * **Best for**: Interactive buttons, click rewards, and anniversary triggers.
88
-
89
- ### 4. `startSparkles(container, options)`
90
- Twinkling 4-point cross sparkles that gently float down, simulating glowing fairy dust.
91
- * **Best for**: Mystical theme overlays.
92
-
93
- ### 5. `startLoveRain(container, options)`
94
- A falling downpour of romantic emojis (`๐Ÿ’–`, `๐Ÿ’•`, `๐ŸŒธ`, etc.) and hearts drifting on wind vectors.
95
- * **Best for**: Wedding banners and celebration announcements.
96
-
97
- ### 6. `startConfetti(container, options)`
98
- Celebration ribbons and flakes launched from the screen edges falling under the influence of gravity, rotational twist, and drag.
99
- * **Best for**: Checkout success, checkout completions, or birthday triggers.
100
-
101
- ### 7. `startFireworks(container, options)`
102
- Auto-firing rockets launching upwards, leaving trail paths before bursting into colorful star coordinate arrays.
103
- * **Best for**: Festivities and new-year celebrations.
104
-
105
- ### 8. `startStarField(container, options)`
106
- An interactive warp speed stellar coordinate system drawing sleek geometric line links to nearby stars.
107
- * **Best for**: Interactive hero pages.
108
-
109
- ### 9. `startButterflies(container, options)`
110
- Wing-flapping glowing butterfly paths that hover organically with realistic flight drift algorithms.
111
- * **Best for**: Spring-time landing themes.
112
-
113
- ### 10. `startMagicDust(container, options)`
114
- Swirling trails of glittering particles that drift slowly on the screen.
115
-
116
- ### 11. `startFloatingOrbs(container, options)`
117
- Large, soft bokeh globes bouncing gently off the screen boundaries.
118
-
119
- ### 12. `startShootingStars(container, options)`
120
- Cosmic meteor streaks flashing randomly across the dark skyline.
121
-
122
- ---
123
-
124
- ## ๐Ÿ’ป Integration Guides
125
-
126
- ### 1. Vanilla JavaScript ESM Setup
127
- Ensure your container is structured to overlap the viewport properly:
128
-
129
- ```html
130
- <!-- Main Overlay Wrapper -->
131
- <div id="romantic-canvas-container" style="position: fixed; inset: 0; pointer-events: none; z-index: 9999;"></div>
132
-
133
- <script type="module">
134
- import { startFloatingHearts } from '@sarthak03dot/romantic-animations';
135
-
136
- // Spawn romantic drifting hearts
137
- const sessionId = startFloatingHearts('romantic-canvas-container', {
138
- count: 0.2,
139
- minSize: 10,
140
- maxSize: 30,
141
- colors: ['#ff4d6d', '#ff85a1', '#e8c1a0'],
142
- glow: true
143
- });
144
- </script>
145
- ```
146
-
147
- ---
148
-
149
- ### 2. React Components (Zero-Leak Hooks)
150
- Always clean up your active canvas sessions when components unmount to prevent memory leaks in single-page apps:
151
-
152
- ```jsx
153
- import React, { useEffect, useRef } from 'react';
154
- import { startConfetti, stopAnimation } from '@sarthak03dot/romantic-animations';
155
-
156
- export const ConfettiCelebration = () => {
157
- const containerRef = useRef(null);
158
- const sessionRef = useRef(null);
159
-
160
- useEffect(() => {
161
- if (containerRef.current) {
162
- sessionRef.current = startConfetti(containerRef.current, {
163
- count: 0.35,
164
- colors: ['#ff4d6d', '#ff85a1', '#c77dff', '#48cae4']
165
- });
166
- }
167
-
168
- // Stop active canvas loops immediately on unmount
169
- return () => {
170
- if (sessionRef.current) {
171
- stopAnimation(sessionRef.current);
172
- }
173
- };
174
- }, []);
175
-
176
- return (
177
- <div
178
- ref={containerRef}
179
- style={{
180
- position: 'fixed',
181
- inset: 0,
182
- pointerEvents: 'none',
183
- zIndex: 9999
184
- }}
185
- />
186
- );
187
- };
188
- ```
189
-
190
- ---
191
-
192
- ### 3. Next.js Client Integrations (SSR Protection)
193
- Canvas rendering references the global browser `window` object. Guard imports using a client-side execution block:
194
-
195
- ```jsx
196
- 'use client';
197
-
198
- import React, { useEffect } from 'react';
199
-
200
- export default function LandingPage() {
201
- useEffect(() => {
202
- // Dynamic import inside useEffect to safely isolate client-only UMD scripts
203
- import('@sarthak03dot/romantic-animations').then((lib) => {
204
- lib.startShootingStars('shooting-stars-overlay', {
205
- speed: 2.5,
206
- count: 0.15
207
- });
208
- });
209
- }, []);
210
-
211
- return (
212
- <div style={{ position: 'relative', minHeight: '100vh', background: '#0b0c10' }}>
213
- <div
214
- id="shooting-stars-overlay"
215
- style={{
216
- position: 'absolute',
217
- inset: 0,
218
- pointerEvents: 'none',
219
- zIndex: 10
220
- }}
221
- />
222
- </div>
223
- );
224
- }
225
- ```
226
-
227
- ---
228
-
229
- ### 4. Direct Browser UMD CDN Script Integration
230
- Excellent for quick testing inside simple HTML static assets:
231
-
232
- ```html
233
- <!DOCTYPE html>
234
- <html lang="en">
235
- <head>
236
- <meta charset="UTF-8">
237
- <title>Romantic Page</title>
238
- </head>
239
- <body>
240
- <!-- Canvas overlay -->
241
- <div id="overlay-container" style="position: fixed; inset: 0; pointer-events: none; z-index: 9999;"></div>
242
-
243
- <!-- UMD script loading -->
244
- <script src="https://cdn.jsdelivr.net/npm/@sarthak03dot/romantic-animations@1.2.0/dist/romantic-animations.umd.js"></script>
245
-
246
- <script>
247
- // Access via global window namespace
248
- RomanticAnimations.startSparkles('overlay-container', {
249
- count: 0.25,
250
- glow: true
251
- });
252
- </script>
253
- </body>
254
- </html>
255
- ```
256
-
257
- ---
258
-
259
- ## โš™๏ธ Configuration Properties
260
-
261
- The second parameter supports rich custom tokens:
262
-
263
- | Property | Type | Default | Description |
264
- | :--- | :--- | :--- | :--- |
265
- | `count` | `Number` | `0.2` | Particle spawn density rate (range: `0.01` to `1.0`). |
266
- | `minSize` | `Number` | `10` | Minimum particle rendering size in pixels. |
267
- | `maxSize` | `Number` | `30` | Maximum particle rendering size in pixels. |
268
- | `colors` | `Array` | `['#ff4d6d']` | List of color hex/rgb strings chosen randomly for particles. |
269
- | `glow` | `Boolean` | `true` | Enables/disables radial neon drop shadows. |
270
- | `speed` | `Number` | `1.5` | Particle speed modifier multiplier. |
271
-
272
- ---
273
-
274
- ## ๐Ÿงน Session Management & Lifecycle Cleansing
275
-
276
- Stop active loops cleanly with the lifecycle triggers:
277
-
278
- ```javascript
279
- import { startFloatingHearts, stopAnimation, stopAll } from '@sarthak03dot/romantic-animations';
280
-
281
- // Start session
282
- const session = startFloatingHearts('canvas-wrapper');
283
-
284
- // Clean up just this single session
285
- stopAnimation(session);
286
-
287
- // Clean up all running canvas loops on the page at once
288
- stopAll();
289
- ```
290
-
291
- ---
292
-
293
- ## ๐Ÿค Contributing & Running Locally
294
-
295
- We welcome bug fixes, enhancement requests, and brand new canvas effect implementations!
296
-
297
- 1. **Fork the Repository** and clone it.
298
- 2. Install all dev packages:
299
- ```bash
300
- npm install
301
- ```
302
- 3. Boot the local development server:
303
- ```bash
304
- npm run dev
305
- ```
306
- 4. Write your gorgeous animation source codes inside `src/animations/` and wire them into the global entry inside `src/index.js`.
307
- 5. Run the production build validation:
308
- ```bash
309
- npm run build
310
- npm run build:demo
311
- ```
312
- 6. Submit a **Pull Request** detailing your upgrades!
313
-
314
- ---
315
-
316
- ## ๐Ÿง‘โ€๐Ÿ’ป Author
317
-
318
- **Sarthak Singh ๐Ÿ‘‹**
319
- * Passionate front-end developer crafting interactive canvas web experiences.
320
- * **Email**: [sarthak03december@gmail.com](mailto:sarthak03december@gmail.com)
321
- * **GitHub**: [@sarthak03dot](https://github.com/sarthak03dot)
322
-
323
- ---
324
-
325
- ## ๐Ÿ“„ License
326
-
327
- This repository is licensed under the [MIT License](LICENSE).
1
+ # ๐Ÿ’– Romantic Animations v1.2.0
2
+
3
+ <p align="center">
4
+ <b>A premium, lightweight, zero-dependency JavaScript canvas particle library for gorgeous romantic & celebratory effects.</b>
5
+ </p>
6
+
7
+ <p align="center">
8
+ Perfect for Valentine's Day, weddings, anniversaries, landing pages, or any celebratory web application needing high-quality hardware-accelerated visual particle overlays.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/@sarthak03dot/romantic-animations">
13
+ <img src="https://img.shields.io/npm/v/@sarthak03dot/romantic-animations.svg" alt="NPM Version" />
14
+ </a>
15
+ <a href="https://opensource.org/licenses/MIT">
16
+ <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" />
17
+ </a>
18
+ <a href="https://sarthak03dot.github.io/romantic-animations/">
19
+ <img src="https://img.shields.io/badge/Demo-Interactive%20Showcase-ff4d6d.svg" alt="Interactive Showcase" />
20
+ </a>
21
+ </p>
22
+
23
+ ---
24
+
25
+ ## Live Demo
26
+
27
+ [![Live Demo](https://img.shields.io/badge/๐Ÿš€-Try%20Live%20Demo-ff4d6d?style=for-the-badge)](https://sarthak03dot.github.io/romantic-animations/)
28
+
29
+ ---
30
+
31
+ ## Gallery & Screenshots (Placeholder Previews)
32
+
33
+ Here is a sneak peek at the gorgeous, performance-tuned particle renderers in action.
34
+ *(You can swap these placeholders with your actual screenshots in `docs/screenshots/`)*
35
+
36
+ <div align="center">
37
+ <h3>โœจ Floating Hearts & Live Tweaks</h3>
38
+ <img width="1874" height="859" alt="Image" src="https://github.com/user-attachments/assets/08516f1e-c943-4cc5-9749-78f13a6af47b" />
39
+
40
+ <h3>๐ŸŽ† Starry Fireworks Celebration</h3>
41
+ <img width="1880" height="853" alt="Image" src="https://github.com/user-attachments/assets/5642cd49-8908-417b-8cc0-12d00e8a6eda" />
42
+
43
+ <h3>๐Ÿ“š Integrated Live Customizer & Developer Portal</h3>
44
+ <img width="1864" height="855" alt="Image" src="https://github.com/user-attachments/assets/a676f240-0502-4cd7-896d-7ceb8994478c" />
45
+ </div>
46
+
47
+ ---
48
+
49
+ ## ๐Ÿš€ Key Features
50
+
51
+ * ๐Ÿš€ **High Performance & Zero Dependencies**: Built directly on raw HTML5 `<canvas>` API with optimal mathematical loop calculations (`requestAnimationFrame`), keeping your bundle size extremely small.
52
+ * ๐ŸŒ“ **Responsive Dual-Theme Customizer**: Fully styled and responsive landing page that seamlessly toggles between a neon-drenched **Dark Mode** and a clean, high-contrast **Light Mode** for accessibility.
53
+ * ๐Ÿ“ฑ **Touch & Mobile Optimizations**: Fully responsive drawer nav overlays, click-burst triggers for tapping screens, and custom mobile menu structures.
54
+ * ๐Ÿ“š **Collapsible Developer Portal**: Hash-routed playground switcher containing dynamic CDN, Vanilla, React, and Next.js SSR setups.
55
+
56
+ ---
57
+ ## ๐Ÿ“ฆ Installation
58
+
59
+ To begin adding romantic canvas overlays to your codebase:
60
+
61
+ ```bash
62
+ # Using npm
63
+ npm install @sarthak03dot/romantic-animations
64
+
65
+ # Using pnpm
66
+ pnpm add @sarthak03dot/romantic-animations
67
+
68
+ # Using yarn
69
+ yarn add @sarthak03dot/romantic-animations
70
+ ```
71
+
72
+ ---
73
+
74
+ ## โœจ Available Animations & API reference
75
+
76
+ Each animation function returns a unique **`sessionId`** string. Keep this reference to stop or update the animation loops when pages change.
77
+
78
+ ### 1. `startFloatingHearts(container, options)`
79
+ Rises hearts from the bottom edge of the container that drift sideways via a sinusoidal wave.
80
+ * **Best for**: Romantic background ambient atmosphere.
81
+ * **Special options**:
82
+ * `count`: Particle spawning density multiplier (`0.01` to `1.0`, default `0.15`).
83
+
84
+ ### 2. `startHeartTrail(container, options)`
85
+ Leaves a beautiful floating heart trail trailing directly behind the mouse pointer or fingertip touches.
86
+ * **Best for**: High-user-interaction sections.
87
+ * **Special options**:
88
+ * `maxSize`: Tail sizing bounds.
89
+
90
+ ### 3. `startHeartBurst(container, options)`
91
+ Spawns explosive, colorful shockwaves of hearts, stars, or sparkles radiating outwards from a click/tap coordinate.
92
+ * **Best for**: Interactive buttons, click rewards, and anniversary triggers.
93
+
94
+ ### 4. `startSparkles(container, options)`
95
+ Twinkling 4-point cross sparkles that gently float down, simulating glowing fairy dust.
96
+ * **Best for**: Mystical theme overlays.
97
+
98
+ ### 5. `startLoveRain(container, options)`
99
+ A falling downpour of romantic emojis (`๐Ÿ’–`, `๐Ÿ’•`, `๐ŸŒธ`, etc.) and hearts drifting on wind vectors.
100
+ * **Best for**: Wedding banners and celebration announcements.
101
+
102
+ ### 6. `startConfetti(container, options)`
103
+ Celebration ribbons and flakes launched from the screen edges falling under the influence of gravity, rotational twist, and drag.
104
+ * **Best for**: Checkout success, checkout completions, or birthday triggers.
105
+
106
+ ### 7. `startFireworks(container, options)`
107
+ Auto-firing rockets launching upwards, leaving trail paths before bursting into colorful star coordinate arrays.
108
+ * **Best for**: Festivities and new-year celebrations.
109
+
110
+ ### 8. `startStarField(container, options)`
111
+ An interactive warp speed stellar coordinate system drawing sleek geometric line links to nearby stars.
112
+ * **Best for**: Interactive hero pages.
113
+
114
+ ### 9. `startButterflies(container, options)`
115
+ Wing-flapping glowing butterfly paths that hover organically with realistic flight drift algorithms.
116
+ * **Best for**: Spring-time landing themes.
117
+
118
+ ### 10. `startMagicDust(container, options)`
119
+ Swirling trails of glittering particles that drift slowly on the screen.
120
+
121
+ ### 11. `startFloatingOrbs(container, options)`
122
+ Large, soft bokeh globes bouncing gently off the screen boundaries.
123
+
124
+ ### 12. `startShootingStars(container, options)`
125
+ Cosmic meteor streaks flashing randomly across the dark skyline.
126
+
127
+ ---
128
+
129
+ ## ๐Ÿ’ป Integration Guides
130
+
131
+ ### 1. Vanilla JavaScript ESM Setup
132
+ Ensure your container is structured to overlap the viewport properly:
133
+
134
+ ```html
135
+ <!-- Main Overlay Wrapper -->
136
+ <div id="romantic-canvas-container" style="position: fixed; inset: 0; pointer-events: none; z-index: 9999;"></div>
137
+
138
+ <script type="module">
139
+ import { startFloatingHearts } from '@sarthak03dot/romantic-animations';
140
+
141
+ // Spawn romantic drifting hearts
142
+ const sessionId = startFloatingHearts('romantic-canvas-container', {
143
+ count: 0.2,
144
+ minSize: 10,
145
+ maxSize: 30,
146
+ colors: ['#ff4d6d', '#ff85a1', '#e8c1a0'],
147
+ glow: true
148
+ });
149
+ </script>
150
+ ```
151
+
152
+ ---
153
+
154
+ ### 2. React Components (Zero-Leak Hooks)
155
+ Always clean up your active canvas sessions when components unmount to prevent memory leaks in single-page apps:
156
+
157
+ ```jsx
158
+ import React, { useEffect, useRef } from 'react';
159
+ import { startConfetti, stopAnimation } from '@sarthak03dot/romantic-animations';
160
+
161
+ export const ConfettiCelebration = () => {
162
+ const containerRef = useRef(null);
163
+ const sessionRef = useRef(null);
164
+
165
+ useEffect(() => {
166
+ if (containerRef.current) {
167
+ sessionRef.current = startConfetti(containerRef.current, {
168
+ count: 0.35,
169
+ colors: ['#ff4d6d', '#ff85a1', '#c77dff', '#48cae4']
170
+ });
171
+ }
172
+
173
+ // Stop active canvas loops immediately on unmount
174
+ return () => {
175
+ if (sessionRef.current) {
176
+ stopAnimation(sessionRef.current);
177
+ }
178
+ };
179
+ }, []);
180
+
181
+ return (
182
+ <div
183
+ ref={containerRef}
184
+ style={{
185
+ position: 'fixed',
186
+ inset: 0,
187
+ pointerEvents: 'none',
188
+ zIndex: 9999
189
+ }}
190
+ />
191
+ );
192
+ };
193
+ ```
194
+
195
+ ---
196
+
197
+ ### 3. Next.js Client Integrations (SSR Protection)
198
+ Canvas rendering references the global browser `window` object. Guard imports using a client-side execution block:
199
+
200
+ ```jsx
201
+ 'use client';
202
+
203
+ import React, { useEffect } from 'react';
204
+
205
+ export default function LandingPage() {
206
+ useEffect(() => {
207
+ // Dynamic import inside useEffect to safely isolate client-only UMD scripts
208
+ import('@sarthak03dot/romantic-animations').then((lib) => {
209
+ lib.startShootingStars('shooting-stars-overlay', {
210
+ speed: 2.5,
211
+ count: 0.15
212
+ });
213
+ });
214
+ }, []);
215
+
216
+ return (
217
+ <div style={{ position: 'relative', minHeight: '100vh', background: '#0b0c10' }}>
218
+ <div
219
+ id="shooting-stars-overlay"
220
+ style={{
221
+ position: 'absolute',
222
+ inset: 0,
223
+ pointerEvents: 'none',
224
+ zIndex: 10
225
+ }}
226
+ />
227
+ </div>
228
+ );
229
+ }
230
+ ```
231
+
232
+ ---
233
+
234
+ ### 4. Direct Browser UMD CDN Script Integration
235
+ Excellent for quick testing inside simple HTML static assets:
236
+
237
+ ```html
238
+ <!DOCTYPE html>
239
+ <html lang="en">
240
+ <head>
241
+ <meta charset="UTF-8">
242
+ <title>Romantic Page</title>
243
+ </head>
244
+ <body>
245
+ <!-- Canvas overlay -->
246
+ <div id="overlay-container" style="position: fixed; inset: 0; pointer-events: none; z-index: 9999;"></div>
247
+
248
+ <!-- UMD script loading -->
249
+ <script src="https://cdn.jsdelivr.net/npm/@sarthak03dot/romantic-animations@1.2.0/dist/romantic-animations.umd.js"></script>
250
+
251
+ <script>
252
+ // Access via global window namespace
253
+ RomanticAnimations.startSparkles('overlay-container', {
254
+ count: 0.25,
255
+ glow: true
256
+ });
257
+ </script>
258
+ </body>
259
+ </html>
260
+ ```
261
+
262
+ ---
263
+
264
+ ## โš™๏ธ Configuration Properties
265
+
266
+ The second parameter supports rich custom tokens:
267
+
268
+ | Property | Type | Default | Description |
269
+ | :--- | :--- | :--- | :--- |
270
+ | `count` | `Number` | `0.2` | Particle spawn density rate (range: `0.01` to `1.0`). |
271
+ | `minSize` | `Number` | `10` | Minimum particle rendering size in pixels. |
272
+ | `maxSize` | `Number` | `30` | Maximum particle rendering size in pixels. |
273
+ | `colors` | `Array` | `['#ff4d6d']` | List of color hex/rgb strings chosen randomly for particles. |
274
+ | `glow` | `Boolean` | `true` | Enables/disables radial neon drop shadows. |
275
+ | `speed` | `Number` | `1.5` | Particle speed modifier multiplier. |
276
+
277
+ ---
278
+
279
+ ## ๐Ÿงน Session Management & Lifecycle Cleansing
280
+
281
+ Stop active loops cleanly with the lifecycle triggers:
282
+
283
+ ```javascript
284
+ import { startFloatingHearts, stopAnimation, stopAll } from '@sarthak03dot/romantic-animations';
285
+
286
+ // Start session
287
+ const session = startFloatingHearts('canvas-wrapper');
288
+
289
+ // Clean up just this single session
290
+ stopAnimation(session);
291
+
292
+ // Clean up all running canvas loops on the page at once
293
+ stopAll();
294
+ ```
295
+
296
+ ---
297
+
298
+ ## ๐Ÿค Contributing & Running Locally
299
+
300
+ We welcome bug fixes, enhancement requests, and brand new canvas effect implementations!
301
+
302
+ 1. **Fork the Repository** and clone it.
303
+ 2. Install all dev packages:
304
+ ```bash
305
+ npm install
306
+ ```
307
+ 3. Boot the local development server:
308
+ ```bash
309
+ npm run dev
310
+ ```
311
+ 4. Write your gorgeous animation source codes inside `src/animations/` and wire them into the global entry inside `src/index.js`.
312
+ 5. Run the production build validation:
313
+ ```bash
314
+ npm run build
315
+ npm run build:demo
316
+ ```
317
+ 6. Submit a **Pull Request** detailing your upgrades!
318
+
319
+ ---
320
+
321
+ ## ๐Ÿง‘โ€๐Ÿ’ป Author
322
+
323
+ **Sarthak Singh ๐Ÿ‘‹**
324
+ * Passionate front-end developer crafting interactive canvas web experiences.
325
+ * **Email**: [sarthak03december@gmail.com](mailto:sarthak03december@gmail.com)
326
+ * **GitHub**: [@sarthak03dot](https://github.com/sarthak03dot)
327
+
328
+ ---
329
+
330
+ ## ๐Ÿ“„ License
331
+
332
+ This repository is licensed under the [MIT License](LICENSE).