Jump to content


  • Posts

  • Joined

  • Last visited

yanivab's Achievements


Newbie (1/14)



  1. So this is working great for me. I do want the option to measure the animation's performance as it plays - that is save the timing of each flicker of the image. (The reason being I am using this to code a psychology experiment, for which timing is important). Is that possible with an ease, and if so, what is the most efficient way? I saw that the ease has an onUpdate property - though that fires on every screen refresh - that is every 16.67ms if everything is OK. Getting that is useful, but I would actually like to know how long each images has been presented on screen. I could probe the opacity value of the image every onUpdate, but that sounds expensive. If my ease would simultaneously change the value of a javascript variable with the image opacity, would probing and recording that be reliable / reasonable? Thanks again!
  2. That is tremendous help! Thank you! I will give it a try. Just to make sure - since I want a flickering animation, my ease should be a square wave function. I could crate that with vertical and horizontal lines in svg. But I see you avoid vertical lines. The idea is that the svg path has to be a function, right? (ie, no two x points with the same y value). In that case, horizontal lines with slightly diagonal lines connecting them is the way to go?
  3. Hello, I'm trying to code a flickering animation, where a canvas and an image flicker on and off intermittently. I'm trying to get the timing of the flickering as accurate as possible: the canvas (multicoloured "mondrian" in the codepen) should be presented for 67 ms (4 frames at 60Hz) and the image ("stimulus" in the codepen) for 34ms (2 frames at 60Hz). I coded it using only autoalpha, drawing everything before the animation starts. The presentation times are recorded into an object called "vbl" in the codepen. On my macbook with chrome, animation works almost perfectly. But testing this animation on a few different setups (weaker windows machines, all chrome or firefox), I'm getting a considerable amount of mistiming: Especially in the first flickers in the sequence. Both the canvas and the image might be presented for too short or too long (0-100ms in range, though mean and median are close to wanted values). As timing is the most important issue for me, I am willing to use almost any trick to get it better. Any ideas? I'm fine with long (~0.7 second) loading times. Many thanks, Yaniv