Skip to content

Commit

Permalink
有关移动端无法正确显示约会模式的问题 itorr#42
Browse files Browse the repository at this point in the history
  • Loading branch information
itorr committed Aug 28, 2022
1 parent 39e8414 commit ed59f51
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
14 changes: 13 additions & 1 deletion html/deto.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@
<meta name="description" content="Lycoris Recoil,リコリス・リコイル,莉可丽丝,石蒜虚拟器,石蒜模拟器,锦木千束,錦木千束,井之上泷奈,井ノ上たきな,神奇海螺试验场">
<link rel="stylesheet" href="document.css">
<link rel="apple-touch-icon" href="takina.png">
<style>
@media (max-width:800px) {
.deto{
transform: scale(0.6);
transform-origin: 50% 100%;
margin: 0 -100px;
}
html .deto>div{
margin: 0 -120px;
}
}
</style>
</head>
<body>
<div class="center-bottom">
<div class="deto">
<div class="takina"></div>
<div class="chisato"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion html/document.less
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ html .single-box{
right:0;
margin: 0 auto;
}
html .center-bottom{
html .deto{
position: absolute;
bottom:0;
left:0;
Expand Down
5 changes: 2 additions & 3 deletions html/sakana.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ed59f51

Please sign in to comment.