requestanimationframe Questions

3

Solved

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 code is...
Needless asked 9/4, 2011 at 14:22

1

Solved

I found 2 sources where it kind of says that React is using requestAnimationFrame On this blog post about Om, a ClojureScript framework on top of React. Also on the comments of this SO answer. I'...
Foreman asked 25/1, 2014 at 15:41

2

Solved

Paul Irish has a post called requestAnimationFrame for Smart Animating. Now Paul is a smart guy - and I'm just trying to understand the scope of the application of this idea. He says to do HTML5 ...
Norris asked 17/1, 2014 at 3:31

3

Solved

I made a quick simple solution in JSFiddle, for better and faster explaining: var Canvas = document.getElementById("canvas"); var ctx = Canvas.getContext("2d"); var startAngle = (2*Math.PI); var ...
Solipsism asked 7/12, 2013 at 19:6

3

Solved

(I need a process.nextTick equivalent on browser.) I'm trying to get the most out of javascript performance so I made a simple counter ... In a second I make continuous calls to a function that j...
Nimesh asked 11/11, 2013 at 12:56

3

Solved

Some browsers support requestAnimationFrame, so why not use it? After all, it's been supported since Google Chrome 10. Despite that, jQuery does not seem to be using it. I've found a bug report abo...
Adulterant asked 3/11, 2011 at 17:57

1

Solved

I'm trying to figure out if d3's default animations use requestAnimationFrame for the callback already or if I need to do it myself. For example, I have defined a custom tween that calls a redraw f...
Tessi asked 27/3, 2013 at 20:32

1

Solved

So, I am doing an animation (Not on a website/webpage!), that uses Javascript. For the animation, I use requestAnimationFrame instead of setInterval, as setInterval did not work well enough for wha...
Programmer asked 24/1, 2013 at 18:21

1

Solved

What's the equivalent of the following in plain JS? $(window).scroll(function() { }); I'm also looking to animate scroll, e.g.: $('html, body').animate({scrollTop:1750}, 'slow'); Should I be u...
Gunfire asked 17/1, 2013 at 22:56

1

Solved

So I've been a good net citizen, using feature detection to see whether the browser supports requestAnimationFrame and only fall back to a setTimeout-based solution otherwise (something around the ...
Harty asked 18/12, 2012 at 15:25

2

Solved

I've noticed that whenever I dock the browser window or switch tabs requestAnimationFrame stops being called (which I expect to happen). Is there a way to detect when this stop occurs? Reason is,...
Rationalism asked 30/10, 2012 at 5:54

2

Solved

I use Box2D with WebGL. Box2D demands a constant frame rate (time steps for it's "world" updates). function update(time) {//update of box2d world world.Step( 1/60 // 1 / frame-rate , 3 //veloci...
Legra asked 23/10, 2012 at 18:36

3

I want to change the background color of in-viewport elements (using overflow: scroll) So here was my first attempt: http://jsfiddle.net/2YeZG/ As you see, there is a brief flicker of the previou...
Counterclaim asked 20/9, 2012 at 14:55

3

Solved

I'm trying to build a parallax site, which will move few elements while scrolling the site. But instead of using a scroll event listener I'm using requestAnimationFrame, after reading this post by ...
Carrizales asked 15/5, 2012 at 14:24

1

Solved

I did some tests on Chrome and requestAnimationFrame yielded 61 fps while setTimeOut( callback, 0 ), yielded 233 fps. If one would like to have more than 61 fps (which I'm not sure what for) but wo...
Giffard asked 21/12, 2011 at 14:56

1

Solved

I'm wondering if I should switch my game over to requestAnimationFrame. If there even is still a reason to do so anymore, as I've read that setTimeout() now also pauses when you switch tabs in the ...
Anecdote asked 19/11, 2011 at 16:50

1

Solved

I am just trying to understand why the hell window.requestAnimationFrame is accepting the second parameter as an element, what is the reason behind that? I am curious to know the underlying execu...

© 2022 - 2024 — McMap. All rights reserved.