From 5d8ef56686fbda774f0ca7bd035c6ef3b9efc2ff Mon Sep 17 00:00:00 2001 From: mt Date: Wed, 8 Jan 2020 18:04:33 +0100 Subject: [PATCH] Restore script.js --- README.md | 3 - scanimation/interfaces/animation/script.js | 321 ++++----------------- 2 files changed, 56 insertions(+), 268 deletions(-) diff --git a/README.md b/README.md index d514728..df11378 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,3 @@ Listen 8888 ``` requires `a2enmod rewrite proxy proxy_http proxy_wstunnel` - - -s \ No newline at end of file diff --git a/scanimation/interfaces/animation/script.js b/scanimation/interfaces/animation/script.js index 75fecee..8ed9a37 100644 --- a/scanimation/interfaces/animation/script.js +++ b/scanimation/interfaces/animation/script.js @@ -1,288 +1,79 @@ - - - - - - - - - - - - - - - - - - - - -Sign in ยท GitLab - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - + function update(step){ + if (imgs.length < 1) return; + if (current_frame == (imgs.length-1)) forward = false + else if (current_frame == 0) forward = true + forward ? current_frame++ : current_frame-- -
- - + ctx.drawImage(imgs[current_frame], 0, 0) + // console.log(current_frame) + } + + + function timeStamp(){ return window.performance && window.performance.now ? window.performance.now() : new Date().getTime() }