Animation not looping cerrectly

What do you want to achieve?

Loop over four animations

What have you tried so far?

different delays between the four animations, but the fourth is not looping

Screenshot or video

Others

  • SquareLine Studio version:
    1.3.3
  • Operating system:
    Windows 11
  • Target hardware:
    WT32-SC01 Plus

At the moment i’am just playing around with Squareline Studion until i get my WT32-SC01, an i’am trying to loop over an animation which consists of four movements (move y, move x, move y, move x). Three of them are working fine, but the fourth one is not repeating. But the four animations are working fine one time…

1st animation move y, from 28 to 58, loop infinite
2nd animation move x, from 185 to -65, loop infinite
3rd animation move y, from 58 to 28, loop infinite
4th animation move x, from -65 to 185, loop infinite

How to upload a video?

added a video to dropbox
Video

Maybe simpler isnt use infinite but normal anims with delay a nd on last attach end callback to restart…

ah, good idea, is this possible in Squareline Studio directly?

I dont use 1.3.3 now , but i mean no, you need do it in code.

ok, no problem, then i have to wait until my WT32 arrives.

thx

Problem with animation from Squareline is dont exported anim object, then you need add line to ui.c or move generated anim to your code…

lv_anim_set_ready_cb(&a, (lv_anim_ready_cb_t)reanim);

get a here is trouble.
func reanim is simple

void reanim()
{
Tpan1_Animation(ui_dot1anim object, 0); //call first stage anim here is only fictive names
}

@Syr0x: This seems to work fine in SquareLine Studio 1.3.4. I attached a project-file that shows a way to do this. It creates 4 animations similar to yours but all need a 3000ms loop delay set not to overlap each other, and anim1…4 are started with different delays (1s delays between steps) in the initial action events.
No need for manual LVGL code to do this and it loops correctly.
LinkedAnimations.zip (7.9 KB)

I see, but i tried/would have it in just one animation, and used the different move properties to move the object.
My explaination is not correct it is this way

one animation:
1st property move y, from 28 to 58, loop infinite
2nd property move x, from 185 to -65, loop infinite
3rd property move y, from 58 to 28, loop infinite
4th property move x, from -65 to 185, loop infinite

I tried the same setup you mentioned above, it works fine for me, both in SquareLine Studio 1.4 and the exported & built code. Maybe there’s a timing clash between your 2nd and 4th phase which are both setting X coordinate. I attached a project file here for this solution as well.
LinkedAnimations2.zip (7.9 KB)
If one animation phase is 1 second, you need to set all adjacent animation-phases 1000ms apart, so 1st phase has delay of 0, 2nd phase has delay of 1000ms, etc. And also needed to ensure that the loop-delay is set to 3000ms for all of them so their overall runtimes are equal (4000 milliseconds, because there are 4 phases.)

Thx, i’ll check your example.
Meanwhile it is also working with my implementarion with a callback like @Marian_M suggested it.

1 Like