```
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Simple 3D FPS Game</title>
    <style>
        body { margin: 0; overflow: hidden; }
        canvas { width: 100%; height: 100% }
    </style>
</head>
<body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
    <script>
    // Setup the scene, camera, and renderer
    const scene = new THREE.Scene();
    const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
    const renderer = new THREE.WebGLRenderer();
    renderer.setSize(window.innerWidth, window.innerHeight);
    document.body.appendChild(renderer.domElement);

    // Create a simple box geometry for the player
    const geometry = new THREE.BoxGeometry(1, 1, 1);
    const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
    const player = new THREE.Mesh(geometry, material);
    scene.add(player);

    // Position the camera at the player's "eyes"
    camera.position.set(0, 0.5, 0);
    player.add(camera);

    // Add some environment - a ground plane
    const planeGeometry = new THREE.PlaneGeometry(100, 100);
    const planeMaterial = new THREE.MeshBasicMaterial({ color: 0x808080, side: THREE.DoubleSide });
    const plane = new THREE.Mesh(planeGeometry, planeMaterial);
    plane.rotation.x = Math.PI / 2;
    scene.add(plane);

    // Add a target or enemy
    const enemyGeometry = new THREE.SphereGeometry(0.5, 32, 32);
    const enemyMaterial = new THREE.MeshBasicMaterial({ color: 0xff0000 });
    const enemy = new THREE.Mesh(enemyGeometry, enemyMaterial);
    enemy.position.set(10, 0.5, 10);
    scene.add(enemy);

    // Game logic
    const velocity = new THREE.Vector3();
    const direction = new THREE.Vector3();
    const speed = 0.1;

    // Key bindings
    const keys = {
        forward: false,
        backward: false,
        left: false,
        right: false
    };

    document.addEventListener('keydown', (event) => {
        switch(event.code) {
            case 'KeyW': keys.forward = true; break;
            case 'KeyS': keys.backward = true; break;
            case 'KeyA': keys.left = true; break;
            case 'KeyD': keys.right = true; break;
        }
    });

    document.addEventListener('keyup', (event) => {
        switch(event.code) {
            case 'KeyW': keys.forward = false; break;
            case 'KeyS': keys.backward = false; break;
            case 'KeyA': keys.left = false; break;
            case 'KeyD': keys.right = false; break;
        }
    });

    // Shooting mechanism (very basic)
    document.addEventListener('click', () => {
        const bullet = new THREE.Mesh(
            new THREE.SphereGeometry(0.1, 8, 8),
            new THREE.MeshBasicMaterial({color: 0xffff00})
        );
        bullet.position.copy(camera.position);
        bullet.quaternion.copy(camera.quaternion);
        scene.add(bullet);

        // Simple bullet movement
        const bulletSpeed = 0.5;
        function moveBullet() {
            bullet.translateZ(-bulletSpeed);
            if (bullet.position.distanceTo(enemy.position) < 0.6) {
                scene.remove(enemy);
                scene.remove(bullet);
            } else if (bullet.position.z < -50) {  // Remove bullet if too far
                scene.remove(bullet);
            } else {
                requestAnimationFrame(moveBullet);
            }
        }
        moveBullet();
    });

    // Animation loop
    function animate() {
        requestAnimationFrame(animate);

        // Update player position based on key states
        direction.z = Number(keys.forward) - Number(keys.backward);
        direction.x =  Number(keys.left) - Number(keys.right);
        direction.normalize(); // this ensures consistent movements in all directions

        if (keys.forward || keys.backward) velocity.z -= direction.z * speed;
        if (keys.left || keys.right) velocity.x -= direction.x * speed;

        player.translateX(velocity.x);
        player.translateZ(velocity.z);

        // Simple friction
        velocity.x *= 0.95;
        velocity.z *= 0.95;

        renderer.render(scene, camera);
    }

    animate();
    </script>
</body>
</html>
```

there are many many bugs here! one of it is the bullet shot from a fix place but not the place player at, and there are many many other bugs, fix it please!