What just happened?

In this section, we just followed the path set for an earlier declaration—the vertical movement of the stellar body influences its perceived size; therefore, it seems like a good decision to bind the two animations together. Note that instead of specifying a new property value source for the scale, we might have modified the original animation and made the scale animation parallel to the animation that operates on the y property:

SequentialAnimation {    ParallelAnimation {        NumberAnimation {            target: sun            property: "y"            from: root.height + sunVisual.height            to: root.height - 270            duration: dayLength / 2            easing.type: Easing.OutCubic        }        NumberAnimation {            target: sun            property: "scale"            from: 1.6; to: 0.8            duration: dayLength / 2 easing.type: ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.