From d82d65677b451cf9696cbf96970105366f950bfb Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 24 Nov 2022 21:01:14 +0100 Subject: [PATCH] move the position.x to the cube --- js/Cube.js | 3 +++ js/Player.js | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/Cube.js b/js/Cube.js index 5c64549..739c69a 100644 --- a/js/Cube.js +++ b/js/Cube.js @@ -17,5 +17,8 @@ export class Cube extends Element { // Create shadows this.data.castShadow = true; + + // Move up + this.data.position.y = 0.5; } } diff --git a/js/Player.js b/js/Player.js index 70fd57f..d8aedcf 100644 --- a/js/Player.js +++ b/js/Player.js @@ -5,7 +5,6 @@ export class Player extends Cube { constructor(color) { super(color, "assets/images/player.png"); - this.data.position.y = 0.5; this.data.position.x = -2; this.data.rotation.x = this.gameRotation;