Comments (5)
This is most likely because the code that you're passing to onStep
is taking more than 16ms to complete on mobile. You can throttle the CPU in Chrome on desktop and use the DevTools performance tab to see what's taking so long.
If you're manipulating the DOM in any way that causes a repaint, this might be your problem. For most things DOM related you can use CSS animations instead.
I'll close this as I don't believe it's an issue with the library, but if you're stuck feel free to share your code and I'll see if I can help.
from easy-ease.
Would it be possible to lower framerate to make up for the throttling?
from easy-ease.
Hmm, if I understand correctly, you're suggesting that the library would calculate how long it's taking to execute the code in onStep
and adjust the number of steps for the remainder of the animation? I like the idea, but this would need to be done for every single step, potentially slowing down the whole thing for all users.
from easy-ease.
No, I mean to change it to 30 fps for everyone.
from easy-ease.
Oh, no I'd like to leave it at 60 FPS.
You could fork (or even just copy/paste, it's very small) and make the change. But currently it uses requestAnimationFrame
, not a hardcoded 60 FPS, so you'd need to change that logic.
I wrote a post about the inner workings if you're interested https://medium.com/hackernoon/writing-an-easing-function-a-slightly-interesting-story-70ce667c212a
from easy-ease.
Related Issues (2)
- not working as expected HOT 5
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 easy-ease.