- fix bug resize 3d home page
    - fix bug selection on mobile mode in online game
This commit is contained in:
Kum1ta
2024-09-27 22:00:23 +02:00
parent 7d319d020b
commit 6f409e7476
5 changed files with 59 additions and 22 deletions

View File

@ -6,11 +6,10 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/18 00:30:31 by edbernar #+# #+# */
/* Updated: 2024/09/27 21:16:32 by edbernar ### ########.fr */
/* Updated: 2024/09/27 21:21:02 by edbernar ### ########.fr */
/* */
/* ************************************************************************** */
import { isMobile } from '/static/javascript/main.js'
import * as THREE from '/static/javascript/three/build/three.module.js'
/*
@ -71,8 +70,6 @@ class Player
this.opponent = opponent;
if (playerExist)
throw Error("Player is already init.");
if (isMobile)
showGamePad();
playerExist = true;
isOnPointAnim = false;
pressedButton = [];
@ -92,6 +89,11 @@ class Player
document.addEventListener('keypress', simplePressKey);
}
mobileMode()
{
showGamePad();
}
dispose()
{
playerExist = false;