AlloyTouch是 60FPS的丝般顺滑的触摸运动方案。
特征
高度抽象的组件
真实的触摸反馈
与样式布局无关的设计
简洁的API设计
高效率的运动方式
真实的物理运动轨迹
API
ew AlloyTouch({ touch:"#wrapper",//反馈触摸的dom vertical: true,//不必需,默认是true代表监听竖直方向touch target: target, //运动的对象 property: "traslateY", //被运动的属性 sesitivity: 1,//不必需,触摸区域的灵敏度,默认值为1,可以为负数 factor: 1,//不必需,表示触摸位移与被运动属性映射关系,默认值是1 mi: 100, //不必需,运动属性的最小值 max: 2000, //不必需,滚动属性的最大值 sprig: true, //不必需,是否有回弹效果。默认是true chage:fuctio(){ }, //不必需,属性改变的回调 touchStart:fuctio(value){ }, touchMove:fuctio(value){ }, touchEd:fuctio(value){ }, reboudEd:fuctio(value){ } //回弹结束 })Demo
SimpleDemo: https://alloyteam.github.io/AlloyTouch/
3DDemo: https://alloyteam.github.io/AlloyTouch/3d.html
RotateDemo: https://alloyteam.github.io/AlloyTouch/rotate.html
CarouselDemo:https://alloyteam.github.io/AlloyTouch/carousel.html










评论