Re: [pointerevents] Define event order relative to RAF?

Interesting, thanks.

For maximum smoothness we've found it valuable to [align input with 
vsync, using interpolated 
  You can see this in practice on [this demo 
page](  Without this even a
 60hz touchscreen can trigger occasional jank when scrolling/dragging 
due to aliasing effects (as the phase drifts).

But regardless, I agree this should be an implementation detail of the
 browser - the "JIT events" approach isn't necessarily wrong (it's 
still what we do on desktop actually).

But then how does one write a reliably smooth pinch library on top of 
pointer events (say for manipulating a map)?  With touch events I can 
just process each event and transform all at once. With PE I probably 
want to compute/apply my transform exactly once for all fingers, so 
I'll probably do it on RAF, right?

I certainly don't want to let a frame be produced that includes the 
changes from one finger's movement without the changes from the other 
finger's movement (or I'll get a cyclic zoom-in/out pattern as the 
user drags with a constant distance between their fingers).  In a "JIT
 events" browser users may see occasional jitter when one finger 
happens to come before the RAF and one after.  But in a buffered-input
 browser, doing the work on RAF should be reliably smooth.

@tdresser, you've got some tools somewhere for precisely measuring 
such jitter in finger separation, right?  Perhaps we should extend 
them to use pointer events and see if we can quantify this two-finger 
vsync-boundary effect on some Windows devices?

I suppose you could argue that any such library should always do some 
amount of smoothing.  But that always comes at a cost of increased 
latency and a feeling of "squishyness", so I'm not sure I'd really 
recommend that.  WDYT?

GitHub Notif of comment by RByers

Received on Thursday, 9 July 2015 03:25:03 UTC