sync clock and widget fly-in animations to wave phase
This commit is contained in:
parent
e2f8accbc1
commit
570000f09a
3 changed files with 20 additions and 55 deletions
|
|
@ -8,19 +8,14 @@ Item {
|
|||
|
||||
width: 280
|
||||
|
||||
opacity: 0
|
||||
property real _slideX: 80
|
||||
property real wavePhase: 0
|
||||
property real screenWidth: 0
|
||||
property real unlockFade: 1
|
||||
|
||||
NumberAnimation on opacity {
|
||||
to: 1
|
||||
duration: 400
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
NumberAnimation on _slideX {
|
||||
to: 0
|
||||
duration: 500
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
// Fly in when wave exits the right edge
|
||||
readonly property real _progress: (screenWidth > 0 ? Math.max(0, Math.min(1, (wavePhase - screenWidth) / 500)) : 0) * unlockFade
|
||||
opacity: _progress
|
||||
property real _slideX: (1 - _progress) * 80
|
||||
|
||||
transform: Translate {
|
||||
x: root._slideX
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue