This commit is contained in:
Vitaly Turovsky 2025-04-06 00:14:37 +03:00
commit f27f2f0b43
2 changed files with 12 additions and 1 deletions

View file

@ -580,7 +580,7 @@ contro.on('release', ({ command }) => {
export const f3Keybinds: Array<{
key?: string,
action: () => void,
action: () => void | Promise<void>,
mobileTitle: string
enabled?: () => boolean
}> = [

View file

@ -34,6 +34,7 @@ const defaultOptions = {
touchButtonsOpacity: 80,
touchButtonsPosition: 12,
touchControlsPositions: getDefaultTouchControlsPositions(),
touchControlsSize: getTouchControlsSize(),
touchMovementType: 'modern' as 'modern' | 'classic',
touchInteractionType: 'classic' as 'classic' | 'buttons',
gpuPreference: 'default' as 'default' | 'high-performance' | 'low-power',
@ -138,6 +139,16 @@ function getDefaultTouchControlsPositions () {
} as Record<string, [number, number]>
}
function getTouchControlsSize () {
return {
joystick: 60,
action: 36,
break: 36,
jump: 36,
sneak: 36,
}
}
// const qsOptionsRaw = new URLSearchParams(location.search).getAll('setting')
const qsOptionsRaw = appQueryParamsArray.setting ?? []
export const qsOptions = Object.fromEntries(qsOptionsRaw.map(o => {