Standalone Minecraft-style voxel demo (single HTML + generator)#3
Open
hzsw1234 wants to merge 1 commit into
Open
Standalone Minecraft-style voxel demo (single HTML + generator)#3hzsw1234 wants to merge 1 commit into
hzsw1234 wants to merge 1 commit into
Conversation
Single-file demo with procedural terrain, biomes, caves, trees, ruins, chunk meshes, day/night cycle, mobs, combat, mining/placing, hotbar, and data-driven tables. Python generator expands meaningful lookup tables; HTML exceeds 3000 lines. Fix UV mapping, chunk border rebuilds, spawn chunk loading, and melee hit detection. Co-authored-by: hzsw1234 <hzsw1234@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a standalone single-file voxel sandbox at the repo root:
minecraft-clone.html. It is not wired into existing static pages; open the file in a browser (with network for the Three.js import map CDN).Contents
minecraft-clone.html(~3960 lines): Three.js module game — procedural terrain (2D/3D noise, biomes, height table), caves, ores, trees, rare ruin pillars + crafting table, merged chunk meshes with atlas UVs, day/night sky and fog, zombies/skeletons/spiders/creepers (colored boxes), mining/placing, hotbar, hunger/health, particles, respawn.tools/generate_minecraft_clone.py: Regenerates the large embedded data sections (biome LUT, ore depth weights, sky stops, spawn weights, decoration rules, structure offsets, crafting recipes, block defs, drop table) plus the engine source, then splices into HTML if the marker/* ==== MC_CLONE_CHUNK_MARKER_START ==== */is present in a template. The committed HTML is already fully expanded so the script is optional for edits.Fixes applied in the shipped HTML
world.updateAroundbefore spawn so ground query sees terrain.keys.Mouse0).How to run
Serve the file or open via
file://(import map may require a local server depending on browser). Example:python3 -m http.serverin the repo root, then open/minecraft-clone.html.