About 58 results
Open links in new tab
  1. javascript - Why is requestAnimationFrame better than setInterval or ...

    Aug 2, 2016 · Why should I use requestAnimationFrame rather than setTimeout or setInterval? This self-answered question is a documentation example.

  2. Controlling fps with requestAnimationFrame? - Stack Overflow

    It seems like requestAnimationFrame is the de facto way to animate things now. It worked pretty well for me for the most part, but right now I'm trying to do some canvas animations and I was wonder...

  3. How to use requestAnimationFrame? - Stack Overflow

    Apr 9, 2011 · I'm new to animation, but I have recently created an animation using setTimeout. The FPS was too low, so I found a solution to use requestAnimationFrame, described in this link. So far, my …

  4. html - How to deal with the warning: violation requestanimationframe ...

    Dec 17, 2022 · Violation ‘requestAnimationFrame’ handler took 742ms. Violation ‘load’ handler took 80ms. I tried to use setTimeout for the creation of the Viewer object, but it just makes the warnings …

  5. How do I use ResizeObserver with requestAnimationFrame correctly

    Jan 18, 2024 · The issue here is the spec says that ResizeObserver callbacks happen after requestAnimationFrame callbacks. This means the order of operations in the example above is …

  6. Using request animation frame in React - Stack Overflow

    Jun 17, 2021 · It saves in requestRef.current the timestamp the requestAnimationFrame returns. The requestRef.current calls the animate function that computes the delta time between the request …

  7. event loop - setTimeout vs requestAnimationFrame - Stack Overflow

    Mar 18, 2022 · I made an example of 'setTimeout vs requestAnimationFrame' to find out how different they are. As you can see, the orange box arrives to the destination first. The green box jump some …

  8. Qual é a melhor forma de chamar o método requestAnimationFrame()?

    Essa maneira não estaria tecnicamente errada? pois o sentido de usar o método requestAnimationFrame() é executar um código antes do navegador renderizar a página novamente …

  9. javascript - How to implement requestAnimationFrame loop with ...

    Feb 17, 2024 · 1 requestAnimationFrame (rAF) will queue your callback to be called right before the browser updates its rendering. This means that any new task¹ queued from such a callback will get …

  10. How to use requestAnimationFrame with Promise - Stack Overflow

    Dec 4, 2020 · I want to use requestAnimationFrame with Promise, so I can use it this way opacityToggle ("layername",0).then (i=>"do some stuff after animation ends") , but not sure how to d...