react-native-confetti-reanimated 0.1.0 → 0.1.2
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 +38 -38
- package/lib/commonjs/ConfettiCanvas.js +8 -7
- package/lib/commonjs/ConfettiCanvas.js.map +1 -1
- package/lib/commonjs/ConfettiParticle.js +134 -53
- package/lib/commonjs/ConfettiParticle.js.map +1 -1
- package/lib/commonjs/presets.js +65 -79
- package/lib/commonjs/presets.js.map +1 -1
- package/lib/commonjs/utils.js +65 -10
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/ConfettiCanvas.js +8 -7
- package/lib/module/ConfettiCanvas.js.map +1 -1
- package/lib/module/ConfettiParticle.js +135 -54
- package/lib/module/ConfettiParticle.js.map +1 -1
- package/lib/module/presets.js +64 -78
- package/lib/module/presets.js.map +1 -1
- package/lib/module/utils.js +65 -10
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/ConfettiCanvas.d.ts.map +1 -1
- package/lib/typescript/ConfettiParticle.d.ts +2 -1
- package/lib/typescript/ConfettiParticle.d.ts.map +1 -1
- package/lib/typescript/presets.d.ts +22 -26
- package/lib/typescript/presets.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +4 -3
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils.d.ts.map +1 -1
- package/package.json +10 -14
- package/src/ConfettiCanvas.tsx +19 -14
- package/src/ConfettiParticle.tsx +153 -75
- package/src/presets.ts +56 -70
- package/src/types.ts +4 -3
- package/src/utils.ts +44 -20
- package/lib/module/package.json +0 -1
package/README.md
CHANGED
|
@@ -5,20 +5,13 @@ A high-performance confetti component for React Native, powered by [Reanimated 4
|
|
|
5
5
|
[](https://www.npmjs.com/package/react-native-confetti-reanimated)
|
|
6
6
|
[](https://github.com/andydev271/react-native-confetti-reanimated/blob/main/LICENSE)
|
|
7
7
|
|
|
8
|
-
## Preview
|
|
9
|
-
|
|
10
|
-
<!-- Add your demo GIF here after generating it -->
|
|
11
|
-

|
|
12
|
-
|
|
13
|
-
> **Note**: To generate demo GIFs, run the example app and record the screen. See [example/README.md](./example/README.md) for instructions.
|
|
14
|
-
|
|
15
8
|
## Features
|
|
16
9
|
|
|
17
10
|
- 🚀 **High Performance** - Built with Reanimated 4 for smooth 60fps animations on UI thread
|
|
18
11
|
- 📱 **Expo Compatible** - Works seamlessly with Expo managed workflow
|
|
19
12
|
- 🎨 **Fully Customizable** - Control colors, shapes, physics, and more
|
|
20
|
-
- 🎭 **Multiple Shapes** - Supports squares, circles, and
|
|
21
|
-
- 🎯 **Preset Effects** - Ready-to-use effects like fireworks,
|
|
13
|
+
- 🎭 **Multiple Shapes** - Supports squares, circles, and stars
|
|
14
|
+
- 🎯 **Preset Effects** - Ready-to-use effects like fireworks, stars, and realistic confetti
|
|
22
15
|
- 🌈 **Canvas Confetti API** - Familiar API inspired by canvas-confetti
|
|
23
16
|
- 📦 **TypeScript** - Full TypeScript support
|
|
24
17
|
- 🔧 **Lightweight** - Minimal dependencies
|
|
@@ -26,29 +19,27 @@ A high-performance confetti component for React Native, powered by [Reanimated 4
|
|
|
26
19
|
## Installation
|
|
27
20
|
|
|
28
21
|
```bash
|
|
29
|
-
npm install react-native-confetti-reanimated react-native-reanimated
|
|
22
|
+
npm install react-native-confetti-reanimated react-native-reanimated
|
|
30
23
|
```
|
|
31
24
|
|
|
32
25
|
Or with Expo:
|
|
33
26
|
|
|
34
27
|
```bash
|
|
35
|
-
npx expo install react-native-confetti-reanimated react-native-reanimated
|
|
28
|
+
npx expo install react-native-confetti-reanimated react-native-reanimated
|
|
36
29
|
```
|
|
37
30
|
|
|
38
31
|
### Setup
|
|
39
32
|
|
|
40
33
|
Add the Babel plugin to your `babel.config.js`:
|
|
41
34
|
|
|
42
|
-
**For Expo projects:**
|
|
35
|
+
**For Expo projects (SDK 50+):**
|
|
43
36
|
|
|
44
37
|
```javascript
|
|
45
38
|
module.exports = function (api) {
|
|
46
39
|
api.cache(true);
|
|
47
40
|
return {
|
|
48
41
|
presets: ['babel-preset-expo'],
|
|
49
|
-
|
|
50
|
-
'react-native-worklets/plugin',
|
|
51
|
-
],
|
|
42
|
+
// Reanimated plugin is automatically included in Expo SDK 50+
|
|
52
43
|
};
|
|
53
44
|
};
|
|
54
45
|
```
|
|
@@ -60,11 +51,12 @@ module.exports = {
|
|
|
60
51
|
presets: ['module:metro-react-native-babel-preset'],
|
|
61
52
|
plugins: [
|
|
62
53
|
'react-native-worklets/plugin',
|
|
54
|
+
'react-native-reanimated/plugin',
|
|
63
55
|
],
|
|
64
56
|
};
|
|
65
57
|
```
|
|
66
58
|
|
|
67
|
-
> ⚠️ **Important**:
|
|
59
|
+
> ⚠️ **Important**: For Expo, plugins are auto-included. For React Native CLI, add both plugins (worklets before reanimated). Restart your app after changes.
|
|
68
60
|
|
|
69
61
|
## Quick Start
|
|
70
62
|
|
|
@@ -92,16 +84,19 @@ export default function App() {
|
|
|
92
84
|
```tsx
|
|
93
85
|
import { presets } from 'react-native-confetti-reanimated';
|
|
94
86
|
|
|
95
|
-
//
|
|
96
|
-
fire(presets.
|
|
87
|
+
// Basic cannon burst
|
|
88
|
+
fire(presets.basicCannon);
|
|
97
89
|
|
|
98
|
-
//
|
|
99
|
-
fire(presets.
|
|
90
|
+
// Random direction (different each time)
|
|
91
|
+
fire(presets.randomDirection);
|
|
92
|
+
|
|
93
|
+
// Realistic confetti (mixed bursts)
|
|
94
|
+
fire(presets.realistic);
|
|
100
95
|
|
|
101
|
-
//
|
|
102
|
-
fire(presets.
|
|
96
|
+
// Fireworks effect (continuous from sides)
|
|
97
|
+
fire(presets.fireworks);
|
|
103
98
|
|
|
104
|
-
// Stars
|
|
99
|
+
// Stars burst
|
|
105
100
|
fire(presets.stars);
|
|
106
101
|
```
|
|
107
102
|
|
|
@@ -184,7 +179,7 @@ interface ConfettiConfig {
|
|
|
184
179
|
colors?: string[]; // Default: vibrant colors
|
|
185
180
|
scalar?: number; // Default: 1
|
|
186
181
|
origin?: { x?: number; y?: number }; // Default: { x: 0.5, y: 0.5 }
|
|
187
|
-
shapes?: Array<'square' | 'circle' | '
|
|
182
|
+
shapes?: Array<'square' | 'circle' | 'star'>; // Default: ['square']
|
|
188
183
|
tilt?: boolean; // Default: true
|
|
189
184
|
tiltAngleIncrement?: number; // Default: 10
|
|
190
185
|
}
|
|
@@ -193,19 +188,24 @@ interface ConfettiConfig {
|
|
|
193
188
|
### Available Presets
|
|
194
189
|
|
|
195
190
|
```typescript
|
|
196
|
-
presets.
|
|
197
|
-
presets.
|
|
198
|
-
presets.realistic
|
|
199
|
-
presets.
|
|
200
|
-
presets.stars
|
|
201
|
-
presets.leftCannon
|
|
202
|
-
presets.rightCannon
|
|
203
|
-
presets.bottomCannon
|
|
191
|
+
presets.basicCannon // 🎊 Basic celebration burst
|
|
192
|
+
presets.randomDirection // 🎲 Random direction & amount
|
|
193
|
+
presets.realistic // ✨ Realistic confetti (mixed bursts)
|
|
194
|
+
presets.fireworks // 🎆 Continuous fireworks from sides
|
|
195
|
+
presets.stars // ⭐ Golden star burst
|
|
196
|
+
presets.leftCannon // ⬅️ Left side cannon
|
|
197
|
+
presets.rightCannon // ➡️ Right side cannon
|
|
198
|
+
presets.bottomCannon // ⬆️ Bottom cannon
|
|
204
199
|
```
|
|
205
200
|
|
|
206
201
|
## Example App
|
|
207
202
|
|
|
208
|
-
Check out the `example` directory for a complete demo app with all features
|
|
203
|
+
Check out the `example` directory for a complete demo app with all features:
|
|
204
|
+
- 🎊 Basic Cannon
|
|
205
|
+
- 🎲 Random Direction
|
|
206
|
+
- ✨ Realistic Look
|
|
207
|
+
- 🎆 Fireworks
|
|
208
|
+
- ⭐ Stars
|
|
209
209
|
|
|
210
210
|
```bash
|
|
211
211
|
cd example
|
|
@@ -219,16 +219,16 @@ Then use Expo Go to scan the QR code or press `i` for iOS / `a` for Android.
|
|
|
219
219
|
|
|
220
220
|
- ✅ iOS
|
|
221
221
|
- ✅ Android
|
|
222
|
-
- ✅ Expo (SDK 50
|
|
222
|
+
- ✅ Expo (SDK 50+, tested with SDK 54)
|
|
223
223
|
|
|
224
224
|
## Requirements
|
|
225
225
|
|
|
226
|
-
- React
|
|
226
|
+
- React ≥ 18.0.0 (tested with React 19)
|
|
227
|
+
- React Native ≥ 0.74 (New Architecture/Fabric required)
|
|
227
228
|
- React Native Reanimated ≥ 4.0.0
|
|
228
|
-
-
|
|
229
|
-
- Expo SDK ≥ 50 (if using Expo)
|
|
229
|
+
- Expo SDK ≥ 50 (tested with SDK 54)
|
|
230
230
|
|
|
231
|
-
> **Note**: Reanimated 4 requires
|
|
231
|
+
> **Note**: Reanimated 4 requires React Native's New Architecture (Fabric). Expo SDK 50+ has this enabled by default.
|
|
232
232
|
|
|
233
233
|
## Troubleshooting
|
|
234
234
|
|
|
@@ -16,7 +16,6 @@ const ConfettiCanvas = exports.ConfettiCanvas = /*#__PURE__*/_react.default.forw
|
|
|
16
16
|
fullScreen = true
|
|
17
17
|
}, ref) => {
|
|
18
18
|
const [particles, setParticles] = (0, _react.useState)([]);
|
|
19
|
-
const [activeCount, setActiveCount] = (0, _react.useState)(0);
|
|
20
19
|
const {
|
|
21
20
|
width,
|
|
22
21
|
height
|
|
@@ -32,8 +31,11 @@ const ConfettiCanvas = exports.ConfettiCanvas = /*#__PURE__*/_react.default.forw
|
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
33
|
const newParticles = (0, _utils.createConfettiParticles)(mergedConfig, width, height);
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const particlesWithConfig = newParticles.map(p => ({
|
|
35
|
+
...p,
|
|
36
|
+
config: mergedConfig
|
|
37
|
+
}));
|
|
38
|
+
setParticles(prev => [...prev, ...particlesWithConfig]);
|
|
37
39
|
|
|
38
40
|
// Resolve after the duration
|
|
39
41
|
setTimeout(() => {
|
|
@@ -43,7 +45,6 @@ const ConfettiCanvas = exports.ConfettiCanvas = /*#__PURE__*/_react.default.forw
|
|
|
43
45
|
}, [width, height]);
|
|
44
46
|
const reset = (0, _react.useCallback)(() => {
|
|
45
47
|
setParticles([]);
|
|
46
|
-
setActiveCount(0);
|
|
47
48
|
}, []);
|
|
48
49
|
(0, _react.useImperativeHandle)(ref, () => {
|
|
49
50
|
const confetti = fire;
|
|
@@ -51,13 +52,12 @@ const ConfettiCanvas = exports.ConfettiCanvas = /*#__PURE__*/_react.default.forw
|
|
|
51
52
|
return confetti;
|
|
52
53
|
}, [fire, reset]);
|
|
53
54
|
const handleParticleComplete = (0, _react.useCallback)(particleId => {
|
|
54
|
-
setActiveCount(prev => prev - 1);
|
|
55
55
|
setParticles(prev => {
|
|
56
56
|
// Clean up completed particles periodically
|
|
57
57
|
if (prev.length > 100) {
|
|
58
58
|
return prev.filter(p => p.id !== particleId).slice(-50);
|
|
59
59
|
}
|
|
60
|
-
return prev;
|
|
60
|
+
return prev.filter(p => p.id !== particleId);
|
|
61
61
|
});
|
|
62
62
|
}, []);
|
|
63
63
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
@@ -67,7 +67,8 @@ const ConfettiCanvas = exports.ConfettiCanvas = /*#__PURE__*/_react.default.forw
|
|
|
67
67
|
pointerEvents: "none",
|
|
68
68
|
children: particles.map(particle => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfettiParticle.ConfettiParticle, {
|
|
69
69
|
particle: particle,
|
|
70
|
-
|
|
70
|
+
config: particle.config,
|
|
71
|
+
duration: particle.config.duration,
|
|
71
72
|
onComplete: () => handleParticleComplete(particle.id)
|
|
72
73
|
}, particle.id))
|
|
73
74
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_utils","_ConfettiParticle","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfettiCanvas","exports","React","forwardRef","containerStyle","zIndex","fullScreen","ref","particles","setParticles","useState","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_utils","_ConfettiParticle","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfettiCanvas","exports","React","forwardRef","containerStyle","zIndex","fullScreen","ref","particles","setParticles","useState","width","height","useWindowDimensions","fire","useCallback","config","Promise","resolve","mergedConfig","DEFAULT_CONFIG","origin","newParticles","createConfettiParticles","particlesWithConfig","map","p","prev","setTimeout","duration","reset","useImperativeHandle","confetti","handleParticleComplete","particleId","length","filter","id","slice","jsx","View","style","styles","container","pointerEvents","children","particle","ConfettiParticle","onComplete","displayName","StyleSheet","create","position","top","left","right","bottom"],"sourceRoot":"../../src","sources":["ConfettiCanvas.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAAsD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gB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AC,QAAA,EACnBrC,SAAS,CAACiB,GAAG,CAACqB,QAAQ,iBACrB,IAAAlE,WAAA,CAAA2D,GAAA,EAAC5D,iBAAA,CAAAoE,gBAAgB;MAEfD,QAAQ,EAAEA,QAAS;MACnB9B,MAAM,EAAE8B,QAAQ,CAAC9B,MAAO;MACxBa,QAAQ,EAAEiB,QAAQ,CAAC9B,MAAM,CAACa,QAAS;MACnCmB,UAAU,EAAEA,CAAA,KAAMf,sBAAsB,CAACa,QAAQ,CAACT,EAAE;IAAE,GAJjDS,QAAQ,CAACT,EAKf,CACF;EAAC,CACE,CAAC;AAEX,CACF,CAAC;AAEDrC,cAAc,CAACiD,WAAW,GAAG,gBAAgB;AAE7C,MAAMP,MAAM,GAAGQ,uBAAU,CAACC,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,QAAQ,EAAE,UAAU;IACpBzC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV,CAAC;EACDN,UAAU,EAAE;IACV+C,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
11
11
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
12
|
const ConfettiParticle = ({
|
|
13
13
|
particle,
|
|
14
|
+
config,
|
|
14
15
|
duration,
|
|
15
16
|
onComplete
|
|
16
17
|
}) => {
|
|
@@ -18,68 +19,159 @@ const ConfettiParticle = ({
|
|
|
18
19
|
const translateY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
19
20
|
const rotation = (0, _reactNativeReanimated.useSharedValue)(particle.rotation);
|
|
20
21
|
const opacity = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
22
|
+
|
|
23
|
+
// Velocity state
|
|
24
|
+
const velX = (0, _reactNativeReanimated.useSharedValue)(particle.velocity.x);
|
|
25
|
+
const velY = (0, _reactNativeReanimated.useSharedValue)(particle.velocity.y);
|
|
26
|
+
const startTime = (0, _reactNativeReanimated.useSharedValue)(Date.now());
|
|
27
|
+
const isComplete = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
28
|
+
|
|
29
|
+
// Canvas-confetti realistic wobble and tilt variables
|
|
30
|
+
const wobble = (0, _reactNativeReanimated.useSharedValue)(Math.random() * 10);
|
|
31
|
+
const wobbleSpeed = (0, _reactNativeReanimated.useSharedValue)(Math.min(0.11, Math.random() * 0.1 + 0.05));
|
|
32
|
+
const tiltAngle = (0, _reactNativeReanimated.useSharedValue)(particle.tiltAngle);
|
|
33
|
+
const tiltSin = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
34
|
+
const tiltCos = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
35
|
+
const random = (0, _reactNativeReanimated.useSharedValue)(Math.random() + 2);
|
|
36
|
+
const tick = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
37
|
+
const totalTicks = (0, _reactNativeReanimated.useSharedValue)(duration / 1000 * 60); // 60fps
|
|
38
|
+
|
|
21
39
|
(0, _react.useEffect)(() => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
rotation.value = (0, _reactNativeReanimated.withTiming)(particle.rotation + particle.rotationVelocity * (duration / 16), {
|
|
32
|
-
duration,
|
|
33
|
-
easing: _reactNativeReanimated.Easing.linear
|
|
34
|
-
});
|
|
35
|
-
opacity.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
36
|
-
duration,
|
|
37
|
-
easing: _reactNativeReanimated.Easing.linear
|
|
38
|
-
}, finished => {
|
|
39
|
-
if (finished && onComplete) {
|
|
40
|
-
(0, _reactNativeReanimated.runOnJS)(onComplete)();
|
|
40
|
+
startTime.value = Date.now();
|
|
41
|
+
tick.value = 0;
|
|
42
|
+
|
|
43
|
+
// Cleanup callback
|
|
44
|
+
const timer = setTimeout(() => {
|
|
45
|
+
isComplete.value = true;
|
|
46
|
+
if (onComplete) {
|
|
47
|
+
onComplete();
|
|
41
48
|
}
|
|
42
|
-
});
|
|
43
|
-
|
|
49
|
+
}, duration);
|
|
50
|
+
return () => {
|
|
51
|
+
clearTimeout(timer);
|
|
52
|
+
(0, _reactNativeReanimated.cancelAnimation)(translateX);
|
|
53
|
+
(0, _reactNativeReanimated.cancelAnimation)(translateY);
|
|
54
|
+
(0, _reactNativeReanimated.cancelAnimation)(rotation);
|
|
55
|
+
(0, _reactNativeReanimated.cancelAnimation)(opacity);
|
|
56
|
+
};
|
|
57
|
+
}, [duration, onComplete, opacity, isComplete, startTime, translateX, translateY, rotation, tick]);
|
|
58
|
+
|
|
59
|
+
// Real-time physics simulation using frame callback
|
|
60
|
+
(0, _reactNativeReanimated.useFrameCallback)(() => {
|
|
61
|
+
'worklet';
|
|
62
|
+
|
|
63
|
+
if (isComplete.value) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const elapsed = Date.now() - startTime.value;
|
|
67
|
+
if (elapsed >= duration) {
|
|
68
|
+
isComplete.value = true;
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Update position based on current velocity
|
|
73
|
+
translateX.value += velX.value;
|
|
74
|
+
translateY.value += velY.value;
|
|
75
|
+
|
|
76
|
+
// Apply gravity (increases downward velocity) - realistic physics!
|
|
77
|
+
velY.value += config.gravity;
|
|
78
|
+
|
|
79
|
+
// Apply drift (horizontal wind)
|
|
80
|
+
velX.value += config.drift;
|
|
81
|
+
|
|
82
|
+
// Apply decay (air resistance)
|
|
83
|
+
velX.value *= config.decay;
|
|
84
|
+
velY.value *= config.decay;
|
|
85
|
+
|
|
86
|
+
// Update rotation - ALL particles spin faster when moving fast, slower when slowing down
|
|
87
|
+
const speed = Math.sqrt(velX.value * velX.value + velY.value * velY.value);
|
|
88
|
+
const speedBoost = 1 + speed / 20;
|
|
89
|
+
rotation.value += particle.rotationVelocity * speedBoost;
|
|
90
|
+
|
|
91
|
+
// Canvas-confetti wobble effect (creates side-to-side flutter)
|
|
92
|
+
wobble.value += wobbleSpeed.value;
|
|
93
|
+
|
|
94
|
+
// Canvas-confetti tilt animation (creates 3D tumbling effect)
|
|
95
|
+
tiltAngle.value += 0.1;
|
|
96
|
+
tiltSin.value = Math.sin(tiltAngle.value);
|
|
97
|
+
tiltCos.value = Math.cos(tiltAngle.value);
|
|
98
|
+
random.value = Math.random() + 2;
|
|
99
|
+
|
|
100
|
+
// Update tick for progressive opacity fade
|
|
101
|
+
tick.value += 1;
|
|
102
|
+
|
|
103
|
+
// Canvas-confetti progressive fade: opacity decreases linearly over lifetime
|
|
104
|
+
const progress = tick.value / totalTicks.value;
|
|
105
|
+
opacity.value = 1 - progress;
|
|
106
|
+
});
|
|
44
107
|
const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
108
|
+
// Canvas-confetti wobble calculation (circular motion)
|
|
109
|
+
const wobbleX = 10 * config.scalar * Math.cos(wobble.value);
|
|
110
|
+
const wobbleY = 10 * config.scalar * Math.sin(wobble.value);
|
|
111
|
+
|
|
112
|
+
// Canvas-confetti 3D-like positioning with tilt
|
|
113
|
+
const x1 = translateX.value + random.value * tiltCos.value;
|
|
114
|
+
const y1 = translateY.value + random.value * tiltSin.value;
|
|
115
|
+
const x2 = translateX.value + wobbleX + random.value * tiltCos.value;
|
|
116
|
+
const y2 = translateY.value + wobbleY + random.value * tiltSin.value;
|
|
117
|
+
|
|
118
|
+
// Dynamic scaling based on wobble (creates 3D depth perception)
|
|
119
|
+
const scaleX = Math.abs(x2 - x1) * 0.1;
|
|
120
|
+
const scaleY = Math.abs(y2 - y1) * 0.1;
|
|
45
121
|
return {
|
|
46
122
|
transform: [{
|
|
47
|
-
translateX:
|
|
123
|
+
translateX: x2
|
|
48
124
|
}, {
|
|
49
|
-
translateY:
|
|
125
|
+
translateY: y2
|
|
50
126
|
}, {
|
|
51
127
|
rotate: `${rotation.value}deg`
|
|
128
|
+
}, {
|
|
129
|
+
scaleX: Math.max(0.3, scaleX)
|
|
130
|
+
},
|
|
131
|
+
// Prevent too small
|
|
132
|
+
{
|
|
133
|
+
scaleY: Math.max(0.3, scaleY)
|
|
52
134
|
}],
|
|
53
135
|
opacity: opacity.value
|
|
54
136
|
};
|
|
55
137
|
});
|
|
56
138
|
const renderShape = () => {
|
|
57
|
-
const baseStyle = [styles.particle, {
|
|
58
|
-
width: particle.size,
|
|
59
|
-
height: particle.size,
|
|
60
|
-
backgroundColor: particle.color
|
|
61
|
-
}];
|
|
62
139
|
if (particle.shape === 'circle') {
|
|
140
|
+
// Circles for snow - perfectly round
|
|
141
|
+
const size = particle.width;
|
|
63
142
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
64
|
-
style: [
|
|
143
|
+
style: [styles.particle, styles.circle, {
|
|
144
|
+
width: size,
|
|
145
|
+
height: size,
|
|
146
|
+
backgroundColor: particle.color
|
|
147
|
+
}, animatedStyle]
|
|
65
148
|
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
149
|
+
}
|
|
150
|
+
if (particle.shape === 'star') {
|
|
151
|
+
// Stars using Unicode character
|
|
152
|
+
const fontSize = particle.width * 1.5;
|
|
153
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.Text, {
|
|
154
|
+
style: [styles.particle, {
|
|
155
|
+
fontSize,
|
|
156
|
+
color: particle.color,
|
|
157
|
+
textShadowColor: particle.color,
|
|
158
|
+
textShadowOffset: {
|
|
159
|
+
width: 0,
|
|
160
|
+
height: 0
|
|
161
|
+
},
|
|
162
|
+
textShadowRadius: 3
|
|
163
|
+
}, animatedStyle],
|
|
164
|
+
children: "\u2605"
|
|
77
165
|
});
|
|
78
166
|
}
|
|
79
167
|
|
|
80
|
-
//
|
|
168
|
+
// Rectangles - sharp, thin confetti strips
|
|
81
169
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
82
|
-
style: [
|
|
170
|
+
style: [styles.particle, {
|
|
171
|
+
width: particle.width,
|
|
172
|
+
height: particle.height,
|
|
173
|
+
backgroundColor: particle.color
|
|
174
|
+
}, animatedStyle]
|
|
83
175
|
});
|
|
84
176
|
};
|
|
85
177
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
@@ -100,17 +192,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
100
192
|
},
|
|
101
193
|
circle: {
|
|
102
194
|
borderRadius: 999
|
|
103
|
-
},
|
|
104
|
-
transparent: {
|
|
105
|
-
backgroundColor: 'transparent'
|
|
106
|
-
},
|
|
107
|
-
triangle: {
|
|
108
|
-
width: 0,
|
|
109
|
-
height: 0,
|
|
110
|
-
backgroundColor: 'transparent',
|
|
111
|
-
borderStyle: 'solid',
|
|
112
|
-
borderLeftColor: 'transparent',
|
|
113
|
-
borderRightColor: 'transparent'
|
|
114
195
|
}
|
|
115
196
|
});
|
|
116
197
|
//# sourceMappingURL=ConfettiParticle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfettiParticle","particle","duration","onComplete","translateX","useSharedValue","translateY","rotation","opacity","useEffect","value","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfettiParticle","particle","config","duration","onComplete","translateX","useSharedValue","translateY","rotation","opacity","velX","velocity","x","velY","y","startTime","Date","now","isComplete","wobble","Math","random","wobbleSpeed","min","tiltAngle","tiltSin","tiltCos","tick","totalTicks","useEffect","value","timer","setTimeout","clearTimeout","cancelAnimation","useFrameCallback","elapsed","gravity","drift","decay","speed","sqrt","speedBoost","rotationVelocity","sin","cos","progress","animatedStyle","useAnimatedStyle","wobbleX","scalar","wobbleY","x1","y1","x2","y2","scaleX","abs","scaleY","transform","rotate","max","renderShape","shape","size","width","jsx","View","style","styles","circle","height","backgroundColor","color","fontSize","Text","textShadowColor","textShadowOffset","textShadowRadius","children","container","left","top","exports","StyleSheet","create","position","borderRadius"],"sourceRoot":"../../src","sources":["ConfettiParticle.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAKiC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA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