edemaine / cocreate

Cocreate Shared Whiteboard/Drawing
MIT License
209 stars 27 forks source link

Sample rate / Investigate native apps #38

Closed edemaine closed 4 years ago

edemaine commented 4 years ago

Perhaps I can get the sample rate for pointer events higher in a native Electron app with custom web browser...

https://nolanlawson.com/2019/08/11/high-performance-input-handling-on-the-web/ seems related to pointer-events sample rate.

Apparently getCoalescedEvents() will get missed events!

Whoa, I totally missed pointerrawupdate events. Together with the coalesced getter, this seems like it will solve the sample-rate issue.

Upon further reading and testing on this tool (source), getCoalescedEvents() gets the same events as pointerrawupdate events, whether you ask for pointermove or pointerrawupdate. We don't need to be faster than the display, so pointermove is fine, as long as we use all the coalesced events.