Animation Enhancement
Content alternation and smooth transitions between HMI elements.
Draft
This documentation is a draft and will be updated after testing.
Overview
TOR Reference: 3.1.1.10
Animation enhancement allows alternating between different content types (Video, Banner, Image) with smooth transitions. This creates dynamic displays that cycle through multiple content sources.
Content Alternation
Multiple elements can be grouped together to alternate display:
| Property | Description |
|---|---|
| Alternation Group ID | Group identifier |
| Alternation Interval | Time between switches (seconds) |
| Transition Effect | Fade, Slide, or None |
| Transition Duration | Animation duration (ms) |
Supported Content Types
Elements that can participate in alternation:
- Video elements
- Banner elements
- Image elements
- Static content
Transition Effects
| Effect | Description |
|---|---|
| Fade | Smooth crossfade using opacity |
| Slide | Slide out/in animation |
| None | Instant content switch |
Configuration in xDraw
- Select elements to alternate
- Assign same Alternation Group ID
- Set Alternation Interval
- Choose Transition Effect
- Set Transition Duration
Technical Implementation
GSAP Integration
Animations use GSAP (GreenSock Animation Platform) for smooth transitions:
// Fade transition example
gsap.to(currentElement, {
opacity: 0,
duration: transitionDuration / 1000,
onComplete: () => {
gsap.to(nextElement, {
opacity: 1,
duration: transitionDuration / 1000
});
}
});
Cleanup
Alternation timers are automatically cleared when navigating away from HMI pages to prevent memory leaks.