CSS3 transforms a howl transition when a value changes frequently (not performance related)

I am currently creating a compass application in HTML and CSS in a PhoneGap project with the DeviceOrientation plugin to get the compass title.

I created jsbin to emulate a header change .

The problem I am facing is that when the value changes frequently (every 200 ms), the CSS transition stutters quite a bit.

You can see this problem in action by going to jsbin, which I linked above, and slowly drag the slider to increase or decrease the degree of rotation, especially when you slowly move the slider back and forth.

This makes me think that this is not just a performance or frame rate issue; this is most likely caused by rapid changes in values ​​that interrupt the transition.

Note in the actual PhoneGap application, the compass value is updated every 200 milliseconds (or some other arbitrary interval) instead of the inconsistent update interval that you see in the jsbin simulation.

I tried to play with the transition duration a bit, and none of them worked. Here is what I tried:

  • I tried to make the transition duration 0.5 ms shorter than the interval for changing the value. For instance. get a new value every 500 ms, set the transition duration to 450 ms. Not only does it stutter me, but it also makes the whole transition much harder.
  • , ( ), , ... .
  • , , .

: CSS3 , ?. , JavaScript- , , , ?

:

CSS3 Javascript. Velocity.js . , , , Velocity(compass_element, "finish"), rotateZ .

+4
1

CodeMentor. , , , , , . , , - , , .

, , , , . , :

  • , , , .
  • . , n- 1/k ( ), k - , 2. , 0,05 , . - , , , , , .

( , , ) , - 0.1s, , , . dragstart dragstop, .

+2

All Articles