Improved timing for inbetweens

This commit is contained in:
Daniel Wolf 2016-12-20 22:36:27 +01:00
parent d777f760d5
commit 62b6394bdf
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
JoiningContinuousTimeline<Shape> insertTweens(const JoiningContinuousTimeline<Shape>& shapes) {
centiseconds minTweenDuration = 4_cs;
centiseconds maxTweenDuration = 10_cs;
centiseconds maxTweenDuration = 8_cs;
JoiningContinuousTimeline<Shape> result(shapes);
@ -28,7 +28,7 @@ JoiningContinuousTimeline<Shape> insertTweens(const JoiningContinuousTimeline<Sh
break;
}
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;
break;
}