Files
minecraft-clone/index.html
T
minecraft-cloneandClaude f009789c42 feat: shadows, baked vertex AO, post-processing + central config.js
Visuals:
- PCFSoftShadowMap (2048²), directional light follows player with a tight
  shadow frustum (SHADOW_AREA) for high texel density; opak blocks cast+receive,
  water receives.
- Baked vertex ambient occlusion ("smooth lighting"): per-vertex solid-neighbor
  lookup (0fps algorithm) written into a color attribute, with flip-triangulation
  to avoid brightness seams across quad diagonals.
- EffectComposer: RenderPass -> UnrealBloomPass (subtle) -> OutputPass with
  ACES filmic tone-mapping + sRGB. HalfFloat render target (anti-banding) + MSAA.

Controls:
- Sprint moved from Ctrl to Shift (Ctrl is problematic in browsers). Shift in
  fly mode still means "descend" (no conflict, sprint only applies when walking).

config.js:
- New central js/config.js for all tweakable values (world, performance,
  renderer/tone-mapping, sky & fog, camera, lighting, shadows, bloom, AO,
  player physics, mouse sensitivity, reach) with SHADOWS_ENABLED / BLOOM_ENABLED
  feature toggles. Structural engine constants stay in constants.js.
- SEA_LEVEL / WORLD_SEED moved constants.js -> config.js (consumers rewired).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-21 00:46:03 +02:00

45 lines
1.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Minecraft Clone</title>
<link rel="stylesheet" href="style.css" />
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.165.0/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.165.0/examples/jsm/",
"simplex-noise": "https://cdn.jsdelivr.net/npm/simplex-noise@4.0.1/dist/esm/simplex-noise.js"
}
}
</script>
</head>
<body>
<!-- Lade-/Start-Overlay -->
<div id="overlay">
<div class="panel">
<h1>Minecraft Clone</h1>
<p>Klicke, um zu starten.</p>
<div class="keys">
<div><b>WASD</b> Laufen &nbsp; <b>Leertaste</b> Springen</div>
<div><b>Maus</b> Umsehen &nbsp; <b>Shift</b> Sprint / Runter (Fly)</div>
<div><b>Linke Maustaste</b> Abbauen &nbsp; <b>Rechte Maustaste</b> Setzen</div>
<div><b>F</b> Flug-Modus &nbsp; <b>1–6</b> Block wählen &nbsp; <b>Esc</b> Pause</div>
</div>
</div>
</div>
<!-- Crosshair -->
<div id="crosshair"></div>
<!-- Hotbar -->
<div id="hotbar"></div>
<!-- Debug-HUD -->
<div id="hud"></div>
<script type="module" src="js/main.js"></script>
</body>
</html>