What's Included
- TypeScript source (Level.tsx)
- App entry that loads the font and mounts the level
- Background image asset
- README with install + usage
- MP4 preview
About the Project
Reads the expo-sensors Accelerometer at ~50fps and derives tilt magnitude and direction from the gravity vector with atan2. An adaptive low-pass filter (variable alpha plus a center deadzone) kills hand tremor while staying responsive, and the heading unwraps the 180/-180 seam so rotation never jumps. The smoothed values feed react-native-reanimated v4 shared values, with useDerivedValue, useAnimatedStyle, and useAnimatedProps driving the bubble offset, rotation, and degree text entirely on the UI thread. Glass bubbles use expo-glass-effect (iOS 26 Liquid Glass; Android falls back gracefully). Requires a dev build rather than Expo Go because of the native sensor and glass dependencies, and a real device since the accelerometer is inert in the simulator. Tested on Expo SDK 56.