Improved timing for inbetweens
This commit is contained in:
parent
d777f760d5
commit
62b6394bdf
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
JoiningContinuousTimeline<Shape> insertTweens(const JoiningContinuousTimeline<Shape>& shapes) {
|
JoiningContinuousTimeline<Shape> insertTweens(const JoiningContinuousTimeline<Shape>& shapes) {
|
||||||
centiseconds minTweenDuration = 4_cs;
|
centiseconds minTweenDuration = 4_cs;
|
||||||
centiseconds maxTweenDuration = 10_cs;
|
centiseconds maxTweenDuration = 8_cs;
|
||||||
|
|
||||||
JoiningContinuousTimeline<Shape> result(shapes);
|
JoiningContinuousTimeline<Shape> result(shapes);
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ JoiningContinuousTimeline<Shape> insertTweens(const JoiningContinuousTimeline<Sh
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TweenTiming::Centered: {
|
case TweenTiming::Centered: {
|
||||||
tweenDuration = std::min({firstTimeRange.getDuration() / 3, secondTimeRange.getDuration() / 3, maxTweenDuration});
|
tweenDuration = std::min({firstTimeRange.getDuration() / 4, secondTimeRange.getDuration() / 4, maxTweenDuration});
|
||||||
tweenStart = firstTimeRange.getEnd() - tweenDuration / 2;
|
tweenStart = firstTimeRange.getEnd() - tweenDuration / 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue