Comments (3)
Wow sorry looping back after all this time. https://mybrowser.fyi/report/5ed878792ba61600152538fd
Curious what do you use 'under the hood'...any touch event library? We are considering a touch handler revamp because we have sticky headers, a side menu, a swipe navigation and more all listening to the touch handlers to determine distance, direction, angle, etc. Becomes a lot. But I guess you know that and assuming that is where Tornis might work well. But kind of wondering what people are these days...touch handler or pointer events, and if touch handlers still any lib thats standard with rAF and debouncing and preventDefault these days that's a 1 trick pony that you know of?
Pretty good thread too on that https://stackoverflow.com/questions/49541173/how-to-prevent-default-handling-of-touch-events
from tornis.
I see the throttled helper function in the source so I guess my first question is answered.
from tornis.
The main concept for Tornis was that I wanted to handle all input-related events independently and have the rAF function only handle the render updates. The rAF function itself is also limited to only fire when something has changed.
Certain native events are throttled (as you've spotted), whilst others, like velocity, are captured using an averaged array of the most recent values. Throttling the native events causes gaps in the delta calculation used for velocity, in-turn causing the value to fluctuate back to zero. Pushing the delta values into an array and averaging them smoothes out the fluctuation and, whilst not 100% accurate, gives a much more representative value.
All that said, I've not experienced that level of latency before. Would you be able to share your browser set up with https://mybrowser.fyi ?
from tornis.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tornis.