function easeOutBounce (x) { var base = -Math.cos(x * (0.5 * Math.PI)) + 1; var rate = Math.pow(base,1.5); var rateR = Math.pow(1 - x, 2); var progress = -Math.abs(Math.cos(rate * (2.5 * Math.PI) )) + 1; return (1- rateR) + (progress * rateR); } var timing, timingProps = { type: 'delayed', duration: 150, start: 'autostart', pathTimingFunction: Vivus.LINEAR, animTimingFunction: Vivus.LINEAR }; function timingTest (buttonEl, property, type) { var activeSibling = buttonEl.parentNode.querySelector('button.active'); activeSibling.classList.remove('active'); buttonEl.classList.add('active'); timingProps.type = (property === 'type') ? type : timingProps.type; timingProps.pathTimingFunction = (property === 'path') ? Vivus[type] : timingProps.pathTimingFunction; timingProps.animTimingFunction = (property === 'anim') ? Vivus[type] : timingProps.animTimingFunction; timing && timing.stop().destroy(); timing = new Vivus('timing-example', timingProps); } var hi = new Vivus('hi-there', {type: 'delayed', duration: 700, start: 'autostart', dashGap: 200, forceRender: false}, function () { // if (window.console) { // console.log('Animation finished. [log triggered from callback]'); // } }), hi2 = new Vivus('hi2-there', {type: 'delayed', duration: 700, start: 'autostart', dashGap: 200, forceRender: false}, obt1 = new Vivus('obturateur1', {type: 'delayed', duration: 150}), obt2 = new Vivus('obturateur2', {type: 'sync', duration: 150}), obt3 = new Vivus('obturateur3', {type: 'oneByOne', duration: 150}), pola = new Vivus('polaroid', {type: 'scenario-sync', duration: 20, forceRender: false}); */?>