From b84865bb12a331d460fb9a208326ac8c6b0d6662 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 26 Dec 2019 17:50:26 +0900 Subject: [PATCH] image_blend_occlude_few: increase a factor to update animation properly. --- src/bin/image_blend_occlude1_few.c | 6 ++++-- src/bin/image_blend_occlude2_few.c | 6 ++++-- src/bin/image_blend_occlude3_few.c | 8 +++++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/bin/image_blend_occlude1_few.c b/src/bin/image_blend_occlude1_few.c index 522a295..450301d 100644 --- a/src/bin/image_blend_occlude1_few.c +++ b/src/bin/image_blend_occlude1_few.c @@ -59,6 +59,7 @@ static void _cleanup(void) /* loop - do things */ static void _loop(double t, int f) { + static int k = 0; int i; Evas_Coord x, y, w, h; for (i = 0; i < OBNUM; i++) @@ -68,12 +69,13 @@ static void _loop(double t, int f) w = 120; h = 160; 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 += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2); efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y)); } } + ++k; FPS_STD(NAME); } diff --git a/src/bin/image_blend_occlude2_few.c b/src/bin/image_blend_occlude2_few.c index 7a22e38..6429550 100644 --- a/src/bin/image_blend_occlude2_few.c +++ b/src/bin/image_blend_occlude2_few.c @@ -59,6 +59,7 @@ static void _cleanup(void) /* loop - do things */ static void _loop(double t, int f) { + static int k = 0; int i; Evas_Coord x, y, w, h; for (i = 0; i < OBNUM; i++) @@ -68,12 +69,13 @@ static void _loop(double t, int f) w = 120; h = 160; 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 += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2); efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y)); } } + k++; FPS_STD(NAME); } diff --git a/src/bin/image_blend_occlude3_few.c b/src/bin/image_blend_occlude3_few.c index ce7c8b0..12551c4 100644 --- a/src/bin/image_blend_occlude3_few.c +++ b/src/bin/image_blend_occlude3_few.c @@ -59,21 +59,23 @@ static void _cleanup(void) /* loop - do things */ static void _loop(double t, int f) { + static int k = 0; int i; Evas_Coord x, y, w, h; for (i = 0; i < OBNUM; i++) { - if (i > (OBNUM / 2)) + if (i < (OBNUM / 2)) { w = 120; h = 160; 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 += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2); efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y)); } } + ++k; FPS_STD(NAME); }