buen dìa. Tengo un error en la sintaxis me aparece este error en Javascript intentando mover un cubo con las letras del teclado "Uncaught SyntaxError: Identifier 'keyController' has already been declared (at linea 35)".
Este es mi archivo keyController donde da el error
const keyController = new KeyController()
export default keyController
export{ KeyController }
Y este el index.js
import camera from './basic/Camera.js';
import light from './basic/Light.js';
import renderer from './basic/Renderer.js';
import scene from './basic/Scene.js';
import resize from './basic/Resize.js';
import cube from './basic/shapes/Cube.js';
import plane from './basic/shapes/Plane.js'
import loopMachine from './basic/LoopMachine.js';
import keyListener from './basic/keyListener.js';
import { keyCode } from './basic/KeyCode.js';
import characterController from './controller/CharacterController.js';
import keyController from './controller/KeyController.js';
import moveController from './controller/MoveController.js';
scene.add(cube);
scene.add(light);
scene.add(plane);
camera.position.set(2,2,2);
camera.lookAt(cube.position);
characterController.addCharacter(cube)
characterController.addController(keyController)
characterController.addController(moveController)
loopMachine.addCallback(() => {
if(keyListener.isPressed(keyCode.ENTER)) cube.rotation.y += 0.01;
renderer.render(scene, camera);
});
resize.start(renderer);
loopMachine.start();
keyListener.start();
characterController.start()