Загрузка данных


Build a fully playable, single-file HTML/JS 3D physics sandbox game inspired by Garry's Mod using Three.js and Cannon.js (or Rapier.js). Do not ask clarifying questions, proceed directly to complete working code.

Requirements:
1. ENVIRONMENT & GRAPHICS:
   - A bright, clean sandbox arena with a grid-textured floor, skybox with sunlight/shadows, and outer boundary walls.
   - Smooth 60FPS WebGL render pipeline.

2. CONTROLS (FPS Style):
   - First-person controls (WASD to move, Space to jump, Shift to sprint, Mouse to look with Pointer Lock on click).

3. PHYSICS & TOOLS (The Physics Gun):
   - Player holds a glowing 3D Physics Gun model on screen.
   - Left Click / Hold: Shoot a beam to freeze/grab any physics object in 3D space, drag it smoothly around with the beam attached, and scroll mouse wheel to push/pull it closer or further.
   - Right Click: Freeze the held object firmly in air (zero gravity mode for that prop).
   - "E" Key: Pick up / drop lightweight props directly.
   - "G" Key: Blast/Launch held object forward with high force.

4. SPAWN MENU (GMod-style UI):
   - Press "Q" or "Tab" to toggle an overlay Spawn Menu.
   - Allow spawning various shapes and props with different physical properties:
     * Basic Primitives (Cubes, Spheres, Cylinders, Ramps).
     * Interactive Objects (Explosive Barrels with particle fire effects on impact, Ragdoll-like connected wooden figures, Bouncy balls, Heavy metal blocks).
     * Thrusters / Wheels: Props that push forward automatically when spawned.
   - Clear All button and Gravity toggle slider (Moon gravity / Earth gravity / Zero-G).

5. SOUND & VISUAL EFFECTS:
   - Web Audio API procedural sound effects for Physics Gun beam, prop impacts/collisions, explosion sounds, and jump/footsteps.
   - Dynamic particle effects when barrels explode or props hit surfaces at high velocity.

Return ONLY a single, completely self-contained HTML file containing all HTML, CSS, JavaScript, WebGL libraries via CDN, and inline assets. Ensure zero bugs and immediate playability when opened in any modern browser.