Git Product home page Git Product logo

Comments (2)

Lucifier129 avatar Lucifier129 commented on July 30, 2024 1

damping is used to simulate the spring effect in a naive way

image

Let's try it in pull-element playground

Said we start touching in here

01

What if the damping value is 1

02

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

03

It looks like there exists a reaction force interacting with the user.

What if the damping value is 4

04

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.

garygreen avatar garygreen commented on July 30, 2024 1

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.