Author Topic: animation pulse not working?  (Read 185 times)

popoklo

  • Full Member
  • ***
  • Posts: 40
    • View Profile
animation pulse not working?
« on: October 08, 2017, 07:33:09 AM »
Ahoi!
try to do a pulsating selection Frame, it only runs once:

local flicker_anim = {
   when = When.Always,
    property = "alpha", time=300,
    start = 255, end = 0,
    loop = 1, pulse = 1
}

local frame2 = gamegrid_surface.add_image("frame.selected.2.png", 0, 0, 240 220); frame.alpha = 255;

animation.add( PropertyAnimation( frame2, flicker_anim ) );

does anyone had the Problem? or knows my fault?

thx!

kent79

  • Sr. Member
  • ****
  • Posts: 427
    • View Profile
Re: animation pulse not working?
« Reply #1 on: October 08, 2017, 11:13:35 PM »
Ahoi!
try to do a pulsating selection Frame, it only runs once:

local flicker_anim = {
   when = When.Always,
    property = "alpha", time=300,
    start = 255, end = 0,
    loop = 1, pulse = 1
}

local frame2 = gamegrid_surface.add_image("frame.selected.2.png", 0, 0, 240 220); frame.alpha = 255;

animation.add( PropertyAnimation( frame2, flicker_anim ) );

does anyone had the Problem? or knows my fault?

thx!


local flicker_anim = {
   when = When.Always,
    property = "alpha", time=300,
    start = 255, end = 0,
    loop = 1, pulse = 1
}

local frame2 = gamegrid_surface.add_image("frame.selected.2.png", 0, 0, 240 220); frame.alpha = 255;

animation.add( PropertyAnimation( frame2, flicker_anim ) );

Should be

frame2.alpha = 255?

 Actually, what is error log?

popoklo

  • Full Member
  • ***
  • Posts: 40
    • View Profile
Re: animation pulse not working?
« Reply #2 on: October 15, 2017, 03:11:03 AM »
thx 4 your answer kent!

i tried everything. theres no error produced. cant get pulse working.
did a Workaround. Using TickCallback and check if Alpha is 0. then resetting to 255.
i dont like Workarounds. but ok.


popoklo

  • Full Member
  • ***
  • Posts: 40
    • View Profile
Re: animation pulse not working?
« Reply #3 on: November 11, 2017, 04:29:16 AM »
anyone whos interested:
when = When.Always was 1 Problem. use Transition.StartLayout!!
and Loop = 1, pulse = 1, also does not work in my script.
i had to use Loop = true, pulse = true!!!!!!!

but why is pulse only working once! after that is does not reverse anymore and Loops only from start to end value.
does anybody know that Problem?

popoklo

  • Full Member
  • ***
  • Posts: 40
    • View Profile
Re: animation pulse not working?
« Reply #4 on: November 12, 2017, 03:33:02 AM »
i tested kents new grid layout and there the pulse animation is also not working!
for u kent? it runs only at start once correct. but then no reverse of the alpha.

HELP PLZ

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 437
    • View Profile
Re: animation pulse not working?
« Reply #5 on: November 12, 2017, 12:49:39 PM »
hey popoklo,

I am not sure what happened with pulse, but i'm seeing the same thing you are. I'll try to take a look at why it seems broken.

In the meantime, I have been working on rewriting the animation module and have a wip up here:
https://github.com/liquid8d/attract-extra/tree/master/modules/animate2

It has some changes in the way things operate, but you might be interested in taking a look. For example in the new engine for pulse, you could do:

Code: [Select]
PropertyAnimation(OBJECTS.wheel).key("alpha").from(255).to(0).loops(-1).yoyo().speed(0.5).play();

If you do decide to use it for your layouts, please understand it is still a wip, and you may need to include it or instruct the user how to get it as it is not included like the original animate module is.

popoklo

  • Full Member
  • ***
  • Posts: 40
    • View Profile
Re: animation pulse not working?
« Reply #6 on: November 13, 2017, 04:54:14 AM »
so much thanks 4 ur great work on the animation system. and im very happy that u try a new one. ill have a look into your progress and try to test it. i dont know when, but great news from u. thanks alot!

could u plz look into my scrolling issue with animations on? if u have time, try my Grid mod theme with surfface animation.
scroll a long time holding down or up. after many scrolls u see the start positions of the lower snaps row come up more and more. this influences also after many animations the overall performance. then it is useless for me. AM restart helps of course and if i turn   animations off, there wont be the long time performance issue.

sorry for the long text. but i hope u understand what i meen.

ok. i couldn't wait trying ur new animation2.
THE RESULT:
I LOVE U! Performance is super great! no more performance issues after long time scrolling! and the positions keeps perfectly!


« Last Edit: November 13, 2017, 05:40:22 AM by popoklo »

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 437
    • View Profile
Re: animation pulse not working?
« Reply #7 on: November 13, 2017, 02:02:01 PM »
glad to hear it! Let me know if you have any feedback or suggestions.

popoklo

  • Full Member
  • ***
  • Posts: 40
    • View Profile
Re: animation pulse not working?
« Reply #8 on: November 14, 2017, 05:49:36 AM »
i like to change more propertys. i.e. .visible or .video_flags.
with that we could use your animation system also as nice timers.

i tried to use your .on("start", function) and "stop", it was ok, but not so comfortable to start the video via .video_flag.

best greets!