소스 검색

Make the scroll-button speed proportional to world size

master
Fen Dweller 6 년 전
부모
커밋
21b80784e1
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. +4
    -2
      macrovision.js

+ 4
- 2
macrovision.js 파일 보기

@@ -1670,12 +1670,14 @@ function setHelpDate() {
}

function doYScroll() {
config.y += scrollDirection / 180;
const worldHeight = config.height.toNumber("meters");
config.y += scrollDirection * worldHeight / 180;
updateSizes();
scrollDirection *= 1.05;
}
function doXScroll() {
config.x += scrollDirection / 180;
const worldWidth = config.height.toNumber("meters") / canvasHeight * canvasWidth;
config.x += scrollDirection * worldWidth / 180 ;
updateSizes();
scrollDirection *= 1.05;
}


불러오는 중...
취소
저장