JS library which simulating reflections on devices that support the DeviceMotion event.
Shiny is a lightweight JavaScript library designed to add simulated reflections to mobile websites. It creates dynamic visual effects that react to the physical movement of the user's device.
Here is a summary of its principal functionalities:
Multi-Element Support: The library can apply shiny reflection effects to text, backgrounds, and borders.
Motion-Based Interactivity: It utilizes the DeviceMotion event to track the orientation and movement of a mobile device, adjusting the "reflection" in real-time to simulate how light hits a physical object.
Default Rendering: If no specific configuration is provided, Shiny automatically renders a radial background gradient with a white center and a transparent outer ring to create the reflection effect.
Easy Installation: Developers can install the tool via npm or by manually including the shiny.umd.js script in their project.
Flexible Selectors: The core shiny() function can target a specific CSS selector, a single DOM element, or an array of elements.
Customizable Configuration: The library allows for a configuration object to be passed as a second argument to define exactly how the special effects should be rendered.
Mobile-Focused: The tool is specifically designed for mobile devices, with a preference for portrait mode.
Open Source: It is released under the MIT license, allowing for broad use and modification.
Development Note: Development is currently on hold because modern versions of iOS (starting with 12.2) began disabling access to device sensors in Safari by default.