Tweak animation step a little.

Animation now starts slightly after the start and ends slightly before
the end. This prevents a weird flicker effect in the image like layers.
This commit is contained in:
2018-03-16 14:37:37 +01:00
parent 40a60c02bb
commit 512c4e8c95

View File

@@ -167,7 +167,7 @@ static void idleFunc()
checkGLErrors();
glutPostRedisplay();
throttleIdleFunc();
rendererData.animationStep = (1 - cos(M_PI * getAnimationStep(std::chrono::seconds(5)))) / 2;
rendererData.animationStep = 0.025f + 0.95f * (1 - cos(M_PI * getAnimationStep(std::chrono::seconds(5)))) / 2;
}
int main(int argc, char *argv[])