Added debug bool
Used to enable spamming of the player position in the browser console
This commit is contained in:
@@ -6,6 +6,8 @@ import * as Animations from './utils/animateMesh.js';
|
||||
let Clock = new THREE.Clock();
|
||||
THREE.Cache.enabled = true;//So we can request several time the same file without worrying : https://threejs.org/docs/#api/en/loaders/FileLoader
|
||||
|
||||
const APP_DEBUG = false;//Turn true to show player position in browser console
|
||||
|
||||
/* --------------------- */
|
||||
/* | SCENE CREATION | */
|
||||
/* --------------------- */
|
||||
@@ -38,6 +40,8 @@ Animations.addAnimationMixerOnMesh(assets.player, ["Walk"]);
|
||||
function animate() {
|
||||
requestAnimationFrame( animate );
|
||||
|
||||
if(APP_DEBUG)console.log("Player position X : "+assets.player.scene.position.x+ " Y : "+assets.player.scene.position.y);
|
||||
|
||||
PlayerMovement.updatePlayerPositionAnimation(assets.player, camera, scene);//Updating player position and rotation
|
||||
Animations.updateAnimations(Clock.getDelta());//Playing animations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user