image_blend_occlude_few: increase a factor to update animation properly.

This commit is contained in:
Hermet Park 2019-12-26 17:50:26 +09:00 committed by Cedric BAIL
parent 7d95c2f730
commit 433b9e3833
3 changed files with 13 additions and 7 deletions

View File

@ -61,6 +61,7 @@ static void _cleanup(void)
/* loop - do things */ /* loop - do things */
static void _loop(double t, int f) static void _loop(double t, int f)
{ {
static int k = 0;
int i; int i;
Evas_Coord x, y, w, h; Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++) for (i = 0; i < OBNUM; i++)
@ -70,12 +71,13 @@ static void _loop(double t, int f)
w = 120; w = 120;
h = 160; h = 160;
x = (win_w / 2) - (w / 2); x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2); y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y)); eo_do(o_images[i], evas_obj_position_set(x, y));
} }
} }
++k;
FPS_STD(NAME); FPS_STD(NAME);
} }

View File

@ -61,6 +61,7 @@ static void _cleanup(void)
/* loop - do things */ /* loop - do things */
static void _loop(double t, int f) static void _loop(double t, int f)
{ {
static int k = 0;
int i; int i;
Evas_Coord x, y, w, h; Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++) for (i = 0; i < OBNUM; i++)
@ -70,12 +71,13 @@ static void _loop(double t, int f)
w = 120; w = 120;
h = 160; h = 160;
x = (win_w / 2) - (w / 2); x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2); y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y)); eo_do(o_images[i], evas_obj_position_set(x, y));
} }
} }
k++;
FPS_STD(NAME); FPS_STD(NAME);
} }

View File

@ -61,21 +61,23 @@ static void _cleanup(void)
/* loop - do things */ /* loop - do things */
static void _loop(double t, int f) static void _loop(double t, int f)
{ {
static int k = 0;
int i; int i;
Evas_Coord x, y, w, h; Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++) for (i = 0; i < OBNUM; i++)
{ {
if (i > (OBNUM / 2)) if (i < (OBNUM / 2))
{ {
w = 120; w = 120;
h = 160; h = 160;
x = (win_w / 2) - (w / 2); x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2); y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y)); eo_do(o_images[i], evas_obj_position_set(x, y));
} }
} }
++k;
FPS_STD(NAME); FPS_STD(NAME);
} }