r/reactnative • • Oct 22 '26

Booster pack opening in React Native: swipe to tear, tilt to reveal

Swipe to tear the foil, drag to tilt the stack, then tap or flick through five cards. Rare pulls get a foil sweep and sparkles.

I also rebuilt it in Swift and Kotlin. For your app, would you use the React Native version or prefer native?

32 Upvotes

13 comments sorted by

4

u/bkdev98 Oct 22 '26

For a moment like this I'd keep the RN version, as long as the tear tracks the finger on the UI thread it's hard to tell apart from native. Does the tilt follow the drag only, or the gyroscope too?

2

u/s3079 Oct 23 '26

I crafted the lines to follow the movement of the fingers; the most challenging part, in my opinion, was the tear—getting it to look just like the tear on an actual pack.

2

u/bkdev98 Oct 23 '26

The tear really sells it, matching how a real pack rips is the kind of detail people feel without noticing. Did you end up drawing the torn edge as a path or masking an image?

3

u/ConsciousAntelope Oct 22 '26 edited Oct 23 '26

Nice one. Give me the tech behind this

2

u/s3079 Oct 23 '26

I used Reanimated and Skia for this effect

3

u/LittleBulletWhoCould Oct 22 '26

Wow. Link please

1

u/s3079 Oct 23 '26

I will open source when code swift and kotlin complete

1

u/s3079 21d ago

I have open-sourced all of my code at https://nativecook.dev/

3

u/alexfoxy Oct 23 '26

Very nice, can you tilt your phone to make the shiney shine?

2

u/s3079 21d ago

Yeah, I’ll integrate the sensor component for this effect

2

u/Embarrassed_Land_161 25d ago

Link? I build a similar effect with threejs

1

u/s3079 21d ago

I have open-sourced all of my code at https://nativecook.dev/