UNPKG

hae

Version:

Mobile web UI based on Vux

22 lines (18 loc) 596 B
export function getElement (expr) { return (typeof expr === 'string') ? document.querySelector(expr) : expr } export function getComputedStyle (el, key) { var computedStyle = window.getComputedStyle(el) return computedStyle[key] || '' } // Easing Equations (c) 2003 Robert Penner, all rights reserved. // Open source under the BSD License. export function easeOutCubic (pos) { return (Math.pow((pos - 1), 3) + 1) } export function easeInOutCubic (pos) { if ((pos /= 0.5) < 1) { return 0.5 * Math.pow(pos, 3) } return 0.5 * (Math.pow((pos - 2), 3) + 2) }