Hi,
I tried to include motion effect for three images in a row (768*1296). Second and third image is moving from left to right and vice a versa. However the animation for first starts very slowly after the third animation is done.
Am I doing something wrong?
void WelcomeTemplateApp::setup()
{
mWindow1 = gl::Texture::create(loadImage(loadAsset("1.jpg")));
mWindow2 = gl::Texture::create(loadImage(loadAsset("2.jpg")));
mWindow3 = gl::Texture::create(loadImage(loadAsset("3.jpg")));
mWindow1Anim = vec2(-200.0, 0.0);
mWindow2Anim = vec2(0.0, getWindowHeight() / 3);
mWindow3Anim = vec2(-20.0, 2.0*getWindowHeight() / 3);
}
void WelcomeTemplateApp::update()
{
const float kDuration = 5.0f;
timeline().apply(&mWindow1Anim, vec2(50.0, 0.0), kDuration, EaseInOutQuad());
timeline().appendTo(&mWindow2Anim, vec2(-20.0, getWindowHeight() / 3), kDuration, EaseInOutQuad());
timeline().appendTo(&mWindow3Anim, vec2(0, 2.0*getWindowHeight() / 3), kDuration, EaseInOutQuad());
}
Regards
Rachana