Open domenic opened 10 years ago
Off the top of my head, frequency: "animationframe" might be good.
Would it make sense to have that as the default behavior too?
Off the top of my head, frequency: "animationframe" might be good.
This is a very cool idea.
Moved to: w3c/sensors#4
For games and other animation frame loop-based situations (off the top of my head, accelerometer-based scrolling comes to mind) you want one value per animation frame.
Chrome is actually doing work specifically to integrate our scheduling of input events and animation frames, see Blink Scheduler design doc.
Off the top of my head,
frequency: "animationframe"
might be good. The contract being that, if you pass that in to the constructor, then givenyou will get an updated value every frame.
I don't think
frequency: 60
is quite the same thing (but I could be wrong; will try to tag in some Blink engineers) since animation frames often vary away from 60 Hz and so you will quickly get out of sync.Posted to blink-dev: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/fLucJ2QH3fA unsure whether people will follow-up here or there.