This commit is contained in:
Mylloon 2022-11-24 18:58:45 +01:00
parent f3aad63918
commit 80cf9d6e80
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 5 additions and 5 deletions

View file

@ -1,7 +1,7 @@
import { Cube } from "./Cube.js";
import { Rotation } from "./utils.js";
export class Joueur extends Cube {
export class Player extends Cube {
constructor(color) {
super(color, "assets/images/player.png");

View file

@ -1,6 +1,6 @@
import { Env } from "./Env.js";
import { Plane } from "./Plane.js";
import { Joueur } from "./player.js";
import { Player } from "./Player.js";
window.addEventListener("load", () => main());
@ -17,10 +17,10 @@ const main = () => {
);
env.addToScene(plan);
const joueur = new Joueur(THREE.Color.NAMES.red);
env.addToScene(joueur);
const player = new Player(THREE.Color.NAMES.red);
env.addToScene(player);
addEventListener("keypress", joueur.controlUser);
addEventListener("keypress", player.controlUser);
/**
* Run the game