v1.5.0
Flux Hourglass 1.5.0
A premium release introducing a gorgeous Water Mode alongside complete Full-Screen Immersive Mode support. The liquid rendering utilizes accelerometer-driven fluid dynamics with beautiful wobbly bubbles and splash particles.
Highlights
- Dynamic Water Mode. Tap "WATER" on the setup screen to toggle this premium liquid simulation. It features:
- Double-Layer Waves: Undulating translucent waves (Cyan & Blue paths) flowing continuously in real-time.
- Spring-Damper Tilt Physics: Highly-responsive fluid tilting that realistically sloshes back and forth when you tilt your device, settling naturally into equilibrium.
- Ambient Gaseous Bubbles: Gentle bubbles spawning at the bottom pool, rising with a side-to-side wobble phase, and popping cleanly on the surface waves.
- Gravity-Accelerated Splashes: Splashing water droplets erupting upwards under gravity from the exact point of the vertical stream's impact.
- Full-Screen Immersive Mode. No more status or navigation bars breaking the minimalism. The entire display is dedicated to the visual timer experience, with bar visibility toggled via a transient swipe-to-reveal gesture.
- Enhanced Physics & Aesthetics. Highly refined gravity formulas and scaled splash properties align the physical tilting response of the fluid perfectly with the device's actual angle, matching the premium look of the Sand simulation.
Implementation Notes
- Inside
MainActivity.onCreate, standardWindowInsetsControllerCompathandles the immersive configuration:val controller = WindowInsetsControllerCompat(window, window.decorView) controller.hide(WindowInsetsCompat.Type.systemBars()) controller.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
- Accelerometer values are continuously filtered using low-pass and spring-damper equations to prevent micro-jitter and achieve realistic fluid inertia:
$$\text{acceleration} = (\text{targetSlosh} - \text{sloshAngle}) \cdot 35f - \text{sloshVelocity} \cdot 6f$$ - Splash droplet horizontal velocity components scale linearly with
tiltX * 36fto perfectly align the impact point with the falling water column on tilted screens.