
- Core Educational Objective: Demonstrate how to implement a nested "Group within a Group" architecture to decouple overlapping transform properties, and build concurrent animations for Hover and Click actions across a dual-layer state machine configuration.
- Background Pain Points: When adding multiple animations to a single layer, simultaneous actions like hovering (scaling up) and clicking (elastic squish) overwrite or conflict on the same scale track, causing stuttering or logical deadlocks.
- Final Business Benefit: Complete a comprehensive high-fidelity interactive button pipeline. By leveraging a View Model alongside independent concurrent state machine layers, you achieve real-time physics overlap and a "Liquid Bounce" interaction. Since all logic remains self-contained, it provides an out-of-the-box asset ready for UI implementation.
- The Nested Decoupling Principle: This is an essential architectural baseline for engineering advanced interactive assets in Rive. Because Rive applies independent transform data blocks to every distinct group, nesting spaces (e.g., placing a hover parent container above a click child) separates conflicting metrics. The system compounds these via matrix multiplication at runtime, eliminating interpolation overwrite bugs.
- Concurrent State Machine Layers: State machine layers operate in absolute parallel workflows at runtime. The
hoverlayer continuously updates color interpolation data and scale ratios across the parent matrix while theclicklayer simultaneously fires rapid-fire squish physics without resetting parent tracking channels. - Rapid Fire Triggers and Alternating State Nodes: When animating high-frequency click events (e.g., trigger switches or UI buttons), a single terminal transition path forces an active animation clip to finish its track before resetting. Stringing two identical timeline assets together inside an alternating trigger loop permits zero