Build a complete browser-based first-person 3D environment using the latest stable version of Three.js. The user must be able to move freely through the environment using the WASD keys for directional movement and the mouse for camera rotation through pointer lock controls. The implementation must not include any overlays, popups, or interactive prompts such as “Click to Begin.” Implement a camera soldier system that maintains a human-scale eye height, smooth acceleration, head stability, and accurate step height relative to the ground. Include a visible textured ground plane that spans a large enough area for continuous movement. Place one static 3D object within the scene positioned as a navigation obstacle. Include a complete lighting setup using a combination of directional light and hemispheric light to achieve visible illumination across all geometry. Implement smooth movement physics that remain consistent under variable frame rates by using delta-time-based integration. Ensure collision handling between the player controller and static geometry so that the user cannot pass through solid objects. Maintain correct visual proportions and perspective under all window resizing events by recalculating aspect ratio and updating the camera projection matrix dynamically. Use current JavaScript and Three.js best practices with explicit import statements from the most recent stable module URLs. All variable names must follow consistent camelCase naming. All functions must include concise, technically accurate code comments describing their purpose and behavior. Use strict typing where possible, avoid global variables, and ensure deterministic behavior of the main animation loop driven by requestAnimationFrame. The program must execute without console warnings, syntax errors, or deprecated API usage.
cf7fe6f
verified