第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

better-scroll 插件源碼中 momentum 函數(shù) ,動量公式推導的?如何學習呢

better-scroll 插件源碼中 momentum 函數(shù) ,動量公式推導的?如何學習呢

Arey_jy 2017-08-22 11:56:31
//?this.x,?this.startX,?duration,?this.maxScrollX|Y,?this.options.bounce???this.wrapperWidth|Height?:?0,?this.options???? export?function?momentum(current,?start,?time,?lowerMargin,?wrapperSize,?options)?{???? let?distance?=?current?-?start;???? let?speed?=?Math.abs(distance)?/?time;???? //??deceleration?=?0.001,?itemHeight,?swipeBounceTime?=?1200,?bounceTime?=?700???? let?{deceleration,?itemHeight,?swipeBounceTime,?bounceTime}?=?options;???? //?swipeTime?=?2500???? let?duration?=?options.swipeTime;???? let?rate?=?options.wheel???4?:?15;???? //????? //?(distance?<?0???-1?:?1)?判斷往上滾動,還是往下滾動???? let?destination?=?current?+?speed?/?deceleration?*?(distance?<?0???-1?:?1);???? if?(options.wheel?&&?itemHeight)?{???? destination?=?Math.round(destination?/?itemHeight)?*?itemHeight;???? }???? //?destination?<?lowerMargin判斷往(下|右)方向,?destination?>?0?相反???? if?(destination?<?lowerMargin)?{???? //????? destination?=?wrapperSize???lowerMargin?-?(wrapperSize?/?rate?*?speed)?:?lowerMargin;???? duration?=?swipeBounceTime?-?bounceTime;???? }?else?if?(destination?>?0)?{???? //???? destination?=?wrapperSize???wrapperSize?/?rate?*?speed?:?0;???? duration?=?swipeBounceTime?-?bounceTime;???? }???? return?{???? destination:?Math.round(destination),???? duration???? };???? };
查看完整描述

目前暫無任何回答

  • 0 回答
  • 0 關(guān)注
  • 1905 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號