Consider the following spec:
struct MotionSpec spec = {
.expand = {
.verticalMovement = {
.delay = 0.000, .duration = 0.350, .curve = EaseInEaseOut,
},
.scaling = {
.delay = 0.000, .duration = 0.350, .curve = EaseInEaseOut,
},
},
.collapse = {
.verticalMovement = {
.delay = 0.000, .duration = 0.350, .curve = EaseInEaseOut,
},
.scaling = {
.delay = 0.000, .duration = 0.350, .curve = EaseInEaseOut,
},
},
};
All of the animations are described in relation to a relative timeline. If the timing could correspondingly be described in a relative fashion, our struct might look like this:
struct MotionSpec spec = {
.expand = {
.verticalMovement = {
.delay = 0.0, .duration = 1.0, .curve = EaseInEaseOut,
},
.scaling = {
.delay = 0.0, .duration = 1.0, .curve = EaseInEaseOut,
},
},
.collapse = {
.verticalMovement = {
.delay = 0.0, .duration = 1.0, .curve = EaseInEaseOut,
},
.scaling = {
.delay = 0.0, .duration = 1.0, .curve = EaseInEaseOut,
},
},
};
animator.relativeTimingDuration = 0.350;
All animation timing would correspondingly be multiplied by the relativeTimingDuration.