Game - Push

This commit is contained in:
hubourge
2024-08-30 16:51:28 +02:00
parent e3a1db286d
commit 0a7f6eacfa
3 changed files with 57 additions and 15 deletions

View File

@ -3,16 +3,15 @@
/* ::: :::::::: */
/* Ball.js :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/28 15:58:03 by edbernar #+# #+# */
/* Updated: 2024/08/29 13:45:02 by edbernar ### ########.fr */
/* Updated: 2024/08/30 16:01:52 by hubourge ### ########.fr */
/* */
/* ************************************************************************** */
import * as THREE from 'three';
import { wallTop, wallBottom } from './Map.js';
import { player1, player2 } from './Players.js';
let ball = null;
let speed = 0.15;
@ -26,7 +25,7 @@ class Ball
ball = createBall();
scene.add(ball);
ball.rotateY(2.39);
ball.rotateY(2.39);
}
static dispose()
@ -53,4 +52,4 @@ function createBall()
return (mesh);
}
export { Ball, ball };
export { Ball, ball };