Comments (2)
damping
is used to simulate the spring effect in a naive way
Let's try it in pull-element playground
Said we start touching in here
What if the damping
value is 1
It shows that the moving distance is almost equal to the distance of the user's touch-move. It may be too sensitive, sometimes boring.
What if the damping
value is 1.6
It looks like there exists a reaction force interacting with the user.
What if the damping
value is 4
Oh, too sluggish! It's hard to move an element. the user got a bad experience.
The default value 1.6 is selected by my testing, we can change the value when it doesn't make sense.
from pull-element.
Woah thanks for the great explanation. So it's almost a bit like "friction" so the touch isn't a 1/1 but feels like there is some kind of resistance to it. Hope I understood that correct, thanks once again 👍
from pull-element.
Related Issues (6)
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 pull-element.