What's Included
- TypeScript source (Scratch.tsx)
- App.tsx entry with font loader
- Scratch foil image + handwritten hint font
- README with install + usage
- Peer-dependency list
About the Project
Built around @shopify/react-native-skia: the foil image is drawn on a Skia Canvas and a Path stroked with blendMode="clear" acts as the eraser, so every frame stays on the GPU. The pan gesture from react-native-gesture-handler appends points to a shared Skia path and accumulates a distance-based scratched-area estimate on the UI thread; once it crosses REVEAL_THRESHOLD, scheduleOnRN (react-native-worklets) hops back to JS to fade the canvas, spring-pop the prize, and fire react-native-fast-confetti. Pure JS/native modules — no custom native code — runs on Expo SDK 54 with the new architecture enabled, on both iOS and Android.