All Projects → AlloyTeam → Phytouch

AlloyTeam / Phytouch

Licence: mit
Smooth scrolling, rotation, pull to refresh, page transition and any motion for the web - 丝般顺滑的触摸运动方案

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to Phytouch

react-scroll-trigger
📜 React component that monitors scroll events to trigger callbacks when it enters, exits and progresses through the viewport. All callback include the progress and velocity of the scrolling, in the event you want to manipulate stuff based on those values.
Stars: ✭ 126 (-95.59%)
Mutual labels:  scrolling, scroll
Perspective
Powerful scrolling and motion parallax for iOS
Stars: ✭ 260 (-90.89%)
Mutual labels:  scrolling, motion
onscroll-effect
A tiny JavaScript library to enable CSS animations when user scrolls.
Stars: ✭ 35 (-98.77%)
Mutual labels:  scrolling, scroll
Moveto
A lightweight scroll animation javascript library without any dependency
Stars: ✭ 2,746 (-3.78%)
Mutual labels:  scroll, scrolling
volx-recyclerview-fast-scroll
An easy to use implementation for fast scroll recyclerview
Stars: ✭ 34 (-98.81%)
Mutual labels:  scrolling, scroll
react-is-scrolling
Simply detect if users are scrolling in your components in a declarative API
Stars: ✭ 17 (-99.4%)
Mutual labels:  scrolling, scroll
react-smart-scroll
Efficient rendering of long lists in React
Stars: ✭ 27 (-99.05%)
Mutual labels:  scrolling, scroll
Scroll Snap
↯ Snap page when user stops scrolling, with a customizable configuration and a consistent cross browser behaviour
Stars: ✭ 187 (-93.45%)
Mutual labels:  scroll, scrolling
use-scroll-direction
A simple, performant, and cross-browser hook for detecting scroll direction in your next react app.
Stars: ✭ 24 (-99.16%)
Mutual labels:  scrolling, scroll
EasyScrollDots
Single page scroll JavaScript plugin that allows for vertical navigation of page sections
Stars: ✭ 38 (-98.67%)
Mutual labels:  scrolling, scroll
V Bar
The virtual responsive crossbrowser scrollbar component for VueJS 2x
Stars: ✭ 216 (-92.43%)
Mutual labels:  scroll, scrolling
postcss-momentum-scrolling
PostCSS plugin add 'momentum' style scrolling behavior (-webkit-overflow-scrolling: touch) for elements with overflow (scroll, auto) on iOS
Stars: ✭ 69 (-97.58%)
Mutual labels:  touch, scroll
Stickyfill
Polyfill for CSS `position: sticky`
Stars: ✭ 2,252 (-21.09%)
Mutual labels:  scroll, scrolling
scroll-sync-react
A scroll syncing library for react that is up to date
Stars: ✭ 49 (-98.28%)
Mutual labels:  scrolling, scroll
React Indiana Drag Scroll
React component which implements scrolling via holding the mouse button or touch
Stars: ✭ 190 (-93.34%)
Mutual labels:  scroll, scrolling
NoobScroll
A lightweight jQuery Plugin that add some cool function to make scrolling more fun [Archive]
Stars: ✭ 43 (-98.49%)
Mutual labels:  scrolling, scroll
Scroll Js
Light cross-browser scroller that uses native javascript
Stars: ✭ 179 (-93.73%)
Mutual labels:  scroll, scrolling
Infinitescroll
Infinite Scroll (Endless Scrolling) for RecyclerView in Android
Stars: ✭ 183 (-93.59%)
Mutual labels:  scroll, scrolling
really-smooth-scroll
A script that smoothen scrolling in the browser
Stars: ✭ 21 (-99.26%)
Mutual labels:  scrolling, scroll
scrollparent.js
A function to get the scrolling parent of an html element.
Stars: ✭ 51 (-98.21%)
Mutual labels:  scrolling, scroll

PhyTouch

丝般顺滑的触摸运动方案

Smooth scrolling, rotation, pull to refresh and any motion for the web.

Install

npm install phy-touch

Usage

var phyTouch = new PhyTouch({
  touch:"#wrapper",//反馈触摸的dom
  vertical: true,//不必需,默认是true代表监听竖直方向touch
  target: { y: 0 }, //运动的对象
  property: "y",  //被运动的属性
  min: 100, //不必需,运动属性的最小值
  max: 2000, //不必需,滚动属性的最大值
  sensitivity: 1,//不必需,触摸区域的灵敏度,默认值为1,可以为负数
  factor: 1,//不必需,表示触摸位移运动位移与被运动属性映射关系,默认值是1
  moveFactor: 1,//不必需,表示touchmove位移与被运动属性映射关系,默认值是1
  step: 45,//用于校正到step的整数倍
  bindSelf: false,
  maxSpeed: 2, //不必需,触摸反馈的最大速度限制 
  value: 0,
  change:function(value){ 
    target.style.transform = "translate(0," + value + "px)"
    target.style.webkitTransform = "translate(0," + value + "px)"
  }, 
  touchStart:function(evt, value){  },
  touchMove:function(evt, value){  },
  touchEnd:function(evt,value){  },
  tap:function(evt, value){  },
  pressMove:function(evt, value){  },
  animationEnd:function(value){  } //运动结束
})

通过对象的实例可以自行运动DOM:

phyTouch.to(value, time, ease)
  • value是必填项
  • time是非必填项,默认值是600
  • ease是非必填项,默认值是先加速后减速的运动函数,CSS版本默认值是cubic-bezier(0.1, 0.57, 0.1, 1)

通过对象的实例可以自行停止DOM运动:

phyTouch.stop()

Demo(Mobile)

Related links

License

This content is released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].