From ed59f511f506fef172e76bd4b5b620db27ba66eb Mon Sep 17 00:00:00 2001 From: itorr Date: Sun, 28 Aug 2022 22:10:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=89=E5=85=B3=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E7=A1=AE=E6=98=BE=E7=A4=BA=E7=BA=A6?= =?UTF-8?q?=E4=BC=9A=E6=A8=A1=E5=BC=8F=E7=9A=84=E9=97=AE=E9=A2=98=20#42?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/deto.html | 14 +++++++++++++- html/document.less | 2 +- html/sakana.js | 5 ++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/html/deto.html b/html/deto.html index 22f54b9..0b04000 100644 --- a/html/deto.html +++ b/html/deto.html @@ -7,9 +7,21 @@ + -
+
diff --git a/html/document.less b/html/document.less index 44a721a..0e72cf9 100644 --- a/html/document.less +++ b/html/document.less @@ -138,7 +138,7 @@ html .single-box{ right:0; margin: 0 auto; } -html .center-bottom{ +html .deto{ position: absolute; bottom:0; left:0; diff --git a/html/sakana.js b/html/sakana.js index f6823e4..5494065 100644 --- a/html/sakana.js +++ b/html/sakana.js @@ -223,11 +223,10 @@ const Sakana = (_=>{ const runUnix = +new Date(); - const lastRunUnixDiff = runUnix - lastRunUnix; let _inertia = inertia; - - if(lastRunUnixDiff < 40){ // 如果单帧间隔超过 40ms 那就躺平不处理 + const lastRunUnixDiff = runUnix - lastRunUnix; + if(lastRunUnixDiff < 16){ // 如果单帧间隔超过 16ms 那就躺平不处理 _inertia = inertia / defaultFrameUnix * lastRunUnixDiff; } lastRunUnix = runUnix;