diff --git a/index.ts b/index.ts index d9144f8..bc9475c 100755 --- a/index.ts +++ b/index.ts @@ -103,7 +103,7 @@ app.get('/login', (req, res) => { }); app.get('/room', (req, res) => { - const player_email = req.query['player_email']; + const player_email = req.query['player_email'] + ''; const room_id = req.query['room_id']+''; const response = new Response(); diff --git a/src/Player.ts b/src/Player.ts index 83e86ef..4af4371 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -39,7 +39,7 @@ export class Player { this.#_mesh.position = new Vector3(); this.position = this.#_mesh.position; - const ship = new Texture("/ship.png"); + const ship = new Texture("ship.png"); this.#_meshMaterial = new StandardMaterial("playerMaterial", scene); this.#_meshMaterial.diffuseTexture = ship; this.#_meshMaterial.diffuseTexture.hasAlpha = true; diff --git a/src/Room.ts b/src/Room.ts index 76f2fba..b81cec6 100644 --- a/src/Room.ts +++ b/src/Room.ts @@ -30,7 +30,7 @@ export default class Room { scene ); - const gridTexture = new Texture('/bg/grid.png'); + const gridTexture = new Texture('bg/grid.png'); this.roomMaterial = new StandardMaterial('roomMaterial', scene); this.roomMaterial.diffuseTexture = gridTexture; @@ -77,7 +77,7 @@ export default class Room { delete this.players[player_username]; } - player_is_here(playerUsername) { + player_is_here(playerUsername: string) { return !(Object.keys(this.players).indexOf(playerUsername) === -1); } diff --git a/src/stage/Environment.ts b/src/stage/Environment.ts index a91edce..20bbbfc 100644 --- a/src/stage/Environment.ts +++ b/src/stage/Environment.ts @@ -23,7 +23,7 @@ class Environment { this.skybox.position.set(0, 0, 20); if(!skyboxMaterial){ - const texture = new Texture("/bg/pn-2.png", this.scene); + const texture = new Texture("bg/pn-2.png", this.scene); skyboxMaterial = new StandardMaterial("skybox", this.scene); skyboxMaterial.diffuseTexture = texture;